/*
* MSMPEG4 backend for ffmpeg encoder and decoder
- * Copyright (c) 2001 Fabrice Bellard.
+ * Copyright (c) 2001 Fabrice Bellard
* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
*
* msmpeg4v1 & v2 stuff by Michael Niedermayer <michaelni@gmx.at>
*/
/**
- * @file msmpeg4.c
+ * @file libavcodec/msmpeg4.c
* MSMPEG4 backend for ffmpeg encoder and decoder.
*/
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static void init_h263_dc_for_msmpeg4(void);
static inline void msmpeg4_memsetw(short *tab, int val, int n);
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
#endif //CONFIG_ENCODERS
#include "msmpeg4data.h"
-#ifdef CONFIG_ENCODERS //strangely gcc includes this even if it is not references
+#if CONFIG_ENCODERS //strangely gcc includes this even if it is not referenced
static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2];
#endif //CONFIG_ENCODERS
s->y_dc_scale_table= wmv1_y_dc_scale_table;
s->c_dc_scale_table= wmv1_c_dc_scale_table;
break;
-#if defined(CONFIG_WMV3_DECODER)||defined(CONFIG_VC1_DECODER)
+#if CONFIG_WMV3_DECODER || CONFIG_VC1_DECODER
case 6:
s->y_dc_scale_table= wmv3_dc_scale_table;
s->c_dc_scale_table= wmv3_dc_scale_table;
}
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
/* build the table which associate a (x,y) motion vector to a vlc */
static void init_mv_table(MVTable *tab)
return pred;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
void ff_msmpeg4_encode_motion(MpegEncContext * s,
int mx, int my)
necessitate to modify mpegvideo.c. The problem comes from the
fact they decided to store the quantized DC (which would lead
to problems if Q could vary !) */
-#if (defined(ARCH_X86)) && !defined PIC
- asm volatile(
+#if ARCH_X86 && !defined PIC
+ __asm__ volatile(
"movl %3, %%eax \n\t"
"shrl $1, %%eax \n\t"
"addl %%eax, %2 \n\t"
: "%eax", "%edx"
);
#else
- /* #elif defined (ARCH_ALPHA) */
+ /* #elif ARCH_ALPHA */
/* Divisions are extremely costly on Alpha; optimize the most
common case. But they are costly everywhere...
*/
s->decode_mb= msmpeg4v34_decode_mb;
break;
case 5:
- if (ENABLE_WMV2_DECODER)
+ if (CONFIG_WMV2_DECODER)
s->decode_mb= ff_wmv2_decode_mb;
case 6:
//FIXME + TODO VC1 decode mb
tab[i] = val;
}
-#ifdef CONFIG_ENCODERS
+#if CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
{
int range, bit_size, sign, code, bits;
int n, int coded, const uint8_t *scan_table)
{
int level, i, last, run, run_diff;
- int dc_pred_dir;
+ int av_uninit(dc_pred_dir);
RLTable *rl;
RL_VLC_ELEM *rl_vlc;
int qmul, qadd;