Commit cd4af68a authored by Zdenek Kabelac's avatar Zdenek Kabelac

* started to cleanup name clashes for onetime compilation

Originally committed as revision 617 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c0eb0bb7
...@@ -548,3 +548,5 @@ int avpicture_deinterlace(AVPicture *dst, AVPicture *src, ...@@ -548,3 +548,5 @@ int avpicture_deinterlace(AVPicture *dst, AVPicture *src,
} }
return 0; return 0;
} }
#undef FIX
...@@ -222,3 +222,10 @@ jpeg_fdct_ifast (DCTELEM * data) ...@@ -222,3 +222,10 @@ jpeg_fdct_ifast (DCTELEM * data)
dataptr++; /* advance pointer to next column */ dataptr++; /* advance pointer to next column */
} }
} }
#undef GLOBAL
#undef CONST_BITS
#undef DESCALE
#undef FIX_0_541196100
#undef FIX_1_306562965
...@@ -1166,4 +1166,5 @@ void j_rev_dct(DCTBLOCK data) ...@@ -1166,4 +1166,5 @@ void j_rev_dct(DCTBLOCK data)
} }
} }
#undef FIX
#undef CONST_BITS
...@@ -456,8 +456,8 @@ void mjpeg_picture_trailer(MpegEncContext *s) ...@@ -456,8 +456,8 @@ void mjpeg_picture_trailer(MpegEncContext *s)
put_marker(&s->pb, EOI); put_marker(&s->pb, EOI);
} }
static inline void encode_dc(MpegEncContext *s, int val, static inline void mjpeg_encode_dc(MpegEncContext *s, int val,
UINT8 *huff_size, UINT16 *huff_code) UINT8 *huff_size, UINT16 *huff_code)
{ {
int mant, nbits; int mant, nbits;
...@@ -496,11 +496,11 @@ static void encode_block(MpegEncContext *s, DCTELEM *block, int n) ...@@ -496,11 +496,11 @@ static void encode_block(MpegEncContext *s, DCTELEM *block, int n)
dc = block[0]; /* overflow is impossible */ dc = block[0]; /* overflow is impossible */
val = dc - s->last_dc[component]; val = dc - s->last_dc[component];
if (n < 4) { 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_size_ac = m->huff_size_ac_luminance;
huff_code_ac = m->huff_code_ac_luminance; huff_code_ac = m->huff_code_ac_luminance;
} else { } 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_size_ac = m->huff_size_ac_chrominance;
huff_code_ac = m->huff_code_ac_chrominance; huff_code_ac = m->huff_code_ac_chrominance;
} }
...@@ -808,14 +808,14 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s, ...@@ -808,14 +808,14 @@ static int mjpeg_decode_sof0(MJpegDecodeContext *s,
return 0; 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; int code, diff;
code = get_vlc(&s->gb, &s->vlcs[0][dc_index]); code = get_vlc(&s->gb, &s->vlcs[0][dc_index]);
if (code < 0) 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]); &s->vlcs[0][dc_index]);
return 0xffff; return 0xffff;
} }
...@@ -839,7 +839,7 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block, ...@@ -839,7 +839,7 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
INT16 *quant_matrix; INT16 *quant_matrix;
/* DC coef */ /* DC coef */
val = decode_dc(s, dc_index); val = mjpeg_decode_dc(s, dc_index);
if (val == 0xffff) { if (val == 0xffff) {
dprintf("error dc\n"); dprintf("error dc\n");
return -1; return -1;
......
...@@ -775,3 +775,5 @@ AVCodec mp2_encoder = { ...@@ -775,3 +775,5 @@ AVCodec mp2_encoder = {
MPA_encode_frame, MPA_encode_frame,
NULL, NULL,
}; };
#undef FIX
...@@ -2498,3 +2498,14 @@ AVCodec mp3_decoder = ...@@ -2498,3 +2498,14 @@ AVCodec mp3_decoder =
NULL, NULL,
decode_frame, decode_frame,
}; };
#undef C1
#undef C2
#undef C3
#undef C4
#undef C5
#undef C6
#undef C7
#undef C8
#undef FRAC_BITS
#undef HEADER_SIZE
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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 #define FRAME_SKIPED 100 // return value for header parsers if frame is not coded
enum OutputFormat { enum OutputFormat {
...@@ -510,6 +513,4 @@ int ff_rate_estimate_qscale_pass2(MpegEncContext *s); ...@@ -510,6 +513,4 @@ int ff_rate_estimate_qscale_pass2(MpegEncContext *s);
void ff_write_pass1_stats(MpegEncContext *s); void ff_write_pass1_stats(MpegEncContext *s);
void ff_rate_control_uninit(MpegEncContext *s); void ff_rate_control_uninit(MpegEncContext *s);
#endif /* AVCODEC_MPEGVIDEO_H */
...@@ -934,7 +934,7 @@ int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size) ...@@ -934,7 +934,7 @@ int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size)
return 0; 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; int i;
for(i=0;i<n;i++) for(i=0;i<n;i++)
...@@ -1074,23 +1074,23 @@ int msmpeg4_decode_mb(MpegEncContext *s, ...@@ -1074,23 +1074,23 @@ int msmpeg4_decode_mb(MpegEncContext *s,
int wrap; int wrap;
/* reset DC pred (set previous line to 1024) */ /* reset DC pred (set previous line to 1024) */
wrap = 2 * s->mb_width + 2; wrap = 2 * s->mb_width + 2;
memsetw(&s->dc_val[0][(1) + (2 * s->mb_y) * wrap], msmpeg4_memsetw(&s->dc_val[0][(1) + (2 * s->mb_y) * wrap],
1024, 2 * s->mb_width); 1024, 2 * s->mb_width);
wrap = s->mb_width + 2; wrap = s->mb_width + 2;
memsetw(&s->dc_val[1][(1) + (s->mb_y) * wrap], msmpeg4_memsetw(&s->dc_val[1][(1) + (s->mb_y) * wrap],
1024, s->mb_width); 1024, s->mb_width);
memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap], msmpeg4_memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap],
1024, s->mb_width); 1024, s->mb_width);
/* reset AC pred (set previous line to 0) */ /* reset AC pred (set previous line to 0) */
wrap = s->mb_width * 2 + 2; wrap = s->mb_width * 2 + 2;
memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16, msmpeg4_memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16,
0, 2 * s->mb_width*16); 0, 2 * s->mb_width*16);
wrap = s->mb_width + 2; wrap = s->mb_width + 2;
memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16, msmpeg4_memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16,
0, s->mb_width*16); 0, s->mb_width*16);
memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16, msmpeg4_memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16,
0, s->mb_width*16); 0, s->mb_width*16);
s->first_slice_line = 1; s->first_slice_line = 1;
} else { } else {
......
...@@ -103,7 +103,7 @@ static void build_xlaw_table(UINT8 *linear_to_xlaw, ...@@ -103,7 +103,7 @@ static void build_xlaw_table(UINT8 *linear_to_xlaw,
linear_to_xlaw[0] = linear_to_xlaw[1]; 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; avctx->frame_size = 1;
switch(avctx->codec->id) { switch(avctx->codec->id) {
...@@ -131,7 +131,7 @@ static int encode_init(AVCodecContext *avctx) ...@@ -131,7 +131,7 @@ static int encode_init(AVCodecContext *avctx)
return 0; return 0;
} }
static int encode_close(AVCodecContext *avctx) static int pcm_encode_close(AVCodecContext *avctx)
{ {
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_ALAW:
...@@ -149,8 +149,8 @@ static int encode_close(AVCodecContext *avctx) ...@@ -149,8 +149,8 @@ static int encode_close(AVCodecContext *avctx)
return 0; return 0;
} }
static int encode_frame(AVCodecContext *avctx, static int pcm_encode_frame(AVCodecContext *avctx,
unsigned char *frame, int buf_size, void *data) unsigned char *frame, int buf_size, void *data)
{ {
int n, sample_size, v; int n, sample_size, v;
short *samples; short *samples;
...@@ -247,7 +247,7 @@ typedef struct PCMDecode { ...@@ -247,7 +247,7 @@ typedef struct PCMDecode {
short table[256]; short table[256];
} PCMDecode; } PCMDecode;
static int decode_init(AVCodecContext * avctx) static int pcm_decode_init(AVCodecContext * avctx)
{ {
PCMDecode *s = avctx->priv_data; PCMDecode *s = avctx->priv_data;
int i; int i;
...@@ -267,9 +267,9 @@ static int decode_init(AVCodecContext * avctx) ...@@ -267,9 +267,9 @@ static int decode_init(AVCodecContext * avctx)
return 0; return 0;
} }
static int decode_frame(AVCodecContext *avctx, static int pcm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, void *data, int *data_size,
UINT8 *buf, int buf_size) UINT8 *buf, int buf_size)
{ {
PCMDecode *s = avctx->priv_data; PCMDecode *s = avctx->priv_data;
int n; int n;
...@@ -344,9 +344,9 @@ AVCodec name ## _encoder = { \ ...@@ -344,9 +344,9 @@ AVCodec name ## _encoder = { \
CODEC_TYPE_AUDIO, \ CODEC_TYPE_AUDIO, \
id, \ id, \
0, \ 0, \
encode_init, \ pcm_encode_init, \
encode_frame, \ pcm_encode_frame, \
encode_close, \ pcm_encode_close, \
NULL, \ NULL, \
}; \ }; \
AVCodec name ## _decoder = { \ AVCodec name ## _decoder = { \
...@@ -354,10 +354,10 @@ AVCodec name ## _decoder = { \ ...@@ -354,10 +354,10 @@ AVCodec name ## _decoder = { \
CODEC_TYPE_AUDIO, \ CODEC_TYPE_AUDIO, \
id, \ id, \
sizeof(PCMDecode), \ sizeof(PCMDecode), \
decode_init, \ pcm_decode_init, \
NULL, \ NULL, \
NULL, \ NULL, \
decode_frame, \ pcm_decode_frame, \
}; };
PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le); PCM_CODEC(CODEC_ID_PCM_S16LE, pcm_s16le);
...@@ -368,3 +368,5 @@ PCM_CODEC(CODEC_ID_PCM_S8, pcm_s8); ...@@ -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_U8, pcm_u8);
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw); PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw); PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
#undef PCM_CODEC
...@@ -587,3 +587,5 @@ void simple_idct (short *block) ...@@ -587,3 +587,5 @@ void simple_idct (short *block)
idctSparseCol(block + i); idctSparseCol(block + i);
#endif #endif
} }
#undef COL_SHIFT
...@@ -518,20 +518,20 @@ void avcodec_flush_buffers(AVCodecContext *avctx) ...@@ -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; return 0;
} }
static int decode_frame(AVCodecContext *avctx, static int raw_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, void *data, int *data_size,
UINT8 *buf, int buf_size) UINT8 *buf, int buf_size)
{ {
return -1; return -1;
} }
static int encode_frame(AVCodecContext *avctx, static int raw_encode_frame(AVCodecContext *avctx,
unsigned char *frame, int buf_size, void *data) unsigned char *frame, int buf_size, void *data)
{ {
return -1; return -1;
} }
...@@ -541,8 +541,8 @@ AVCodec rawvideo_codec = { ...@@ -541,8 +541,8 @@ AVCodec rawvideo_codec = {
CODEC_TYPE_VIDEO, CODEC_TYPE_VIDEO,
CODEC_ID_RAWVIDEO, CODEC_ID_RAWVIDEO,
0, 0,
encode_init, raw_encode_init,
encode_frame, raw_encode_frame,
NULL, NULL,
decode_frame, raw_decode_frame,
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment