* started to cleanup name clashes for onetime compilation

Originally committed as revision 617 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Zdenek Kabelac 2002-05-27 16:42:14 +00:00
parent c0eb0bb717
commit cd4af68ad5
11 changed files with 79 additions and 51 deletions

View File

@ -548,3 +548,5 @@ int avpicture_deinterlace(AVPicture *dst, AVPicture *src,
}
return 0;
}
#undef FIX

View File

@ -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

View File

@ -1166,4 +1166,5 @@ void j_rev_dct(DCTBLOCK data)
}
}
#undef FIX
#undef CONST_BITS

View File

@ -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;

View File

@ -775,3 +775,5 @@ AVCodec mp2_encoder = {
MPA_encode_frame,
NULL,
};
#undef FIX

View File

@ -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

View File

@ -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 */

View File

@ -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 {

View File

@ -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

View File

@ -587,3 +587,5 @@ void simple_idct (short *block)
idctSparseCol(block + i);
#endif
}
#undef COL_SHIFT

View File

@ -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,
};