aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac2002-05-27 16:42:14 +0000
committerZdenek Kabelac2002-05-27 16:42:14 +0000
commitcd4af68ad54c189205175a6874f81844fa9a0ba2 (patch)
tree31b95874aa2f0fe240b4ffd2c9c599a081ed00e7
parentc0eb0bb717eee510b47da4bccdd3307a608e034c (diff)
* started to cleanup name clashes for onetime compilation
Originally committed as revision 617 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/imgconvert.c2
-rw-r--r--libavcodec/jfdctfst.c7
-rw-r--r--libavcodec/jrevdct.c3
-rw-r--r--libavcodec/mjpeg.c14
-rw-r--r--libavcodec/mpegaudio.c2
-rw-r--r--libavcodec/mpegaudiodec.c11
-rw-r--r--libavcodec/mpegvideo.h7
-rw-r--r--libavcodec/msmpeg4.c36
-rw-r--r--libavcodec/pcm.c28
-rw-r--r--libavcodec/simple_idct.c2
-rw-r--r--libavcodec/utils.c18
11 files changed, 79 insertions, 51 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 18dc90a2c1..04300744f1 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -548,3 +548,5 @@ int avpicture_deinterlace(AVPicture *dst, AVPicture *src,
}
return 0;
}
+
+#undef FIX
diff --git a/libavcodec/jfdctfst.c b/libavcodec/jfdctfst.c
index cdc3b47f99..25d0d227d9 100644
--- a/libavcodec/jfdctfst.c
+++ b/libavcodec/jfdctfst.c
@@ -222,3 +222,10 @@ jpeg_fdct_ifast (DCTELEM * data)
dataptr++; /* advance pointer to next column */
}
}
+
+
+#undef GLOBAL
+#undef CONST_BITS
+#undef DESCALE
+#undef FIX_0_541196100
+#undef FIX_1_306562965
diff --git a/libavcodec/jrevdct.c b/libavcodec/jrevdct.c
index 246f1b190a..3ba91543de 100644
--- a/libavcodec/jrevdct.c
+++ b/libavcodec/jrevdct.c
@@ -1166,4 +1166,5 @@ void j_rev_dct(DCTBLOCK data)
}
}
-
+#undef FIX
+#undef CONST_BITS
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 72c8c7fed4..016ccd7307 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -456,8 +456,8 @@ void mjpeg_picture_trailer(MpegEncContext *s)
put_marker(&s->pb, EOI);
}
-static inline void encode_dc(MpegEncContext *s, int val,
- UINT8 *huff_size, UINT16 *huff_code)
+static inline void mjpeg_encode_dc(MpegEncContext *s, int val,
+ UINT8 *huff_size, UINT16 *huff_code)
{
int mant, nbits;
@@ -496,11 +496,11 @@ static void encode_block(MpegEncContext *s, DCTELEM *block, int n)
dc = block[0]; /* overflow is impossible */
val = dc - s->last_dc[component];
if (n < 4) {
- encode_dc(s, val, m->huff_size_dc_luminance, m->huff_code_dc_luminance);
+ mjpeg_encode_dc(s, val, m->huff_size_dc_luminance, m->huff_code_dc_luminance);
huff_size_ac = m->huff_size_ac_luminance;
huff_code_ac = m->huff_code_ac_luminance;
} else {
- encode_dc(s, val, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
+ mjpeg_encode_dc(s, val, m->huff_size_dc_chrominance, m->huff_code_dc_chrominance);
huff_size_ac = m->huff_size_ac_chrominance;
huff_code_ac = m->huff_code_ac_chrominance;
}
@@ -808,14 +808,14 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s,
return 0;
}
-static inline int decode_dc(MJpegDecodeContext *s, int dc_index)
+static inline int mjpeg_decode_dc(MJpegDecodeContext *s, int dc_index)
{
int code, diff;
code = get_vlc(&s->gb, &s->vlcs[0][dc_index]);
if (code < 0)
{
- dprintf("decode_dc: bad vlc: %d:%d (%p)\n", 0, dc_index,
+ dprintf("mjpeg_decode_dc: bad vlc: %d:%d (%p)\n", 0, dc_index,
&s->vlcs[0][dc_index]);
return 0xffff;
}
@@ -839,7 +839,7 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
INT16 *quant_matrix;
/* DC coef */
- val = decode_dc(s, dc_index);
+ val = mjpeg_decode_dc(s, dc_index);
if (val == 0xffff) {
dprintf("error dc\n");
return -1;
diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index 16255f0ffa..a4d4bf8e1f 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -775,3 +775,5 @@ AVCodec mp2_encoder = {
MPA_encode_frame,
NULL,
};
+
+#undef FIX
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 1405e6e346..a38a3127da 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -2498,3 +2498,14 @@ AVCodec mp3_decoder =
NULL,
decode_frame,
};
+
+#undef C1
+#undef C2
+#undef C3
+#undef C4
+#undef C5
+#undef C6
+#undef C7
+#undef C8
+#undef FRAC_BITS
+#undef HEADER_SIZE
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index ee92d365fa..21b28954dc 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef AVCODEC_MPEGVIDEO_H
+#define AVCODEC_MPEGVIDEO_H
+
#define FRAME_SKIPED 100 // return value for header parsers if frame is not coded
enum OutputFormat {
@@ -510,6 +513,4 @@ int ff_rate_estimate_qscale_pass2(MpegEncContext *s);
void ff_write_pass1_stats(MpegEncContext *s);
void ff_rate_control_uninit(MpegEncContext *s);
-
-
-
+#endif /* AVCODEC_MPEGVIDEO_H */
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 369e042de5..ea744b3609 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -934,7 +934,7 @@ int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size)
return 0;
}
-static inline void memsetw(short *tab, int val, int n)
+static inline void msmpeg4_memsetw(short *tab, int val, int n)
{
int i;
for(i=0;i<n;i++)
@@ -1074,23 +1074,23 @@ int msmpeg4_decode_mb(MpegEncContext *s,
int wrap;
/* reset DC pred (set previous line to 1024) */
wrap = 2 * s->mb_width + 2;
- memsetw(&s->dc_val[0][(1) + (2 * s->mb_y) * wrap],
- 1024, 2 * s->mb_width);
- wrap = s->mb_width + 2;
- memsetw(&s->dc_val[1][(1) + (s->mb_y) * wrap],
- 1024, s->mb_width);
- memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap],
- 1024, s->mb_width);
-
- /* reset AC pred (set previous line to 0) */
- wrap = s->mb_width * 2 + 2;
- memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16,
- 0, 2 * s->mb_width*16);
- wrap = s->mb_width + 2;
- memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16,
- 0, s->mb_width*16);
- memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16,
- 0, s->mb_width*16);
+ msmpeg4_memsetw(&s->dc_val[0][(1) + (2 * s->mb_y) * wrap],
+ 1024, 2 * s->mb_width);
+ wrap = s->mb_width + 2;
+ msmpeg4_memsetw(&s->dc_val[1][(1) + (s->mb_y) * wrap],
+ 1024, s->mb_width);
+ msmpeg4_memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap],
+ 1024, s->mb_width);
+
+ /* reset AC pred (set previous line to 0) */
+ wrap = s->mb_width * 2 + 2;
+ msmpeg4_memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16,
+ 0, 2 * s->mb_width*16);
+ wrap = s->mb_width + 2;
+ msmpeg4_memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16,
+ 0, s->mb_width*16);
+ msmpeg4_memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16,
+ 0, s->mb_width*16);
s->first_slice_line = 1;
} else {
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index bff8aaf4c4..c9ae292c4b 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -103,7 +103,7 @@ static void build_xlaw_table(UINT8 *linear_to_xlaw,
linear_to_xlaw[0] = linear_to_xlaw[1];
}
-static int encode_init(AVCodecContext *avctx)
+static int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 1;
switch(avctx->codec->id) {
@@ -131,7 +131,7 @@ static int encode_init(AVCodecContext *avctx)
return 0;
}
-static int encode_close(AVCodecContext *avctx)
+static int pcm_encode_close(AVCodecContext *avctx)
{
switch(avctx->codec->id) {
case CODEC_ID_PCM_ALAW:
@@ -149,8 +149,8 @@ static int encode_close(AVCodecContext *avctx)
return 0;
}
-static int encode_frame(AVCodecContext *avctx,
- unsigned char *frame, int buf_size, void *data)
+static int pcm_encode_frame(AVCodecContext *avctx,
+ unsigned char *frame, int buf_size, void *data)
{
int n, sample_size, v;
short *samples;
@@ -247,7 +247,7 @@ typedef struct PCMDecode {
short table[256];
} PCMDecode;
-static int decode_init(AVCodecContext * avctx)
+static int pcm_decode_init(AVCodecContext * avctx)
{
PCMDecode *s = avctx->priv_data;
int i;
@@ -267,9 +267,9 @@ static int decode_init(AVCodecContext * avctx)
return 0;
}
-static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
- UINT8 *buf, int buf_size)
+static int pcm_decode_frame(AVCodecContext *avctx,
+ void *data, int *data_size,
+ UINT8 *buf, int buf_size)
{
PCMDecode *s = avctx->priv_data;
int n;
@@ -344,9 +344,9 @@ AVCodec name ## _encoder = { \
CODEC_TYPE_AUDIO, \
id, \
0, \
- encode_init, \
- encode_frame, \
- encode_close, \
+ pcm_encode_init, \
+ pcm_encode_frame, \
+ pcm_encode_close, \
NULL, \
}; \
AVCodec name ## _decoder = { \
@@ -354,10 +354,10 @@ AVCodec name ## _decoder = { \
CODEC_TYPE_AUDIO, \
id, \
sizeof(PCMDecode), \
- decode_init, \
+ pcm_decode_init, \
NULL, \
NULL, \
- decode_frame, \
+ pcm_decode_frame, \
};
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
@@ -368,3 +368,5 @@ PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8);
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
+
+#undef PCM_CODEC
diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index de3d9265cf..95ebb4db22 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -587,3 +587,5 @@ void simple_idct (short *block)
idctSparseCol(block + i);
#endif
}
+
+#undef COL_SHIFT
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 208f8b146b..34f788947a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -518,20 +518,20 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
}
-static int encode_init(AVCodecContext *s)
+static int raw_encode_init(AVCodecContext *s)
{
return 0;
}
-static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
- UINT8 *buf, int buf_size)
+static int raw_decode_frame(AVCodecContext *avctx,
+ void *data, int *data_size,
+ UINT8 *buf, int buf_size)
{
return -1;
}
-static int encode_frame(AVCodecContext *avctx,
- unsigned char *frame, int buf_size, void *data)
+static int raw_encode_frame(AVCodecContext *avctx,
+ unsigned char *frame, int buf_size, void *data)
{
return -1;
}
@@ -541,8 +541,8 @@ AVCodec rawvideo_codec = {
CODEC_TYPE_VIDEO,
CODEC_ID_RAWVIDEO,
0,
- encode_init,
- encode_frame,
+ raw_encode_init,
+ raw_encode_frame,
NULL,
- decode_frame,
+ raw_decode_frame,
};