Mercurial > libavcodec.hg
changeset 440:000aeeac27a2 libavcodec
* started to cleanup name clashes for onetime compilation
author | kabi |
---|---|
date | Mon, 27 May 2002 16:42:14 +0000 |
parents | 6ae275655a23 |
children | c0de4d3c7d3c |
files | imgconvert.c jfdctfst.c jrevdct.c mjpeg.c mpegaudio.c mpegaudiodec.c mpegvideo.h msmpeg4.c pcm.c simple_idct.c utils.c |
diffstat | 11 files changed, 79 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/imgconvert.c Mon May 27 14:09:10 2002 +0000 +++ b/imgconvert.c Mon May 27 16:42:14 2002 +0000 @@ -548,3 +548,5 @@ } return 0; } + +#undef FIX
--- a/jfdctfst.c Mon May 27 14:09:10 2002 +0000 +++ b/jfdctfst.c Mon May 27 16:42:14 2002 +0000 @@ -222,3 +222,10 @@ dataptr++; /* advance pointer to next column */ } } + + +#undef GLOBAL +#undef CONST_BITS +#undef DESCALE +#undef FIX_0_541196100 +#undef FIX_1_306562965
--- a/jrevdct.c Mon May 27 14:09:10 2002 +0000 +++ b/jrevdct.c Mon May 27 16:42:14 2002 +0000 @@ -1166,4 +1166,5 @@ } } - +#undef FIX +#undef CONST_BITS
--- a/mjpeg.c Mon May 27 14:09:10 2002 +0000 +++ b/mjpeg.c Mon May 27 16:42:14 2002 +0000 @@ -456,8 +456,8 @@ 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 @@ 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 @@ 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 @@ 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;
--- a/mpegaudio.c Mon May 27 14:09:10 2002 +0000 +++ b/mpegaudio.c Mon May 27 16:42:14 2002 +0000 @@ -775,3 +775,5 @@ MPA_encode_frame, NULL, }; + +#undef FIX
--- a/mpegaudiodec.c Mon May 27 14:09:10 2002 +0000 +++ b/mpegaudiodec.c Mon May 27 16:42:14 2002 +0000 @@ -2498,3 +2498,14 @@ 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
--- a/mpegvideo.h Mon May 27 14:09:10 2002 +0000 +++ b/mpegvideo.h Mon May 27 16:42:14 2002 +0000 @@ -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 @@ void ff_write_pass1_stats(MpegEncContext *s); void ff_rate_control_uninit(MpegEncContext *s); - - - +#endif /* AVCODEC_MPEGVIDEO_H */
--- a/msmpeg4.c Mon May 27 14:09:10 2002 +0000 +++ b/msmpeg4.c Mon May 27 16:42:14 2002 +0000 @@ -934,7 +934,7 @@ 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 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 {
--- a/pcm.c Mon May 27 14:09:10 2002 +0000 +++ b/pcm.c Mon May 27 16:42:14 2002 +0000 @@ -103,7 +103,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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_U8, pcm_u8); PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw); PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw); + +#undef PCM_CODEC
--- a/simple_idct.c Mon May 27 14:09:10 2002 +0000 +++ b/simple_idct.c Mon May 27 16:42:14 2002 +0000 @@ -587,3 +587,5 @@ idctSparseCol(block + i); #endif } + +#undef COL_SHIFT
--- a/utils.c Mon May 27 14:09:10 2002 +0000 +++ b/utils.c Mon May 27 16:42:14 2002 +0000 @@ -518,20 +518,20 @@ } -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 @@ CODEC_TYPE_VIDEO, CODEC_ID_RAWVIDEO, 0, - encode_init, - encode_frame, + raw_encode_init, + raw_encode_frame, NULL, - decode_frame, + raw_decode_frame, };