summaryrefslogtreecommitdiff
path: root/libavcodec/msmpeg4.c
diff options
context:
space:
mode:
authorWolfgang Hesseler <qv@multimediaware.com>2003-02-16 23:05:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-02-16 23:05:38 +0000
commit7604246d1a27a0c32e036bb01704787c435fa153 (patch)
tree7ea7cf2a9983f549dc42b1b4d178097ab3579405 /libavcodec/msmpeg4.c
parent0a6de063b05088c9c9556f0aefd2171906e8baf4 (diff)
more #ifdef CONFIG_ENCODERS patch by (Wolfgang Hesseler <qv at multimediaware dot com>) with modifications by me (s/WOLFGANG/CONFIG_ENCODERS/ and some other fixes)
Originally committed as revision 1588 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/msmpeg4.c')
-rw-r--r--libavcodec/msmpeg4.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index d7e3ecc7e4..2183b9d3a0 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -53,16 +53,22 @@
static uint32_t v2_dc_lum_table[512][2];
static uint32_t v2_dc_chroma_table[512][2];
+#ifdef CONFIG_ENCODERS
static inline void msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
+#endif //CONFIG_ENCODERS
static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
int n, int coded, const uint8_t *scantable);
static int msmpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);
static int msmpeg4_decode_motion(MpegEncContext * s,
int *mx_ptr, int *my_ptr);
+#ifdef CONFIG_ENCODERS
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val);
+#endif //CONFIG_ENCODERS
static void init_h263_dc_for_msmpeg4(void);
static inline void msmpeg4_memsetw(short *tab, int val, int n);
+#ifdef CONFIG_ENCODERS
static int get_size_of_code(MpegEncContext * s, RLTable *rl, int last, int run, int level, int intra);
+#endif //CONFIG_ENCODERS
static int msmpeg4v12_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]);
@@ -185,6 +191,8 @@ static void common_init(MpegEncContext * s)
}
}
+#ifdef CONFIG_ENCODERS
+
/* build the table which associate a (x,y) motion vector to a vlc */
static void init_mv_table(MVTable *tab)
{
@@ -433,6 +441,8 @@ void msmpeg4_encode_ext_header(MpegEncContext * s)
}
}
+#endif //CONFIG_ENCODERS
+
/* predict coded block */
static inline int coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block_ptr)
{
@@ -460,6 +470,8 @@ static inline int coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_bl
return pred;
}
+#ifdef CONFIG_ENCODERS
+
static void msmpeg4_encode_motion(MpegEncContext * s,
int mx, int my)
{
@@ -624,6 +636,8 @@ void msmpeg4_encode_mb(MpegEncContext * s,
}
}
+#endif //CONFIG_ENCODERS
+
/* old ffmpeg msmpeg4v3 mode */
static void ff_old_msmpeg4_dc_scale(MpegEncContext * s)
{
@@ -817,6 +831,8 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n,
#define DC_MAX 119
+#ifdef CONFIG_ENCODERS
+
static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr)
{
int sign, code;
@@ -1009,6 +1025,8 @@ else
}
}
+#endif //CONFIG_ENCODERS
+
/****************************************/
/* decoding stuff */
@@ -1391,6 +1409,8 @@ static inline void msmpeg4_memsetw(short *tab, int val, int n)
tab[i] = val;
}
+#ifdef CONFIG_ENCODERS
+
static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
{
int range, bit_size, sign, code, bits;
@@ -1424,6 +1444,8 @@ static void msmpeg4v2_encode_motion(MpegEncContext * s, int val)
}
}
+#endif //CONFIG_ENCODERS
+
/* this is identical to h263 except that its range is multiplied by 2 */
static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
{