Mercurial > libavcodec.hg
changeset 1064:b32afefe7d33 libavcodec
* UINTX -> uintx_t INTX -> intx_t
line wrap: on
line diff
--- a/a52dec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/a52dec.c Tue Feb 11 16:35:48 2003 +0000 @@ -29,8 +29,8 @@ * released under the GPL license. */ typedef struct AC3DecodeState { - UINT8 inbuf[4096]; /* input buffer */ - UINT8 *inbuf_ptr; + uint8_t inbuf[4096]; /* input buffer */ + uint8_t *inbuf_ptr; int frame_size; int flags; int channels; @@ -123,7 +123,7 @@ return i - 0x43c00000; } -static inline void float_to_int (float * _f, INT16 * s16, int nchannels) +static inline void float_to_int (float * _f, int16_t * s16, int nchannels) { int i, j, c; int32_t * f = (int32_t *) _f; // XXX assumes IEEE float format @@ -142,10 +142,10 @@ static int a52_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { AC3DecodeState *s = avctx->priv_data; - UINT8 *buf_ptr; + uint8_t *buf_ptr; int flags, i, len; int sample_rate, bit_rate; short *out_samples = data; @@ -221,7 +221,7 @@ } s->inbuf_ptr = s->inbuf; s->frame_size = 0; - *data_size = 6 * avctx->channels * 256 * sizeof(INT16); + *data_size = 6 * avctx->channels * 256 * sizeof(int16_t); break; } }
--- a/ac3.h Mon Feb 10 22:43:30 2003 +0000 +++ b/ac3.h Tue Feb 11 16:35:48 2003 +0000 @@ -38,19 +38,19 @@ int cplfleak, cplsleak; } AC3BitAllocParameters; -extern const UINT16 ac3_freqs[3]; -extern const UINT16 ac3_bitratetab[19]; -extern const INT16 ac3_window[256]; -extern const UINT8 sdecaytab[4]; -extern const UINT8 fdecaytab[4]; -extern const UINT16 sgaintab[4]; -extern const UINT16 dbkneetab[4]; -extern const UINT16 floortab[8]; -extern const UINT16 fgaintab[8]; +extern const uint16_t ac3_freqs[3]; +extern const uint16_t ac3_bitratetab[19]; +extern const int16_t ac3_window[256]; +extern const uint8_t sdecaytab[4]; +extern const uint8_t fdecaytab[4]; +extern const uint16_t sgaintab[4]; +extern const uint16_t dbkneetab[4]; +extern const uint16_t floortab[8]; +extern const uint16_t fgaintab[8]; void ac3_common_init(void); -void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, UINT8 *bap, - INT8 *exp, int start, int end, +void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap, + int8_t *exp, int start, int end, int snroffset, int fgain, int is_lfe, int deltbae,int deltnseg, - UINT8 *deltoffst, UINT8 *deltlen, UINT8 *deltba); + uint8_t *deltoffst, uint8_t *deltlen, uint8_t *deltba);
--- a/ac3dec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ac3dec.c Tue Feb 11 16:35:48 2003 +0000 @@ -22,8 +22,8 @@ /* currently, I use libac3 which is Copyright (C) Aaron Holtzman and released under the GPL license. I may reimplement it someday... */ typedef struct AC3DecodeState { - UINT8 inbuf[4096]; /* input buffer */ - UINT8 *inbuf_ptr; + uint8_t inbuf[4096]; /* input buffer */ + uint8_t *inbuf_ptr; int frame_size; int flags; int channels; @@ -53,7 +53,7 @@ return i - 0x43c00000; } -static inline void float_to_int (float * _f, INT16 * s16, int nchannels) +static inline void float_to_int (float * _f, int16_t * s16, int nchannels) { int i, j, c; int32_t * f = (int32_t *) _f; // XXX assumes IEEE float format @@ -72,10 +72,10 @@ static int ac3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { AC3DecodeState *s = avctx->priv_data; - UINT8 *buf_ptr; + uint8_t *buf_ptr; int flags, i, len; int sample_rate, bit_rate; short *out_samples = data; @@ -151,7 +151,7 @@ } s->inbuf_ptr = s->inbuf; s->frame_size = 0; - *data_size = 6 * avctx->channels * 256 * sizeof(INT16); + *data_size = 6 * avctx->channels * 256 * sizeof(int16_t); break; } }
--- a/ac3enc.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ac3enc.c Tue Feb 11 16:35:48 2003 +0000 @@ -63,7 +63,7 @@ static void fft_init(int ln); static void ac3_crc_init(void); -static inline INT16 fix15(float a) +static inline int16_t fix15(float a) { int v; v = (int)(a * (float)(1 << 15)); @@ -110,18 +110,18 @@ /* AC3 bit allocation. The algorithm is the one described in the AC3 spec. */ -void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, UINT8 *bap, - INT8 *exp, int start, int end, +void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap, + int8_t *exp, int start, int end, int snroffset, int fgain, int is_lfe, int deltbae,int deltnseg, - UINT8 *deltoffst, UINT8 *deltlen, UINT8 *deltba) + uint8_t *deltoffst, uint8_t *deltlen, uint8_t *deltba) { int bin,i,j,k,end1,v,v1,bndstrt,bndend,lowcomp,begin; int fastleak,slowleak,address,tmp; - INT16 psd[256]; /* scaled exponents */ - INT16 bndpsd[50]; /* interpolated exponents */ - INT16 excite[50]; /* excitation */ - INT16 mask[50]; /* masking value */ + int16_t psd[256]; /* scaled exponents */ + int16_t bndpsd[50]; /* interpolated exponents */ + int16_t excite[50]; /* excitation */ + int16_t mask[50]; /* masking value */ /* exponent mapping to PSD */ for(bin=start;bin<end;bin++) { @@ -404,10 +404,10 @@ } /* do a 512 point mdct */ -static void mdct512(INT32 *out, INT16 *in) +static void mdct512(int32_t *out, int16_t *in) { int i, re, im, re1, im1; - INT16 rot[N]; + int16_t rot[N]; IComplex x[N/4]; /* shift to simplify computations */ @@ -436,7 +436,7 @@ } /* XXX: use another norm ? */ -static int calc_exp_diff(UINT8 *exp1, UINT8 *exp2, int n) +static int calc_exp_diff(uint8_t *exp1, uint8_t *exp2, int n) { int sum, i; sum = 0; @@ -446,8 +446,8 @@ return sum; } -static void compute_exp_strategy(UINT8 exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], - UINT8 exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], +static void compute_exp_strategy(uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], + uint8_t exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], int ch, int is_lfe) { int i, j; @@ -493,7 +493,7 @@ } /* set exp[i] to min(exp[i], exp1[i]) */ -static void exponent_min(UINT8 exp[N/2], UINT8 exp1[N/2], int n) +static void exponent_min(uint8_t exp[N/2], uint8_t exp1[N/2], int n) { int i; @@ -505,13 +505,13 @@ /* update the exponents so that they are the ones the decoder will decode. Return the number of bits used to code the exponents */ -static int encode_exp(UINT8 encoded_exp[N/2], - UINT8 exp[N/2], +static int encode_exp(uint8_t encoded_exp[N/2], + uint8_t exp[N/2], int nb_exps, int exp_strategy) { int group_size, nb_groups, i, j, k, recurse, exp_min, delta; - UINT8 exp1[N/2]; + uint8_t exp1[N/2]; switch(exp_strategy) { case EXP_D15: @@ -586,7 +586,7 @@ } /* return the size in bits taken by the mantissa */ -static int compute_mantissa_size(AC3EncodeContext *s, UINT8 *m, int nb_coefs) +static int compute_mantissa_size(AC3EncodeContext *s, uint8_t *m, int nb_coefs) { int bits, mant, i; @@ -637,9 +637,9 @@ static int bit_alloc(AC3EncodeContext *s, - UINT8 bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], - UINT8 encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], - UINT8 exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], + uint8_t bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], + uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], + uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], int frame_bits, int csnroffst, int fsnroffst) { int i, ch; @@ -651,7 +651,7 @@ s->mant4_cnt = 0; for(ch=0;ch<s->nb_all_channels;ch++) { ac3_parametric_bit_allocation(&s->bit_alloc, - bap[i][ch], (INT8 *)encoded_exp[i][ch], + bap[i][ch], (int8_t *)encoded_exp[i][ch], 0, s->nb_coefs[ch], (((csnroffst-15) << 4) + fsnroffst) << 2, @@ -673,14 +673,14 @@ #define SNR_INC1 4 static int compute_bit_allocation(AC3EncodeContext *s, - UINT8 bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], - UINT8 encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], - UINT8 exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], + uint8_t bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], + uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2], + uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS], int frame_bits) { int i, ch; int csnroffst, fsnroffst; - UINT8 bap1[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; + uint8_t bap1[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; static int frame_bits_inc[8] = { 0, 0, 2, 2, 2, 4, 2, 4 }; /* init default parameters */ @@ -816,7 +816,7 @@ AC3EncodeContext *s = avctx->priv_data; int i, j, ch; float alpha; - static const UINT8 acmod_defs[6] = { + static const uint8_t acmod_defs[6] = { 0x01, /* C */ 0x02, /* L R */ 0x03, /* L C R */ @@ -966,19 +966,19 @@ /* Output one audio block. There are NB_BLOCKS audio blocks in one AC3 frame */ static void output_audio_block(AC3EncodeContext *s, - UINT8 exp_strategy[AC3_MAX_CHANNELS], - UINT8 encoded_exp[AC3_MAX_CHANNELS][N/2], - UINT8 bap[AC3_MAX_CHANNELS][N/2], - INT32 mdct_coefs[AC3_MAX_CHANNELS][N/2], - INT8 global_exp[AC3_MAX_CHANNELS], + uint8_t exp_strategy[AC3_MAX_CHANNELS], + uint8_t encoded_exp[AC3_MAX_CHANNELS][N/2], + uint8_t bap[AC3_MAX_CHANNELS][N/2], + int32_t mdct_coefs[AC3_MAX_CHANNELS][N/2], + int8_t global_exp[AC3_MAX_CHANNELS], int block_num) { int ch, nb_groups, group_size, i, baie; - UINT8 *p; - UINT16 qmant[AC3_MAX_CHANNELS][N/2]; + uint8_t *p; + uint16_t qmant[AC3_MAX_CHANNELS][N/2]; int exp0, exp1; int mant1_cnt, mant2_cnt, mant4_cnt; - UINT16 *qmant1_ptr, *qmant2_ptr, *qmant4_ptr; + uint16_t *qmant1_ptr, *qmant2_ptr, *qmant4_ptr; int delta0, delta1, delta2; for(ch=0;ch<s->nb_channels;ch++) @@ -1244,7 +1244,7 @@ } } -static unsigned int ac3_crc(UINT8 *data, int n, unsigned int crc) +static unsigned int ac3_crc(uint8_t *data, int n, unsigned int crc) { int i; for(i=0;i<n;i++) { @@ -1284,7 +1284,7 @@ /* compute log2(max(abs(tab[]))) */ -static int log2_tab(INT16 *tab, int n) +static int log2_tab(int16_t *tab, int n) { int i, v; @@ -1295,7 +1295,7 @@ return av_log2(v); } -static void lshift_tab(INT16 *tab, int n, int lshift) +static void lshift_tab(int16_t *tab, int n, int lshift) { int i; @@ -1315,7 +1315,7 @@ static int output_frame_end(AC3EncodeContext *s) { int frame_size, frame_size_58, n, crc1, crc2, crc_inv; - UINT8 *frame; + uint8_t *frame; frame_size = s->frame_size; /* frame size in words */ /* align to 8 bits */ @@ -1350,24 +1350,24 @@ AC3EncodeContext *s = avctx->priv_data; short *samples = data; int i, j, k, v, ch; - INT16 input_samples[N]; - INT32 mdct_coef[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; - UINT8 exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; - UINT8 exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS]; - UINT8 encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; - UINT8 bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; - INT8 exp_samples[NB_BLOCKS][AC3_MAX_CHANNELS]; + int16_t input_samples[N]; + int32_t mdct_coef[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; + uint8_t exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; + uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNELS]; + uint8_t encoded_exp[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; + uint8_t bap[NB_BLOCKS][AC3_MAX_CHANNELS][N/2]; + int8_t exp_samples[NB_BLOCKS][AC3_MAX_CHANNELS]; int frame_bits; frame_bits = 0; for(ch=0;ch<s->nb_all_channels;ch++) { /* fixed mdct to the six sub blocks & exponent computation */ for(i=0;i<NB_BLOCKS;i++) { - INT16 *sptr; + int16_t *sptr; int sinc; /* compute input samples */ - memcpy(input_samples, s->last_samples[ch], N/2 * sizeof(INT16)); + memcpy(input_samples, s->last_samples[ch], N/2 * sizeof(int16_t)); sinc = s->nb_all_channels; sptr = samples + (sinc * (N/2) * i) + ch; for(j=0;j<N/2;j++) { @@ -1432,7 +1432,7 @@ /* copy encoded exponents for reuse case */ for(k=i+1;k<j;k++) { memcpy(encoded_exp[k][ch], encoded_exp[i][ch], - s->nb_coefs[ch] * sizeof(UINT8)); + s->nb_coefs[ch] * sizeof(uint8_t)); } i = j; } @@ -1492,8 +1492,8 @@ void mdct_test(void) { - INT16 input[N]; - INT32 output[N/2]; + int16_t input[N]; + int32_t output[N/2]; float input1[N]; float output1[N/2]; float s, a, err, e, emax;
--- a/ac3tab.h Mon Feb 10 22:43:30 2003 +0000 +++ b/ac3tab.h Tue Feb 11 16:35:48 2003 +0000 @@ -1,10 +1,10 @@ /* tables taken directly from AC3 spec */ /* possible frequencies */ -const UINT16 ac3_freqs[3] = { 48000, 44100, 32000 }; +const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 }; /* possible bitrates */ -const UINT16 ac3_bitratetab[19] = { +const uint16_t ac3_bitratetab[19] = { 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 }; @@ -12,7 +12,7 @@ /* AC3 MDCT window */ /* MDCT window */ -const INT16 ac3_window[256] = { +const int16_t ac3_window[256] = { 4, 7, 12, 16, 21, 28, 34, 42, 51, 61, 72, 84, 97, 111, 127, 145, 164, 184, 207, 231, 257, 285, 315, 347, @@ -47,9 +47,9 @@ 32767,32767,32767,32767,32767,32767,32767,32767, }; -static UINT8 masktab[253]; +static uint8_t masktab[253]; -static const UINT8 latab[260]= { +static const uint8_t latab[260]= { 0x0040,0x003f,0x003e,0x003d,0x003c,0x003b,0x003a,0x0039,0x0038,0x0037, 0x0036,0x0035,0x0034,0x0034,0x0033,0x0032,0x0031,0x0030,0x002f,0x002f, 0x002e,0x002d,0x002c,0x002c,0x002b,0x002a,0x0029,0x0029,0x0028,0x0027, @@ -78,7 +78,7 @@ 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, }; -static const UINT16 hth[50][3]= { +static const uint16_t hth[50][3]= { { 0x04d0,0x04f0,0x0580 }, { 0x04d0,0x04f0,0x0580 }, { 0x0440,0x0460,0x04b0 }, @@ -131,7 +131,7 @@ { 0x0840,0x0840,0x04e0 }, }; -static const UINT8 baptab[64]= { +static const uint8_t baptab[64]= { 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, @@ -141,43 +141,43 @@ 15, 15, 15, 15, }; -const UINT8 sdecaytab[4]={ +const uint8_t sdecaytab[4]={ 0x0f, 0x11, 0x13, 0x15, }; -const UINT8 fdecaytab[4]={ +const uint8_t fdecaytab[4]={ 0x3f, 0x53, 0x67, 0x7b, }; -const UINT16 sgaintab[4]= { +const uint16_t sgaintab[4]= { 0x540, 0x4d8, 0x478, 0x410, }; -const UINT16 dbkneetab[4]= { +const uint16_t dbkneetab[4]= { 0x000, 0x700, 0x900, 0xb00, }; -const UINT16 floortab[8]= { +const uint16_t floortab[8]= { 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, }; -const UINT16 fgaintab[8]= { +const uint16_t fgaintab[8]= { 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, }; -static const UINT8 bndsz[50]={ +static const uint8_t bndsz[50]={ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 }; -static UINT8 bndtab[51]; +static uint8_t bndtab[51]; /* fft & mdct sin cos tables */ -static INT16 costab[64]; -static INT16 sintab[64]; -static INT16 fft_rev[512]; -static INT16 xcos1[128]; -static INT16 xsin1[128]; +static int16_t costab[64]; +static int16_t sintab[64]; +static int16_t fft_rev[512]; +static int16_t xcos1[128]; +static int16_t xsin1[128]; -static UINT16 crc_table[256]; +static uint16_t crc_table[256];
--- a/adpcm.c Mon Feb 10 22:43:30 2003 +0000 +++ b/adpcm.c Tue Feb 11 16:35:48 2003 +0000 @@ -329,14 +329,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { ADPCMContext *c = avctx->priv_data; ADPCMChannelStatus *cs; int n, m, channel; int block_predictor[2]; short *samples; - UINT8 *src; + uint8_t *src; int st; /* stereo */ samples = data; @@ -500,7 +500,7 @@ *data_size = 0; return -1; } - *data_size = (UINT8 *)samples - (UINT8 *)data; + *data_size = (uint8_t *)samples - (uint8_t *)data; return src - buf; }
--- a/apiexample.c Mon Feb 10 22:43:30 2003 +0000 +++ b/apiexample.c Tue Feb 11 16:35:48 2003 +0000 @@ -28,7 +28,7 @@ FILE *f; short *samples; float t, tincr; - UINT8 *outbuf; + uint8_t *outbuf; printf("Audio encoding\n"); @@ -94,8 +94,8 @@ AVCodecContext *c= NULL; int out_size, size, len; FILE *f, *outfile; - UINT8 *outbuf; - UINT8 inbuf[INBUF_SIZE], *inbuf_ptr; + uint8_t *outbuf; + uint8_t inbuf[INBUF_SIZE], *inbuf_ptr; printf("Audio decoding\n"); @@ -169,7 +169,7 @@ int i, out_size, size, x, y, outbuf_size; FILE *f; AVFrame *picture; - UINT8 *outbuf, *picture_buf; + uint8_t *outbuf, *picture_buf; printf("Video encoding\n"); @@ -283,7 +283,7 @@ int frame, size, got_picture, len; FILE *f; AVFrame *picture; - UINT8 inbuf[INBUF_SIZE], *inbuf_ptr; + uint8_t inbuf[INBUF_SIZE], *inbuf_ptr; char buf[1024]; printf("Video decoding\n");
--- a/armv4l/mpegvideo_arm.c Mon Feb 10 22:43:30 2003 +0000 +++ b/armv4l/mpegvideo_arm.c Tue Feb 11 16:35:48 2003 +0000 @@ -23,17 +23,17 @@ extern void j_rev_dct_ARM(DCTELEM *data); /* XXX: local hack */ -static void (*ff_put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); -static void (*ff_add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); +static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); +static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ -static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct_ARM (block); ff_put_pixels_clamped(block, dest, line_size); } -static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct_ARM (block); ff_add_pixels_clamped(block, dest, line_size);
--- a/avcodec.h Mon Feb 10 22:43:30 2003 +0000 +++ b/avcodec.h Tue Feb 11 16:35:48 2003 +0000 @@ -393,7 +393,7 @@ * decoding: set by user. */ void (*draw_horiz_band)(struct AVCodecContext *s, - UINT8 **src_ptr, int linesize, + uint8_t **src_ptr, int linesize, int y, int width, int height); /* audio only */ @@ -992,10 +992,10 @@ int id; int priv_data_size; int (*init)(AVCodecContext *); - int (*encode)(AVCodecContext *, UINT8 *buf, int buf_size, void *data); + int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data); int (*close)(AVCodecContext *); int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, - UINT8 *buf, int buf_size); + uint8_t *buf, int buf_size); int capabilities; const AVOption *options; struct AVCodec *next; @@ -1006,7 +1006,7 @@ * the last component is alpha */ typedef struct AVPicture { - UINT8 *data[4]; + uint8_t *data[4]; int linesize[4]; } AVPicture; @@ -1110,7 +1110,7 @@ void img_resample_close(ImgReSampleContext *s); -int avpicture_fill(AVPicture *picture, UINT8 *ptr, +int avpicture_fill(AVPicture *picture, uint8_t *ptr, int pix_fmt, int width, int height); int avpicture_get_size(int pix_fmt, int width, int height); void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); @@ -1152,18 +1152,18 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic); int avcodec_open(AVCodecContext *avctx, AVCodec *codec); -int avcodec_decode_audio(AVCodecContext *avctx, INT16 *samples, +int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, - UINT8 *buf, int buf_size); + uint8_t *buf, int buf_size); int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, - UINT8 *buf, int buf_size); -int avcodec_parse_frame(AVCodecContext *avctx, UINT8 **pdata, + uint8_t *buf, int buf_size); +int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, int *data_size_ptr, - UINT8 *buf, int buf_size); -int avcodec_encode_audio(AVCodecContext *avctx, UINT8 *buf, int buf_size, + uint8_t *buf, int buf_size); +int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples); -int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size, +int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict); int avcodec_close(AVCodecContext *avctx);
--- a/common.c Mon Feb 10 22:43:30 2003 +0000 +++ b/common.c Tue Feb 11 16:35:48 2003 +0000 @@ -20,7 +20,7 @@ */ #include "avcodec.h" -const UINT8 ff_sqrt_tab[128]={ +const uint8_t ff_sqrt_tab[128]={ 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, @@ -39,9 +39,9 @@ }; void init_put_bits(PutBitContext *s, - UINT8 *buffer, int buffer_size, + uint8_t *buffer, int buffer_size, void *opaque, - void (*write_data)(void *, UINT8 *, int)) + void (*write_data)(void *, uint8_t *, int)) { s->buf = buffer; s->buf_end = s->buf + buffer_size; @@ -62,12 +62,12 @@ } /* return the number of bits output */ -INT64 get_bit_count(PutBitContext *s) +int64_t get_bit_count(PutBitContext *s) { #ifdef ALT_BITSTREAM_WRITER return s->data_out_size * 8 + s->index; #else - return (s->buf_ptr - s->buf + s->data_out_size) * 8 + 32 - (INT64)s->bit_left; + return (s->buf_ptr - s->buf + s->data_out_size) * 8 + 32 - (int64_t)s->bit_left; #endif } @@ -110,7 +110,7 @@ /* bit input functions */ void init_get_bits(GetBitContext *s, - UINT8 *buffer, int bit_size) + uint8_t *buffer, int bit_size) { const int buffer_size= (bit_size+7)>>3; @@ -160,16 +160,16 @@ #define GET_DATA(v, table, i, wrap, size) \ {\ - const UINT8 *ptr = (const UINT8 *)table + i * wrap;\ + const uint8_t *ptr = (const uint8_t *)table + i * wrap;\ switch(size) {\ case 1:\ - v = *(const UINT8 *)ptr;\ + v = *(const uint8_t *)ptr;\ break;\ case 2:\ - v = *(const UINT16 *)ptr;\ + v = *(const uint16_t *)ptr;\ break;\ default:\ - v = *(const UINT32 *)ptr;\ + v = *(const uint32_t *)ptr;\ break;\ }\ } @@ -194,10 +194,10 @@ int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, - UINT32 code_prefix, int n_prefix) + uint32_t code_prefix, int n_prefix) { int i, j, k, n, table_size, table_index, nb, n1, index; - UINT32 code; + uint32_t code; VLC_TYPE (*table)[2]; table_size = 1 << table_nb_bits;
--- a/common.h Mon Feb 10 22:43:30 2003 +0000 +++ b/common.h Tue Feb 11 16:35:48 2003 +0000 @@ -72,33 +72,24 @@ /* windows */ -typedef unsigned short UINT16; -typedef signed short INT16; -typedef unsigned char UINT8; -typedef unsigned int UINT32; -typedef unsigned __int64 UINT64; -typedef signed char INT8; -typedef signed int INT32; -typedef signed __int64 INT64; - -typedef UINT8 uint8_t; -typedef INT8 int8_t; -typedef UINT16 uint16_t; -typedef INT16 int16_t; -typedef UINT32 uint32_t; -typedef INT32 int32_t; -typedef UINT64 uint64_t; -typedef INT64 int64_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; +typedef signed char int8_t; +typedef signed int int32_t; +typedef signed __int64 int64_t; # ifndef __MINGW32__ -# define INT64_C(c) (c ## i64) -# define UINT64_C(c) (c ## i64) +# define int64_t_C(c) (c ## i64) +# define uint64_t_C(c) (c ## i64) # define inline __inline # else -# define INT64_C(c) (c ## LL) -# define UINT64_C(c) (c ## ULL) +# define int64_t_C(c) (c ## LL) +# define uint64_t_C(c) (c ## ULL) # endif /* __MINGW32__ */ # ifdef _DEBUG @@ -114,20 +105,11 @@ #include <inttypes.h> -typedef unsigned char UINT8; -typedef unsigned short UINT16; -typedef unsigned int UINT32; -typedef unsigned long long UINT64; -typedef signed char INT8; -typedef signed short INT16; -typedef signed int INT32; -typedef signed long long INT64; - #ifdef HAVE_AV_CONFIG_H -#ifndef INT64_C -#define INT64_C(c) (c ## LL) -#define UINT64_C(c) (c ## ULL) +#ifndef int64_t_C +#define int64_t_C(c) (c ## LL) +#define uint64_t_C(c) (c ## ULL) #endif #ifdef USE_FASTMEMCPY @@ -145,23 +127,10 @@ # include <inttypes.h> -# ifndef __WINE_WINDEF16_H -/* workaround for typedef conflict in MPlayer (wine typedefs) */ -typedef unsigned short UINT16; -typedef signed short INT16; -# endif - -typedef unsigned char UINT8; -typedef unsigned int UINT32; -typedef unsigned long long UINT64; -typedef signed char INT8; -typedef signed int INT32; -typedef signed long long INT64; - # ifdef HAVE_AV_CONFIG_H -# ifndef INT64_C -# define INT64_C(c) (c ## LL) -# define UINT64_C(c) (c ## ULL) +# ifndef int64_t_C +# define int64_t_C(c) (c ## LL) +# define uint64_t_C(c) (c ## ULL) # endif # ifdef USE_FASTMEMCPY @@ -240,26 +209,26 @@ struct PutBitContext; -typedef void (*WriteDataFunc)(void *, UINT8 *, int); +typedef void (*WriteDataFunc)(void *, uint8_t *, int); typedef struct PutBitContext { #ifdef ALT_BITSTREAM_WRITER - UINT8 *buf, *buf_end; + uint8_t *buf, *buf_end; int index; #else - UINT32 bit_buf; + uint32_t bit_buf; int bit_left; - UINT8 *buf, *buf_ptr, *buf_end; + uint8_t *buf, *buf_ptr, *buf_end; #endif - INT64 data_out_size; /* in bytes */ + int64_t data_out_size; /* in bytes */ } PutBitContext; void init_put_bits(PutBitContext *s, - UINT8 *buffer, int buffer_size, + uint8_t *buffer, int buffer_size, void *opaque, - void (*write_data)(void *, UINT8 *, int)); + void (*write_data)(void *, uint8_t *, int)); -INT64 get_bit_count(PutBitContext *s); /* XXX: change function name */ +int64_t get_bit_count(PutBitContext *s); /* XXX: change function name */ void align_put_bits(PutBitContext *s); void flush_put_bits(PutBitContext *s); void put_string(PutBitContext * pbc, char *s); @@ -267,17 +236,17 @@ /* bit input */ typedef struct GetBitContext { - UINT8 *buffer, *buffer_end; + uint8_t *buffer, *buffer_end; #ifdef ALT_BITSTREAM_READER int index; #elif defined LIBMPEG2_BITSTREAM_READER - UINT8 *buffer_ptr; - UINT32 cache; + uint8_t *buffer_ptr; + uint32_t cache; int bit_count; #elif defined A32_BITSTREAM_READER - UINT32 *buffer_ptr; - UINT32 cache0; - UINT32 cache1; + uint32_t *buffer_ptr; + uint32_t cache0; + uint32_t cache1; int bit_count; #endif int size_in_bits; @@ -285,7 +254,7 @@ static inline int get_bits_count(GetBitContext *s); -#define VLC_TYPE INT16 +#define VLC_TYPE int16_t typedef struct VLC { int bits; @@ -305,7 +274,7 @@ /* used to avoid missaligned exceptions on some archs (alpha, ...) */ #ifdef ARCH_X86 -# define unaligned32(a) (*(UINT32*)(a)) +# define unaligned32(a) (*(uint32_t*)(a)) #else # ifdef __GNUC__ static inline uint32_t unaligned32(const void *v) { @@ -357,7 +326,7 @@ s->buf_ptr[3] = bit_buf ; } else #endif - *(UINT32 *)s->buf_ptr = be2me_32(bit_buf); + *(uint32_t *)s->buf_ptr = be2me_32(bit_buf); //printf("bitbuf = %08x\n", bit_buf); s->buf_ptr+=4; bit_left+=32 - n; @@ -700,7 +669,7 @@ } void init_get_bits(GetBitContext *s, - UINT8 *buffer, int buffer_size); + uint8_t *buffer, int buffer_size); int check_marker(GetBitContext *s, const char *msg); void align_get_bits(GetBitContext *s);
--- a/cyuv.c Mon Feb 10 22:43:30 2003 +0000 +++ b/cyuv.c Tue Feb 11 16:35:48 2003 +0000 @@ -56,7 +56,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { CyuvDecodeContext *s=avctx->priv_data;
--- a/dct-test.c Mon Feb 10 22:43:30 2003 +0000 +++ b/dct-test.c Tue Feb 11 16:35:48 2003 +0000 @@ -40,13 +40,13 @@ 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 }; -UINT8 cropTbl[256 + 2 * MAX_NEG_CROP]; +uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; -INT64 gettime(void) +int64_t gettime(void) { struct timeval tv; gettimeofday(&tv,NULL); - return (INT64)tv.tv_sec * 1000000 + tv.tv_usec; + return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; } #define NB_ITS 20000 @@ -86,8 +86,8 @@ { int it, i, scale; int err_inf, v; - INT64 err2, ti, ti1, it1; - INT64 sysErr[64], sysErrMax=0; + int64_t err2, ti, ti1, it1; + int64_t sysErr[64], sysErrMax=0; int maxout=0; int blockSumErrMax=0, blockSumErr; @@ -261,10 +261,10 @@ #endif } -static UINT8 img_dest[64] __attribute__ ((aligned (8))); -static UINT8 img_dest1[64] __attribute__ ((aligned (8))); +static uint8_t img_dest[64] __attribute__ ((aligned (8))); +static uint8_t img_dest1[64] __attribute__ ((aligned (8))); -void idct248_ref(UINT8 *dest, int linesize, INT16 *block) +void idct248_ref(uint8_t *dest, int linesize, int16_t *block) { static int init; static double c8[8][8]; @@ -345,7 +345,7 @@ } void idct248_error(const char *name, - void (*idct248_put)(UINT8 *dest, int line_size, INT16 *block)) + void (*idct248_put)(uint8_t *dest, int line_size, int16_t *block)) { int it, i, it1, ti, ti1, err_max, v;
--- a/dsputil.c Mon Feb 10 22:43:30 2003 +0000 +++ b/dsputil.c Tue Feb 11 16:35:48 2003 +0000 @@ -24,10 +24,10 @@ int ff_bit_exact=0; -UINT8 cropTbl[256 + 2 * MAX_NEG_CROP]; -UINT32 squareTbl[512]; +uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; +uint32_t squareTbl[512]; -const UINT8 ff_zigzag_direct[64] = { +const uint8_t ff_zigzag_direct[64] = { 0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, @@ -39,9 +39,9 @@ }; /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ -UINT16 __align8 inv_zigzag_direct16[64]; +uint16_t __align8 inv_zigzag_direct16[64]; -const UINT8 ff_alternate_horizontal_scan[64] = { +const uint8_t ff_alternate_horizontal_scan[64] = { 0, 1, 2, 3, 8, 9, 16, 17, 10, 11, 4, 5, 6, 7, 15, 14, 13, 12, 19, 18, 24, 25, 32, 33, @@ -52,7 +52,7 @@ 52, 53, 54, 55, 60, 61, 62, 63, }; -const UINT8 ff_alternate_vertical_scan[64] = { +const uint8_t ff_alternate_vertical_scan[64] = { 0, 8, 16, 24, 1, 9, 2, 10, 17, 25, 32, 40, 48, 56, 57, 49, 41, 33, 26, 18, 3, 11, 4, 12, @@ -64,7 +64,7 @@ }; /* a*inverse[b]>>32 == a/b for all 0<=a<=65536 && 2<=b<=255 */ -const UINT32 inverse[256]={ +const uint32_t inverse[256]={ 0, 4294967295U,2147483648U,1431655766, 1073741824, 858993460, 715827883, 613566757, 536870912, 477218589, 429496730, 390451573, 357913942, 330382100, 306783379, 286331154, 268435456, 252645136, 238609295, 226050911, 214748365, 204522253, 195225787, 186737709, @@ -99,7 +99,7 @@ 17318417, 17248865, 17179870, 17111424, 17043522, 16976156, 16909321, 16843010, }; -static int pix_sum_c(UINT8 * pix, int line_size) +static int pix_sum_c(uint8_t * pix, int line_size) { int s, i, j; @@ -121,10 +121,10 @@ return s; } -static int pix_norm1_c(UINT8 * pix, int line_size) +static int pix_norm1_c(uint8_t * pix, int line_size) { int s, i, j; - UINT32 *sq = squareTbl + 256; + uint32_t *sq = squareTbl + 256; s = 0; for (i = 0; i < 16; i++) { @@ -170,10 +170,10 @@ } -static int sse8_c(void *v, UINT8 * pix1, UINT8 * pix2, int line_size) +static int sse8_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size) { int s, i; - UINT32 *sq = squareTbl + 256; + uint32_t *sq = squareTbl + 256; s = 0; for (i = 0; i < 8; i++) { @@ -221,7 +221,7 @@ return s; } -static void get_pixels_c(DCTELEM *restrict block, const UINT8 *pixels, int line_size) +static void get_pixels_c(DCTELEM *restrict block, const uint8_t *pixels, int line_size) { int i; @@ -240,8 +240,8 @@ } } -static void diff_pixels_c(DCTELEM *restrict block, const UINT8 *s1, - const UINT8 *s2, int stride){ +static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1, + const uint8_t *s2, int stride){ int i; /* read the pixels */ @@ -261,11 +261,11 @@ } -static void put_pixels_clamped_c(const DCTELEM *block, UINT8 *restrict pixels, +static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) { int i; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; /* read the pixels */ for(i=0;i<8;i++) { @@ -283,11 +283,11 @@ } } -static void add_pixels_clamped_c(const DCTELEM *block, UINT8 *restrict pixels, +static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) { int i; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; /* read the pixels */ for(i=0;i<8;i++) { @@ -702,7 +702,7 @@ #define avg4(a,b,c,d) ((a+b+c+d+2)>>2) -static void gmc1_c(UINT8 *dst, UINT8 *src, int stride, int h, int x16, int y16, int rounder) +static void gmc1_c(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder) { const int A=(16-x16)*(16-y16); const int B=( x16)*(16-y16); @@ -725,7 +725,7 @@ } } -static void gmc_c(UINT8 *dst, UINT8 *src, int stride, int h, int ox, int oy, +static void gmc_c(uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height) { int y, vx, vy; @@ -783,7 +783,7 @@ } } -static inline void copy_block17(UINT8 *dst, UINT8 *src, int dstStride, int srcStride, int h) +static inline void copy_block17(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h) { int i; for(i=0; i<h; i++) @@ -798,7 +798,7 @@ } } -static inline void copy_block9(UINT8 *dst, UINT8 *src, int dstStride, int srcStride, int h) +static inline void copy_block9(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h) { int i; for(i=0; i<h; i++) @@ -813,8 +813,8 @@ #define QPEL_MC(r, OPNAME, RND, OP) \ -static void OPNAME ## mpeg4_qpel8_h_lowpass(UINT8 *dst, UINT8 *src, int dstStride, int srcStride, int h){\ - UINT8 *cm = cropTbl + MAX_NEG_CROP;\ +static void OPNAME ## mpeg4_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ + uint8_t *cm = cropTbl + MAX_NEG_CROP;\ int i;\ for(i=0; i<h; i++)\ {\ @@ -831,9 +831,9 @@ }\ }\ \ -static void OPNAME ## mpeg4_qpel8_v_lowpass(UINT8 *dst, UINT8 *src, int dstStride, int srcStride){\ +static void OPNAME ## mpeg4_qpel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ const int w=8;\ - UINT8 *cm = cropTbl + MAX_NEG_CROP;\ + uint8_t *cm = cropTbl + MAX_NEG_CROP;\ int i;\ for(i=0; i<w; i++)\ {\ @@ -859,8 +859,8 @@ }\ }\ \ -static void OPNAME ## mpeg4_qpel16_h_lowpass(UINT8 *dst, UINT8 *src, int dstStride, int srcStride, int h){\ - UINT8 *cm = cropTbl + MAX_NEG_CROP;\ +static void OPNAME ## mpeg4_qpel16_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\ + uint8_t *cm = cropTbl + MAX_NEG_CROP;\ int i;\ \ for(i=0; i<h; i++)\ @@ -886,8 +886,8 @@ }\ }\ \ -static void OPNAME ## mpeg4_qpel16_v_lowpass(UINT8 *dst, UINT8 *src, int dstStride, int srcStride){\ - UINT8 *cm = cropTbl + MAX_NEG_CROP;\ +static void OPNAME ## mpeg4_qpel16_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ + uint8_t *cm = cropTbl + MAX_NEG_CROP;\ int i;\ const int w=16;\ for(i=0; i<w; i++)\ @@ -930,367 +930,367 @@ }\ }\ \ -static void OPNAME ## qpel8_mc00_c (UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc00_c (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels8_c(dst, src, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc10_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 half[64];\ +static void OPNAME ## qpel8_mc10_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t half[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2(dst, src, half, stride, stride, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc20_c(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc20_c(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel8_h_lowpass(dst, src, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc30_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 half[64];\ +static void OPNAME ## qpel8_mc30_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t half[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2(dst, src+1, half, stride, stride, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc01_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 half[64];\ +static void OPNAME ## qpel8_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t half[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16);\ OPNAME ## pixels8_l2(dst, full, half, stride, 16, 8, 8);\ }\ \ -static void OPNAME ## qpel8_mc02_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ +static void OPNAME ## qpel8_mc02_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ copy_block9(full, src, 16, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, full, stride, 16);\ }\ \ -static void OPNAME ## qpel8_mc03_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 half[64];\ +static void OPNAME ## qpel8_mc03_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t half[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16);\ OPNAME ## pixels8_l2(dst, full+16, half, stride, 16, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc11_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4(dst, full, halfH, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc11_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full, 8, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc31_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full+1, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4(dst, full+1, halfH, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc31_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full+1, 8, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc13_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4(dst, full+16, halfH+8, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc13_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full, 8, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc33_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full , 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full+1, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l4(dst, full+17, halfH+8, halfV, halfHV, stride, 16, 8, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc33_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full+1, 8, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc21_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc21_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc23_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[72];\ - UINT8 halfHV[64];\ +static void OPNAME ## qpel8_mc23_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[72];\ + uint8_t halfHV[64];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfH+8, halfHV, stride, 8, 8, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc12_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfV, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc12_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ +static void OPNAME ## qpel8_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full, 8, 8, 16, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ -void ff_ ## OPNAME ## qpel8_mc32_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ - UINT8 halfV[64];\ - UINT8 halfHV[64];\ +void ff_ ## OPNAME ## qpel8_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ + uint8_t halfV[64];\ + uint8_t halfHV[64];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfV, full+1, 8, 16);\ put ## RND ## mpeg4_qpel8_v_lowpass(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2(dst, halfV, halfHV, stride, 8, 8, 8);\ }\ -static void OPNAME ## qpel8_mc32_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[16*9];\ - UINT8 halfH[72];\ +static void OPNAME ## qpel8_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[16*9];\ + uint8_t halfH[72];\ copy_block9(full, src, 16, stride, 9);\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, full, 8, 16, 9);\ put ## RND ## pixels8_l2(halfH, halfH, full+1, 8, 8, 16, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel8_mc22_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[72];\ +static void OPNAME ## qpel8_mc22_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[72];\ put ## RND ## mpeg4_qpel8_h_lowpass(halfH, src, 8, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel16_mc00_c (UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc00_c (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels16_c(dst, src, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc10_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 half[256];\ +static void OPNAME ## qpel16_mc10_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t half[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2(dst, src, half, stride, stride, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc20_c(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc20_c(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel16_h_lowpass(dst, src, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc30_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 half[256];\ +static void OPNAME ## qpel16_mc30_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t half[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2(dst, src+1, half, stride, stride, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc01_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 half[256];\ +static void OPNAME ## qpel16_mc01_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t half[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24);\ OPNAME ## pixels16_l2(dst, full, half, stride, 24, 16, 16);\ }\ \ -static void OPNAME ## qpel16_mc02_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ +static void OPNAME ## qpel16_mc02_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ copy_block17(full, src, 24, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, full, stride, 24);\ }\ \ -static void OPNAME ## qpel16_mc03_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 half[256];\ +static void OPNAME ## qpel16_mc03_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t half[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24);\ OPNAME ## pixels16_l2(dst, full+24, half, stride, 24, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc11_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc11_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4(dst, full, halfH, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc11_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc11_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full, 16, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc31_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc31_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full+1, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4(dst, full+1, halfH, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc31_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc31_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full+1, 16, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc13_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc13_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4(dst, full+24, halfH+16, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc13_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc13_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full, 16, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc33_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc33_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full , 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full+1, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l4(dst, full+25, halfH+16, halfV, halfHV, stride, 24, 16, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc33_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full+1, 16, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc21_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc21_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc23_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[272];\ - UINT8 halfHV[256];\ +static void OPNAME ## qpel16_mc23_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[272];\ + uint8_t halfHV[256];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfH+16, halfHV, stride, 16, 16, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc12_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc12_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfV, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc12_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ +static void OPNAME ## qpel16_mc12_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full, 16, 16, 24, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ }\ -void ff_ ## OPNAME ## qpel16_mc32_old_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ - UINT8 halfV[256];\ - UINT8 halfHV[256];\ +void ff_ ## OPNAME ## qpel16_mc32_old_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ + uint8_t halfV[256];\ + uint8_t halfHV[256];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfV, full+1, 16, 24);\ put ## RND ## mpeg4_qpel16_v_lowpass(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2(dst, halfV, halfHV, stride, 16, 16, 16);\ }\ -static void OPNAME ## qpel16_mc32_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 full[24*17];\ - UINT8 halfH[272];\ +static void OPNAME ## qpel16_mc32_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t full[24*17];\ + uint8_t halfH[272];\ copy_block17(full, src, 24, stride, 17);\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, full, 16, 24, 17);\ put ## RND ## pixels16_l2(halfH, halfH, full+1, 16, 16, 24, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ }\ -static void OPNAME ## qpel16_mc22_c(UINT8 *dst, UINT8 *src, int stride){\ - UINT8 halfH[272];\ +static void OPNAME ## qpel16_mc22_c(uint8_t *dst, uint8_t *src, int stride){\ + uint8_t halfH[272];\ put ## RND ## mpeg4_qpel16_h_lowpass(halfH, src, 16, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass(dst, halfH, stride, 16);\ } @@ -1405,7 +1405,7 @@ } -static inline int pix_abs16x16_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static inline int pix_abs16x16_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; @@ -1433,7 +1433,7 @@ return s; } -static int pix_abs16x16_x2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs16x16_x2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; @@ -1461,10 +1461,10 @@ return s; } -static int pix_abs16x16_y2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs16x16_y2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; - UINT8 *pix3 = pix2 + line_size; + uint8_t *pix3 = pix2 + line_size; s = 0; for(i=0;i<16;i++) { @@ -1491,10 +1491,10 @@ return s; } -static int pix_abs16x16_xy2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs16x16_xy2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; - UINT8 *pix3 = pix2 + line_size; + uint8_t *pix3 = pix2 + line_size; s = 0; for(i=0;i<16;i++) { @@ -1521,7 +1521,7 @@ return s; } -static inline int pix_abs8x8_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static inline int pix_abs8x8_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; @@ -1541,7 +1541,7 @@ return s; } -static int pix_abs8x8_x2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs8x8_x2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; @@ -1561,10 +1561,10 @@ return s; } -static int pix_abs8x8_y2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs8x8_y2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; - UINT8 *pix3 = pix2 + line_size; + uint8_t *pix3 = pix2 + line_size; s = 0; for(i=0;i<8;i++) { @@ -1583,10 +1583,10 @@ return s; } -static int pix_abs8x8_xy2_c(UINT8 *pix1, UINT8 *pix2, int line_size) +static int pix_abs8x8_xy2_c(uint8_t *pix1, uint8_t *pix2, int line_size) { int s, i; - UINT8 *pix3 = pix2 + line_size; + uint8_t *pix3 = pix2 + line_size; s = 0; for(i=0;i<8;i++) { @@ -1613,7 +1613,7 @@ return pix_abs8x8_c(a,b,stride); } -void ff_block_permute(DCTELEM *block, UINT8 *permutation, const UINT8 *scantable, int last) +void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last) { int i; DCTELEM temp[64]; @@ -1822,7 +1822,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride){ MpegEncContext * const s= (MpegEncContext *)c; - const UINT8 *scantable= s->intra_scantable.permutated; + const uint8_t *scantable= s->intra_scantable.permutated; uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8]; uint64_t __align8 aligned_bak[stride]; DCTELEM * const temp= (DCTELEM*)aligned_temp; @@ -1896,7 +1896,7 @@ static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride){ MpegEncContext * const s= (MpegEncContext *)c; - const UINT8 *scantable= s->intra_scantable.permutated; + const uint8_t *scantable= s->intra_scantable.permutated; uint64_t __align8 aligned_temp[sizeof(DCTELEM)*64/8]; DCTELEM * const temp= (DCTELEM*)aligned_temp; int i, last, run, bits, level, start_i;
--- a/dsputil.h Mon Feb 10 22:43:30 2003 +0000 +++ b/dsputil.h Tue Feb 11 16:35:48 2003 +0000 @@ -35,16 +35,16 @@ void ff_fdct_mmx(DCTELEM *block); /* encoding scans */ -extern const UINT8 ff_alternate_horizontal_scan[64]; -extern const UINT8 ff_alternate_vertical_scan[64]; -extern const UINT8 ff_zigzag_direct[64]; +extern const uint8_t ff_alternate_horizontal_scan[64]; +extern const uint8_t ff_alternate_vertical_scan[64]; +extern const uint8_t ff_zigzag_direct[64]; /* pixel operations */ #define MAX_NEG_CROP 384 /* temporary */ -extern UINT32 squareTbl[512]; -extern UINT8 cropTbl[256 + 2 * MAX_NEG_CROP]; +extern uint32_t squareTbl[512]; +extern uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; /* minimum alignment rules ;) @@ -58,22 +58,22 @@ */ /* -void get_pixels_c(DCTELEM *block, const UINT8 *pixels, int line_size); -void diff_pixels_c(DCTELEM *block, const UINT8 *s1, const UINT8 *s2, int stride); -void put_pixels_clamped_c(const DCTELEM *block, UINT8 *pixels, int line_size); -void add_pixels_clamped_c(const DCTELEM *block, UINT8 *pixels, int line_size); +void get_pixels_c(DCTELEM *block, const uint8_t *pixels, int line_size); +void diff_pixels_c(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride); +void put_pixels_clamped_c(const DCTELEM *block, uint8_t *pixels, int line_size); +void add_pixels_clamped_c(const DCTELEM *block, uint8_t *pixels, int line_size); void clear_blocks_c(DCTELEM *blocks); */ /* add and put pixel (decoding) */ // blocksizes for op_pixels_func are 8x4,8x8 16x8 16x16 -typedef void (*op_pixels_func)(UINT8 *block/*align width (8 or 16)*/, const UINT8 *pixels/*align 1*/, int line_size, int h); -typedef void (*qpel_mc_func)(UINT8 *dst/*align width (8 or 16)*/, UINT8 *src/*align 1*/, int stride); +typedef void (*op_pixels_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, int line_size, int h); +typedef void (*qpel_mc_func)(uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride); #define DEF_OLD_QPEL(name)\ -void ff_put_ ## name (UINT8 *dst/*align width (8 or 16)*/, UINT8 *src/*align 1*/, int stride);\ -void ff_put_no_rnd_ ## name (UINT8 *dst/*align width (8 or 16)*/, UINT8 *src/*align 1*/, int stride);\ -void ff_avg_ ## name (UINT8 *dst/*align width (8 or 16)*/, UINT8 *src/*align 1*/, int stride); +void ff_put_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride);\ +void ff_put_no_rnd_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride);\ +void ff_avg_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride); DEF_OLD_QPEL(qpel16_mc11_old_c) DEF_OLD_QPEL(qpel16_mc31_old_c) @@ -96,22 +96,22 @@ /* motion estimation */ -typedef int (*op_pixels_abs_func)(UINT8 *blk1/*align width (8 or 16)*/, UINT8 *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/; +typedef int (*op_pixels_abs_func)(uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/; -typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, UINT8 *blk1/*align width (8 or 16)*/, UINT8 *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/; +typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/; typedef struct DSPContext { /* pixel ops : interface with DCT */ - void (*get_pixels)(DCTELEM *block/*align 16*/, const UINT8 *pixels/*align 8*/, int line_size); - void (*diff_pixels)(DCTELEM *block/*align 16*/, const UINT8 *s1/*align 8*/, const UINT8 *s2/*align 8*/, int stride); - void (*put_pixels_clamped)(const DCTELEM *block/*align 16*/, UINT8 *pixels/*align 8*/, int line_size); - void (*add_pixels_clamped)(const DCTELEM *block/*align 16*/, UINT8 *pixels/*align 8*/, int line_size); - void (*gmc1)(UINT8 *dst/*align 8*/, UINT8 *src/*align 1*/, int srcStride, int h, int x16, int y16, int rounder); - void (*gmc )(UINT8 *dst/*align 8*/, UINT8 *src/*align 1*/, int stride, int h, int ox, int oy, + void (*get_pixels)(DCTELEM *block/*align 16*/, const uint8_t *pixels/*align 8*/, int line_size); + void (*diff_pixels)(DCTELEM *block/*align 16*/, const uint8_t *s1/*align 8*/, const uint8_t *s2/*align 8*/, int stride); + void (*put_pixels_clamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); + void (*add_pixels_clamped)(const DCTELEM *block/*align 16*/, uint8_t *pixels/*align 8*/, int line_size); + void (*gmc1)(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int srcStride, int h, int x16, int y16, int rounder); + void (*gmc )(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height); void (*clear_blocks)(DCTELEM *blocks/*align 16*/); - int (*pix_sum)(UINT8 * pix, int line_size); - int (*pix_norm1)(UINT8 * pix, int line_size); + int (*pix_sum)(uint8_t * pix, int line_size); + int (*pix_norm1)(uint8_t * pix, int line_size); me_cmp_func sad[2]; /* identical to pix_absAxA except additional void * */ me_cmp_func sse[2]; me_cmp_func hadamard8_diff[2]; @@ -157,7 +157,7 @@ * permute block according to permuatation. * @param last last non zero element in scantable order */ -void ff_block_permute(DCTELEM *block, UINT8 *permutation, const UINT8 *scantable, int last); +void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last); #define emms_c() @@ -177,8 +177,8 @@ extern int mm_flags; -void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line_size); -void put_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line_size); +void add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); +void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); static inline void emms(void) { @@ -264,7 +264,7 @@ #endif /* !__GNUC__ */ /* PSNR */ -void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3], +void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3], int orig_linesize[3], int coded_linesize, AVCodecContext *avctx);
--- a/dv.c Mon Feb 10 22:43:30 2003 +0000 +++ b/dv.c Tue Feb 11 16:35:48 2003 +0000 @@ -32,15 +32,15 @@ VLC *vlc; int sampling_411; /* 0 = 420, 1 = 411 */ int width, height; - UINT8 *current_picture[3]; /* picture structure */ + uint8_t *current_picture[3]; /* picture structure */ AVFrame picture; int linesize[3]; DCTELEM block[5*6][64] __align8; - UINT8 dv_zigzag[2][64]; - UINT8 idct_permutation[64]; + uint8_t dv_zigzag[2][64]; + uint8_t idct_permutation[64]; /* XXX: move it to static storage ? */ - UINT8 dv_shift[2][22][64]; - void (*idct_put[2])(UINT8 *dest, int line_size, DCTELEM *block); + uint8_t dv_shift[2][22][64]; + void (*idct_put[2])(uint8_t *dest, int line_size, DCTELEM *block); } DVVideoDecodeContext; #include "dvdata.h" @@ -136,18 +136,18 @@ //#define VLC_DEBUG typedef struct BlockInfo { - const UINT8 *shift_table; - const UINT8 *scan_table; - UINT8 pos; /* position in block */ - UINT8 eob_reached; /* true if EOB has been reached */ - UINT8 dct_mode; - UINT8 partial_bit_count; - UINT16 partial_bit_buffer; + const uint8_t *shift_table; + const uint8_t *scan_table; + uint8_t pos; /* position in block */ + uint8_t eob_reached; /* true if EOB has been reached */ + uint8_t dct_mode; + uint8_t partial_bit_count; + uint16_t partial_bit_buffer; int shift_offset; } BlockInfo; /* block size in bits */ -static const UINT16 block_sizes[6] = { +static const uint16_t block_sizes[6] = { 112, 112, 112, 112, 80, 80 }; @@ -161,8 +161,8 @@ { int last_re_index; int shift_offset = mb->shift_offset; - const UINT8 *scan_table = mb->scan_table; - const UINT8 *shift_table = mb->shift_table; + const uint8_t *scan_table = mb->scan_table; + const uint8_t *shift_table = mb->shift_table; int pos = mb->pos; int level, pos1, sign, run; int partial_bit_count; @@ -176,8 +176,8 @@ /* if we must parse a partial vlc, we do it here */ partial_bit_count = mb->partial_bit_count; if (partial_bit_count > 0) { - UINT8 buf[4]; - UINT32 v; + uint8_t buf[4]; + uint32_t v; int l, l1; GetBitContext gb1; @@ -298,21 +298,21 @@ /* mb_x and mb_y are in units of 8 pixels */ static inline void dv_decode_video_segment(DVVideoDecodeContext *s, - UINT8 *buf_ptr1, - const UINT16 *mb_pos_ptr) + uint8_t *buf_ptr1, + const uint16_t *mb_pos_ptr) { int quant, dc, dct_mode, class1, j; int mb_index, mb_x, mb_y, v, last_index; DCTELEM *block, *block1; int c_offset, bits_left; - UINT8 *y_ptr; + uint8_t *y_ptr; BlockInfo mb_data[5 * 6], *mb, *mb1; - void (*idct_put)(UINT8 *dest, int line_size, DCTELEM *block); - UINT8 *buf_ptr; + void (*idct_put)(uint8_t *dest, int line_size, DCTELEM *block); + uint8_t *buf_ptr; PutBitContext pb, vs_pb; - UINT8 mb_bit_buffer[80 + 4]; /* allow some slack */ + uint8_t mb_bit_buffer[80 + 4]; /* allow some slack */ int mb_bit_count; - UINT8 vs_bit_buffer[5 * 80 + 4]; /* allow some slack */ + uint8_t vs_bit_buffer[5 * 80 + 4]; /* allow some slack */ int vs_bit_count; memset(s->block, 0, sizeof(s->block)); @@ -493,12 +493,12 @@ 144000 bytes for PAL) */ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { DVVideoDecodeContext *s = avctx->priv_data; int sct, dsf, apt, ds, nb_dif_segs, vs, width, height, i, packet_size; - UINT8 *buf_ptr; - const UINT16 *mb_pos_ptr; + uint8_t *buf_ptr; + const uint16_t *mb_pos_ptr; /* parse id */ init_get_bits(&s->gb, buf, buf_size*8); @@ -642,9 +642,9 @@ return 0; } -static UINT16 dv_audio_12to16(UINT16 sample) +static uint16_t dv_audio_12to16(uint16_t sample) { - UINT16 shift, result; + uint16_t shift, result; sample = (sample < 0x800) ? sample : sample | 0xf000; shift = (sample & 0xf00) >> 8; @@ -676,13 +676,13 @@ */ static int dvaudio_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { DVVideoDecodeContext *s = avctx->priv_data; - const UINT16 (*unshuffle)[9]; + const uint16_t (*unshuffle)[9]; int smpls, freq, quant, sys, stride, difseg, ad, dp, nb_dif_segs, i; - UINT16 lc, rc; - UINT8 *buf_ptr; + uint16_t lc, rc; + uint8_t *buf_ptr; /* parse id */ init_get_bits(&s->gb, &buf[AAUX_OFFSET], 5*8); @@ -742,10 +742,10 @@ if (difseg >= nb_dif_segs/2) goto out; /* We're not doing 4ch at this time */ - lc = ((UINT16)buf_ptr[dp] << 4) | - ((UINT16)buf_ptr[dp+2] >> 4); - rc = ((UINT16)buf_ptr[dp+1] << 4) | - ((UINT16)buf_ptr[dp+2] & 0x0f); + lc = ((uint16_t)buf_ptr[dp] << 4) | + ((uint16_t)buf_ptr[dp+2] >> 4); + rc = ((uint16_t)buf_ptr[dp+1] << 4) | + ((uint16_t)buf_ptr[dp+2] & 0x0f); lc = dv_audio_12to16(lc); rc = dv_audio_12to16(rc);
--- a/dvdata.h Mon Feb 10 22:43:30 2003 +0000 +++ b/dvdata.h Tue Feb 11 16:35:48 2003 +0000 @@ -20,7 +20,7 @@ #define NB_DV_VLC 409 #define AAUX_OFFSET (80*6 + 80*16*3 + 3) -static const UINT16 dv_vlc_bits[409] = { +static const uint16_t dv_vlc_bits[409] = { 0x0000, 0x0002, 0x0007, 0x0008, 0x0009, 0x0014, 0x0015, 0x0016, 0x0017, 0x0030, 0x0031, 0x0032, 0x0033, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, 0x00e0, 0x00e1, 0x00e2, @@ -75,7 +75,7 @@ 0x0006, }; -static const UINT8 dv_vlc_len[409] = { +static const uint8_t dv_vlc_len[409] = { 2, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, @@ -130,7 +130,7 @@ 4, }; -static const UINT8 dv_vlc_run[409] = { +static const uint8_t dv_vlc_run[409] = { 0, 0, 1, 0, 0, 2, 1, 0, 0, 3, 4, 0, 0, 5, 6, 2, 1, 1, 0, 0, 0, 7, 8, 9, @@ -185,7 +185,7 @@ 0, }; -static const UINT8 dv_vlc_level[409] = { +static const uint8_t dv_vlc_level[409] = { 1, 2, 1, 3, 4, 1, 2, 5, 6, 1, 1, 7, 8, 1, 1, 2, 3, 4, 9, 10, 11, 1, 1, 1, @@ -242,7 +242,7 @@ /* Specific zigzag scan for 248 idct. NOTE that unlike the specification, we interleave the fields */ -static const UINT8 dv_248_zigzag[64] = { +static const uint8_t dv_248_zigzag[64] = { 0, 8, 1, 9, 16, 24, 2, 10, 17, 25, 32, 40, 48, 56, 33, 41, 18, 26, 3, 11, 4, 12, 19, 27, @@ -254,7 +254,7 @@ }; /* unquant tables (not used directly) */ -static const UINT8 dv_88_areas[64] = { +static const uint8_t dv_88_areas[64] = { 0,0,0,1,1,1,2,2, 0,0,1,1,1,2,2,2, 0,1,1,1,2,2,2,3, @@ -265,7 +265,7 @@ 2,2,3,3,3,3,3,3, }; -static const UINT8 dv_248_areas[64] = { +static const uint8_t dv_248_areas[64] = { 0,0,1,1,1,2,2,3, 0,0,1,1,2,2,2,3, 0,1,1,2,2,2,3,3, @@ -276,7 +276,7 @@ 1,2,2,3,3,3,3,3, }; -static UINT8 dv_quant_shifts[22][4] = { +static uint8_t dv_quant_shifts[22][4] = { { 3,3,4,4 }, { 3,3,4,4 }, { 2,3,3,4 }, @@ -301,12 +301,12 @@ { 0,0,0,0 }, }; -static const UINT8 dv_quant_offset[4] = { 6, 3, 0, 1 }; +static const uint8_t dv_quant_offset[4] = { 6, 3, 0, 1 }; /* NOTE: I prefer hardcoding the positionning of dv blocks, it is simpler :-) */ -static const UINT16 dv_place_420[1620] = { +static const uint16_t dv_place_420[1620] = { 0x0c24, 0x2412, 0x3036, 0x0000, 0x1848, 0x0e24, 0x2612, 0x3236, 0x0200, 0x1a48, 0x1024, 0x2812, 0x3436, 0x0400, 0x1c48, @@ -633,7 +633,7 @@ 0x0a34, 0x2222, 0x2e46, 0x4610, 0x1658, }; -static const UINT16 dv_place_411[1350] = { +static const uint16_t dv_place_411[1350] = { 0x0c24, 0x2710, 0x3334, 0x0000, 0x1848, 0x0d24, 0x2810, 0x3434, 0x0100, 0x1948, 0x0e24, 0x2910, 0x3534, 0x0200, 0x1a48, @@ -906,7 +906,7 @@ 0x0834, 0x2320, 0x2f44, 0x3810, 0x1658, }; -static const UINT16 dv_place_audio60[10][9] = { +static const uint16_t dv_place_audio60[10][9] = { { 0, 30, 60, 20, 50, 80, 10, 40, 70 }, /* 1st channel */ { 6, 36, 66, 26, 56, 86, 16, 46, 76 }, { 12, 42, 72, 2, 32, 62, 22, 52, 82 }, @@ -920,7 +920,7 @@ { 25, 55, 85, 15, 45, 75, 5, 35, 65 }, }; -static const UINT16 dv_place_audio50[12][9] = { +static const uint16_t dv_place_audio50[12][9] = { { 0, 36, 72, 26, 62, 98, 16, 52, 88}, /* 1st channel */ { 6, 42, 78, 32, 68, 104, 22, 58, 94}, { 12, 48, 84, 2, 38, 74, 28, 64, 100},
--- a/error_resilience.c Mon Feb 10 22:43:30 2003 +0000 +++ b/error_resilience.c Tue Feb 11 16:35:48 2003 +0000 @@ -54,7 +54,7 @@ } } -static void filter181(INT16 *data, int width, int height, int stride){ +static void filter181(int16_t *data, int width, int height, int stride){ int x,y; /* horizontal filter */ @@ -95,7 +95,7 @@ * @param w width in 8 pixel blocks * @param h height in 8 pixel blocks */ -static void guess_dc(MpegEncContext *s, INT16 *dc, int w, int h, int stride, int is_luma){ +static void guess_dc(MpegEncContext *s, int16_t *dc, int w, int h, int stride, int is_luma){ int b_x, b_y; for(b_y=0; b_y<h; b_y++){ @@ -103,7 +103,7 @@ int color[4]={1024,1024,1024,1024}; int distance[4]={9999,9999,9999,9999}; int mb_index, error, j; - INT64 guess, weight_sum; + int64_t guess, weight_sum; mb_index= (b_x>>is_luma) + (b_y>>is_luma)*s->mb_width; @@ -163,8 +163,8 @@ weight_sum=0; guess=0; for(j=0; j<4; j++){ - INT64 weight= 256*256*256*16/distance[j]; - guess+= weight*(INT64)color[j]; + int64_t weight= 256*256*256*16/distance[j]; + guess+= weight*(int64_t)color[j]; weight_sum+= weight; } guess= (guess + weight_sum/2) / weight_sum; @@ -179,9 +179,9 @@ * @param w width in 8 pixel blocks * @param h height in 8 pixel blocks */ -static void h_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stride, int is_luma){ +static void h_block_filter(MpegEncContext *s, uint8_t *dst, int w, int h, int stride, int is_luma){ int b_x, b_y; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; for(b_y=0; b_y<h; b_y++){ for(b_x=0; b_x<w-1; b_x++){ @@ -193,8 +193,8 @@ int left_damage = left_status&(DC_ERROR|AC_ERROR|MV_ERROR); int right_damage= right_status&(DC_ERROR|AC_ERROR|MV_ERROR); int offset= b_x*8 + b_y*stride*8; - INT16 *left_mv= s->motion_val[s->block_wrap[0]*((b_y<<(1-is_luma)) + 1) + ( b_x <<(1-is_luma))]; - INT16 *right_mv= s->motion_val[s->block_wrap[0]*((b_y<<(1-is_luma)) + 1) + ((b_x+1)<<(1-is_luma))]; + int16_t *left_mv= s->motion_val[s->block_wrap[0]*((b_y<<(1-is_luma)) + 1) + ( b_x <<(1-is_luma))]; + int16_t *right_mv= s->motion_val[s->block_wrap[0]*((b_y<<(1-is_luma)) + 1) + ((b_x+1)<<(1-is_luma))]; if(!(left_damage||right_damage)) continue; // both undamaged @@ -239,9 +239,9 @@ * @param w width in 8 pixel blocks * @param h height in 8 pixel blocks */ -static void v_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stride, int is_luma){ +static void v_block_filter(MpegEncContext *s, uint8_t *dst, int w, int h, int stride, int is_luma){ int b_x, b_y; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; for(b_y=0; b_y<h-1; b_y++){ for(b_x=0; b_x<w; b_x++){ @@ -253,8 +253,8 @@ int top_damage = top_status&(DC_ERROR|AC_ERROR|MV_ERROR); int bottom_damage= bottom_status&(DC_ERROR|AC_ERROR|MV_ERROR); int offset= b_x*8 + b_y*stride*8; - INT16 *top_mv= s->motion_val[s->block_wrap[0]*(( b_y <<(1-is_luma)) + 1) + (b_x<<(1-is_luma))]; - INT16 *bottom_mv= s->motion_val[s->block_wrap[0]*(((b_y+1)<<(1-is_luma)) + 1) + (b_x<<(1-is_luma))]; + int16_t *top_mv= s->motion_val[s->block_wrap[0]*(( b_y <<(1-is_luma)) + 1) + (b_x<<(1-is_luma))]; + int16_t *bottom_mv= s->motion_val[s->block_wrap[0]*(((b_y+1)<<(1-is_luma)) + 1) + (b_x<<(1-is_luma))]; if(!(top_damage||bottom_damage)) continue; // both undamaged @@ -295,7 +295,7 @@ } static void guess_mv(MpegEncContext *s){ - UINT8 fixed[s->mb_num]; + uint8_t fixed[s->mb_num]; #define MV_FROZEN 3 #define MV_CHANGED 2 #define MV_UNCHANGED 1 @@ -464,7 +464,7 @@ s->mb_y= mb_y; for(j=0; j<pred_count; j++){ int score=0; - UINT8 *src= s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *src= s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; s->motion_val[mot_index][0]= s->mv[0][0][0]= mv_predictor[j][0]; s->motion_val[mot_index][1]= s->mv[0][0][1]= mv_predictor[j][1]; @@ -558,8 +558,8 @@ if((j%skip_amount) != 0) continue; //skip a few to speed things up if(s->pict_type==I_TYPE){ - UINT8 *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; - UINT8 *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; + uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; is_intra_likely += s->dsp.pix_abs16x16(last_mb_ptr, mb_ptr , s->linesize); is_intra_likely -= s->dsp.pix_abs16x16(last_mb_ptr, last_mb_ptr+s->linesize*16, s->linesize); @@ -795,8 +795,8 @@ for(mb_y=0; mb_y<s->mb_height; mb_y++){ for(mb_x=0; mb_x<s->mb_width; mb_x++){ int dc, dcu, dcv, y, n; - INT16 *dc_ptr; - UINT8 *dest_y, *dest_cb, *dest_cr; + int16_t *dc_ptr; + uint8_t *dest_y, *dest_cb, *dest_cr; i++; error= s->error_status_table[i]; @@ -846,7 +846,7 @@ i= -1; for(mb_y=0; mb_y<s->mb_height; mb_y++){ for(mb_x=0; mb_x<s->mb_width; mb_x++){ - UINT8 *dest_y, *dest_cb, *dest_cr; + uint8_t *dest_y, *dest_cb, *dest_cr; i++; error= s->error_status_table[i];
--- a/fft-test.c Mon Feb 10 22:43:30 2003 +0000 +++ b/fft-test.c Tue Feb 11 16:35:48 2003 +0000 @@ -105,11 +105,11 @@ return (float)((random() & 0xffff) - 32768) / 32768.0; } -INT64 gettime(void) +int64_t gettime(void) { struct timeval tv; gettimeofday(&tv,NULL); - return (INT64)tv.tv_sec * 1000000 + tv.tv_usec; + return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; } void check_diff(float *tab1, float *tab2, int n) @@ -233,7 +233,7 @@ /* do a speed test */ if (do_speed) { - INT64 time_start, duration; + int64_t time_start, duration; int nb_its; printf("Speed test...\n");
--- a/h263.c Mon Feb 10 22:43:30 2003 +0000 +++ b/h263.c Tue Feb 11 16:35:48 2003 +0000 @@ -61,7 +61,7 @@ static void h263_encode_motion(MpegEncContext * s, int val, int fcode); static void h263p_encode_umotion(MpegEncContext * s, int val); static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, - int n, int dc, UINT8 *scan_table, + int n, int dc, uint8_t *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb); #endif @@ -72,23 +72,23 @@ static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr); static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block, int n, int coded, int intra); -static int h263_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr); +static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr); static void mpeg4_inv_pred_ac(MpegEncContext * s, DCTELEM *block, int n, int dir); static void mpeg4_decode_sprite_trajectory(MpegEncContext * s); -static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr, int *dir_ptr); - -extern UINT32 inverse[256]; - -static UINT8 uni_DCtab_lum_len[512]; -static UINT8 uni_DCtab_chrom_len[512]; -static UINT16 uni_DCtab_lum_bits[512]; -static UINT16 uni_DCtab_chrom_bits[512]; +static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr, int *dir_ptr); + +extern uint32_t inverse[256]; + +static uint8_t uni_DCtab_lum_len[512]; +static uint8_t uni_DCtab_chrom_len[512]; +static uint16_t uni_DCtab_lum_bits[512]; +static uint16_t uni_DCtab_chrom_bits[512]; #ifdef CONFIG_ENCODERS -static UINT16 (*mv_penalty)[MAX_MV*2+1]= NULL; -static UINT8 fcode_tab[MAX_MV*2+1]; -static UINT8 umv_fcode_tab[MAX_MV*2+1]; +static uint16_t (*mv_penalty)[MAX_MV*2+1]= NULL; +static uint8_t fcode_tab[MAX_MV*2+1]; +static uint8_t umv_fcode_tab[MAX_MV*2+1]; static uint32_t uni_mpeg4_intra_rl_bits[64*64*2*2]; static uint8_t uni_mpeg4_intra_rl_len [64*64*2*2]; @@ -161,7 +161,7 @@ s->gob_number = 0; put_bits(&s->pb, 22, 0x20); /* PSC */ - put_bits(&s->pb, 8, (((INT64)s->picture_number * 30 * FRAME_RATE_BASE) / + put_bits(&s->pb, 8, (((int64_t)s->picture_number * 30 * FRAME_RATE_BASE) / s->frame_rate) & 0xff); put_bits(&s->pb, 1, 1); /* marker */ @@ -280,7 +280,7 @@ int8_t * const qscale_table= s->current_picture.qscale_table; for(n=0; n<6; n++){ - INT16 *ac_val, *ac_val1; + int16_t *ac_val, *ac_val1; ac_val = s->ac_val[0][0] + s->block_index[n] * 16; ac_val1= ac_val; @@ -728,12 +728,12 @@ int dc_diff[6]; //dc values with the dc prediction subtracted int dir[6]; //prediction direction int zigzag_last_index[6]; - UINT8 *scan_table[6]; + uint8_t *scan_table[6]; int i; for(i=0; i<6; i++){ const int level= block[i][0]; - UINT16 *dc_ptr; + uint16_t *dc_ptr; dc_diff[i]= level - ff_mpeg4_pred_dc(s, i, &dc_ptr, &dir[i]); if (i < 4) { @@ -747,7 +747,7 @@ if(s->ac_pred){ for(i=0; i<6; i++){ - UINT8 *st; + uint8_t *st; int last_index; mpeg4_inv_pred_ac(s, block[i], i, dir[i]); @@ -817,7 +817,7 @@ if(s->ac_pred){ for(i=0; i<6; i++){ int j; - INT16 *ac_val; + int16_t *ac_val; ac_val = s->ac_val[0][0] + s->block_index[i] * 16; @@ -839,9 +839,9 @@ int motion_x, int motion_y) { int cbpc, cbpy, i, cbp, pred_x, pred_y; - INT16 pred_dc; - INT16 rec_intradc[6]; - UINT16 *dc_ptr[6]; + int16_t pred_dc; + int16_t rec_intradc[6]; + uint16_t *dc_ptr[6]; const int dquant_code[5]= {1,0,9,2,3}; //printf("**mb x=%d y=%d\n", s->mb_x, s->mb_y); @@ -890,7 +890,7 @@ for(i=0; i<6; i++) { /* Predict DC */ if (s->h263_aic && s->mb_intra) { - INT16 level = block[i][0]; + int16_t level = block[i][0]; pred_dc = h263_pred_dc(s, i, &dc_ptr[i]); level -= pred_dc; @@ -965,10 +965,10 @@ } #endif -static int h263_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr) +static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr) { int x, y, wrap, a, c, pred_dc, scale; - INT16 *dc_val, *ac_val; + int16_t *dc_val, *ac_val; /* find prediction */ if (n < 4) { @@ -1014,7 +1014,7 @@ static void h263_pred_acdc(MpegEncContext * s, DCTELEM *block, int n) { int x, y, wrap, a, c, pred_dc, scale, i; - INT16 *dc_val, *ac_val, *ac_val1; + int16_t *dc_val, *ac_val, *ac_val1; /* find prediction */ if (n < 4) { @@ -1095,11 +1095,11 @@ ac_val1[8 + i] = block[s->idct_permutation[i ]]; } -INT16 *h263_pred_motion(MpegEncContext * s, int block, +int16_t *h263_pred_motion(MpegEncContext * s, int block, int *px, int *py) { int xy, wrap; - INT16 *A, *B, *C, *mot_val; + int16_t *A, *B, *C, *mot_val; static const int off[4]= {2, 1, 1, -1}; wrap = s->block_wrap[0]; @@ -1249,7 +1249,7 @@ int mv; if(mv_penalty==NULL) - mv_penalty= av_mallocz( sizeof(UINT16)*(MAX_FCODE+1)*(2*MAX_MV+1) ); + mv_penalty= av_mallocz( sizeof(uint16_t)*(MAX_FCODE+1)*(2*MAX_MV+1) ); for(f_code=1; f_code<=MAX_FCODE; f_code++){ for(mv=-MAX_MV; mv<=MAX_MV; mv++){ @@ -1343,7 +1343,7 @@ } #ifdef CONFIG_ENCODERS -static void init_uni_mpeg4_rl_tab(RLTable *rl, UINT32 *bits_tab, UINT8 *len_tab){ +static void init_uni_mpeg4_rl_tab(RLTable *rl, uint32_t *bits_tab, uint8_t *len_tab){ int slevel, run, last; assert(MAX_LEVEL >= 64); @@ -1575,7 +1575,7 @@ if(s->current_picture.pts) s->time= (s->current_picture.pts*s->time_increment_resolution + 500*1000)/(1000*1000); else - s->time= picture_number*(INT64)FRAME_RATE_BASE*s->time_increment_resolution/s->frame_rate; + s->time= picture_number*(int64_t)FRAME_RATE_BASE*s->time_increment_resolution/s->frame_rate; time_div= s->time/s->time_increment_resolution; time_mod= s->time%s->time_increment_resolution; @@ -1821,10 +1821,10 @@ * @param dir_ptr pointer to an integer where the prediction direction will be stored * @return the quantized predicted dc */ -static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, UINT16 **dc_val_ptr, int *dir_ptr) +static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr, int *dir_ptr) { int a, b, c, wrap, pred, scale; - UINT16 *dc_val; + uint16_t *dc_val; int dummy; /* find prediction */ @@ -1887,7 +1887,7 @@ int dir) { int i; - INT16 *ac_val, *ac_val1; + int16_t *ac_val, *ac_val1; int8_t * const qscale_table= s->current_picture.qscale_table; /* find prediction */ @@ -1942,7 +1942,7 @@ int dir) { int i; - INT16 *ac_val; + int16_t *ac_val; int8_t * const qscale_table= s->current_picture.qscale_table; /* find prediction */ @@ -2031,15 +2031,15 @@ * @param n block index (0-3 are luma, 4-5 are chroma) */ static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, - UINT8 *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb) + uint8_t *scan_table, PutBitContext *dc_pb, PutBitContext *ac_pb) { int i, last_non_zero; #if 0 //variables for the outcommented version int code, sign, last; #endif const RLTable *rl; - UINT32 *bits_tab; - UINT8 *len_tab; + uint32_t *bits_tab; + uint8_t *len_tab; const int last_index = s->block_last_index[n]; if (s->mb_intra) { //Note gcc (3.2.1 at least) will optimize this away @@ -2147,11 +2147,11 @@ } static inline int mpeg4_get_block_length(MpegEncContext * s, DCTELEM * block, int n, int intra_dc, - UINT8 *scan_table) + uint8_t *scan_table) { int i, last_non_zero; const RLTable *rl; - UINT8 *len_tab; + uint8_t *len_tab; const int last_index = s->block_last_index[n]; int len=0; @@ -2564,14 +2564,14 @@ #endif /* clean AC */ - memset(s->ac_val[0] + l_xy, 0, (l_wrap*2+1)*16*sizeof(INT16)); - memset(s->ac_val[1] + c_xy, 0, (c_wrap +1)*16*sizeof(INT16)); - memset(s->ac_val[2] + c_xy, 0, (c_wrap +1)*16*sizeof(INT16)); + memset(s->ac_val[0] + l_xy, 0, (l_wrap*2+1)*16*sizeof(int16_t)); + memset(s->ac_val[1] + c_xy, 0, (c_wrap +1)*16*sizeof(int16_t)); + memset(s->ac_val[2] + c_xy, 0, (c_wrap +1)*16*sizeof(int16_t)); /* clean MV */ // we cant clear the MVs as they might be needed by a b frame -// memset(s->motion_val + l_xy, 0, (l_wrap*2+1)*2*sizeof(INT16)); -// memset(s->motion_val, 0, 2*sizeof(INT16)*(2 + s->mb_width*2)*(2 + s->mb_height*2)); +// memset(s->motion_val + l_xy, 0, (l_wrap*2+1)*2*sizeof(int16_t)); +// memset(s->motion_val, 0, 2*sizeof(int16_t)*(2 + s->mb_width*2)*(2 + s->mb_height*2)); s->last_mv[0][0][0]= s->last_mv[0][0][1]= s->last_mv[1][0][0]= @@ -2671,7 +2671,7 @@ */ static int mpeg4_decode_partition_a(MpegEncContext *s){ int mb_num; - static const INT8 quant_tab[4] = { -1, -2, 1, 2 }; + static const int8_t quant_tab[4] = { -1, -2, 1, 2 }; /* decode first partition */ mb_num=0; @@ -2729,7 +2729,7 @@ s->error_status_table[xy]= AC_ERROR; }else{ /* P/S_TYPE */ int mx, my, pred_x, pred_y, bits; - INT16 * const mot_val= s->motion_val[s->block_index[0]]; + int16_t * const mot_val= s->motion_val[s->block_index[0]]; const int stride= s->block_wrap[0]*2; bits= show_bits(&s->gb, 17); @@ -2817,7 +2817,7 @@ PRINT_MB_TYPE("4"); s->mb_type[xy]= MB_TYPE_INTER4V; for(i=0;i<4;i++) { - INT16 *mot_val= h263_pred_motion(s, i, &pred_x, &pred_y); + int16_t *mot_val= h263_pred_motion(s, i, &pred_x, &pred_y); mx = h263_decode_motion(s, pred_x, s->f_code); if (mx >= 0xffff) return -1; @@ -2845,7 +2845,7 @@ */ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){ int mb_num=0; - static const INT8 quant_tab[4] = { -1, -2, 1, 2 }; + static const int8_t quant_tab[4] = { -1, -2, 1, 2 }; s->mb_x= s->resync_mb_x; s->first_slice_line=1; @@ -3073,8 +3073,8 @@ DCTELEM block[6][64]) { int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant; - INT16 *mot_val; - static INT8 quant_tab[4] = { -1, -2, 1, 2 }; + int16_t *mot_val; + static int8_t quant_tab[4] = { -1, -2, 1, 2 }; s->error_status_table[s->mb_x + s->mb_y*s->mb_width]= 0; @@ -3216,7 +3216,6 @@ int modb1; // first bit of modb int modb2; // second bit of modb int mb_type; - int xy; s->mb_intra = 0; //B-frames never contain intra blocks s->mcsel=0; // ... true gmc blocks @@ -3501,7 +3500,7 @@ { int code, level, i, j, last, run; RLTable *rl = &rl_inter; - const UINT8 *scan_table; + const uint8_t *scan_table; scan_table = s->intra_scantable.permutated; if (s->h263_aic && s->mb_intra) { @@ -3556,7 +3555,7 @@ /* escape */ last = get_bits1(&s->gb); run = get_bits(&s->gb, 6); - level = (INT8)get_bits(&s->gb, 8); + level = (int8_t)get_bits(&s->gb, 8); if (s->h263_rv10 && level == -128) { /* XXX: should patch encoder too */ level = get_bits(&s->gb, 12); @@ -3598,7 +3597,7 @@ static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr) { int level, pred, code; - UINT16 *dc_val; + uint16_t *dc_val; if (n < 4) code = get_vlc2(&s->gb, dc_lum.table, DC_VLC_BITS, 1); @@ -3657,7 +3656,7 @@ int dc_pred_dir; RLTable * rl; RL_VLC_ELEM * rl_vlc; - const UINT8 * scan_table; + const uint8_t * scan_table; int qmul, qadd; if(intra) {
--- a/h263data.h Mon Feb 10 22:43:30 2003 +0000 +++ b/h263data.h Tue Feb 11 16:35:48 2003 +0000 @@ -1,11 +1,11 @@ /* intra MCBPC, mb_type = (intra), then (intraq) */ -const UINT8 intra_MCBPC_code[8] = { 1, 1, 2, 3, 1, 1, 2, 3 }; -const UINT8 intra_MCBPC_bits[8] = { 1, 3, 3, 3, 4, 6, 6, 6 }; +const uint8_t intra_MCBPC_code[8] = { 1, 1, 2, 3, 1, 1, 2, 3 }; +const uint8_t intra_MCBPC_bits[8] = { 1, 3, 3, 3, 4, 6, 6, 6 }; /* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */ /* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */ -const UINT8 inter_MCBPC_code[25] = { +const uint8_t inter_MCBPC_code[25] = { 1, 3, 2, 5, 3, 4, 3, 3, 3, 7, 6, 5, @@ -14,7 +14,7 @@ 1, /* Stuffing */ 2, 12, 14, 15, }; -const UINT8 inter_MCBPC_bits[25] = { +const uint8_t inter_MCBPC_bits[25] = { 1, 4, 4, 6, 5, 8, 8, 7, 3, 7, 7, 9, @@ -25,14 +25,14 @@ }; /* This is the old table -static const UINT8 inter_MCBPC_code[20] = { +static const uint8_t inter_MCBPC_code[20] = { 1, 3, 2, 5, 3, 4, 3, 3, 0, 1, 2, 3, 4, 4, 3, 2, 2, 5, 4, 5, }; -static const UINT8 inter_MCBPC_bits[20] = { +static const uint8_t inter_MCBPC_bits[20] = { 1, 4, 4, 6, 5, 8, 8, 7, 12, 12, 12, 12, @@ -40,13 +40,13 @@ 3, 7, 7, 8, };*/ -const UINT8 cbpy_tab[16][2] = +const uint8_t cbpy_tab[16][2] = { {3,4}, {5,5}, {4,5}, {9,4}, {3,5}, {7,4}, {2,6}, {11,4}, {2,5}, {3,6}, {5,4}, {10,4}, {4,4}, {8,4}, {6,4}, {3,2} }; -const UINT8 mvtab[33][2] = +const uint8_t mvtab[33][2] = { {1,1}, {1,2}, {1,3}, {1,4}, {3,6}, {5,7}, {4,7}, {3,7}, {11,9}, {10,9}, {9,9}, {17,10}, {16,10}, {15,10}, {14,10}, {13,10}, @@ -56,7 +56,7 @@ }; /* third non intra table */ -const UINT16 inter_vlc[103][2] = { +const uint16_t inter_vlc[103][2] = { { 0x2, 2 },{ 0xf, 4 },{ 0x15, 6 },{ 0x17, 7 }, { 0x1f, 8 },{ 0x25, 9 },{ 0x24, 9 },{ 0x21, 10 }, { 0x20, 10 },{ 0x7, 11 },{ 0x6, 11 },{ 0x20, 11 }, @@ -85,7 +85,7 @@ { 0x5e, 12 },{ 0x5f, 12 },{ 0x3, 7 }, }; -const INT8 inter_level[102] = { +const int8_t inter_level[102] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, @@ -101,7 +101,7 @@ 1, 1, 1, 1, 1, 1, }; -const INT8 inter_run[102] = { +const int8_t inter_run[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, @@ -125,7 +125,7 @@ inter_level, }; -const UINT16 intra_vlc_aic[103][2] = { +const uint16_t intra_vlc_aic[103][2] = { { 0x2, 2 }, { 0x6, 3 }, { 0xe, 4 }, { 0xc, 5 }, { 0xd, 5 }, { 0x10, 6 }, { 0x11, 6 }, { 0x12, 6 }, { 0x16, 7 }, { 0x1b, 8 }, { 0x20, 9 }, { 0x21, 9 }, @@ -154,7 +154,7 @@ { 0x59, 12 }, { 0x5a, 12 }, { 0x3, 7 }, }; -const INT8 intra_run_aic[102] = { +const int8_t intra_run_aic[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -170,7 +170,7 @@ 18, 19, 20, 21, 22, 23, }; -const INT8 intra_level_aic[102] = { +const int8_t intra_level_aic[102] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -194,7 +194,7 @@ intra_level_aic, }; -static const UINT16 h263_format[8][2] = { +static const uint16_t h263_format[8][2] = { { 0, 0 }, { 128, 96 }, { 176, 144 }, @@ -203,7 +203,7 @@ { 1408, 1152 }, }; -static UINT8 h263_aic_dc_scale_table[32]={ +static uint8_t h263_aic_dc_scale_table[32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0, 2, 4, 6, 8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62 };
--- a/h263dec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/h263dec.c Tue Feb 11 16:35:48 2003 +0000 @@ -299,7 +299,7 @@ * finds the end of the current frame in the bitstream. * @return the position of the first byte of the next frame, or -1 */ -static int mpeg4_find_frame_end(MpegEncContext *s, UINT8 *buf, int buf_size){ +static int mpeg4_find_frame_end(MpegEncContext *s, uint8_t *buf, int buf_size){ ParseContext *pc= &s->parse_context; int vop_found, i; uint32_t state; @@ -403,7 +403,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int ret,i; @@ -629,7 +629,7 @@ #endif if(s->error_resilience) - memset(s->error_status_table, MV_ERROR|AC_ERROR|DC_ERROR|VP_START|AC_END|DC_END|MV_END, s->mb_num*sizeof(UINT8)); + memset(s->error_status_table, MV_ERROR|AC_ERROR|DC_ERROR|VP_START|AC_END|DC_END|MV_END, s->mb_num*sizeof(uint8_t)); /* decode each macroblock */ s->block_wrap[0]=
--- a/huffyuv.c Mon Feb 10 22:43:30 2003 +0000 +++ b/huffyuv.c Tue Feb 11 16:35:48 2003 +0000 @@ -638,7 +638,7 @@ static void draw_slice(HYuvContext *s, int y){ int h, cy; - UINT8 *src_ptr[3]; + uint8_t *src_ptr[3]; if(s->avctx->draw_horiz_band==NULL) return;
--- a/i386/dsputil_mmx.c Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/dsputil_mmx.c Tue Feb 11 16:35:48 2003 +0000 @@ -172,7 +172,7 @@ /***********************************/ /* standard MMX */ -static void get_pixels_mmx(DCTELEM *block, const UINT8 *pixels, int line_size) +static void get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size) { asm volatile( "movl $-128, %%eax \n\t" @@ -200,7 +200,7 @@ ); } -static inline void diff_pixels_mmx(DCTELEM *block, const UINT8 *s1, const UINT8 *s2, int stride) +static inline void diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride) { asm volatile( "pxor %%mm7, %%mm7 \n\t" @@ -229,10 +229,10 @@ ); } -void put_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line_size) +void put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) { const DCTELEM *p; - UINT8 *pix; + uint8_t *pix; /* read the pixels */ p = block; @@ -284,10 +284,10 @@ :"memory"); } -void add_pixels_clamped_mmx(const DCTELEM *block, UINT8 *pixels, int line_size) +void add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size) { const DCTELEM *p; - UINT8 *pix; + uint8_t *pix; int i; /* read the pixels */ @@ -325,7 +325,7 @@ } while (--i); } -static void put_pixels8_mmx(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -351,7 +351,7 @@ ); } -static void put_pixels16_mmx(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -402,7 +402,7 @@ ); } -static int pix_sum16_mmx(UINT8 * pix, int line_size){ +static int pix_sum16_mmx(uint8_t * pix, int line_size){ const int h=16; int sum; int index= -line_size*h; @@ -505,7 +505,7 @@ return tmp; } -static int sse16_mmx(void *v, UINT8 * pix1, UINT8 * pix2, int line_size) { +static int sse16_mmx(void *v, uint8_t * pix1, uint8_t * pix2, int line_size) { int tmp; asm volatile ( "movl $16,%%ecx\n" @@ -1158,46 +1158,46 @@ );\ }\ \ -static void OPNAME ## qpel8_mc00_ ## MMX (UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels8_mmx(dst, src, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc10_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_mmx(dst, src, half, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc20_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel8_h_lowpass_ ## MMX(dst, src, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc30_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, stride, 8);\ OPNAME ## pixels8_l2_mmx(dst, src+1, half, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc01_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, 8, stride);\ OPNAME ## pixels8_l2_mmx(dst, src, half, stride, stride, 8);\ }\ \ -static void OPNAME ## qpel8_mc02_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, src, stride, stride);\ }\ \ -static void OPNAME ## qpel8_mc03_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[8];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, 8, stride);\ OPNAME ## pixels8_l2_mmx(dst, src+stride, half, stride, stride, 8);\ }\ -static void OPNAME ## qpel8_mc11_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1206,7 +1206,7 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc31_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1215,7 +1215,7 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc13_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1224,7 +1224,7 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH+8, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc33_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1233,7 +1233,7 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH+8, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc21_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1241,7 +1241,7 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc23_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half) + 64;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1249,66 +1249,66 @@ put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\ OPNAME ## pixels8_l2_mmx(dst, halfH+8, halfHV, stride, 8, 8);\ }\ -static void OPNAME ## qpel8_mc12_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_mmx(halfH, src, halfH, 8, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel8_mc32_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[8 + 9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, stride, 9);\ put ## RND ## pixels8_l2_mmx(halfH, src+1, halfH, 8, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel8_mc22_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[9];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, stride, 9);\ OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, stride, 8);\ }\ -static void OPNAME ## qpel16_mc00_ ## MMX (UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## pixels16_mmx(dst, src, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc10_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_mmx(dst, src, half, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc20_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel16_h_lowpass_ ## MMX(dst, src, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc30_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, stride, 16);\ OPNAME ## pixels16_l2_mmx(dst, src+1, half, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc01_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, stride);\ OPNAME ## pixels16_l2_mmx(dst, src, half, stride, stride, 16);\ }\ \ -static void OPNAME ## qpel16_mc02_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, src, stride, stride);\ }\ \ -static void OPNAME ## qpel16_mc03_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t temp[32];\ uint8_t * const half= (uint8_t*)temp;\ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, stride);\ OPNAME ## pixels16_l2_mmx(dst, src+stride, half, stride, stride, 16);\ }\ -static void OPNAME ## qpel16_mc11_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1317,7 +1317,7 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc31_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1326,7 +1326,7 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc13_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1335,7 +1335,7 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH+16, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc33_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1344,7 +1344,7 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH+16, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc21_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1352,7 +1352,7 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc23_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[16*2 + 17*2];\ uint8_t * const halfH= ((uint8_t*)half) + 256;\ uint8_t * const halfHV= ((uint8_t*)half);\ @@ -1360,21 +1360,21 @@ put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, 16, 16);\ OPNAME ## pixels16_l2_mmx(dst, halfH+16, halfHV, stride, 16, 16);\ }\ -static void OPNAME ## qpel16_mc12_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_mmx(halfH, src, halfH, 16, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, stride, 16);\ }\ -static void OPNAME ## qpel16_mc32_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, stride, 17);\ put ## RND ## pixels16_l2_mmx(halfH, src+1, halfH, 16, stride, 17);\ OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, stride, 16);\ }\ -static void OPNAME ## qpel16_mc22_ ## MMX(UINT8 *dst, UINT8 *src, int stride){\ +static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, int stride){\ uint64_t half[17*2];\ uint8_t * const halfH= ((uint8_t*)half);\ put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, stride, 17);\
--- a/i386/dsputil_mmx_avg.h Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/dsputil_mmx_avg.h Tue Feb 11 16:35:48 2003 +0000 @@ -25,7 +25,7 @@ /* XXX: we use explicit registers to avoid a gcc 2.95.2 register asm clobber bug - now it will work with 2.95.2 and also with -fPIC */ -static void DEF(put_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -85,7 +85,7 @@ :"memory"); } -static void DEF(put_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put_pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -154,7 +154,7 @@ } /* GL: this function does incorrect rounding if overflow */ -static void DEF(put_no_rnd_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put_no_rnd_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BONE(mm6); __asm __volatile( @@ -191,7 +191,7 @@ :"%eax", "memory"); } -static void DEF(put_pixels8_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put_pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -222,7 +222,7 @@ } /* GL: this function does incorrect rounding if overflow */ -static void DEF(put_no_rnd_pixels8_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put_no_rnd_pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BONE(mm6); __asm __volatile( @@ -255,7 +255,7 @@ :"%eax", "memory"); } -static void DEF(avg_pixels8)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg_pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -283,7 +283,7 @@ :"%eax", "memory"); } -static void DEF(avg_pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg_pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -315,7 +315,7 @@ :"%eax", "memory"); } -static void DEF(avg_pixels8_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg_pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { __asm __volatile( "lea (%3, %3), %%eax \n\t" @@ -354,7 +354,7 @@ } // Note this is not correctly rounded, but this function is only used for b frames so it doesnt matter -static void DEF(avg_pixels8_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg_pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BONE(mm6); __asm __volatile( @@ -396,31 +396,31 @@ } //FIXME the following could be optimized too ... -static void DEF(put_no_rnd_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(put_no_rnd_pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(put_no_rnd_pixels8_x2)(block , pixels , line_size, h); DEF(put_no_rnd_pixels8_x2)(block+8, pixels+8, line_size, h); } -static void DEF(put_pixels16_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(put_pixels16_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(put_pixels8_y2)(block , pixels , line_size, h); DEF(put_pixels8_y2)(block+8, pixels+8, line_size, h); } -static void DEF(put_no_rnd_pixels16_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(put_no_rnd_pixels16_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(put_no_rnd_pixels8_y2)(block , pixels , line_size, h); DEF(put_no_rnd_pixels8_y2)(block+8, pixels+8, line_size, h); } -static void DEF(avg_pixels16)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg_pixels16)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg_pixels8)(block , pixels , line_size, h); DEF(avg_pixels8)(block+8, pixels+8, line_size, h); } -static void DEF(avg_pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg_pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg_pixels8_x2)(block , pixels , line_size, h); DEF(avg_pixels8_x2)(block+8, pixels+8, line_size, h); } -static void DEF(avg_pixels16_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg_pixels16_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg_pixels8_y2)(block , pixels , line_size, h); DEF(avg_pixels8_y2)(block+8, pixels+8, line_size, h); } -static void DEF(avg_pixels16_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg_pixels16_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg_pixels8_xy2)(block , pixels , line_size, h); DEF(avg_pixels8_xy2)(block+8, pixels+8, line_size, h); }
--- a/i386/dsputil_mmx_rnd.h Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/dsputil_mmx_rnd.h Tue Feb 11 16:35:48 2003 +0000 @@ -22,7 +22,7 @@ */ // put_pixels -static void DEF(put, pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); __asm __volatile( @@ -104,7 +104,7 @@ :"memory"); } -static void DEF(put, pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put, pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); __asm __volatile( @@ -199,7 +199,7 @@ :"memory"); } -static void DEF(put, pixels8_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put, pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); __asm __volatile( @@ -228,7 +228,7 @@ :"eax", "memory"); } -static void DEF(put, pixels8_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_ZERO(mm7); SET_RND(mm6); // =2 for rnd and =1 for no_rnd version @@ -296,7 +296,7 @@ // avg_pixels // in case more speed is needed - unroling would certainly help -static void DEF(avg, pixels8)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); JUMPALIGN(); @@ -315,7 +315,7 @@ while (--h); } -static void DEF(avg, pixels16)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels16)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); JUMPALIGN(); @@ -338,7 +338,7 @@ while (--h); } -static void DEF(avg, pixels8_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels8_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); JUMPALIGN(); @@ -379,7 +379,7 @@ } while (--h); } -static void DEF(avg, pixels16_x2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels16_x2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); JUMPALIGN(); @@ -432,7 +432,7 @@ } while (--h); } -static void DEF(avg, pixels8_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels8_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_BFE(mm6); __asm __volatile( @@ -472,7 +472,7 @@ } // this routine is 'slightly' suboptimal but mostly unused -static void DEF(avg, pixels8_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h) +static void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h) { MOVQ_ZERO(mm7); SET_RND(mm6); // =2 for rnd and =1 for no_rnd version @@ -547,22 +547,22 @@ } //FIXME optimize -static void DEF(put, pixels16_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(put, pixels16_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(put, pixels8_y2)(block , pixels , line_size, h); DEF(put, pixels8_y2)(block+8, pixels+8, line_size, h); } -static void DEF(put, pixels16_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(put, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(put, pixels8_xy2)(block , pixels , line_size, h); DEF(put, pixels8_xy2)(block+8, pixels+8, line_size, h); } -static void DEF(avg, pixels16_y2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg, pixels16_y2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg, pixels8_y2)(block , pixels , line_size, h); DEF(avg, pixels8_y2)(block+8, pixels+8, line_size, h); } -static void DEF(avg, pixels16_xy2)(UINT8 *block, const UINT8 *pixels, int line_size, int h){ +static void DEF(avg, pixels16_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){ DEF(avg, pixels8_xy2)(block , pixels , line_size, h); DEF(avg, pixels8_xy2)(block+8, pixels+8, line_size, h); }
--- a/i386/motion_est_mmx.c Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/motion_est_mmx.c Tue Feb 11 16:35:48 2003 +0000 @@ -23,7 +23,7 @@ void dsputil_init_pix_mmx(DSPContext* c, unsigned mask); void dsputil_set_bit_exact_pix_mmx(DSPContext* c, unsigned mask); -static const __attribute__ ((aligned(8))) UINT64 round_tab[3]={ +static const __attribute__ ((aligned(8))) uint64_t round_tab[3]={ 0x0000000000000000, 0x0001000100010001, 0x0002000200020002, @@ -31,7 +31,7 @@ static __attribute__ ((aligned(8))) uint64_t bone= 0x0101010101010101LL; -static inline void sad8_mmx(UINT8 *blk1, UINT8 *blk2, int stride, int h) +static inline void sad8_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) { int len= -(stride<<h); asm volatile( @@ -67,7 +67,7 @@ ); } -static inline void sad8_mmx2(UINT8 *blk1, UINT8 *blk2, int stride, int h) +static inline void sad8_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h) { int len= -(stride<<h); asm volatile( @@ -89,7 +89,7 @@ ); } -static inline void sad8_2_mmx2(UINT8 *blk1a, UINT8 *blk1b, UINT8 *blk2, int stride, int h) +static inline void sad8_2_mmx2(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int stride, int h) { int len= -(stride<<h); asm volatile( @@ -115,7 +115,7 @@ ); } -static inline void sad8_4_mmx2(UINT8 *blk1, UINT8 *blk2, int stride, int h) +static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h) { //FIXME reuse src int len= -(stride<<h); asm volatile( @@ -152,7 +152,7 @@ ); } -static inline void sad8_2_mmx(UINT8 *blk1a, UINT8 *blk1b, UINT8 *blk2, int stride, int h) +static inline void sad8_2_mmx(uint8_t *blk1a, uint8_t *blk1b, uint8_t *blk2, int stride, int h) { int len= -(stride<<h); asm volatile( @@ -190,7 +190,7 @@ ); } -static inline void sad8_4_mmx(UINT8 *blk1, UINT8 *blk2, int stride, int h) +static inline void sad8_4_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h) { int len= -(stride<<h); asm volatile( @@ -268,7 +268,7 @@ #define PIX_SAD(suf)\ -static int pix_abs8x8_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs8x8_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t":);\ @@ -277,7 +277,7 @@ \ return sum_ ## suf();\ }\ -static int sad8x8_ ## suf(void *s, UINT8 *blk2, UINT8 *blk1, int stride)\ +static int sad8x8_ ## suf(void *s, uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t":);\ @@ -287,7 +287,7 @@ return sum_ ## suf();\ }\ \ -static int pix_abs8x8_x2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs8x8_x2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ @@ -300,7 +300,7 @@ return sum_ ## suf();\ }\ \ -static int pix_abs8x8_y2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs8x8_y2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ @@ -313,7 +313,7 @@ return sum_ ## suf();\ }\ \ -static int pix_abs8x8_xy2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs8x8_xy2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ @@ -326,7 +326,7 @@ return sum_ ## suf();\ }\ \ -static int pix_abs16x16_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs16x16_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t":);\ @@ -336,7 +336,7 @@ \ return sum_ ## suf();\ }\ -static int sad16x16_ ## suf(void *s, UINT8 *blk2, UINT8 *blk1, int stride)\ +static int sad16x16_ ## suf(void *s, uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t":);\ @@ -346,7 +346,7 @@ \ return sum_ ## suf();\ }\ -static int pix_abs16x16_x2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs16x16_x2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ @@ -359,7 +359,7 @@ \ return sum_ ## suf();\ }\ -static int pix_abs16x16_y2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs16x16_y2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\ @@ -372,7 +372,7 @@ \ return sum_ ## suf();\ }\ -static int pix_abs16x16_xy2_ ## suf(UINT8 *blk2, UINT8 *blk1, int stride)\ +static int pix_abs16x16_xy2_ ## suf(uint8_t *blk2, uint8_t *blk1, int stride)\ {\ asm volatile("pxor %%mm7, %%mm7 \n\t"\ "pxor %%mm6, %%mm6 \n\t"\
--- a/i386/mpegvideo_mmx.c Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/mpegvideo_mmx.c Tue Feb 11 16:35:48 2003 +0000 @@ -25,9 +25,9 @@ #include "../avcodec.h" #include "../simple_idct.h" -extern UINT8 zigzag_direct_noperm[64]; -extern UINT16 inv_zigzag_direct16[64]; -extern UINT32 inverse[256]; +extern uint8_t zigzag_direct_noperm[64]; +extern uint16_t inv_zigzag_direct16[64]; +extern uint32_t inverse[256]; static const unsigned long long int mm_wabs __attribute__ ((aligned(8))) = 0xffffffffffffffffULL; static const unsigned long long int mm_wone __attribute__ ((aligned(8))) = 0x0001000100010001ULL; @@ -144,7 +144,7 @@ DCTELEM *block, int n, int qscale) { int nCoeffs; - const UINT16 *quant_matrix; + const uint16_t *quant_matrix; assert(s->block_last_index[n]>=0); @@ -272,7 +272,7 @@ DCTELEM *block, int n, int qscale) { int nCoeffs; - const UINT16 *quant_matrix; + const uint16_t *quant_matrix; assert(s->block_last_index[n]>=0); @@ -404,9 +404,9 @@ /* draw the edges of width 'w' of an image of size width, height this mmx version can only handle w==8 || w==16 */ -static void draw_edges_mmx(UINT8 *buf, int wrap, int width, int height, int w) +static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, int w) { - UINT8 *ptr, *last_line; + uint8_t *ptr, *last_line; int i; last_line = buf + (height - 1) * wrap; @@ -505,22 +505,22 @@ /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ -static void ff_libmpeg2mmx_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmx_idct (block); put_pixels_clamped_mmx(block, dest, line_size); } -static void ff_libmpeg2mmx_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +static void ff_libmpeg2mmx_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmx_idct (block); add_pixels_clamped_mmx(block, dest, line_size); } -static void ff_libmpeg2mmx2_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +static void ff_libmpeg2mmx2_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmxext_idct (block); put_pixels_clamped_mmx(block, dest, line_size); } -static void ff_libmpeg2mmx2_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +static void ff_libmpeg2mmx2_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { ff_mmxext_idct (block); add_pixels_clamped_mmx(block, dest, line_size);
--- a/i386/mpegvideo_mmx_template.c Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/mpegvideo_mmx_template.c Tue Feb 11 16:35:48 2003 +0000 @@ -37,8 +37,8 @@ int qscale, int *overflow) { int level=0, last_non_zero_p1, q; //=0 is cuz gcc says uninitalized ... - const UINT16 *qmat, *bias; - static __align8 INT16 temp_block[64]; + const uint16_t *qmat, *bias; + static __align8 int16_t temp_block[64]; //s->fdct (block); ff_fdct_mmx (block); //cant be anything else ...
--- a/i386/simple_idct_mmx.c Mon Feb 10 22:43:30 2003 +0000 +++ b/i386/simple_idct_mmx.c Tue Feb 11 16:35:48 2003 +0000 @@ -1298,12 +1298,12 @@ //FIXME merge add/put into the idct -void ff_simple_idct_put_mmx(UINT8 *dest, int line_size, DCTELEM *block) +void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, DCTELEM *block) { idct(block); put_pixels_clamped_mmx(block, dest, line_size); } -void ff_simple_idct_add_mmx(UINT8 *dest, int line_size, DCTELEM *block) +void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block) { idct(block); add_pixels_clamped_mmx(block, dest, line_size);
--- a/imgconvert.c Mon Feb 10 22:43:30 2003 +0000 +++ b/imgconvert.c Tue Feb 11 16:35:48 2003 +0000 @@ -29,14 +29,14 @@ typedef struct PixFmtInfo { const char *name; - UINT8 nb_components; /* number of components in AVPicture array */ - UINT8 is_yuv : 1; /* true if YUV instead of RGB color space */ - UINT8 is_packed : 1; /* true if multiple components in same word */ - UINT8 is_paletted : 1; /* true if paletted */ - UINT8 is_alpha : 1; /* true if alpha can be specified */ - UINT8 is_gray : 1; /* true if gray or monochrome format */ - UINT8 x_chroma_shift; /* X chroma subsampling factor is 2 ^ shift */ - UINT8 y_chroma_shift; /* Y chroma subsampling factor is 2 ^ shift */ + uint8_t nb_components; /* number of components in AVPicture array */ + uint8_t is_yuv : 1; /* true if YUV instead of RGB color space */ + uint8_t is_packed : 1; /* true if multiple components in same word */ + uint8_t is_paletted : 1; /* true if paletted */ + uint8_t is_alpha : 1; /* true if alpha can be specified */ + uint8_t is_gray : 1; /* true if gray or monochrome format */ + uint8_t x_chroma_shift; /* X chroma subsampling factor is 2 ^ shift */ + uint8_t y_chroma_shift; /* Y chroma subsampling factor is 2 ^ shift */ } PixFmtInfo; /* this table gives more information about formats */ @@ -136,7 +136,7 @@ } /* Picture field are filled with 'ptr' addresses. Also return size */ -int avpicture_fill(AVPicture *picture, UINT8 *ptr, +int avpicture_fill(AVPicture *picture, uint8_t *ptr, int pix_fmt, int width, int height) { int size, w2, h2, size2; @@ -223,9 +223,9 @@ static void yuv422_to_yuv420p(AVPicture *dst, AVPicture *src, int width, int height) { - UINT8 *lum, *cb, *cr; + uint8_t *lum, *cb, *cr; int x, y; - const UINT8 *p; + const uint8_t *p; lum = dst->data[0]; cb = dst->data[1]; @@ -258,12 +258,12 @@ /* XXX: use generic filter ? */ /* 1x2 -> 1x1 */ -static void shrink2(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void shrink2(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { int w; - UINT8 *s1, *s2, *d; + uint8_t *s1, *s2, *d; for(;height > 0; height--) { s1 = src; @@ -290,12 +290,12 @@ } /* 2x2 -> 1x1 */ -static void shrink22(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void shrink22(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { int w; - UINT8 *s1, *s2, *d; + uint8_t *s1, *s2, *d; for(;height > 0; height--) { s1 = src; @@ -322,12 +322,12 @@ } /* 1x1 -> 2x2 */ -static void grow22(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void grow22(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { int w; - UINT8 *s1, *d; + uint8_t *s1, *d; for(;height > 0; height--) { s1 = src; @@ -350,12 +350,12 @@ } /* 1x2 -> 2x1 */ -static void conv411(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void conv411(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { int w, c; - UINT8 *s1, *s2, *d; + uint8_t *s1, *s2, *d; for(;height > 0; height--) { s1 = src; @@ -374,8 +374,8 @@ } } -static void img_copy(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, +static void img_copy(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height) { for(;height > 0; height--) { @@ -407,9 +407,9 @@ static void yuv420p_to_ ## rgb_name (AVPicture *dst, AVPicture *src, \ int width, int height) \ { \ - UINT8 *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr, *d, *d1, *d2; \ + uint8_t *y1_ptr, *y2_ptr, *cb_ptr, *cr_ptr, *d, *d1, *d2; \ int w, y, cb, cr, r_add, g_add, b_add, width2; \ - UINT8 *cm = cropTbl + MAX_NEG_CROP; \ + uint8_t *cm = cropTbl + MAX_NEG_CROP; \ unsigned int r, g, b; \ \ d = dst->data[0]; \ @@ -521,9 +521,9 @@ static void yuv422p_to_ ## rgb_name (AVPicture *dst, AVPicture *src, \ int width, int height) \ { \ - UINT8 *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1; \ + uint8_t *y1_ptr, *cb_ptr, *cr_ptr, *d, *d1; \ int w, y, cb, cr, r_add, g_add, b_add, width2; \ - UINT8 *cm = cropTbl + MAX_NEG_CROP; \ + uint8_t *cm = cropTbl + MAX_NEG_CROP; \ unsigned int r, g, b; \ \ d = dst->data[0]; \ @@ -582,8 +582,8 @@ { \ int wrap, wrap3, x, y; \ int r, g, b, r1, g1, b1; \ - UINT8 *lum, *cb, *cr; \ - const UINT8 *p; \ + uint8_t *lum, *cb, *cr; \ + const uint8_t *p; \ \ lum = dst->data[0]; \ cb = dst->data[1]; \ @@ -739,7 +739,7 @@ #define RGB_IN(r, g, b, s)\ {\ - unsigned int v = ((const UINT16 *)(s))[0];\ + unsigned int v = ((const uint16_t *)(s))[0];\ r = bitcopy_n(v >> (10 - 3), 3);\ g = bitcopy_n(v >> (5 - 3), 3);\ b = bitcopy_n(v << 3, 3);\ @@ -747,7 +747,7 @@ #define RGB_OUT(d, r, g, b)\ {\ - ((UINT16 *)(d))[0] = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | 0x8000;\ + ((uint16_t *)(d))[0] = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3) | 0x8000;\ } #define BPP 2 @@ -762,7 +762,7 @@ #define RGB_IN(r, g, b, s)\ {\ - unsigned int v = ((const UINT16 *)(s))[0];\ + unsigned int v = ((const uint16_t *)(s))[0];\ r = bitcopy_n(v >> (11 - 3), 3);\ g = bitcopy_n(v >> (5 - 2), 2);\ b = bitcopy_n(v << 3, 3);\ @@ -770,7 +770,7 @@ #define RGB_OUT(d, r, g, b)\ {\ - ((UINT16 *)(d))[0] = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);\ + ((uint16_t *)(d))[0] = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);\ } #define BPP 2 @@ -833,7 +833,7 @@ #define RGB_IN(r, g, b, s)\ {\ - unsigned int v = ((const UINT32 *)(s))[0];\ + unsigned int v = ((const uint32_t *)(s))[0];\ r = (v >> 16) & 0xff;\ g = (v >> 8) & 0xff;\ b = v & 0xff;\ @@ -841,7 +841,7 @@ #define RGB_OUT(d, r, g, b)\ {\ - ((UINT32 *)(d))[0] = (0xff << 24) | (r << 16) | (g << 8) | b;\ + ((uint32_t *)(d))[0] = (0xff << 24) | (r << 16) | (g << 8) | b;\ } #define BPP 4 @@ -971,8 +971,8 @@ int width, int height, int xor_mask) { int n; - const UINT8 *s; - UINT8 *d; + const uint8_t *s; + uint8_t *d; int j, b, v, n1, src_wrap, dst_wrap, y; s = src->data[0]; @@ -1025,7 +1025,7 @@ } /* this is maybe slow, but allows for extensions */ -static inline unsigned char gif_clut_index(UINT8 r, UINT8 g, UINT8 b) +static inline unsigned char gif_clut_index(uint8_t r, uint8_t g, uint8_t b) { return ((((r)/47)%6)*6*6+(((g)/47)%6)*6+(((b)/47)%6)); } @@ -1330,8 +1330,8 @@ /* YUV to YUV */ if (dst_pix->is_yuv && src_pix->is_yuv) { int x_shift, y_shift, w, h; - void (*resize_func)(UINT8 *dst, int dst_wrap, - UINT8 *src, int src_wrap, + void (*resize_func)(uint8_t *dst, int dst_wrap, + uint8_t *src, int src_wrap, int width, int height); /* compute chroma size of the smallest dimensions */ @@ -1447,11 +1447,11 @@ #endif /* filter parameters: [-1 4 2 4 -1] // 8 */ -static void deinterlace_line(UINT8 *dst, UINT8 *lum_m4, UINT8 *lum_m3, UINT8 *lum_m2, UINT8 *lum_m1, UINT8 *lum, +static void deinterlace_line(uint8_t *dst, uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size) { #ifndef HAVE_MMX - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; int sum; for(;size > 0;size--) { @@ -1490,11 +1490,11 @@ } #endif } -static void deinterlace_line_inplace(UINT8 *lum_m4, UINT8 *lum_m3, UINT8 *lum_m2, UINT8 *lum_m1, UINT8 *lum, +static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size) { #ifndef HAVE_MMX - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; int sum; for(;size > 0;size--) { @@ -1536,11 +1536,11 @@ /* deinterlacing : 2 temporal taps, 3 spatial taps linear filter. The top field is copied as is, but the bottom field is deinterlaced against the top field. */ -static void deinterlace_bottom_field(UINT8 *dst, int dst_wrap, - UINT8 *src1, int src_wrap, +static void deinterlace_bottom_field(uint8_t *dst, int dst_wrap, + uint8_t *src1, int src_wrap, int width, int height) { - UINT8 *src_m2, *src_m1, *src_0, *src_p1, *src_p2; + uint8_t *src_m2, *src_m1, *src_0, *src_p1, *src_p2; int y; src_m2 = src1; @@ -1565,13 +1565,13 @@ deinterlace_line(dst,src_m2,src_m1,src_0,src_0,src_0,width); } -static void deinterlace_bottom_field_inplace(UINT8 *src1, int src_wrap, +static void deinterlace_bottom_field_inplace(uint8_t *src1, int src_wrap, int width, int height) { - UINT8 *src_m1, *src_0, *src_p1, *src_p2; + uint8_t *src_m1, *src_0, *src_p1, *src_p2; int y; - UINT8 *buf; - buf = (UINT8*)av_malloc(width); + uint8_t *buf; + buf = (uint8_t*)av_malloc(width); src_m1 = src1; memcpy(buf,src_m1,width);
--- a/imgresample.c Mon Feb 10 22:43:30 2003 +0000 +++ b/imgresample.c Tue Feb 11 16:35:48 2003 +0000 @@ -41,9 +41,9 @@ struct ImgReSampleContext { int iwidth, iheight, owidth, oheight, topBand, bottomBand, leftBand, rightBand; int h_incr, v_incr; - INT16 h_filters[NB_PHASES][NB_TAPS] __align8; /* horizontal filters */ - INT16 v_filters[NB_PHASES][NB_TAPS] __align8; /* vertical filters */ - UINT8 *line_buf; + int16_t h_filters[NB_PHASES][NB_TAPS] __align8; /* horizontal filters */ + int16_t v_filters[NB_PHASES][NB_TAPS] __align8; /* vertical filters */ + uint8_t *line_buf; }; static inline int get_phase(int pos) @@ -52,12 +52,12 @@ } /* This function must be optimized */ -static void h_resample_fast(UINT8 *dst, int dst_width, UINT8 *src, int src_width, - int src_start, int src_incr, INT16 *filters) +static void h_resample_fast(uint8_t *dst, int dst_width, uint8_t *src, int src_width, + int src_start, int src_incr, int16_t *filters) { int src_pos, phase, sum, i; - UINT8 *s; - INT16 *filter; + uint8_t *s; + int16_t *filter; src_pos = src_start; for(i=0;i<dst_width;i++) { @@ -95,11 +95,11 @@ } /* This function must be optimized */ -static void v_resample(UINT8 *dst, int dst_width, UINT8 *src, int wrap, - INT16 *filter) +static void v_resample(uint8_t *dst, int dst_width, uint8_t *src, int wrap, + int16_t *filter) { int sum, i; - UINT8 *s; + uint8_t *s; s = src; for(i=0;i<dst_width;i++) { @@ -111,7 +111,7 @@ #else { int j; - UINT8 *s1 = s; + uint8_t *s1 = s; sum = 0; for(j=0;j<NB_TAPS;j++) { @@ -154,12 +154,12 @@ #define DUMP(reg) movq_r2m(reg, tmp); printf(#reg "=%016Lx\n", tmp.uq); /* XXX: do four pixels at a time */ -static void h_resample_fast4_mmx(UINT8 *dst, int dst_width, UINT8 *src, int src_width, - int src_start, int src_incr, INT16 *filters) +static void h_resample_fast4_mmx(uint8_t *dst, int dst_width, uint8_t *src, int src_width, + int src_start, int src_incr, int16_t *filters) { int src_pos, phase; - UINT8 *s; - INT16 *filter; + uint8_t *s; + int16_t *filter; mmx_t tmp; src_pos = src_start; @@ -198,11 +198,11 @@ emms(); } -static void v_resample4_mmx(UINT8 *dst, int dst_width, UINT8 *src, int wrap, - INT16 *filter) +static void v_resample4_mmx(uint8_t *dst, int dst_width, uint8_t *src, int wrap, + int16_t *filter) { int sum, i, v; - UINT8 *s; + uint8_t *s; mmx_t tmp; mmx_t coefs[4]; @@ -239,7 +239,7 @@ packuswb_r2r(mm7, mm0); movq_r2m(mm0, tmp); - *(UINT32 *)dst = tmp.ud[0]; + *(uint32_t *)dst = tmp.ud[0]; dst += 4; s += 4; dst_width -= 4; @@ -274,8 +274,8 @@ signed short s[8]; } vec_ss_t; -void v_resample16_altivec(UINT8 *dst, int dst_width, UINT8 *src, int wrap, - INT16 *filter) +void v_resample16_altivec(uint8_t *dst, int dst_width, uint8_t *src, int wrap, + int16_t *filter) { int sum, i; uint8_t *s; @@ -391,12 +391,12 @@ #endif /* slow version to handle limit cases. Does not need optimisation */ -static void h_resample_slow(UINT8 *dst, int dst_width, UINT8 *src, int src_width, - int src_start, int src_incr, INT16 *filters) +static void h_resample_slow(uint8_t *dst, int dst_width, uint8_t *src, int src_width, + int src_start, int src_incr, int16_t *filters) { int src_pos, phase, sum, j, v, i; - UINT8 *s, *src_end; - INT16 *filter; + uint8_t *s, *src_end; + int16_t *filter; src_end = src + src_width; src_pos = src_start; @@ -426,8 +426,8 @@ } } -static void h_resample(UINT8 *dst, int dst_width, UINT8 *src, int src_width, - int src_start, int src_incr, INT16 *filters) +static void h_resample(uint8_t *dst, int dst_width, uint8_t *src, int src_width, + int src_start, int src_incr, int16_t *filters) { int n, src_end; @@ -463,11 +463,11 @@ } static void component_resample(ImgReSampleContext *s, - UINT8 *output, int owrap, int owidth, int oheight, - UINT8 *input, int iwrap, int iwidth, int iheight) + uint8_t *output, int owrap, int owidth, int oheight, + uint8_t *input, int iwrap, int iwidth, int iheight) { int src_y, src_y1, last_src_y, ring_y, phase_y, y1, y; - UINT8 *new_line, *src_line; + uint8_t *new_line, *src_line; last_src_y = - FCENTER - 1; /* position of the bottom of the filter in the source image */ @@ -528,7 +528,7 @@ /* XXX: the following filter is quite naive, but it seems to suffice for 4 taps */ -static void build_filter(INT16 *filter, float factor) +static void build_filter(int16_t *filter, float factor) { int ph, i, v; float x, y, tab[NB_TAPS], norm, mult; @@ -641,15 +641,15 @@ /* input */ #define XSIZE 256 #define YSIZE 256 -UINT8 img[XSIZE * YSIZE]; +uint8_t img[XSIZE * YSIZE]; /* output */ #define XSIZE1 512 #define YSIZE1 512 -UINT8 img1[XSIZE1 * YSIZE1]; -UINT8 img2[XSIZE1 * YSIZE1]; +uint8_t img1[XSIZE1 * YSIZE1]; +uint8_t img2[XSIZE1 * YSIZE1]; -void save_pgm(const char *filename, UINT8 *img, int xsize, int ysize) +void save_pgm(const char *filename, uint8_t *img, int xsize, int ysize) { FILE *f; f=fopen(filename,"w"); @@ -658,7 +658,7 @@ fclose(f); } -static void dump_filter(INT16 *filter) +static void dump_filter(int16_t *filter) { int i, ph;
--- a/jfdctfst.c Mon Feb 10 22:43:30 2003 +0000 +++ b/jfdctfst.c Tue Feb 11 16:35:48 2003 +0000 @@ -78,10 +78,10 @@ */ #if CONST_BITS == 8 -#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ -#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ -#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ -#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ +#define FIX_0_382683433 ((int32_t) 98) /* FIX(0.382683433) */ +#define FIX_0_541196100 ((int32_t) 139) /* FIX(0.541196100) */ +#define FIX_0_707106781 ((int32_t) 181) /* FIX(0.707106781) */ +#define FIX_1_306562965 ((int32_t) 334) /* FIX(1.306562965) */ #else #define FIX_0_382683433 FIX(0.382683433) #define FIX_0_541196100 FIX(0.541196100) @@ -101,7 +101,7 @@ #endif -/* Multiply a DCTELEM variable by an INT32 constant, and immediately +/* Multiply a DCTELEM variable by an int32_t constant, and immediately * descale to yield a DCTELEM result. */
--- a/jfdctint.c Mon Feb 10 22:43:30 2003 +0000 +++ b/jfdctint.c Tue Feb 11 16:35:48 2003 +0000 @@ -78,7 +78,7 @@ * they are represented to better-than-integral precision. These outputs * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word * with the recommended scaling. (For 12-bit sample data, the intermediate - * array is INT32 anyway.) + * array is int32_t anyway.) * * To avoid overflow of the 32-bit intermediate results in pass 2, we must * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis @@ -101,18 +101,18 @@ */ #if CONST_BITS == 13 -#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ -#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ -#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ -#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ -#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ -#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ -#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ -#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ -#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ -#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ -#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ -#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#define FIX_0_298631336 ((int32_t) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((int32_t) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((int32_t) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((int32_t) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((int32_t) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((int32_t) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((int32_t) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((int32_t) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((int32_t) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((int32_t) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((int32_t) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((int32_t) 25172) /* FIX(3.072711026) */ #else #define FIX_0_298631336 FIX(0.298631336) #define FIX_0_390180644 FIX(0.390180644) @@ -129,7 +129,7 @@ #endif -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. +/* Multiply an int32_t variable by an int32_t constant to yield an int32_t result. * For 8-bit samples with the recommended scaling, all the variable * and constant values involved are no more than 16 bits wide, so a * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. @@ -150,9 +150,9 @@ GLOBAL(void) ff_jpeg_fdct_islow (DCTELEM * data) { - INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; + int32_t tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + int32_t tmp10, tmp11, tmp12, tmp13; + int32_t z1, z2, z3, z4, z5; DCTELEM *dataptr; int ctr; SHIFT_TEMPS
--- a/jrevdct.c Mon Feb 10 22:43:30 2003 +0000 +++ b/jrevdct.c Tue Feb 11 16:35:48 2003 +0000 @@ -92,7 +92,7 @@ #define PASS1_BITS 1 /* lose a little precision to avoid overflow */ #endif -#define ONE ((INT32) 1) +#define ONE ((int32_t) 1) #define CONST_SCALE (ONE << CONST_BITS) @@ -103,16 +103,16 @@ */ /* Actually FIX is no longer used, we precomputed them all */ -#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) +#define FIX(x) ((int32_t) ((x) * CONST_SCALE + 0.5)) -/* Descale and correctly round an INT32 value that's scaled by N bits. +/* Descale and correctly round an int32_t value that's scaled by N bits. * We assume RIGHT_SHIFT rounds towards minus infinity, so adding * the fudge factor is correct for either sign of X. */ #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) -/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. +/* Multiply an int32_t variable by an int32_t constant to yield an int32_t result. * For 8-bit samples with the recommended scaling, all the variable * and constant values involved are no more than 16 bits wide, so a * 16x16->32 bit multiply can be used instead of a full 32x32 multiply; @@ -125,10 +125,10 @@ #ifdef EIGHT_BIT_SAMPLES #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ -#define MULTIPLY(var,const) (((INT16) (var)) * ((INT16) (const))) +#define MULTIPLY(var,const) (((int16_t) (var)) * ((int16_t) (const))) #endif #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ -#define MULTIPLY(var,const) (((INT16) (var)) * ((INT32) (const))) +#define MULTIPLY(var,const) (((int16_t) (var)) * ((int32_t) (const))) #endif #endif @@ -172,10 +172,10 @@ void j_rev_dct(DCTBLOCK data) { - INT32 tmp0, tmp1, tmp2, tmp3; - INT32 tmp10, tmp11, tmp12, tmp13; - INT32 z1, z2, z3, z4, z5; - INT32 d0, d1, d2, d3, d4, d5, d6, d7; + int32_t tmp0, tmp1, tmp2, tmp3; + int32_t tmp10, tmp11, tmp12, tmp13; + int32_t z1, z2, z3, z4, z5; + int32_t d0, d1, d2, d3, d4, d5, d6, d7; register DCTELEM *dataptr; int rowctr;
--- a/mace.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mace.c Tue Feb 11 16:35:48 2003 +0000 @@ -24,11 +24,11 @@ * libavcodec api, context stuff, interlaced stereo out). */ -static const UINT16 MACEtab1[] = { 0xfff3, 0x0008, 0x004c, 0x00de, 0x00de, 0x004c, 0x0008, 0xfff3 }; +static const uint16_t MACEtab1[] = { 0xfff3, 0x0008, 0x004c, 0x00de, 0x00de, 0x004c, 0x0008, 0xfff3 }; -static const UINT16 MACEtab3[] = { 0xffee, 0x008c, 0x008c, 0xffee }; +static const uint16_t MACEtab3[] = { 0xffee, 0x008c, 0x008c, 0xffee }; -static const UINT16 MACEtab2[][8] = { +static const uint16_t MACEtab2[][8] = { { 0x0025, 0x0074, 0x00CE, 0x014A, 0xFEB5, 0xFF31, 0xFF8B, 0xFFDA }, { 0x0027, 0x0079, 0x00D8, 0x015A, 0xFEA5, 0xFF27, 0xFF86, 0xFFD8 }, { 0x0029, 0x007F, 0x00E1, 0x0169, 0xFE96, 0xFF1E, 0xFF80, 0xFFD6 }, @@ -159,7 +159,7 @@ { 0x25A7, 0x741F, 0x7FFF, 0x7FFF, 0x8000, 0x8000, 0x8BE0, 0xDA58 }, }; -static const UINT16 MACEtab4[][8] = { +static const uint16_t MACEtab4[][8] = { { 0x0040, 0x00D8, 0xFF27, 0xFFBF, 0, 0, 0, 0 }, { 0x0043, 0x00E2, 0xFF1D, 0xFFBC, 0, 0, 0, 0 }, { 0x0046, 0x00EC, 0xFF13, 0xFFB9, 0, 0, 0, 0 }, { 0x004A, 0x00F6, 0xFF09, 0xFFB5, 0, 0, 0, 0 }, { 0x004D, 0x0101, 0xFEFE, 0xFFB2, 0, 0, 0, 0 }, { 0x0050, 0x010C, 0xFEF3, 0xFFAF, 0, 0, 0, 0 }, @@ -234,9 +234,9 @@ /* /// "chomp3()" */ static void chomp3(MACEContext *ctx, - UINT8 val, - const UINT16 tab1[], - const UINT16 tab2[][8]) + uint8_t val, + const uint16_t tab1[], + const uint16_t tab2[][8]) { short current; @@ -253,13 +253,13 @@ /* /// "Exp1to3()" */ static void Exp1to3(MACEContext *ctx, - UINT8 *inBuffer, + uint8_t *inBuffer, void *outBuffer, - UINT32 cnt, - UINT32 numChannels, - UINT32 whichChannel) + uint32_t cnt, + uint32_t numChannels, + uint32_t whichChannel) { - UINT8 pkt; + uint8_t pkt; /* if (inState) { @@ -298,9 +298,9 @@ /* /// "chomp6()" */ static void chomp6(MACEContext *ctx, - UINT8 val, - const UINT16 tab1[], - const UINT16 tab2[][8]) + uint8_t val, + const uint16_t tab1[], + const uint16_t tab2[][8]) { short current; @@ -335,13 +335,13 @@ /* /// "Exp1to6()" */ static void Exp1to6(MACEContext *ctx, - UINT8 *inBuffer, + uint8_t *inBuffer, void *outBuffer, - UINT32 cnt, - UINT32 numChannels, - UINT32 whichChannel) + uint32_t cnt, + uint32_t numChannels, + uint32_t whichChannel) { - UINT8 pkt; + uint8_t pkt; /* if (inState) { @@ -389,7 +389,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { short *samples; MACEContext *c = avctx->priv_data;
--- a/mjpeg.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mjpeg.c Tue Feb 11 16:35:48 2003 +0000 @@ -30,15 +30,15 @@ #undef TWOMATRIXES typedef struct MJpegContext { - UINT8 huff_size_dc_luminance[12]; - UINT16 huff_code_dc_luminance[12]; - UINT8 huff_size_dc_chrominance[12]; - UINT16 huff_code_dc_chrominance[12]; + uint8_t huff_size_dc_luminance[12]; + uint16_t huff_code_dc_luminance[12]; + uint8_t huff_size_dc_chrominance[12]; + uint16_t huff_code_dc_chrominance[12]; - UINT8 huff_size_ac_luminance[256]; - UINT16 huff_code_ac_luminance[256]; - UINT8 huff_size_ac_chrominance[256]; - UINT16 huff_code_ac_chrominance[256]; + uint8_t huff_size_ac_luminance[256]; + uint16_t huff_code_ac_luminance[256]; + uint8_t huff_size_ac_chrominance[256]; + uint16_t huff_code_ac_chrominance[256]; } MJpegContext; /* JPEG marker codes */ @@ -152,19 +152,19 @@ /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ /* IMPORTANT: these are only valid for 8-bit data precision! */ -static const UINT8 bits_dc_luminance[17] = +static const uint8_t bits_dc_luminance[17] = { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; -static const UINT8 val_dc_luminance[] = +static const uint8_t val_dc_luminance[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static const UINT8 bits_dc_chrominance[17] = +static const uint8_t bits_dc_chrominance[17] = { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; -static const UINT8 val_dc_chrominance[] = +static const uint8_t val_dc_chrominance[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; -static const UINT8 bits_ac_luminance[17] = +static const uint8_t bits_ac_luminance[17] = { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; -static const UINT8 val_ac_luminance[] = +static const uint8_t val_ac_luminance[] = { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, @@ -188,10 +188,10 @@ 0xf9, 0xfa }; -static const UINT8 bits_ac_chrominance[17] = +static const uint8_t bits_ac_chrominance[17] = { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; -static const UINT8 val_ac_chrominance[] = +static const uint8_t val_ac_chrominance[] = { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, @@ -216,8 +216,8 @@ }; /* isn't this function nicer than the one in the libjpeg ? */ -static void build_huffman_codes(UINT8 *huff_size, UINT16 *huff_code, - const UINT8 *bits_table, const UINT8 *val_table) +static void build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code, + const uint8_t *bits_table, const uint8_t *val_table) { int i, j, k,nb, code, sym; @@ -282,7 +282,7 @@ /* table_class: 0 = DC coef, 1 = AC coefs */ static int put_huffman_table(MpegEncContext *s, int table_class, int table_id, - const UINT8 *bits_table, const UINT8 *value_table) + const uint8_t *bits_table, const uint8_t *value_table) { PutBitContext *p = &s->pb; int n, i; @@ -306,7 +306,7 @@ { PutBitContext *p = &s->pb; int i, j, size; - UINT8 *ptr; + uint8_t *ptr; /* quant matrixes */ put_marker(p, DQT); @@ -349,7 +349,7 @@ { PutBitContext *p = &s->pb; int size; - UINT8 *ptr; + uint8_t *ptr; if (s->aspect_ratio_info) { @@ -541,7 +541,7 @@ } static inline void mjpeg_encode_dc(MpegEncContext *s, int val, - UINT8 *huff_size, UINT16 *huff_code) + uint8_t *huff_size, uint16_t *huff_code) { int mant, nbits; @@ -572,8 +572,8 @@ int mant, nbits, code, i, j; int component, dc, run, last_index, val; MJpegContext *m = s->mjpeg_ctx; - UINT8 *huff_size_ac; - UINT16 *huff_code_ac; + uint8_t *huff_size_ac; + uint16_t *huff_code_ac; /* DC coef */ component = (n <= 3 ? 0 : n - 4 + 1); @@ -651,9 +651,9 @@ int start_code; /* current start code */ int buffer_size; - UINT8 *buffer; + uint8_t *buffer; - INT16 quant_matrixes[4][64]; + int16_t quant_matrixes[4][64]; VLC vlcs[2][4]; int org_width, org_height; /* size given at codec init */ @@ -669,11 +669,11 @@ int h_max, v_max; /* maximum h and v counts */ int quant_index[4]; /* quant table index for each component */ int last_dc[MAX_COMPONENTS]; /* last DEQUANTIZED dc (XXX: am I right to do that ?) */ - UINT8 *current_picture[MAX_COMPONENTS]; /* picture structure */ + uint8_t *current_picture[MAX_COMPONENTS]; /* picture structure */ int linesize[MAX_COMPONENTS]; DCTELEM block[64] __align8; ScanTable scantable; - void (*idct_put)(UINT8 *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); + void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); int restart_interval; int restart_count; @@ -684,11 +684,11 @@ static int mjpeg_decode_dht(MJpegDecodeContext *s); -static void build_vlc(VLC *vlc, const UINT8 *bits_table, const UINT8 *val_table, +static void build_vlc(VLC *vlc, const uint8_t *bits_table, const uint8_t *val_table, int nb_codes) { - UINT8 huff_size[256]; - UINT16 huff_code[256]; + uint8_t huff_size[256]; + uint16_t huff_code[256]; memset(huff_size, 0, sizeof(huff_size)); build_huffman_codes(huff_size, huff_code, bits_table, val_table); @@ -776,8 +776,8 @@ static int mjpeg_decode_dht(MJpegDecodeContext *s) { int len, index, i, class, n, v, code_max; - UINT8 bits_table[17]; - UINT8 val_table[256]; + uint8_t bits_table[17]; + uint8_t val_table[256]; len = get_bits(&s->gb, 16) - 2; @@ -928,7 +928,7 @@ int nbits, code, i, j, level; int run, val; VLC *ac_vlc; - INT16 *quant_matrix; + int16_t *quant_matrix; /* DC coef */ val = mjpeg_decode_dc(s, dc_index); @@ -1071,7 +1071,7 @@ for(mb_y = 0; mb_y < mb_height; mb_y++) { for(mb_x = 0; mb_x < mb_width; mb_x++) { for(i=0;i<nb_components;i++) { - UINT8 *ptr; + uint8_t *ptr; int x, y, c; n = nb_blocks[i]; c = comp_index[i]; @@ -1266,7 +1266,7 @@ unsigned int len = get_bits(&s->gb, 16); if (len >= 2 && len < 32768) { /* XXX: any better upper bound */ - UINT8 *cbuf = av_malloc(len - 1); + uint8_t *cbuf = av_malloc(len - 1); if (cbuf) { int i; for (i = 0; i < len - 2; i++) @@ -1318,9 +1318,9 @@ /* return the 8 bit start code value and update the search state. Return -1 if no start code found */ -static int find_marker(UINT8 **pbuf_ptr, UINT8 *buf_end) +static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end) { - UINT8 *buf_ptr; + uint8_t *buf_ptr; unsigned int v, v2; int val; #ifdef DEBUG @@ -1350,10 +1350,10 @@ static int mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MJpegDecodeContext *s = avctx->priv_data; - UINT8 *buf_end, *buf_ptr; + uint8_t *buf_end, *buf_ptr; int i, start_code; AVPicture *picture = data; @@ -1387,12 +1387,12 @@ /* unescape buffer of SOS */ if (start_code == SOS) { - UINT8 *src = buf_ptr; - UINT8 *dst = s->buffer; + uint8_t *src = buf_ptr; + uint8_t *dst = s->buffer; while (src<buf_end) { - UINT8 x = *(src++); + uint8_t x = *(src++); *(dst++) = x; if (x == 0xff) @@ -1527,10 +1527,10 @@ static int mjpegb_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MJpegDecodeContext *s = avctx->priv_data; - UINT8 *buf_end, *buf_ptr; + uint8_t *buf_end, *buf_ptr; int i; AVPicture *picture = data; GetBitContext hgb; /* for the header */
--- a/mlib/dsputil_mlib.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mlib/dsputil_mlib.c Tue Feb 11 16:35:48 2003 +0000 @@ -198,10 +198,10 @@ } -static void (*put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); +static void (*put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); -static void add_pixels_clamped_mlib(const DCTELEM *block, UINT8 *pixels, int line_size) +static void add_pixels_clamped_mlib(const DCTELEM *block, uint8_t *pixels, int line_size) { mlib_VideoAddBlock_U8_S16(pixels, (mlib_s16 *)block, line_size); } @@ -209,13 +209,13 @@ /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ -static void ff_idct_put_mlib(UINT8 *dest, int line_size, DCTELEM *data) +static void ff_idct_put_mlib(uint8_t *dest, int line_size, DCTELEM *data) { mlib_VideoIDCT8x8_S16_S16 (data, data); put_pixels_clamped(data, dest, line_size); } -static void ff_idct_add_mlib(UINT8 *dest, int line_size, DCTELEM *data) +static void ff_idct_add_mlib(uint8_t *dest, int line_size, DCTELEM *data) { mlib_VideoIDCT8x8_S16_S16 (data, data); mlib_VideoAddBlock_U8_S16(dest, (mlib_s16 *)data, line_size);
--- a/motion_est.c Mon Feb 10 22:43:30 2003 +0000 +++ b/motion_est.c Tue Feb 11 16:35:48 2003 +0000 @@ -387,7 +387,7 @@ } } -static int pix_dev(UINT8 * pix, int line_size, int mean) +static int pix_dev(uint8_t * pix, int line_size, int mean) { int s, i, j; @@ -422,7 +422,7 @@ { int x1, y1, x2, y2, xx, yy, x, y; int mx, my, dmin, d; - UINT8 *pix; + uint8_t *pix; xx = 16 * s->mb_x; yy = 16 * s->mb_y; @@ -476,7 +476,7 @@ { int x1, y1, x2, y2, xx, yy, x, y; int mx, my, dmin, d; - UINT8 *pix; + uint8_t *pix; xx = s->mb_x << 4; yy = s->mb_y << 4; @@ -552,7 +552,7 @@ { int x1, y1, x2, y2, xx, yy, x, y, lastx, d; int mx, my, dminx, dminy; - UINT8 *pix; + uint8_t *pix; xx = s->mb_x << 4; yy = s->mb_y << 4; @@ -657,7 +657,7 @@ uint32_t *score_map= s->me.score_map; const int penalty_factor= s->me.sub_penalty_factor; int mx, my, xx, yy, dminh; - UINT8 *pix, *ptr; + uint8_t *pix, *ptr; op_pixels_abs_func pix_abs_x2; op_pixels_abs_func pix_abs_y2; op_pixels_abs_func pix_abs_xy2; @@ -964,7 +964,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s, int mb_x, int mb_y) { - UINT8 *pix, *ppix; + uint8_t *pix, *ppix; int sum, varc, vard, mx, my, range, dmin, xx, yy; int xmin, ymin, xmax, ymax; int rel_xmin, rel_ymin, rel_xmax, rel_ymax; @@ -1302,7 +1302,7 @@ //FIXME optimize? //FIXME move into template? //FIXME better f_code prediction (max mv & distance) - UINT16 *mv_penalty= s->me.mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame + uint16_t *mv_penalty= s->me.mv_penalty[s->f_code] + MAX_MV; // f_code of the prev frame uint8_t *dest_y = s->me.scratchpad; uint8_t *ptr; int dxy; @@ -1535,7 +1535,7 @@ if(s->me_method>=ME_EPZS){ int score[8]; int i, y; - UINT8 * fcode_tab= s->fcode_tab; + uint8_t * fcode_tab= s->fcode_tab; int best_fcode=-1; int best_score=-10000000; @@ -1584,7 +1584,7 @@ { const int f_code= s->f_code; int y; - UINT8 * fcode_tab= s->fcode_tab; + uint8_t * fcode_tab= s->fcode_tab; //int clip=0; //int noclip=0; /* clip / convert to intra 16x16 type MVs */ @@ -1648,7 +1648,7 @@ void ff_fix_long_b_mvs(MpegEncContext * s, int16_t (*mv_table)[2], int f_code, int type) { int y; - UINT8 * fcode_tab= s->fcode_tab; + uint8_t * fcode_tab= s->fcode_tab; // RAL: 8 in MPEG-1, 16 in MPEG-4 int range = (((s->codec_id == CODEC_ID_MPEG1VIDEO) ? 8 : 16) << f_code);
--- a/motion_test.c Mon Feb 10 22:43:30 2003 +0000 +++ b/motion_test.c Tue Feb 11 16:35:48 2003 +0000 @@ -9,27 +9,27 @@ #include "i386/mmx.h" -int pix_abs16x16_mmx(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_mmx1(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_x2_mmx(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_x2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_x2_c(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_y2_mmx(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_y2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_y2_c(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_xy2_mmx(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_xy2_mmx1(UINT8 *blk1, UINT8 *blk2, int lx); -int pix_abs16x16_xy2_c(UINT8 *blk1, UINT8 *blk2, int lx); +int pix_abs16x16_mmx(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_mmx1(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_x2_mmx(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_x2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_x2_c(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_y2_mmx(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_y2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_y2_c(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_xy2_mmx(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_xy2_mmx1(uint8_t *blk1, uint8_t *blk2, int lx); +int pix_abs16x16_xy2_c(uint8_t *blk1, uint8_t *blk2, int lx); -typedef int motion_func(UINT8 *blk1, UINT8 *blk2, int lx); +typedef int motion_func(uint8_t *blk1, uint8_t *blk2, int lx); #define WIDTH 64 #define HEIGHT 64 -UINT8 img1[WIDTH * HEIGHT]; -UINT8 img2[WIDTH * HEIGHT]; +uint8_t img1[WIDTH * HEIGHT]; +uint8_t img2[WIDTH * HEIGHT]; -void fill_random(UINT8 *tab, int size) +void fill_random(uint8_t *tab, int size) { int i; for(i=0;i<size;i++) { @@ -48,11 +48,11 @@ exit(1); } -INT64 gettime(void) +int64_t gettime(void) { struct timeval tv; gettimeofday(&tv,NULL); - return (INT64)tv.tv_sec * 1000000 + tv.tv_usec; + return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; } #define NB_ITS 500 @@ -63,8 +63,8 @@ motion_func *test_func, motion_func *ref_func) { int x, y, d1, d2, it; - UINT8 *ptr; - INT64 ti; + uint8_t *ptr; + int64_t ti; printf("testing '%s'\n", name); /* test correctness */
--- a/mpeg12.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mpeg12.c Tue Feb 11 16:35:48 2003 +0000 @@ -67,8 +67,8 @@ static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); #ifdef CONFIG_ENCODERS -static UINT16 mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; -static UINT8 fcode_tab[MAX_MV*2+1]; +static uint16_t mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; +static uint8_t fcode_tab[MAX_MV*2+1]; static uint32_t uni_mpeg1_ac_vlc_bits[64*64*2]; static uint8_t uni_mpeg1_ac_vlc_len [64*64*2]; @@ -182,7 +182,7 @@ unsigned int vbv_buffer_size; unsigned int fps, v; int n, i; - UINT64 time_code; + uint64_t time_code; float best_aspect_error= 1E10; float aspect_ratio= s->avctx->aspect_ratio; @@ -242,13 +242,13 @@ /* time code : we must convert from the real frame rate to a fake mpeg frame rate in case of low frame rate */ fps = frame_rate_tab[s->frame_rate_index]; - time_code = (INT64)s->fake_picture_number * FRAME_RATE_BASE; + time_code = (int64_t)s->fake_picture_number * FRAME_RATE_BASE; s->gop_picture_number = s->fake_picture_number; - put_bits(&s->pb, 5, (UINT32)((time_code / (fps * 3600)) % 24)); - put_bits(&s->pb, 6, (UINT32)((time_code / (fps * 60)) % 60)); + put_bits(&s->pb, 5, (uint32_t)((time_code / (fps * 3600)) % 24)); + put_bits(&s->pb, 6, (uint32_t)((time_code / (fps * 60)) % 60)); put_bits(&s->pb, 1, 1); - put_bits(&s->pb, 6, (UINT32)((time_code / fps) % 60)); - put_bits(&s->pb, 6, (UINT32)((time_code % fps) / FRAME_RATE_BASE)); + put_bits(&s->pb, 6, (uint32_t)((time_code / fps) % 60)); + put_bits(&s->pb, 6, (uint32_t)((time_code % fps) / FRAME_RATE_BASE)); put_bits(&s->pb, 1, 1); /* closed gop */ put_bits(&s->pb, 1, 0); /* broken link */ } @@ -257,7 +257,7 @@ /* insert empty P pictures to slow down to the desired frame rate. Each fake pictures takes about 20 bytes */ fps = frame_rate_tab[s->frame_rate_index]; - n = (((INT64)s->picture_number * fps) / s->frame_rate) - 1; + n = (((int64_t)s->picture_number * fps) / s->frame_rate) - 1; while (s->fake_picture_number < n) { mpeg1_skip_picture(s, s->fake_picture_number - s->gop_picture_number); @@ -737,7 +737,7 @@ it is handled slightly differently */ level = block[0]; if (abs(level) == 1) { - code = ((UINT32)level >> 31); /* the sign bit */ + code = ((uint32_t)level >> 31); /* the sign bit */ put_bits(&s->pb, 2, code | 0x02); i = 1; } else { @@ -1208,8 +1208,8 @@ int level, dc, diff, i, j, run; int component; RLTable *rl = &rl_mpeg1; - UINT8 * const scantable= s->intra_scantable.permutated; - const UINT16 *quant_matrix= s->intra_matrix; + uint8_t * const scantable= s->intra_scantable.permutated; + const uint16_t *quant_matrix= s->intra_matrix; const int qscale= s->qscale; /* DC coef */ @@ -1280,8 +1280,8 @@ { int level, i, j, run; RLTable *rl = &rl_mpeg1; - UINT8 * const scantable= s->intra_scantable.permutated; - const UINT16 *quant_matrix= s->inter_matrix; + uint8_t * const scantable= s->intra_scantable.permutated; + const uint16_t *quant_matrix= s->inter_matrix; const int qscale= s->qscale; { @@ -1358,8 +1358,8 @@ { int level, i, j, run; RLTable *rl = &rl_mpeg1; - UINT8 * const scantable= s->intra_scantable.permutated; - const UINT16 *quant_matrix; + uint8_t * const scantable= s->intra_scantable.permutated; + const uint16_t *quant_matrix; const int qscale= s->qscale; int mismatch; @@ -1438,8 +1438,8 @@ int level, dc, diff, i, j, run; int component; RLTable *rl; - UINT8 * const scantable= s->intra_scantable.permutated; - const UINT16 *quant_matrix; + uint8_t * const scantable= s->intra_scantable.permutated; + const uint16_t *quant_matrix; const int qscale= s->qscale; int mismatch; @@ -1516,10 +1516,10 @@ typedef struct Mpeg1Context { MpegEncContext mpeg_enc_ctx; - UINT32 header_state; + uint32_t header_state; int start_code; /* current start code */ - UINT8 buffer[PICTURE_BUFFER_SIZE]; - UINT8 *buf_ptr; + uint8_t buffer[PICTURE_BUFFER_SIZE]; + uint8_t *buf_ptr; int buffer_size; int mpeg_enc_ctx_allocated; /* true if decoding context allocated */ int repeat_field; /* true if we must repeat the field */ @@ -1546,10 +1546,10 @@ /* return the 8 bit start code value and update the search state. Return -1 if no start code found */ -static int find_start_code(UINT8 **pbuf_ptr, UINT8 *buf_end, - UINT32 *header_state) +static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end, + uint32_t *header_state) { - UINT8 *buf_ptr; + uint8_t *buf_ptr; unsigned int state, v; int val; @@ -1572,7 +1572,7 @@ } static int mpeg1_decode_picture(AVCodecContext *avctx, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -1724,7 +1724,7 @@ } static void mpeg_decode_extension(AVCodecContext *avctx, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -1764,7 +1764,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx, AVFrame *pict, int start_code, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -1897,7 +1897,7 @@ } static int mpeg1_decode_sequence(AVCodecContext *avctx, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -2010,10 +2010,10 @@ /* handle buffering and image synchronisation */ static int mpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { Mpeg1Context *s = avctx->priv_data; - UINT8 *buf_end, *buf_ptr, *buf_start; + uint8_t *buf_end, *buf_ptr, *buf_start; int len, start_code_found, ret, code, start_code, input_size; AVFrame *picture = data; MpegEncContext *s2 = &s->mpeg_enc_ctx;
--- a/mpeg12data.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpeg12data.h Tue Feb 11 16:35:48 2003 +0000 @@ -2,7 +2,7 @@ * MPEG1/2 tables */ -const INT16 ff_mpeg1_default_intra_matrix[64] = { +const int16_t ff_mpeg1_default_intra_matrix[64] = { 8, 16, 19, 22, 26, 27, 29, 34, 16, 16, 22, 24, 27, 29, 34, 37, 19, 22, 26, 27, 29, 34, 34, 38, @@ -13,7 +13,7 @@ 27, 29, 35, 38, 46, 56, 69, 83 }; -const INT16 ff_mpeg1_default_non_intra_matrix[64] = { +const int16_t ff_mpeg1_default_non_intra_matrix[64] = { 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, @@ -47,14 +47,14 @@ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, }; -const UINT16 vlc_dc_lum_code[12] = { +const uint16_t vlc_dc_lum_code[12] = { 0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff, }; const unsigned char vlc_dc_lum_bits[12] = { 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9, }; -const UINT16 vlc_dc_chroma_code[12] = { +const uint16_t vlc_dc_chroma_code[12] = { 0x0, 0x1, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x3fe, 0x3ff, }; const unsigned char vlc_dc_chroma_bits[12] = { @@ -62,10 +62,10 @@ }; /* simple include everything table for dc, first byte is bits number next 3 are code*/ -static UINT32 mpeg1_lum_dc_uni[512]; -static UINT32 mpeg1_chr_dc_uni[512]; +static uint32_t mpeg1_lum_dc_uni[512]; +static uint32_t mpeg1_chr_dc_uni[512]; -static const UINT16 mpeg1_vlc[113][2] = { +static const uint16_t mpeg1_vlc[113][2] = { { 0x3, 2 }, { 0x4, 4 }, { 0x5, 5 }, { 0x6, 7 }, { 0x26, 8 }, { 0x21, 8 }, { 0xa, 10 }, { 0x1d, 12 }, { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 }, { 0x1a, 13 }, @@ -98,7 +98,7 @@ { 0x2, 2 }, /* EOB */ }; -static const UINT16 mpeg2_vlc[113][2] = { +static const uint16_t mpeg2_vlc[113][2] = { {0x02, 2}, {0x06, 3}, {0x07, 4}, {0x1c, 5}, {0x1d, 5}, {0x05, 6}, {0x04, 6}, {0x7b, 7}, {0x7c, 7}, {0x23, 8}, {0x22, 8}, {0xfa, 8}, @@ -131,7 +131,7 @@ {0x06,4}, /* EOB */ }; -static const INT8 mpeg1_level[111] = { +static const int8_t mpeg1_level[111] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -148,7 +148,7 @@ 1, 1, 1, 1, 1, 1, 1, }; -static const INT8 mpeg1_run[111] = { +static const int8_t mpeg1_run[111] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -165,8 +165,8 @@ 25, 26, 27, 28, 29, 30, 31, }; -static UINT8 mpeg1_index_run[2][64]; -static INT8 mpeg1_max_level[2][64]; +static uint8_t mpeg1_index_run[2][64]; +static int8_t mpeg1_max_level[2][64]; static RLTable rl_mpeg1 = { 111, @@ -184,7 +184,7 @@ mpeg1_level, }; -static const UINT8 mbAddrIncrTable[35][2] = { +static const uint8_t mbAddrIncrTable[35][2] = { {0x1, 1}, {0x3, 3}, {0x2, 3}, @@ -222,7 +222,7 @@ {0xf, 11}, /* stuffing */ }; -static const UINT8 mbPatTable[63][2] = { +static const uint8_t mbPatTable[63][2] = { {0xb, 5}, {0x9, 5}, {0xd, 6}, @@ -294,7 +294,7 @@ #define MB_FOR 0x08 #define MB_QUANT 0x10 -static const UINT8 table_mb_ptype[32][2] = { +static const uint8_t table_mb_ptype[32][2] = { { 0, 0 }, // 0x00 { 3, 5 }, // 0x01 MB_INTRA { 1, 2 }, // 0x02 MB_PAT @@ -329,7 +329,7 @@ { 0, 0 }, // 0x1F }; -static const UINT8 table_mb_btype[32][2] = { +static const uint8_t table_mb_btype[32][2] = { { 0, 0 }, // 0x00 { 3, 5 }, // 0x01 MB_INTRA { 0, 0 }, // 0x02 @@ -364,7 +364,7 @@ { 0, 0 }, // 0x1F }; -static const UINT8 mbMotionVectorTable[17][2] = { +static const uint8_t mbMotionVectorTable[17][2] = { { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, @@ -396,14 +396,14 @@ (int)(60 * FRAME_RATE_BASE), }; -static const UINT8 non_linear_qscale[32] = { +static const uint8_t non_linear_qscale[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8,10,12,14,16,18,20,22, 24,28,32,36,40,44,48,52, 56,64,72,80,88,96,104,112, }; -UINT8 ff_mpeg1_dc_scale_table[128]={ // MN: mpeg2 really can have such large qscales? +uint8_t ff_mpeg1_dc_scale_table[128]={ // MN: mpeg2 really can have such large qscales? // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
--- a/mpeg4data.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpeg4data.h Tue Feb 11 16:35:48 2003 +0000 @@ -34,19 +34,19 @@ #define VOP_STARTCODE 0x1B6 /* dc encoding for mpeg4 */ -const UINT8 DCtab_lum[13][2] = +const uint8_t DCtab_lum[13][2] = { {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8}, {1,9}, {1,10}, {1,11}, }; -const UINT8 DCtab_chrom[13][2] = +const uint8_t DCtab_chrom[13][2] = { {3,2}, {2,2}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8}, {1,9}, {1,10}, {1,11}, {1,12}, }; -const UINT16 intra_vlc[103][2] = { +const uint16_t intra_vlc[103][2] = { { 0x2, 2 }, { 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 }, { 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 }, @@ -76,7 +76,7 @@ { 0x5f, 12 },{ 0x3, 7 }, }; -const INT8 intra_level[102] = { +const int8_t intra_level[102] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, @@ -92,7 +92,7 @@ 1, 1, 1, 1, 1, 1, }; -const INT8 intra_run[102] = { +const int8_t intra_run[102] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -116,17 +116,17 @@ intra_level, }; -static const UINT16 sprite_trajectory_tab[15][2] = { +static const uint16_t sprite_trajectory_tab[15][2] = { {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, }; -static const UINT8 mb_type_b_tab[4][2] = { +static const uint8_t mb_type_b_tab[4][2] = { {1, 1}, {1, 2}, {1, 3}, {1, 4}, }; -static const UINT16 pixel_aspect[16][2]={ +static const uint16_t pixel_aspect[16][2]={ {0, 0}, {1, 1}, {12, 11}, @@ -146,7 +146,7 @@ }; /* these matrixes will be permuted for the idct */ -const INT16 ff_mpeg4_default_intra_matrix[64] = { +const int16_t ff_mpeg4_default_intra_matrix[64] = { 8, 17, 18, 19, 21, 23, 25, 27, 17, 18, 19, 21, 23, 25, 27, 28, 20, 21, 22, 23, 24, 26, 28, 30, @@ -157,7 +157,7 @@ 27, 28, 30, 32, 35, 38, 41, 45, }; -const INT16 ff_mpeg4_default_non_intra_matrix[64] = { +const int16_t ff_mpeg4_default_non_intra_matrix[64] = { 16, 17, 18, 19, 20, 21, 22, 23, 17, 18, 19, 20, 21, 22, 23, 24, 18, 19, 20, 21, 22, 23, 24, 25, @@ -168,15 +168,15 @@ 23, 24, 25, 27, 28, 30, 31, 33, }; -UINT8 ff_mpeg4_y_dc_scale_table[32]={ +uint8_t ff_mpeg4_y_dc_scale_table[32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46 }; -UINT8 ff_mpeg4_c_dc_scale_table[32]={ +uint8_t ff_mpeg4_c_dc_scale_table[32]={ // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25 }; -const UINT16 ff_mpeg4_resync_prefix[8]={ +const uint16_t ff_mpeg4_resync_prefix[8]={ 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 };
--- a/mpegaudio.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegaudio.c Tue Feb 11 16:35:48 2003 +0000 @@ -23,7 +23,7 @@ quantization stage) */ #define FRAC_BITS 15 #define WFRAC_BITS 14 -#define MUL(a,b) (((INT64)(a) * (INT64)(b)) >> FRAC_BITS) +#define MUL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) #define FIX(a) ((int)((a) * (1 << FRAC_BITS))) #define SAMPLES_BUF_SIZE 4096 @@ -36,7 +36,7 @@ int bitrate_index; /* bit rate */ int freq_index; int frame_size; /* frame size, in bits, without padding */ - INT64 nb_samples; /* total number of samples encoded */ + int64_t nb_samples; /* total number of samples encoded */ /* padding computation */ int frame_frac, frame_frac_incr, do_padding; short samples_buf[MPA_MAX_CHANNELS][SAMPLES_BUF_SIZE]; /* buffer for filter */
--- a/mpegaudio.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegaudio.h Tue Feb 11 16:35:48 2003 +0000 @@ -17,11 +17,11 @@ int l2_select_table(int bitrate, int nb_channels, int freq, int lsf); -extern const UINT16 mpa_bitrate_tab[2][3][15]; -extern const UINT16 mpa_freq_tab[3]; +extern const uint16_t mpa_bitrate_tab[2][3][15]; +extern const uint16_t mpa_freq_tab[3]; extern const unsigned char *alloc_tables[5]; extern const double enwindow[512]; extern const int sblimit_table[5]; extern const int quant_steps[17]; extern const int quant_bits[17]; -extern const INT32 mpa_enwindow[257]; +extern const int32_t mpa_enwindow[257];
--- a/mpegaudiodec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegaudiodec.c Tue Feb 11 16:35:48 2003 +0000 @@ -42,17 +42,17 @@ #define FRAC_ONE (1 << FRAC_BITS) -#define MULL(a,b) (((INT64)(a) * (INT64)(b)) >> FRAC_BITS) -#define MUL64(a,b) ((INT64)(a) * (INT64)(b)) +#define MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS) +#define MUL64(a,b) ((int64_t)(a) * (int64_t)(b)) #define FIX(a) ((int)((a) * FRAC_ONE)) /* WARNING: only correct for posititive numbers */ #define FIXR(a) ((int)((a) * FRAC_ONE + 0.5)) #define FRAC_RND(a) (((a) + (FRAC_ONE/2)) >> FRAC_BITS) #if FRAC_BITS <= 15 -typedef INT16 MPA_INT; +typedef int16_t MPA_INT; #else -typedef INT32 MPA_INT; +typedef int32_t MPA_INT; #endif /****************/ @@ -61,14 +61,14 @@ #define BACKSTEP_SIZE 512 typedef struct MPADecodeContext { - UINT8 inbuf1[2][MPA_MAX_CODED_FRAME_SIZE + BACKSTEP_SIZE]; /* input buffer */ + uint8_t inbuf1[2][MPA_MAX_CODED_FRAME_SIZE + BACKSTEP_SIZE]; /* input buffer */ int inbuf_index; - UINT8 *inbuf_ptr, *inbuf; + uint8_t *inbuf_ptr, *inbuf; int frame_size; int free_format_frame_size; /* frame size in case of free format (zero if currently unknown) */ /* next header (used in free format parsing) */ - UINT32 free_format_next_header; + uint32_t free_format_next_header; int error_protection; int layer; int sample_rate; @@ -82,8 +82,8 @@ int lsf; MPA_INT synth_buf[MPA_MAX_CHANNELS][512 * 2]; int synth_buf_offset[MPA_MAX_CHANNELS]; - INT32 sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT]; - INT32 mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */ + int32_t sb_samples[MPA_MAX_CHANNELS][36][SBLIMIT]; + int32_t mdct_buf[MPA_MAX_CHANNELS][SBLIMIT * 18]; /* previous samples, for layer 3 MDCT */ #ifdef DEBUG int frame_count; #endif @@ -91,22 +91,22 @@ /* layer 3 "granule" */ typedef struct GranuleDef { - UINT8 scfsi; + uint8_t scfsi; int part2_3_length; int big_values; int global_gain; int scalefac_compress; - UINT8 block_type; - UINT8 switch_point; + uint8_t block_type; + uint8_t switch_point; int table_select[3]; int subblock_gain[3]; - UINT8 scalefac_scale; - UINT8 count1table_select; + uint8_t scalefac_scale; + uint8_t count1table_select; int region_size[3]; /* number of huffman codes in each region */ int preflag; int short_start, long_end; /* long/short band indexes */ - UINT8 scale_factors[40]; - INT32 sb_hybrid[SBLIMIT * 18]; /* 576 samples */ + uint8_t scale_factors[40]; + int32_t sb_hybrid[SBLIMIT * 18]; /* 576 samples */ } GranuleDef; #define MODE_EXT_MS_STEREO 2 @@ -115,49 +115,49 @@ /* layer 3 huffman tables */ typedef struct HuffTable { int xsize; - const UINT8 *bits; - const UINT16 *codes; + const uint8_t *bits; + const uint16_t *codes; } HuffTable; #include "mpegaudiodectab.h" /* vlc structure for decoding layer 3 huffman tables */ static VLC huff_vlc[16]; -static UINT8 *huff_code_table[16]; +static uint8_t *huff_code_table[16]; static VLC huff_quad_vlc[2]; /* computed from band_size_long */ -static UINT16 band_index_long[9][23]; +static uint16_t band_index_long[9][23]; /* XXX: free when all decoders are closed */ #define TABLE_4_3_SIZE (8191 + 16) -static INT8 *table_4_3_exp; +static int8_t *table_4_3_exp; #if FRAC_BITS <= 15 -static UINT16 *table_4_3_value; +static uint16_t *table_4_3_value; #else -static UINT32 *table_4_3_value; +static uint32_t *table_4_3_value; #endif /* intensity stereo coef table */ -static INT32 is_table[2][16]; -static INT32 is_table_lsf[2][2][16]; -static INT32 csa_table[8][2]; -static INT32 mdct_win[8][36]; +static int32_t is_table[2][16]; +static int32_t is_table_lsf[2][2][16]; +static int32_t csa_table[8][2]; +static int32_t mdct_win[8][36]; /* lower 2 bits: modulo 3, higher bits: shift */ -static UINT16 scale_factor_modshift[64]; +static uint16_t scale_factor_modshift[64]; /* [i][j]: 2^(-j/3) * FRAC_ONE * 2^(i+2) / (2^(i+2) - 1) */ -static INT32 scale_factor_mult[15][3]; +static int32_t scale_factor_mult[15][3]; /* mult table for layer 2 group quantization */ #define SCALE_GEN(v) \ { FIXR(1.0 * (v)), FIXR(0.7937005259 * (v)), FIXR(0.6299605249 * (v)) } -static INT32 scale_factor_mult2[3][3] = { +static int32_t scale_factor_mult2[3][3] = { SCALE_GEN(4.0 / 3.0), /* 3 steps */ SCALE_GEN(4.0 / 5.0), /* 5 steps */ SCALE_GEN(4.0 / 9.0), /* 9 steps */ }; /* 2^(n/4) */ -static UINT32 scale_factor_mult3[4] = { +static uint32_t scale_factor_mult3[4] = { FIXR(1.0), FIXR(1.18920711500272106671), FIXR(1.41421356237309504880), @@ -171,7 +171,7 @@ static inline int l1_unscale(int n, int mant, int scale_factor) { int shift, mod; - INT64 val; + int64_t val; shift = scale_factor_modshift[scale_factor]; mod = shift & 3; @@ -203,7 +203,7 @@ #if FRAC_BITS <= 15 unsigned int m; #else - UINT64 m; + uint64_t m; #endif int e; @@ -221,7 +221,7 @@ return m; #else m = MUL64(m, scale_factor_mult3[exponent & 3]); - m = (m + (UINT64_C(1) << (e-1))) >> e; + m = (m + (uint64_t_C(1) << (e-1))) >> e; return m; #endif } @@ -232,7 +232,7 @@ #define POW_FRAC_BITS 24 #define POW_FRAC_ONE (1 << POW_FRAC_BITS) #define POW_FIX(a) ((int)((a) * POW_FRAC_ONE)) -#define POW_MULL(a,b) (((INT64)(a) * (INT64)(b)) >> POW_FRAC_BITS) +#define POW_MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> POW_FRAC_BITS) static int dev_4_3_coefs[DEV_ORDER]; @@ -318,7 +318,7 @@ for(i=0;i<15;i++) { int n, norm; n = i + 2; - norm = ((INT64_C(1) << n) * FRAC_ONE) / ((1 << n) - 1); + norm = ((int64_t_C(1) << n) * FRAC_ONE) / ((1 << n) - 1); scale_factor_mult[i][0] = MULL(FIXR(1.0 * 2.0), norm); scale_factor_mult[i][1] = MULL(FIXR(0.7937005259 * 2.0), norm); scale_factor_mult[i][2] = MULL(FIXR(0.6299605249 * 2.0), norm); @@ -350,7 +350,7 @@ const HuffTable *h = &mpa_huff_tables[i]; int xsize, x, y; unsigned int n; - UINT8 *code_table; + uint8_t *code_table; xsize = h->xsize; n = xsize * xsize; @@ -577,7 +577,7 @@ #define ADD(a, b) tab[a] += tab[b] /* DCT32 without 1/sqrt(2) coef zero scaling. */ -static void dct32(INT32 *out, INT32 *tab) +static void dct32(int32_t *out, int32_t *tab) { int tmp0, tmp1; @@ -760,7 +760,7 @@ #define OUT_SAMPLE(sum)\ {\ int sum1;\ - sum1 = (int)((sum + (INT64_C(1) << (OUT_SHIFT - 1))) >> OUT_SHIFT);\ + sum1 = (int)((sum + (int64_t_C(1) << (OUT_SHIFT - 1))) >> OUT_SHIFT);\ if (sum1 < -32768)\ sum1 = -32768;\ else if (sum1 > 32767)\ @@ -787,17 +787,17 @@ 32 samples. */ /* XXX: optimize by avoiding ring buffer usage */ static void synth_filter(MPADecodeContext *s1, - int ch, INT16 *samples, int incr, - INT32 sb_samples[SBLIMIT]) + int ch, int16_t *samples, int incr, + int32_t sb_samples[SBLIMIT]) { - INT32 tmp[32]; + int32_t tmp[32]; register MPA_INT *synth_buf, *p; register MPA_INT *w; int j, offset, v; #if FRAC_BITS <= 15 int sum; #else - INT64 sum; + int64_t sum; #endif dct32(tmp, sb_samples); @@ -863,7 +863,7 @@ static void imdct12(int *out, int *in) { int tmp; - INT64 in1_3, in1_9, in4_3, in4_9; + int64_t in1_3, in1_9, in4_3, in4_9; in1_3 = MUL64(in[1], C3); in1_9 = MUL64(in[1], C9); @@ -955,7 +955,7 @@ { int i, j, t0, t1, t2, t3, s0, s1, s2, s3; int tmp[18], *tmp1, *in1; - INT64 in3_3, in6_6; + int64_t in3_3, in6_6; for(i=17;i>=1;i--) in[i] += in[i-1]; @@ -1030,7 +1030,7 @@ } /* fast header check for resync */ -static int check_header(UINT32 header) +static int check_header(uint32_t header) { /* header */ if ((header & 0xffe00000) != 0xffe00000) @@ -1054,7 +1054,7 @@ /* header decoding. MUST check the header before because no consistency check is done there. Return 1 if free format found and that the frame size must be computed externally */ -static int decode_header(MPADecodeContext *s, UINT32 header) +static int decode_header(MPADecodeContext *s, uint32_t header) { int sample_rate, frame_size, mpeg25, padding; int sample_rate_index, bitrate_index; @@ -1155,8 +1155,8 @@ static int mp_decode_layer1(MPADecodeContext *s) { int bound, i, v, n, ch, j, mant; - UINT8 allocation[MPA_MAX_CHANNELS][SBLIMIT]; - UINT8 scale_factors[MPA_MAX_CHANNELS][SBLIMIT]; + uint8_t allocation[MPA_MAX_CHANNELS][SBLIMIT]; + uint8_t scale_factors[MPA_MAX_CHANNELS][SBLIMIT]; if (s->mode == MPA_JSTEREO) bound = (s->mode_ext + 1) * 4; @@ -1451,7 +1451,7 @@ */ static void seek_to_maindata(MPADecodeContext *s, unsigned int backstep) { - UINT8 *ptr; + uint8_t *ptr; /* compute current position in stream */ ptr = s->gb.buffer + (get_bits_count(&s->gb)>>3); @@ -1491,11 +1491,11 @@ static void exponents_from_scale_factors(MPADecodeContext *s, GranuleDef *g, - INT16 *exponents) + int16_t *exponents) { - const UINT8 *bstab, *pretab; + const uint8_t *bstab, *pretab; int len, i, j, k, l, v0, shift, gain, gains[3]; - INT16 *exp_ptr; + int16_t *exp_ptr; exp_ptr = exponents; gain = g->global_gain - 210; @@ -1537,13 +1537,13 @@ } static int huffman_decode(MPADecodeContext *s, GranuleDef *g, - INT16 *exponents, int end_pos) + int16_t *exponents, int end_pos) { int s_index; int linbits, code, x, y, l, v, i, j, k, pos; GetBitContext last_gb; VLC *vlc; - UINT8 *code_table; + uint8_t *code_table; /* low frequencies (called big values) */ s_index = 0; @@ -1642,8 +1642,8 @@ static void reorder_block(MPADecodeContext *s, GranuleDef *g) { int i, j, k, len; - INT32 *ptr, *dst, *ptr1; - INT32 tmp[576]; + int32_t *ptr, *dst, *ptr1; + int32_t tmp[576]; if (g->block_type != 2) return; @@ -1668,7 +1668,7 @@ dst += 3; } } - memcpy(ptr1, tmp, len * 3 * sizeof(INT32)); + memcpy(ptr1, tmp, len * 3 * sizeof(int32_t)); } } @@ -1678,10 +1678,10 @@ GranuleDef *g0, GranuleDef *g1) { int i, j, k, l; - INT32 v1, v2; + int32_t v1, v2; int sf_max, tmp0, tmp1, sf, len, non_zero_found; - INT32 (*is_tab)[16]; - INT32 *tab0, *tab1; + int32_t (*is_tab)[16]; + int32_t *tab0, *tab1; int non_zero_found_short[3]; /* intensity stereo */ @@ -1804,7 +1804,7 @@ static void compute_antialias(MPADecodeContext *s, GranuleDef *g) { - INT32 *ptr, *p0, *p1, *csa; + int32_t *ptr, *p0, *p1, *csa; int n, tmp0, tmp1, i, j; /* we antialias only "long" bands */ @@ -1837,13 +1837,13 @@ static void compute_imdct(MPADecodeContext *s, GranuleDef *g, - INT32 *sb_samples, - INT32 *mdct_buf) + int32_t *sb_samples, + int32_t *mdct_buf) { - INT32 *ptr, *win, *win1, *buf, *buf2, *out_ptr, *ptr1; - INT32 in[6]; - INT32 out[36]; - INT32 out2[12]; + int32_t *ptr, *win, *win1, *buf, *buf2, *out_ptr, *ptr1; + int32_t in[6]; + int32_t out[36]; + int32_t out2[12]; int i, j, k, mdct_long_end, v, sblimit; /* find last non zero block */ @@ -1936,12 +1936,12 @@ } #if defined(DEBUG) -void sample_dump(int fnum, INT32 *tab, int n) +void sample_dump(int fnum, int32_t *tab, int n) { static FILE *files[16], *f; char buf[512]; int i; - INT32 v; + int32_t v; f = files[fnum]; if (!f) { @@ -1972,7 +1972,7 @@ for(i=0;i<n;i++) { /* normalize to 23 frac bits */ v = tab[i] << (23 - FRAC_BITS); - fwrite(&v, 1, sizeof(INT32), f); + fwrite(&v, 1, sizeof(int32_t), f); } } #endif @@ -1984,7 +1984,7 @@ int nb_granules, main_data_begin, private_bits; int gr, ch, blocksplit_flag, i, j, k, n, bits_pos, bits_left; GranuleDef granules[2][2], *g; - INT16 exponents[576]; + int16_t exponents[576]; /* read side info */ if (s->lsf) { @@ -2124,7 +2124,7 @@ bits_pos = get_bits_count(&s->gb); if (!s->lsf) { - UINT8 *sc; + uint8_t *sc; int slen, slen1, slen2; /* MPEG1 scale factors */ @@ -2328,11 +2328,11 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, - UINT8 * buf, int buf_size) + uint8_t * buf, int buf_size) { MPADecodeContext *s = avctx->priv_data; - UINT32 header; - UINT8 *buf_ptr; + uint32_t header; + uint8_t *buf_ptr; int len, out_size; short *out_samples = data; @@ -2399,8 +2399,8 @@ memcpy(s->inbuf, s->inbuf + 1, s->inbuf_ptr - s->inbuf - 1); s->inbuf_ptr--; } else { - UINT8 *p, *pend; - UINT32 header1; + uint8_t *p, *pend; + uint32_t header1; int padding; memcpy(s->inbuf_ptr, buf_ptr, len);
--- a/mpegaudiodectab.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegaudiodectab.h Tue Feb 11 16:35:48 2003 +0000 @@ -1,5 +1,5 @@ -const UINT16 mpa_bitrate_tab[2][3][15] = { +const uint16_t mpa_bitrate_tab[2][3][15] = { { {0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448 }, {0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384 }, {0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 } }, @@ -9,11 +9,11 @@ } }; -const UINT16 mpa_freq_tab[3] = { 44100, 48000, 32000 }; +const uint16_t mpa_freq_tab[3] = { 44100, 48000, 32000 }; /*******************************************************/ /* half mpeg encoding window (full precision) */ -const INT32 mpa_enwindow[257] = { +const int32_t mpa_enwindow[257] = { 0, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -3, -3, -4, -4, -5, -5, -6, -7, -7, -8, -9, -10, -11, @@ -200,13 +200,13 @@ /* layer 3 tables */ /* layer3 scale factor size */ -static const UINT8 slen_table[2][16] = { +static const uint8_t slen_table[2][16] = { { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }, { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }, }; /* number of lsf scale factors for a given size */ -static const UINT8 lsf_nsf_table[6][3][4] = { +static const uint8_t lsf_nsf_table[6][3][4] = { { { 6, 5, 5, 5 }, { 9, 9, 9, 9 }, { 6, 9, 9, 9 } }, { { 6, 5, 7, 3 }, { 9, 9, 12, 6 }, { 6, 9, 12, 6 } }, { { 11, 10, 0, 0 }, { 18, 18, 0, 0 }, { 15, 18, 0, 0 } }, @@ -217,55 +217,55 @@ /* mpegaudio layer 3 huffman tables */ -const UINT16 mpa_huffcodes_1[4] = { +const uint16_t mpa_huffcodes_1[4] = { 0x0001, 0x0001, 0x0001, 0x0000, }; -const UINT8 mpa_huffbits_1[4] = { +const uint8_t mpa_huffbits_1[4] = { 1, 3, 2, 3, }; -const UINT16 mpa_huffcodes_2[9] = { +const uint16_t mpa_huffcodes_2[9] = { 0x0001, 0x0002, 0x0001, 0x0003, 0x0001, 0x0001, 0x0003, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_2[9] = { +const uint8_t mpa_huffbits_2[9] = { 1, 3, 6, 3, 3, 5, 5, 5, 6, }; -const UINT16 mpa_huffcodes_3[9] = { +const uint16_t mpa_huffcodes_3[9] = { 0x0003, 0x0002, 0x0001, 0x0001, 0x0001, 0x0001, 0x0003, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_3[9] = { +const uint8_t mpa_huffbits_3[9] = { 2, 2, 6, 3, 2, 5, 5, 5, 6, }; -const UINT16 mpa_huffcodes_5[16] = { +const uint16_t mpa_huffcodes_5[16] = { 0x0001, 0x0002, 0x0006, 0x0005, 0x0003, 0x0001, 0x0004, 0x0004, 0x0007, 0x0005, 0x0007, 0x0001, 0x0006, 0x0001, 0x0001, 0x0000, }; -const UINT8 mpa_huffbits_5[16] = { +const uint8_t mpa_huffbits_5[16] = { 1, 3, 6, 7, 3, 3, 6, 7, 6, 6, 7, 8, 7, 6, 7, 8, }; -const UINT16 mpa_huffcodes_6[16] = { +const uint16_t mpa_huffcodes_6[16] = { 0x0007, 0x0003, 0x0005, 0x0001, 0x0006, 0x0002, 0x0003, 0x0002, 0x0005, 0x0004, 0x0004, 0x0001, 0x0003, 0x0003, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_6[16] = { +const uint8_t mpa_huffbits_6[16] = { 3, 3, 5, 7, 3, 2, 4, 5, 4, 4, 5, 6, 6, 5, 6, 7, }; -const UINT16 mpa_huffcodes_7[36] = { +const uint16_t mpa_huffcodes_7[36] = { 0x0001, 0x0002, 0x000a, 0x0013, 0x0010, 0x000a, 0x0003, 0x0003, 0x0007, 0x000a, 0x0005, 0x0003, 0x000b, 0x0004, 0x000d, 0x0011, 0x0008, 0x0004, 0x000c, 0x000b, 0x0012, 0x000f, 0x000b, 0x0002, @@ -273,7 +273,7 @@ 0x0005, 0x0003, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_7[36] = { +const uint8_t mpa_huffbits_7[36] = { 1, 3, 6, 8, 8, 9, 3, 4, 6, 7, 7, 8, 6, 5, 7, 8, 8, 9, 7, 7, 8, 9, 9, 9, @@ -281,7 +281,7 @@ 9, 10, 10, 10, }; -const UINT16 mpa_huffcodes_8[36] = { +const uint16_t mpa_huffcodes_8[36] = { 0x0003, 0x0004, 0x0006, 0x0012, 0x000c, 0x0005, 0x0005, 0x0001, 0x0002, 0x0010, 0x0009, 0x0003, 0x0007, 0x0003, 0x0005, 0x000e, 0x0007, 0x0003, 0x0013, 0x0011, 0x000f, 0x000d, 0x000a, 0x0004, @@ -289,7 +289,7 @@ 0x0004, 0x0001, 0x0001, 0x0000, }; -const UINT8 mpa_huffbits_8[36] = { +const uint8_t mpa_huffbits_8[36] = { 2, 3, 6, 8, 8, 9, 3, 2, 4, 8, 8, 8, 6, 4, 6, 8, 8, 9, 8, 8, 8, 9, 9, 10, @@ -297,7 +297,7 @@ 9, 9, 11, 11, }; -const UINT16 mpa_huffcodes_9[36] = { +const uint16_t mpa_huffcodes_9[36] = { 0x0007, 0x0005, 0x0009, 0x000e, 0x000f, 0x0007, 0x0006, 0x0004, 0x0005, 0x0005, 0x0006, 0x0007, 0x0007, 0x0006, 0x0008, 0x0008, 0x0008, 0x0005, 0x000f, 0x0006, 0x0009, 0x000a, 0x0005, 0x0001, @@ -305,7 +305,7 @@ 0x0006, 0x0002, 0x0006, 0x0000, }; -const UINT8 mpa_huffbits_9[36] = { +const uint8_t mpa_huffbits_9[36] = { 3, 3, 5, 6, 8, 9, 3, 3, 4, 5, 6, 8, 4, 4, 5, 6, 7, 8, 6, 5, 6, 7, 7, 8, @@ -313,7 +313,7 @@ 8, 8, 9, 9, }; -const UINT16 mpa_huffcodes_10[64] = { +const uint16_t mpa_huffcodes_10[64] = { 0x0001, 0x0002, 0x000a, 0x0017, 0x0023, 0x001e, 0x000c, 0x0011, 0x0003, 0x0003, 0x0008, 0x000c, 0x0012, 0x0015, 0x000c, 0x0007, 0x000b, 0x0009, 0x000f, 0x0015, 0x0020, 0x0028, 0x0013, 0x0006, @@ -324,7 +324,7 @@ 0x0009, 0x0008, 0x0007, 0x0008, 0x0004, 0x0004, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_10[64] = { +const uint8_t mpa_huffbits_10[64] = { 1, 3, 6, 8, 9, 9, 9, 10, 3, 4, 6, 7, 8, 9, 8, 8, 6, 6, 7, 8, 9, 10, 9, 9, @@ -335,7 +335,7 @@ 9, 8, 9, 10, 10, 11, 11, 11, }; -const UINT16 mpa_huffcodes_11[64] = { +const uint16_t mpa_huffcodes_11[64] = { 0x0003, 0x0004, 0x000a, 0x0018, 0x0022, 0x0021, 0x0015, 0x000f, 0x0005, 0x0003, 0x0004, 0x000a, 0x0020, 0x0011, 0x000b, 0x000a, 0x000b, 0x0007, 0x000d, 0x0012, 0x001e, 0x001f, 0x0014, 0x0005, @@ -346,7 +346,7 @@ 0x000b, 0x0004, 0x0006, 0x0006, 0x0006, 0x0003, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_11[64] = { +const uint8_t mpa_huffbits_11[64] = { 2, 3, 5, 7, 8, 9, 8, 9, 3, 3, 4, 6, 8, 8, 7, 8, 5, 5, 6, 7, 8, 9, 8, 8, @@ -357,7 +357,7 @@ 8, 7, 8, 9, 10, 10, 10, 10, }; -const UINT16 mpa_huffcodes_12[64] = { +const uint16_t mpa_huffcodes_12[64] = { 0x0009, 0x0006, 0x0010, 0x0021, 0x0029, 0x0027, 0x0026, 0x001a, 0x0007, 0x0005, 0x0006, 0x0009, 0x0017, 0x0010, 0x001a, 0x000b, 0x0011, 0x0007, 0x000b, 0x000e, 0x0015, 0x001e, 0x000a, 0x0007, @@ -368,7 +368,7 @@ 0x001b, 0x000c, 0x0008, 0x000c, 0x0006, 0x0003, 0x0001, 0x0000, }; -const UINT8 mpa_huffbits_12[64] = { +const uint8_t mpa_huffbits_12[64] = { 4, 3, 5, 7, 8, 9, 9, 9, 3, 3, 4, 5, 7, 7, 8, 8, 5, 4, 5, 6, 7, 8, 7, 8, @@ -379,7 +379,7 @@ 9, 8, 8, 9, 9, 9, 9, 10, }; -const UINT16 mpa_huffcodes_13[256] = { +const uint16_t mpa_huffcodes_13[256] = { 0x0001, 0x0005, 0x000e, 0x0015, 0x0022, 0x0033, 0x002e, 0x0047, 0x002a, 0x0034, 0x0044, 0x0034, 0x0043, 0x002c, 0x002b, 0x0013, 0x0003, 0x0004, 0x000c, 0x0013, 0x001f, 0x001a, 0x002c, 0x0021, @@ -414,7 +414,7 @@ 0x0011, 0x000c, 0x0010, 0x0008, 0x0001, 0x0001, 0x0000, 0x0001, }; -const UINT8 mpa_huffbits_13[256] = { +const uint8_t mpa_huffbits_13[256] = { 1, 4, 6, 7, 8, 9, 9, 10, 9, 10, 11, 11, 12, 12, 13, 13, 3, 4, 6, 7, 8, 8, 9, 9, @@ -449,7 +449,7 @@ 15, 15, 16, 16, 19, 18, 19, 16, }; -const UINT16 mpa_huffcodes_15[256] = { +const uint16_t mpa_huffcodes_15[256] = { 0x0007, 0x000c, 0x0012, 0x0035, 0x002f, 0x004c, 0x007c, 0x006c, 0x0059, 0x007b, 0x006c, 0x0077, 0x006b, 0x0051, 0x007a, 0x003f, 0x000d, 0x0005, 0x0010, 0x001b, 0x002e, 0x0024, 0x003d, 0x0033, @@ -484,7 +484,7 @@ 0x0015, 0x0010, 0x000a, 0x0006, 0x0008, 0x0006, 0x0002, 0x0000, }; -const UINT8 mpa_huffbits_15[256] = { +const uint8_t mpa_huffbits_15[256] = { 3, 4, 5, 7, 7, 8, 9, 9, 9, 10, 10, 11, 11, 11, 12, 13, 4, 3, 5, 6, 7, 7, 8, 8, @@ -519,7 +519,7 @@ 12, 12, 12, 12, 13, 13, 13, 13, }; -const UINT16 mpa_huffcodes_16[256] = { +const uint16_t mpa_huffcodes_16[256] = { 0x0001, 0x0005, 0x000e, 0x002c, 0x004a, 0x003f, 0x006e, 0x005d, 0x00ac, 0x0095, 0x008a, 0x00f2, 0x00e1, 0x00c3, 0x0178, 0x0011, 0x0003, 0x0004, 0x000c, 0x0014, 0x0023, 0x003e, 0x0035, 0x002f, @@ -554,7 +554,7 @@ 0x000d, 0x000c, 0x000a, 0x0007, 0x0005, 0x0003, 0x0001, 0x0003, }; -const UINT8 mpa_huffbits_16[256] = { +const uint8_t mpa_huffbits_16[256] = { 1, 4, 6, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 9, 3, 4, 6, 7, 8, 9, 9, 9, @@ -589,7 +589,7 @@ 11, 11, 11, 11, 11, 11, 11, 8, }; -const UINT16 mpa_huffcodes_24[256] = { +const uint16_t mpa_huffcodes_24[256] = { 0x000f, 0x000d, 0x002e, 0x0050, 0x0092, 0x0106, 0x00f8, 0x01b2, 0x01aa, 0x029d, 0x028d, 0x0289, 0x026d, 0x0205, 0x0408, 0x0058, 0x000e, 0x000c, 0x0015, 0x0026, 0x0047, 0x0082, 0x007a, 0x00d8, @@ -624,7 +624,7 @@ 0x0007, 0x0006, 0x0004, 0x0007, 0x0005, 0x0003, 0x0001, 0x0003, }; -const UINT8 mpa_huffbits_24[256] = { +const uint8_t mpa_huffbits_24[256] = { 4, 4, 6, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 11, 12, 9, 4, 4, 5, 6, 7, 8, 8, 9, @@ -678,7 +678,7 @@ { 16, mpa_huffbits_24, mpa_huffcodes_24 }, }; -const UINT8 mpa_huff_data[32][2] = { +const uint8_t mpa_huff_data[32][2] = { { 0, 0 }, { 1, 0 }, { 2, 0 }, @@ -715,18 +715,18 @@ /* huffman tables for quadrules */ -static UINT8 mpa_quad_codes[2][16] = { +static uint8_t mpa_quad_codes[2][16] = { { 1, 5, 4, 5, 6, 5, 4, 4, 7, 3, 6, 0, 7, 2, 3, 1, }, { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, }, }; -static UINT8 mpa_quad_bits[2][16] = { +static uint8_t mpa_quad_bits[2][16] = { { 1, 4, 4, 5, 4, 6, 5, 6, 4, 5, 5, 6, 5, 6, 6, 6, }, { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, }, }; /* band size tables */ -const UINT8 band_size_long[9][22] = { +const uint8_t band_size_long[9][22] = { { 4, 4, 4, 4, 4, 4, 6, 6, 8, 8, 10, 12, 16, 20, 24, 28, 34, 42, 50, 54, 76, 158, }, /* 44100 */ { 4, 4, 4, 4, 4, 4, 6, 6, 6, 8, 10, @@ -747,7 +747,7 @@ 40, 48, 56, 64, 76, 90, 2, 2, 2, 2, 2, }, /* 8000 */ }; -const UINT8 band_size_short[9][13] = { +const uint8_t band_size_short[9][13] = { { 4, 4, 4, 4, 6, 8, 10, 12, 14, 18, 22, 30, 56, }, /* 44100 */ { 4, 4, 4, 4, 6, 6, 10, 12, 14, 16, 20, 26, 66, }, /* 48000 */ { 4, 4, 4, 4, 6, 8, 12, 16, 20, 26, 34, 42, 12, }, /* 32000 */ @@ -759,7 +759,7 @@ { 8, 8, 8, 12, 16, 20, 24, 28, 36, 2, 2, 2, 26, }, /* 8000 */ }; -const UINT8 mpa_pretab[2][22] = { +const uint8_t mpa_pretab[2][22] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 2, 0 }, };
--- a/mpegaudiotab.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegaudiotab.h Tue Feb 11 16:35:48 2003 +0000 @@ -54,13 +54,13 @@ }; -static INT16 filter_bank[512]; +static int16_t filter_bank[512]; static int scale_factor_table[64]; #ifdef USE_FLOATS static float scale_factor_inv_table[64]; #else -static INT8 scale_factor_shift[64]; +static int8_t scale_factor_shift[64]; static unsigned short scale_factor_mult[64]; #endif static unsigned char scale_diff_table[128];
--- a/mpegvideo.c Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegvideo.c Tue Feb 11 16:35:48 2003 +0000 @@ -40,11 +40,11 @@ DCTELEM *block, int n, int qscale); static void dct_unquantize_h263_c(MpegEncContext *s, DCTELEM *block, int n, int qscale); -static void draw_edges_c(UINT8 *buf, int wrap, int width, int height, int w); +static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w); static int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); static int dct_quantize_trellis_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); -void (*draw_edges)(UINT8 *buf, int wrap, int width, int height, int w)= draw_edges_c; +void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, int w)= draw_edges_c; /* enable all paranoid tests for rounding, overflows, etc... */ @@ -85,13 +85,13 @@ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, }; -static UINT16 (*default_mv_penalty)[MAX_MV*2+1]=NULL; -static UINT8 default_fcode_tab[MAX_MV*2+1]; +static uint16_t (*default_mv_penalty)[MAX_MV*2+1]=NULL; +static uint8_t default_fcode_tab[MAX_MV*2+1]; enum PixelFormat ff_yuv420p_list[2]= {PIX_FMT_YUV420P, -1}; static void convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16)[64], uint16_t (*qmat16_bias)[64], - const UINT16 *quant_matrix, int bias, int qmin, int qmax) + const uint16_t *quant_matrix, int bias, int qmin, int qmax) { int qscale; @@ -105,7 +105,7 @@ /* (1<<36)/19952 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */ /* 3444240 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= 275 */ - qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / + qmat[qscale][i] = (int)((uint64_t_C(1) << QMAT_SHIFT) / (qscale * quant_matrix[j])); } } else if (s->fdct == fdct_ifast) { @@ -116,7 +116,7 @@ /* (1<<36)/19952 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= (1<<36)/249205026 */ /* 3444240 >= (1<<36)/(aanscales[i] * qscale * quant_matrix[i]) >= 275 */ - qmat[qscale][i] = (int)((UINT64_C(1) << (QMAT_SHIFT + 14)) / + qmat[qscale][i] = (int)((uint64_t_C(1) << (QMAT_SHIFT + 14)) / (aanscales[i] * qscale * quant_matrix[j])); } } else { @@ -127,7 +127,7 @@ so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905 so 32768 >= (1<<19) / (qscale * quant_matrix[i]) >= 67 */ - qmat[qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT) / (qscale * quant_matrix[j])); + qmat[qscale][i] = (int)((uint64_t_C(1) << QMAT_SHIFT) / (qscale * quant_matrix[j])); // qmat [qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[i]); qmat16[qscale][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]); @@ -147,7 +147,7 @@ }\ } -void ff_init_scantable(MpegEncContext *s, ScanTable *st, const UINT8 *src_scantable){ +void ff_init_scantable(MpegEncContext *s, ScanTable *st, const uint8_t *src_scantable){ int i; int end; @@ -174,14 +174,14 @@ /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ // *FIXME* this is ugly hack using local static -static void (*ff_put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); -static void (*ff_add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size); -static void ff_jref_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); +static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); +static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct (block); ff_put_pixels_clamped(block, dest, line_size); } -static void ff_jref_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct (block); ff_add_pixels_clamped(block, dest, line_size); @@ -312,14 +312,14 @@ if(pic->qscale_table==NULL){ if (s->encoding) { - CHECKED_ALLOCZ(pic->mb_var , s->mb_num * sizeof(INT16)) - CHECKED_ALLOCZ(pic->mc_mb_var, s->mb_num * sizeof(INT16)) - CHECKED_ALLOCZ(pic->mb_mean , s->mb_num * sizeof(INT8)) + CHECKED_ALLOCZ(pic->mb_var , s->mb_num * sizeof(int16_t)) + CHECKED_ALLOCZ(pic->mc_mb_var, s->mb_num * sizeof(int16_t)) + CHECKED_ALLOCZ(pic->mb_mean , s->mb_num * sizeof(int8_t)) CHECKED_ALLOCZ(pic->mb_cmp_score, s->mb_num * sizeof(int32_t)) } - CHECKED_ALLOCZ(pic->mbskip_table , s->mb_num * sizeof(UINT8)+1) //the +1 is for the slice end check - CHECKED_ALLOCZ(pic->qscale_table , s->mb_num * sizeof(UINT8)) + CHECKED_ALLOCZ(pic->mbskip_table , s->mb_num * sizeof(uint8_t)+1) //the +1 is for the slice end check + CHECKED_ALLOCZ(pic->qscale_table , s->mb_num * sizeof(uint8_t)) pic->qstride= s->mb_width; } @@ -405,12 +405,12 @@ int mv_table_size= (s->mb_width+2)*(s->mb_height+2); /* Allocate MV tables */ - CHECKED_ALLOCZ(s->p_mv_table , mv_table_size * 2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->b_forw_mv_table , mv_table_size * 2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->b_back_mv_table , mv_table_size * 2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->b_bidir_forw_mv_table , mv_table_size * 2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->b_bidir_back_mv_table , mv_table_size * 2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->b_direct_mv_table , mv_table_size * 2 * sizeof(INT16)) + CHECKED_ALLOCZ(s->p_mv_table , mv_table_size * 2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->b_forw_mv_table , mv_table_size * 2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->b_back_mv_table , mv_table_size * 2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->b_bidir_forw_mv_table , mv_table_size * 2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->b_bidir_back_mv_table , mv_table_size * 2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->b_direct_mv_table , mv_table_size * 2 * sizeof(int16_t)) //FIXME should be linesize instead of s->width*2 but that isnt known before get_buffer() CHECKED_ALLOCZ(s->me.scratchpad, s->width*2*16*3*sizeof(uint8_t)) @@ -429,29 +429,29 @@ CHECKED_ALLOCZ(s->avctx->stats_out, 256); } - CHECKED_ALLOCZ(s->error_status_table, s->mb_num*sizeof(UINT8)) + CHECKED_ALLOCZ(s->error_status_table, s->mb_num*sizeof(uint8_t)) if (s->out_format == FMT_H263 || s->encoding) { int size; /* Allocate MB type table */ - CHECKED_ALLOCZ(s->mb_type , s->mb_num * sizeof(UINT8)) + CHECKED_ALLOCZ(s->mb_type , s->mb_num * sizeof(uint8_t)) /* MV prediction */ size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2); - CHECKED_ALLOCZ(s->motion_val, size * 2 * sizeof(INT16)); + CHECKED_ALLOCZ(s->motion_val, size * 2 * sizeof(int16_t)); } if(s->codec_id==CODEC_ID_MPEG4){ /* interlaced direct mode decoding tables */ - CHECKED_ALLOCZ(s->field_mv_table, s->mb_num*2*2 * sizeof(INT16)) - CHECKED_ALLOCZ(s->field_select_table, s->mb_num*2* sizeof(INT8)) + CHECKED_ALLOCZ(s->field_mv_table, s->mb_num*2*2 * sizeof(int16_t)) + CHECKED_ALLOCZ(s->field_select_table, s->mb_num*2* sizeof(int8_t)) } /* 4mv b frame decoding table */ //note this is needed for h263 without b frames too (segfault on damaged streams otherwise) - CHECKED_ALLOCZ(s->co_located_type_table, s->mb_num * sizeof(UINT8)) + CHECKED_ALLOCZ(s->co_located_type_table, s->mb_num * sizeof(uint8_t)) if (s->out_format == FMT_H263) { /* ac values */ - CHECKED_ALLOCZ(s->ac_val[0], yc_size * sizeof(INT16) * 16); + CHECKED_ALLOCZ(s->ac_val[0], yc_size * sizeof(int16_t) * 16); s->ac_val[1] = s->ac_val[0] + y_size; s->ac_val[2] = s->ac_val[1] + c_size; @@ -462,14 +462,14 @@ CHECKED_ALLOCZ(s->bitstream_buffer, BITSTREAM_BUFFER_SIZE); /* cbp, ac_pred, pred_dir */ - CHECKED_ALLOCZ(s->cbp_table , s->mb_num * sizeof(UINT8)) - CHECKED_ALLOCZ(s->pred_dir_table, s->mb_num * sizeof(UINT8)) + CHECKED_ALLOCZ(s->cbp_table , s->mb_num * sizeof(uint8_t)) + CHECKED_ALLOCZ(s->pred_dir_table, s->mb_num * sizeof(uint8_t)) } if (s->h263_pred || s->h263_plus || !s->encoding) { /* dc values */ //MN: we need these for error resilience of intra-frames - CHECKED_ALLOCZ(s->dc_val[0], yc_size * sizeof(INT16)); + CHECKED_ALLOCZ(s->dc_val[0], yc_size * sizeof(int16_t)); s->dc_val[1] = s->dc_val[0] + y_size; s->dc_val[2] = s->dc_val[1] + c_size; for(i=0;i<yc_size;i++) @@ -716,9 +716,9 @@ int i; done=1; - default_mv_penalty= av_mallocz( sizeof(UINT16)*(MAX_FCODE+1)*(2*MAX_MV+1) ); - memset(default_mv_penalty, 0, sizeof(UINT16)*(MAX_FCODE+1)*(2*MAX_MV+1)); - memset(default_fcode_tab , 0, sizeof(UINT8)*(2*MAX_MV+1)); + default_mv_penalty= av_mallocz( sizeof(uint16_t)*(MAX_FCODE+1)*(2*MAX_MV+1) ); + memset(default_mv_penalty, 0, sizeof(uint16_t)*(MAX_FCODE+1)*(2*MAX_MV+1)); + memset(default_fcode_tab , 0, sizeof(uint8_t)*(2*MAX_MV+1)); for(i=-16; i<16; i++){ default_fcode_tab[i + MAX_MV]= 1; @@ -812,8 +812,8 @@ void init_rl(RLTable *rl) { - INT8 max_level[MAX_RUN+1], max_run[MAX_LEVEL+1]; - UINT8 index_run[MAX_RUN+1]; + int8_t max_level[MAX_RUN+1], max_run[MAX_LEVEL+1]; + uint8_t index_run[MAX_RUN+1]; int last, run, level, start, end, i; /* compute max_level[], max_run[] and index_run[] */ @@ -850,9 +850,9 @@ /* draw the edges of width 'w' of an image of size width, height */ //FIXME check that this is ok for mpeg4 interlaced -static void draw_edges_c(UINT8 *buf, int wrap, int width, int height, int w) +static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w) { - UINT8 *ptr, *last_line; + uint8_t *ptr, *last_line; int i; last_line = buf + (height - 1) * wrap; @@ -1324,11 +1324,11 @@ } static inline void gmc1_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dest_offset, - UINT8 **ref_picture, int src_offset) + uint8_t **ref_picture, int src_offset) { - UINT8 *ptr; + uint8_t *ptr; int offset, src_x, src_y, linesize, uvlinesize; int motion_x, motion_y; int emu=0; @@ -1412,11 +1412,11 @@ } static inline void gmc_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dest_offset, - UINT8 **ref_picture, int src_offset) + uint8_t **ref_picture, int src_offset) { - UINT8 *ptr; + uint8_t *ptr; int linesize, uvlinesize; const int a= s->sprite_warping_accuracy; int ox, oy; @@ -1475,11 +1475,11 @@ } -void ff_emulated_edge_mc(MpegEncContext *s, UINT8 *src, int linesize, int block_w, int block_h, +void ff_emulated_edge_mc(MpegEncContext *s, uint8_t *src, int linesize, int block_w, int block_h, int src_x, int src_y, int w, int h){ int x, y; int start_y, start_x, end_y, end_x; - UINT8 *buf= s->edge_emu_buffer; + uint8_t *buf= s->edge_emu_buffer; if(src_y>= h){ src+= (h-1-src_y)*linesize; @@ -1538,13 +1538,13 @@ /* apply one mpeg motion vector to the three components */ static inline void mpeg_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dest_offset, - UINT8 **ref_picture, int src_offset, + uint8_t **ref_picture, int src_offset, int field_based, op_pixels_func (*pix_op)[4], int motion_x, int motion_y, int h) { - UINT8 *ptr; + uint8_t *ptr; int dxy, offset, mx, my, src_x, src_y, height, v_edge_pos, linesize, uvlinesize; int emu=0; #if 0 @@ -1628,14 +1628,14 @@ } static inline void qpel_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dest_offset, - UINT8 **ref_picture, int src_offset, + uint8_t **ref_picture, int src_offset, int field_based, op_pixels_func (*pix_op)[4], qpel_mc_func (*qpix_op)[16], int motion_x, int motion_y, int h) { - UINT8 *ptr; + uint8_t *ptr; int dxy, offset, mx, my, src_x, src_y, height, v_edge_pos, linesize, uvlinesize; int emu=0; @@ -1735,13 +1735,13 @@ } static inline void MPV_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, - int dir, UINT8 **ref_picture, + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + int dir, uint8_t **ref_picture, op_pixels_func (*pix_op)[4], qpel_mc_func (*qpix_op)[16]) { int dxy, offset, mx, my, src_x, src_y, motion_x, motion_y; int mb_x, mb_y, i; - UINT8 *ptr, *dest; + uint8_t *ptr, *dest; int emu=0; mb_x = s->mb_x; @@ -1916,7 +1916,7 @@ /* put block[] to dest[] */ static inline void put_dct(MpegEncContext *s, - DCTELEM *block, int i, UINT8 *dest, int line_size) + DCTELEM *block, int i, uint8_t *dest, int line_size) { s->dct_unquantize(s, block, i, s->qscale); s->idct_put (dest, line_size, block); @@ -1924,7 +1924,7 @@ /* add block[] to dest[] */ static inline void add_dct(MpegEncContext *s, - DCTELEM *block, int i, UINT8 *dest, int line_size) + DCTELEM *block, int i, uint8_t *dest, int line_size) { if (s->block_last_index[i] >= 0) { s->idct_add (dest, line_size, block); @@ -1932,7 +1932,7 @@ } static inline void add_dequant_dct(MpegEncContext *s, - DCTELEM *block, int i, UINT8 *dest, int line_size) + DCTELEM *block, int i, uint8_t *dest, int line_size) { if (s->block_last_index[i] >= 0) { s->dct_unquantize(s, block, i, s->qscale); @@ -1954,8 +1954,8 @@ s->dc_val[0][xy + wrap] = s->dc_val[0][xy + 1 + wrap] = 1024; /* ac pred */ - memset(s->ac_val[0][xy ], 0, 32 * sizeof(INT16)); - memset(s->ac_val[0][xy + wrap], 0, 32 * sizeof(INT16)); + memset(s->ac_val[0][xy ], 0, 32 * sizeof(int16_t)); + memset(s->ac_val[0][xy + wrap], 0, 32 * sizeof(int16_t)); if (s->msmpeg4_version>=3) { s->coded_block[xy ] = s->coded_block[xy + 1 ] = @@ -1968,8 +1968,8 @@ s->dc_val[1][xy] = s->dc_val[2][xy] = 1024; /* ac pred */ - memset(s->ac_val[1][xy], 0, 16 * sizeof(INT16)); - memset(s->ac_val[2][xy], 0, 16 * sizeof(INT16)); + memset(s->ac_val[1][xy], 0, 16 * sizeof(int16_t)); + memset(s->ac_val[2][xy], 0, 16 * sizeof(int16_t)); s->mbintra_table[s->mb_x + s->mb_y*s->mb_width]= 0; } @@ -2053,7 +2053,7 @@ } if ((s->flags&CODEC_FLAG_PSNR) || !(s->encoding && (s->intra_only || s->pict_type==B_TYPE))) { //FIXME precalc - UINT8 *dest_y, *dest_cb, *dest_cr; + uint8_t *dest_y, *dest_cb, *dest_cr; int dct_linesize, dct_offset; op_pixels_func (*op_pix)[4]; qpel_mc_func (*op_qpix)[16]; @@ -2065,7 +2065,7 @@ /* skip only during decoding as we might trash the buffers during encoding a bit */ if(!s->encoding){ - UINT8 *mbskip_ptr = &s->mbskip_table[mb_xy]; + uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy]; const int age= s->current_picture.age; assert(age); @@ -2327,7 +2327,7 @@ s->qscale= newq; } #if 0 -static int pix_vcmp16x8(UINT8 *s, int stride){ //FIXME move to dsputil & optimize +static int pix_vcmp16x8(uint8_t *s, int stride){ //FIXME move to dsputil & optimize int score=0; int x,y; @@ -2342,7 +2342,7 @@ return score; } -static int pix_diff_vcmp16x8(UINT8 *s1, UINT8*s2, int stride){ //FIXME move to dsputil & optimize +static int pix_diff_vcmp16x8(uint8_t *s1, uint8_t*s2, int stride){ //FIXME move to dsputil & optimize int score=0; int x,y; @@ -2359,7 +2359,7 @@ #else #define SQ(a) ((a)*(a)) -static int pix_vcmp16x8(UINT8 *s, int stride){ //FIXME move to dsputil & optimize +static int pix_vcmp16x8(uint8_t *s, int stride){ //FIXME move to dsputil & optimize int score=0; int x,y; @@ -2374,7 +2374,7 @@ return score; } -static int pix_diff_vcmp16x8(UINT8 *s1, UINT8*s2, int stride){ //FIXME move to dsputil & optimize +static int pix_diff_vcmp16x8(uint8_t *s1, uint8_t*s2, int stride){ //FIXME move to dsputil & optimize int score=0; int x,y; @@ -2394,7 +2394,7 @@ void ff_draw_horiz_band(MpegEncContext *s){ if ( s->avctx->draw_horiz_band && (s->last_picture.data[0] || s->low_delay) ) { - UINT8 *src_ptr[3]; + uint8_t *src_ptr[3]; int y, h, offset; y = s->mb_y * 16; h = s->height - y; @@ -2454,7 +2454,7 @@ } if (s->mb_intra) { - UINT8 *ptr; + uint8_t *ptr; int wrap_y; int emu=0; @@ -2509,8 +2509,8 @@ }else{ op_pixels_func (*op_pix)[4]; qpel_mc_func (*op_qpix)[16]; - UINT8 *dest_y, *dest_cb, *dest_cr; - UINT8 *ptr_y, *ptr_cb, *ptr_cr; + uint8_t *dest_y, *dest_cb, *dest_cr; + uint8_t *ptr_y, *ptr_cb, *ptr_cr; int wrap_y, wrap_c; int emu=0; @@ -2714,7 +2714,7 @@ return 0; } -void ff_copy_bits(PutBitContext *pb, UINT8 *src, int length) +void ff_copy_bits(PutBitContext *pb, uint8_t *src, int length) { int bytes= length>>4; int bits= length&15; @@ -2846,9 +2846,9 @@ int i; int bits; MpegEncContext best_s, backup_s; - UINT8 bit_buf[2][3000]; - UINT8 bit_buf2[2][3000]; - UINT8 bit_buf_tex[2][3000]; + uint8_t bit_buf[2][3000]; + uint8_t bit_buf2[2][3000]; + uint8_t bit_buf_tex[2][3000]; PutBitContext pb[2], pb2[2], tex_pb[2]; for(i=0; i<2; i++){ @@ -2935,9 +2935,9 @@ }else /* if(s->pict_type == I_TYPE) */{ /* I-Frame */ //FIXME do we need to zero them? - memset(s->motion_val[0], 0, sizeof(INT16)*(s->mb_width*2 + 2)*(s->mb_height*2 + 2)*2); - memset(s->p_mv_table , 0, sizeof(INT16)*(s->mb_width+2)*(s->mb_height+2)*2); - memset(s->mb_type , MB_TYPE_INTRA, sizeof(UINT8)*s->mb_width*s->mb_height); + memset(s->motion_val[0], 0, sizeof(int16_t)*(s->mb_width*2 + 2)*(s->mb_height*2 + 2)*2); + memset(s->p_mv_table , 0, sizeof(int16_t)*(s->mb_width+2)*(s->mb_height+2)*2); + memset(s->mb_type , MB_TYPE_INTRA, sizeof(uint8_t)*s->mb_width*s->mb_height); if(!s->fixed_qscale){ /* finding spatial complexity for I-frame rate control */ @@ -2962,7 +2962,7 @@ if(s->scene_change_score > 0 && s->pict_type == P_TYPE){ s->pict_type= I_TYPE; - memset(s->mb_type , MB_TYPE_INTRA, sizeof(UINT8)*s->mb_width*s->mb_height); + memset(s->mb_type , MB_TYPE_INTRA, sizeof(uint8_t)*s->mb_width*s->mb_height); //printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); } @@ -3506,7 +3506,7 @@ DCTELEM *block, int n, int qscale, int *overflow){ const int *qmat; - const UINT8 *scantable= s->intra_scantable.scantable; + const uint8_t *scantable= s->intra_scantable.scantable; int max=0; unsigned int threshold1, threshold2; int bias=0; @@ -3756,7 +3756,7 @@ { int i, j, level, last_non_zero, q; const int *qmat; - const UINT8 *scantable= s->intra_scantable.scantable; + const uint8_t *scantable= s->intra_scantable.scantable; int bias; int max=0; unsigned int threshold1, threshold2; @@ -3823,7 +3823,7 @@ DCTELEM *block, int n, int qscale) { int i, level, nCoeffs; - const UINT16 *quant_matrix; + const uint16_t *quant_matrix; nCoeffs= s->block_last_index[n]; @@ -3886,7 +3886,7 @@ DCTELEM *block, int n, int qscale) { int i, level, nCoeffs; - const UINT16 *quant_matrix; + const uint16_t *quant_matrix; if(s->alternate_scan) nCoeffs= 63; else nCoeffs= s->block_last_index[n];
--- a/mpegvideo.h Mon Feb 10 22:43:30 2003 +0000 +++ b/mpegvideo.h Tue Feb 11 16:35:48 2003 +0000 @@ -68,7 +68,7 @@ int i_tex_bits; int p_tex_bits; int misc_bits; - UINT64 expected_bits; + uint64_t expected_bits; int new_pict_type; float new_qscale; int mc_mb_var_sum; @@ -92,21 +92,21 @@ double last_qscale_for[5]; /* last qscale for a specific pict type, used for max_diff & ipb factor stuff */ int last_mc_mb_var_sum; int last_mb_var_sum; - UINT64 i_cplx_sum[5]; - UINT64 p_cplx_sum[5]; - UINT64 mv_bits_sum[5]; - UINT64 qscale_sum[5]; + uint64_t i_cplx_sum[5]; + uint64_t p_cplx_sum[5]; + uint64_t mv_bits_sum[5]; + uint64_t qscale_sum[5]; int frame_count[5]; int last_non_b_pict_type; }RateControlContext; typedef struct ScanTable{ - const UINT8 *scantable; - UINT8 permutated[64]; - UINT8 raster_end[64]; + const uint8_t *scantable; + uint8_t permutated[64]; + uint8_t raster_end[64]; #ifdef ARCH_POWERPC /* Used by dct_quantise_alitvec to find last-non-zero */ - UINT8 __align8 inverse[64]; + uint8_t __align8 inverse[64]; #endif } ScanTable; @@ -123,7 +123,7 @@ } Picture; typedef struct ParseContext{ - UINT8 *buffer; + uint8_t *buffer; int index; int last_index; int buffer_size; @@ -147,7 +147,7 @@ int mb_penalty_factor; int pre_pass; /* = 1 for the pre pass */ int dia_size; - UINT16 (*mv_penalty)[MAX_MV*2+1]; /* amount of bits needed to encode a MV */ + uint16_t (*mv_penalty)[MAX_MV*2+1]; /* amount of bits needed to encode a MV */ int (*sub_motion_search)(struct MpegEncContext * s, int *mx_ptr, int *my_ptr, int dmin, int xmin, int ymin, int xmax, int ymax, @@ -224,21 +224,21 @@ Picture new_picture; /* source picture for encoding */ Picture current_picture; /* buffer to store the decompressed current picture */ int last_dc[3]; /* last DC values for MPEG1 */ - INT16 *dc_val[3]; /* used for mpeg4 DC prediction, all 3 arrays must be continuous */ + int16_t *dc_val[3]; /* used for mpeg4 DC prediction, all 3 arrays must be continuous */ int y_dc_scale, c_dc_scale; - UINT8 *y_dc_scale_table; /* qscale -> y_dc_scale table */ - UINT8 *c_dc_scale_table; /* qscale -> c_dc_scale table */ - UINT8 *coded_block; /* used for coded block pattern prediction (msmpeg4v3, wmv1)*/ - INT16 (*ac_val[3])[16]; /* used for for mpeg4 AC prediction, all 3 arrays must be continuous */ + uint8_t *y_dc_scale_table; /* qscale -> y_dc_scale table */ + uint8_t *c_dc_scale_table; /* qscale -> c_dc_scale table */ + uint8_t *coded_block; /* used for coded block pattern prediction (msmpeg4v3, wmv1)*/ + int16_t (*ac_val[3])[16]; /* used for for mpeg4 AC prediction, all 3 arrays must be continuous */ int ac_pred; uint8_t *prev_pict_types; /* previous picture types in bitstream order, used for mb skip */ #define PREV_PICT_TYPES_BUFFER_SIZE 256 int mb_skiped; /* MUST BE SET only during DECODING */ - UINT8 *mbskip_table; /* used to avoid copy if macroblock skipped (for black regions for example) + uint8_t *mbskip_table; /* used to avoid copy if macroblock skipped (for black regions for example) and used for b-frame encoding & decoding (contains skip table of next P Frame) */ - UINT8 *mbintra_table; /* used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding */ - UINT8 *cbp_table; /* used to store cbp, ac_pred for partitioned decoding */ - UINT8 *pred_dir_table; /* used to store pred_dir for partitioned decoding */ + uint8_t *mbintra_table; /* used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding */ + uint8_t *cbp_table; /* used to store cbp, ac_pred for partitioned decoding */ + uint8_t *pred_dir_table; /* used to store pred_dir for partitioned decoding */ uint8_t *allocated_edge_emu_buffer; uint8_t *edge_emu_buffer; /* points into the middle of allocated_edge_emu_buffer */ @@ -257,13 +257,13 @@ DSPContext dsp; /* pointers for accelerated dsp fucntions */ int f_code; /* forward MV resolution */ int b_code; /* backward MV resolution for B Frames (mpeg4) */ - INT16 (*motion_val)[2]; /* used for MV prediction (4MV per MB) */ - INT16 (*p_mv_table)[2]; /* MV table (1MV per MB) p-frame encoding */ - INT16 (*b_forw_mv_table)[2]; /* MV table (1MV per MB) forward mode b-frame encoding */ - INT16 (*b_back_mv_table)[2]; /* MV table (1MV per MB) backward mode b-frame encoding */ - INT16 (*b_bidir_forw_mv_table)[2]; /* MV table (1MV per MB) bidir mode b-frame encoding */ - INT16 (*b_bidir_back_mv_table)[2]; /* MV table (1MV per MB) bidir mode b-frame encoding */ - INT16 (*b_direct_mv_table)[2]; /* MV table (1MV per MB) direct mode b-frame encoding */ + int16_t (*motion_val)[2]; /* used for MV prediction (4MV per MB) */ + int16_t (*p_mv_table)[2]; /* MV table (1MV per MB) p-frame encoding */ + int16_t (*b_forw_mv_table)[2]; /* MV table (1MV per MB) forward mode b-frame encoding */ + int16_t (*b_back_mv_table)[2]; /* MV table (1MV per MB) backward mode b-frame encoding */ + int16_t (*b_bidir_forw_mv_table)[2]; /* MV table (1MV per MB) bidir mode b-frame encoding */ + int16_t (*b_bidir_back_mv_table)[2]; /* MV table (1MV per MB) bidir mode b-frame encoding */ + int16_t (*b_direct_mv_table)[2]; /* MV table (1MV per MB) direct mode b-frame encoding */ int me_method; /* ME algorithm */ int scene_change_score; int mv_dir; @@ -284,7 +284,7 @@ int mv[2][4][2]; int field_select[2][2]; int last_mv[2][2][2]; /* last MV, used for MV prediction in MPEG1 & B-frame MPEG4 */ - UINT8 *fcode_tab; /* smallest fcode needed for each MV */ + uint8_t *fcode_tab; /* smallest fcode needed for each MV */ MotionEstContext me; @@ -298,7 +298,7 @@ int mb_x, mb_y; int mb_incr; int mb_intra; - UINT8 *mb_type; /* Table for MB type */ + uint8_t *mb_type; /* Table for MB type */ #define MB_TYPE_INTRA 0x01 #define MB_TYPE_INTER 0x02 #define MB_TYPE_INTER4V 0x04 @@ -314,10 +314,10 @@ int block_wrap[6]; /* matrix transmitted in the bitstream */ - UINT16 intra_matrix[64]; - UINT16 chroma_intra_matrix[64]; - UINT16 inter_matrix[64]; - UINT16 chroma_inter_matrix[64]; + uint16_t intra_matrix[64]; + uint16_t chroma_intra_matrix[64]; + uint16_t inter_matrix[64]; + uint16_t chroma_inter_matrix[64]; #define QUANT_BIAS_SHIFT 4 int intra_quant_bias; /* bias for the quantizer */ int inter_quant_bias; /* bias for the quantizer */ @@ -336,17 +336,17 @@ int __align8 q_intra_matrix[32][64]; int __align8 q_inter_matrix[32][64]; /* identical to the above but for MMX & these are not permutated */ - UINT16 __align8 q_intra_matrix16[32][64]; - UINT16 __align8 q_inter_matrix16[32][64]; - UINT16 __align8 q_intra_matrix16_bias[32][64]; - UINT16 __align8 q_inter_matrix16_bias[32][64]; + uint16_t __align8 q_intra_matrix16[32][64]; + uint16_t __align8 q_inter_matrix16[32][64]; + uint16_t __align8 q_intra_matrix16_bias[32][64]; + uint16_t __align8 q_inter_matrix16_bias[32][64]; int block_last_index[6]; /* last non zero coefficient in block */ /* scantables */ ScanTable __align8 intra_scantable; ScanTable intra_h_scantable; ScanTable intra_v_scantable; ScanTable inter_scantable; // if inter == intra then intra should be used to reduce tha cache usage - UINT8 idct_permutation[64]; + uint8_t idct_permutation[64]; int idct_permutation_type; #define FF_NO_IDCT_PERM 1 #define FF_LIBMPEG2_IDCT_PERM 2 @@ -357,8 +357,8 @@ /* bit rate control */ int I_frame_bits; //FIXME used in mpeg12 ... - INT64 wanted_bits; - INT64 total_bits; + int64_t wanted_bits; + int64_t total_bits; int frame_bits; /* bits used for the current frame */ RateControlContext rc_context; // contains stuff only accessed in ratecontrol.c @@ -375,7 +375,7 @@ int last_bits; //temp var used for calculating the above vars /* error concealment / resync */ - UINT8 *error_status_table; /* table of the error status of each MB */ + uint8_t *error_status_table; /* table of the error status of each MB */ #define VP_START 1 /* current MB is the first after a resync marker */ #define AC_ERROR 2 #define DC_ERROR 4 @@ -409,12 +409,12 @@ int time_increment_bits; /* number of bits to represent the fractional part of time */ int last_time_base; int time_base; /* time in seconds of last I,P,S Frame */ - INT64 time; /* time of current frame */ - INT64 last_non_b_time; - UINT16 pp_time; /* time distance between the last 2 p,s,i frames */ - UINT16 pb_time; /* time distance between the last b and p,s,i frame */ - UINT16 pp_field_time; - UINT16 pb_field_time; /* like above, just for interlaced */ + int64_t time; /* time of current frame */ + int64_t last_non_b_time; + uint16_t pp_time; /* time distance between the last 2 p,s,i frames */ + uint16_t pb_time; /* time distance between the last b and p,s,i frame */ + uint16_t pp_field_time; + uint16_t pb_field_time; /* like above, just for interlaced */ int shape; int vol_sprite_usage; int sprite_width; @@ -455,9 +455,9 @@ int mpeg_quant; #define CO_LOCATED_TYPE_4MV 1 #define CO_LOCATED_TYPE_FIELDMV 2 - INT8 *co_located_type_table; /* 4mv & field_mv info for next b frame */ - INT16 (*field_mv_table)[2][2]; /* used for interlaced b frame decoding */ - INT8 (*field_select_table)[2]; /* wtf, no really another table for interlaced b frames */ + int8_t *co_located_type_table; /* 4mv & field_mv info for next b frame */ + int16_t (*field_mv_table)[2][2]; /* used for interlaced b frame decoding */ + int8_t (*field_select_table)[2]; /* wtf, no really another table for interlaced b frames */ int t_frame; /* time distance of first I -> B, used for interlaced b frames */ int padding_bug_score; /* used to detect the VERY common padding bug in MPEG4 */ @@ -465,7 +465,7 @@ int divx_version; int divx_build; #define BITSTREAM_BUFFER_SIZE 1024*256 - UINT8 *bitstream_buffer; //Divx 5.01 puts several frames in a single one, this is used to reorder them + uint8_t *bitstream_buffer; //Divx 5.01 puts several frames in a single one, this is used to reorder them int bitstream_buffer_size; int xvid_build; @@ -541,9 +541,9 @@ int rtp_mode; int rtp_payload_size; void (*rtp_callback)(void *data, int size, int packet_number); - UINT8 *ptr_lastgob; - UINT8 *ptr_last_mb_line; - UINT32 mb_line_avgsize; + uint8_t *ptr_lastgob; + uint8_t *ptr_last_mb_line; + uint32_t mb_line_avgsize; DCTELEM (*block)[64]; /* points to one of the following blocks */ DCTELEM blocks[2][6][64] __align8; // for HQ mode we need to keep the best block @@ -564,8 +564,8 @@ int (*dct_quantize)(struct MpegEncContext *s, DCTELEM *block/*align 16*/, int n, int qscale, int *overflow); int (*fast_dct_quantize)(struct MpegEncContext *s, DCTELEM *block/*align 16*/, int n, int qscale, int *overflow); void (*fdct)(DCTELEM *block/* align 16*/); - void (*idct_put)(UINT8 *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); - void (*idct_add)(UINT8 *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); + void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); + void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/); //FIXME move above funcs into dspContext perhaps } MpegEncContext; @@ -597,14 +597,14 @@ #ifdef ARCH_POWERPC void MPV_common_init_ppc(MpegEncContext *s); #endif -extern void (*draw_edges)(UINT8 *buf, int wrap, int width, int height, int w); +extern void (*draw_edges)(uint8_t *buf, int wrap, int width, int height, int w); void ff_conceal_past_errors(MpegEncContext *s, int conceal_all); -void ff_copy_bits(PutBitContext *pb, UINT8 *src, int length); +void ff_copy_bits(PutBitContext *pb, uint8_t *src, int length); void ff_clean_intra_table_entries(MpegEncContext *s); -void ff_init_scantable(MpegEncContext *s, ScanTable *st, const UINT8 *src_scantable); +void ff_init_scantable(MpegEncContext *s, ScanTable *st, const uint8_t *src_scantable); void ff_error_resilience(MpegEncContext *s); void ff_draw_horiz_band(MpegEncContext *s); -void ff_emulated_edge_mc(MpegEncContext *s, UINT8 *src, int linesize, int block_w, int block_h, +void ff_emulated_edge_mc(MpegEncContext *s, uint8_t *src, int linesize, int block_w, int block_h, int src_x, int src_y, int w, int h); char ff_get_pict_type_char(int pict_type); int ff_combine_frame( MpegEncContext *s, int next, uint8_t **buf, int *buf_size); @@ -645,9 +645,9 @@ /* mpeg12.c */ -extern const INT16 ff_mpeg1_default_intra_matrix[64]; -extern const INT16 ff_mpeg1_default_non_intra_matrix[64]; -extern UINT8 ff_mpeg1_dc_scale_table[128]; +extern const int16_t ff_mpeg1_default_intra_matrix[64]; +extern const int16_t ff_mpeg1_default_non_intra_matrix[64]; +extern uint8_t ff_mpeg1_dc_scale_table[128]; void mpeg1_encode_picture_header(MpegEncContext *s, int picture_number); void mpeg1_encode_mb(MpegEncContext *s, @@ -660,12 +660,12 @@ typedef struct RLTable { int n; /* number of entries of table_vlc minus 1 */ int last; /* number of values for last = 0 */ - const UINT16 (*table_vlc)[2]; - const INT8 *table_run; - const INT8 *table_level; - UINT8 *index_run[2]; /* encoding only */ - INT8 *max_level[2]; /* encoding & decoding */ - INT8 *max_run[2]; /* encoding & decoding */ + const uint16_t (*table_vlc)[2]; + const int8_t *table_run; + const int8_t *table_level; + uint8_t *index_run[2]; /* encoding only */ + int8_t *max_level[2]; /* encoding & decoding */ + int8_t *max_run[2]; /* encoding & decoding */ VLC vlc; /* decoding only deprected FIXME remove*/ RL_VLC_ELEM *rl_vlc[32]; /* decoding only */ } RLTable; @@ -684,14 +684,14 @@ return index + level - 1; } -extern UINT8 ff_mpeg4_y_dc_scale_table[32]; -extern UINT8 ff_mpeg4_c_dc_scale_table[32]; -extern const INT16 ff_mpeg4_default_intra_matrix[64]; -extern const INT16 ff_mpeg4_default_non_intra_matrix[64]; +extern uint8_t ff_mpeg4_y_dc_scale_table[32]; +extern uint8_t ff_mpeg4_c_dc_scale_table[32]; +extern const int16_t ff_mpeg4_default_intra_matrix[64]; +extern const int16_t ff_mpeg4_default_non_intra_matrix[64]; int ff_h263_decode_init(AVCodecContext *avctx); int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size); + uint8_t *buf, int buf_size); int ff_h263_decode_end(AVCodecContext *avctx); void h263_encode_mb(MpegEncContext *s, DCTELEM block[6][64], @@ -701,7 +701,7 @@ int motion_x, int motion_y); void h263_encode_picture_header(MpegEncContext *s, int picture_number); int h263_encode_gob_header(MpegEncContext * s, int mb_line); -INT16 *h263_pred_motion(MpegEncContext * s, int block, +int16_t *h263_pred_motion(MpegEncContext * s, int block, int *px, int *py); void mpeg4_pred_ac(MpegEncContext * s, DCTELEM *block, int n, int dir); @@ -751,8 +751,8 @@ int ff_wmv2_decode_picture_header(MpegEncContext * s); void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr); void ff_mspel_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, - UINT8 **ref_picture, op_pixels_func (*pix_op)[4], + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + uint8_t **ref_picture, op_pixels_func (*pix_op)[4], int motion_x, int motion_y, int h); int ff_wmv2_encode_picture_header(MpegEncContext * s, int picture_number); void ff_wmv2_encode_mb(MpegEncContext * s,
--- a/msmpeg4.c Mon Feb 10 22:43:30 2003 +0000 +++ b/msmpeg4.c Tue Feb 11 16:35:48 2003 +0000 @@ -50,8 +50,8 @@ #define DEFAULT_INTER_INDEX 3 -static UINT32 v2_dc_lum_table[512][2]; -static UINT32 v2_dc_chroma_table[512][2]; +static uint32_t v2_dc_lum_table[512][2]; +static uint32_t v2_dc_chroma_table[512][2]; static inline void msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n); static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, @@ -67,7 +67,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]); static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]); -extern UINT32 inverse[256]; +extern uint32_t inverse[256]; #ifdef DEBUG @@ -77,7 +77,7 @@ #include "msmpeg4data.h" -static UINT8 rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2]; +static uint8_t rl_length[NB_RL_TABLES][MAX_LEVEL+1][MAX_RUN+1][2]; #ifdef STATS @@ -190,7 +190,7 @@ { int i, x, y; - tab->table_mv_index = av_malloc(sizeof(UINT16) * 4096); + tab->table_mv_index = av_malloc(sizeof(uint16_t) * 4096); /* mark all entries as not used */ for(i=0;i<4096;i++) tab->table_mv_index[i] = tab->n; @@ -434,7 +434,7 @@ } /* predict coded block */ -static inline int coded_block_pred(MpegEncContext * s, int n, UINT8 **coded_block_ptr) +static inline int coded_block_pred(MpegEncContext * s, int n, uint8_t **coded_block_ptr) { int xy, wrap, pred, a, b, c; @@ -518,7 +518,7 @@ { int cbp, coded_cbp, i; int pred_x, pred_y; - UINT8 *coded_block; + uint8_t *coded_block; handle_slices(s); @@ -640,7 +640,7 @@ } static inline int msmpeg4v1_pred_dc(MpegEncContext * s, int n, - INT32 **dc_val_ptr) + int32_t **dc_val_ptr) { int i; @@ -669,10 +669,10 @@ /* dir = 0: left, dir = 1: top prediction */ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n, - UINT16 **dc_val_ptr, int *dir_ptr) + uint16_t **dc_val_ptr, int *dir_ptr) { int a, b, c, wrap, pred, scale; - INT16 *dc_val; + int16_t *dc_val; /* find prediction */ if (n < 4) { @@ -823,13 +823,13 @@ int pred; if(s->msmpeg4_version==1){ - INT32 *dc_val; + int32_t *dc_val; pred = msmpeg4v1_pred_dc(s, n, &dc_val); /* update predictor */ *dc_val= level; }else{ - UINT16 *dc_val; + uint16_t *dc_val; pred = msmpeg4_pred_dc(s, n, &dc_val, dir_ptr); /* update predictor */ @@ -895,7 +895,7 @@ int last_non_zero, sign, slevel; int code, run_diff, dc_pred_dir; const RLTable *rl; - const UINT8 *scantable; + const uint8_t *scantable; if (s->mb_intra) { set_stat(ST_DC); @@ -1544,7 +1544,7 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) { int cbp, code, i; - UINT8 *coded_val; + uint8_t *coded_val; #ifdef PRINT_MB if(s->mb_x==0){ @@ -1939,14 +1939,14 @@ } if(s->msmpeg4_version==1){ - INT32 *dc_val; + int32_t *dc_val; pred = msmpeg4v1_pred_dc(s, n, &dc_val); level += pred; /* update predictor */ *dc_val= level; }else{ - UINT16 *dc_val; + uint16_t *dc_val; pred = msmpeg4_pred_dc(s, n, &dc_val, dir_ptr); level += pred;
--- a/oggvorbis.c Mon Feb 10 22:43:30 2003 +0000 +++ b/oggvorbis.c Tue Feb 11 16:35:48 2003 +0000 @@ -179,7 +179,7 @@ static int oggvorbis_decode_frame(AVCodecContext *avccontext, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { OggVorbisContext *context = avccontext->priv_data ; ogg_packet *op = (ogg_packet*)buf ;
--- a/pcm.c Mon Feb 10 22:43:30 2003 +0000 +++ b/pcm.c Tue Feb 11 16:35:48 2003 +0000 @@ -73,13 +73,13 @@ } /* 16384 entries per table */ -static UINT8 *linear_to_alaw = NULL; +static uint8_t *linear_to_alaw = NULL; static int linear_to_alaw_ref = 0; -static UINT8 *linear_to_ulaw = NULL; +static uint8_t *linear_to_ulaw = NULL; static int linear_to_ulaw_ref = 0; -static void build_xlaw_table(UINT8 *linear_to_xlaw, +static void build_xlaw_table(uint8_t *linear_to_xlaw, int (*xlaw2linear)(unsigned char), int mask) { @@ -274,12 +274,12 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { PCMDecode *s = avctx->priv_data; int n; short *samples; - UINT8 *src; + uint8_t *src; samples = data; src = buf; @@ -339,7 +339,7 @@ *data_size = 0; return -1; } - *data_size = (UINT8 *)samples - (UINT8 *)data; + *data_size = (uint8_t *)samples - (uint8_t *)data; return src - buf; }
--- a/ppc/dsputil_altivec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ppc/dsputil_altivec.c Tue Feb 11 16:35:48 2003 +0000 @@ -480,7 +480,7 @@ return s; } -int pix_sum_altivec(UINT8 * pix, int line_size) +int pix_sum_altivec(uint8_t * pix, int line_size) { const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0); vector unsigned char perm, *pixv; @@ -513,7 +513,7 @@ return s; } -void get_pixels_altivec(DCTELEM *restrict block, const UINT8 *pixels, int line_size) +void get_pixels_altivec(DCTELEM *restrict block, const uint8_t *pixels, int line_size) { int i; vector unsigned char perm, bytes, *pixv; @@ -539,8 +539,8 @@ } } -void diff_pixels_altivec(DCTELEM *restrict block, const UINT8 *s1, - const UINT8 *s2, int stride) +void diff_pixels_altivec(DCTELEM *restrict block, const uint8_t *s1, + const uint8_t *s2, int stride) { int i; vector unsigned char perm, bytes, *pixv;
--- a/ppc/dsputil_altivec.h Mon Feb 10 22:43:30 2003 +0000 +++ b/ppc/dsputil_altivec.h Tue Feb 11 16:35:48 2003 +0000 @@ -34,12 +34,12 @@ extern int pix_norm1_altivec(uint8_t *pix, int line_size); extern int sse8_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size); extern int sse16_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size); -extern int pix_sum_altivec(UINT8 * pix, int line_size); -extern void diff_pixels_altivec(DCTELEM* block, const UINT8* s1, const UINT8* s2, int stride); -extern void get_pixels_altivec(DCTELEM* block, const UINT8 * pixels, int line_size); +extern int pix_sum_altivec(uint8_t * pix, int line_size); +extern void diff_pixels_altivec(DCTELEM* block, const uint8_t* s1, const uint8_t* s2, int stride); +extern void get_pixels_altivec(DCTELEM* block, const uint8_t * pixels, int line_size); extern void add_bytes_altivec(uint8_t *dst, uint8_t *src, int w); -extern void put_pixels_clamped_altivec(const DCTELEM *block, UINT8 *restrict pixels, int line_size); +extern void put_pixels_clamped_altivec(const DCTELEM *block, uint8_t *restrict pixels, int line_size); extern void put_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); extern void avg_pixels16_altivec(uint8_t *block, const uint8_t *pixels, int line_size, int h); extern void avg_pixels8_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h); @@ -48,7 +48,7 @@ extern void put_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h); extern void put_no_rnd_pixels16_xy2_altivec(uint8_t * block, const uint8_t * pixels, int line_size, int h); -extern void gmc1_altivec(UINT8 *dst, UINT8 *src, int stride, int h, int x16, int y16, int rounder); +extern void gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder); extern int has_altivec(void);
--- a/ppc/gmc_altivec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ppc/gmc_altivec.c Tue Feb 11 16:35:48 2003 +0000 @@ -26,7 +26,7 @@ altivec-enhanced gmc1. ATM this code assume stride is a multiple of 8, to preserve proper dst alignement. */ -void gmc1_altivec(UINT8 *dst /* align 8 */, UINT8 *src /* align1 */, int stride, int h, int x16, int y16, int rounder) +void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, int stride, int h, int x16, int y16, int rounder) { POWERPC_TBL_DECLARE(altivec_gmc1_num, h == 8); #ifdef ALTIVEC_USE_REFERENCE_C_CODE
--- a/ppc/idct_altivec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ppc/idct_altivec.c Tue Feb 11 16:35:48 2003 +0000 @@ -176,8 +176,8 @@ POWERPC_TBL_DECLARE(altivec_idct_put_num, 1); #ifdef ALTIVEC_USE_REFERENCE_C_CODE POWERPC_TBL_START_COUNT(altivec_idct_put_num, 1); - void simple_idct_put(UINT8 *dest, int line_size, INT16 *block); - simple_idct_put(dest, stride, (INT16*)block); + void simple_idct_put(uint8_t *dest, int line_size, int16_t *block); + simple_idct_put(dest, stride, (int16_t*)block); POWERPC_TBL_STOP_COUNT(altivec_idct_put_num, 1); #else /* ALTIVEC_USE_REFERENCE_C_CODE */ vector_u8_t tmp; @@ -209,8 +209,8 @@ POWERPC_TBL_DECLARE(altivec_idct_add_num, 1); #ifdef ALTIVEC_USE_REFERENCE_C_CODE POWERPC_TBL_START_COUNT(altivec_idct_add_num, 1); - void simple_idct_add(UINT8 *dest, int line_size, INT16 *block); - simple_idct_add(dest, stride, (INT16*)block); + void simple_idct_add(uint8_t *dest, int line_size, int16_t *block); + simple_idct_add(dest, stride, (int16_t*)block); POWERPC_TBL_STOP_COUNT(altivec_idct_add_num, 1); #else /* ALTIVEC_USE_REFERENCE_C_CODE */ vector_u8_t tmp;
--- a/ppc/mpegvideo_ppc.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ppc/mpegvideo_ppc.c Tue Feb 11 16:35:48 2003 +0000 @@ -30,8 +30,8 @@ extern void dct_unquantize_h263_altivec(MpegEncContext *s, DCTELEM *block, int n, int qscale); -extern void idct_put_altivec(UINT8 *dest, int line_size, INT16 *block); -extern void idct_add_altivec(UINT8 *dest, int line_size, INT16 *block); +extern void idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); +extern void idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); void MPV_common_init_ppc(MpegEncContext *s)
--- a/ps2/dsputil_mmi.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ps2/dsputil_mmi.c Tue Feb 11 16:35:48 2003 +0000 @@ -41,7 +41,7 @@ } -static void get_pixels_mmi(DCTELEM *block, const UINT8 *pixels, int line_size) +static void get_pixels_mmi(DCTELEM *block, const uint8_t *pixels, int line_size) { int i; for(i=0;i<8;i++) {
--- a/ps2/idct_mmi.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ps2/idct_mmi.c Tue Feb 11 16:35:48 2003 +0000 @@ -299,7 +299,7 @@ } -void ff_mmi_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { /* $4 = dest, $5 = line_size, $6 = block */ __asm__ __volatile__("la $24, %0"::"m"(consttable[0])); @@ -323,7 +323,7 @@ } -void ff_mmi_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { /* $4 = dest, $5 = line_size, $6 = block */ __asm__ __volatile__("la $24, %0"::"m"(consttable[0]));
--- a/ps2/mpegvideo_mmi.c Mon Feb 10 22:43:30 2003 +0000 +++ b/ps2/mpegvideo_mmi.c Tue Feb 11 16:35:48 2003 +0000 @@ -22,8 +22,8 @@ #include "../mpegvideo.h" #include "../avcodec.h" -void ff_mmi_idct_put(UINT8 *dest, int line_size, DCTELEM *block); -void ff_mmi_idct_add(UINT8 *dest, int line_size, DCTELEM *block); +void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block); +void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block); static void dct_unquantize_h263_mmi(MpegEncContext *s,
--- a/resample.c Mon Feb 10 22:43:30 2003 +0000 +++ b/resample.c Tue Feb 11 16:35:48 2003 +0000 @@ -20,8 +20,8 @@ typedef struct { /* fractional resampling */ - UINT32 incr; /* fractional increment */ - UINT32 frac; + uint32_t incr; /* fractional increment */ + uint32_t frac; int last_sample; /* integer down sample */ int iratio; /* integer divison ratio */
--- a/rv10.c Mon Feb 10 22:43:30 2003 +0000 +++ b/rv10.c Tue Feb 11 16:35:48 2003 +0000 @@ -24,7 +24,7 @@ #define DC_VLC_BITS 14 //FIXME find a better solution -static const UINT16 rv_lum_code[256] = +static const uint16_t rv_lum_code[256] = { 0x3e7f, 0x0f00, 0x0f01, 0x0f02, 0x0f03, 0x0f04, 0x0f05, 0x0f06, 0x0f07, 0x0f08, 0x0f09, 0x0f0a, 0x0f0b, 0x0f0c, 0x0f0d, 0x0f0e, @@ -60,7 +60,7 @@ 0x0f78, 0x0f79, 0x0f7a, 0x0f7b, 0x0f7c, 0x0f7d, 0x0f7e, 0x0f7f, }; -static const UINT8 rv_lum_bits[256] = +static const uint8_t rv_lum_bits[256] = { 14, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, @@ -96,7 +96,7 @@ 12, 12, 12, 12, 12, 12, 12, 12, }; -static const UINT16 rv_chrom_code[256] = +static const uint16_t rv_chrom_code[256] = { 0xfe7f, 0x3f00, 0x3f01, 0x3f02, 0x3f03, 0x3f04, 0x3f05, 0x3f06, 0x3f07, 0x3f08, 0x3f09, 0x3f0a, 0x3f0b, 0x3f0c, 0x3f0d, 0x3f0e, @@ -132,7 +132,7 @@ 0x3f78, 0x3f79, 0x3f7a, 0x3f7b, 0x3f7c, 0x3f7d, 0x3f7e, 0x3f7f, }; -static const UINT8 rv_chrom_bits[256] = +static const uint8_t rv_chrom_bits[256] = { 16, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, @@ -182,14 +182,14 @@ if they had thought about it !!! */ code = get_bits(&s->gb, 7); if (code == 0x7c) { - code = (INT8)(get_bits(&s->gb, 7) + 1); + code = (int8_t)(get_bits(&s->gb, 7) + 1); } else if (code == 0x7d) { code = -128 + get_bits(&s->gb, 7); } else if (code == 0x7e) { if (get_bits(&s->gb, 1) == 0) - code = (INT8)(get_bits(&s->gb, 8) + 1); + code = (int8_t)(get_bits(&s->gb, 8) + 1); else - code = (INT8)(get_bits(&s->gb, 8)); + code = (int8_t)(get_bits(&s->gb, 8)); } else if (code == 0x7f) { get_bits(&s->gb, 11); code = 1; @@ -203,7 +203,7 @@ if (code < 0) { code = get_bits(&s->gb, 9); if (code == 0x1fc) { - code = (INT8)(get_bits(&s->gb, 7) + 1); + code = (int8_t)(get_bits(&s->gb, 7) + 1); } else if (code == 0x1fd) { code = -128 + get_bits(&s->gb, 7); } else if (code == 0x1fe) { @@ -390,7 +390,7 @@ } static int rv10_decode_packet(AVCodecContext *avctx, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i, mb_count, mb_pos, left; @@ -468,7 +468,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MpegEncContext *s = avctx->priv_data; int i;
--- a/simple_idct.c Mon Feb 10 22:43:30 2003 +0000 +++ b/simple_idct.c Tue Feb 11 16:35:48 2003 +0000 @@ -172,11 +172,11 @@ row[4] = (a3 - b3) >> ROW_SHIFT; } -static inline void idctSparseColPut (UINT8 *dest, int line_size, +static inline void idctSparseColPut (uint8_t *dest, int line_size, DCTELEM * col) { int a0, a1, a2, a3, b0, b1, b2, b3; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; /* XXX: I did that only to give same values as previous code */ a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); @@ -244,11 +244,11 @@ dest[0] = cm[(a0 - b0) >> COL_SHIFT]; } -static inline void idctSparseColAdd (UINT8 *dest, int line_size, +static inline void idctSparseColAdd (uint8_t *dest, int line_size, DCTELEM * col) { int a0, a1, a2, a3, b0, b1, b2, b3; - UINT8 *cm = cropTbl + MAX_NEG_CROP; + uint8_t *cm = cropTbl + MAX_NEG_CROP; /* XXX: I did that only to give same values as previous code */ a0 = W4 * (col[8*0] + ((1<<(COL_SHIFT-1))/W4)); @@ -379,7 +379,7 @@ col[56] = ((a0 - b0) >> COL_SHIFT); } -void simple_idct_put(UINT8 *dest, int line_size, DCTELEM *block) +void simple_idct_put(uint8_t *dest, int line_size, DCTELEM *block) { int i; for(i=0; i<8; i++) @@ -389,7 +389,7 @@ idctSparseColPut(dest + i, line_size, block + i); } -void simple_idct_add(UINT8 *dest, int line_size, DCTELEM *block) +void simple_idct_add(uint8_t *dest, int line_size, DCTELEM *block) { int i; for(i=0; i<8; i++) @@ -420,10 +420,10 @@ and the butterfly must be multiplied by 0.5 * sqrt(2.0) */ #define C_SHIFT (4+1+12) -static inline void idct4col(UINT8 *dest, int line_size, const DCTELEM *col) +static inline void idct4col(uint8_t *dest, int line_size, const DCTELEM *col) { int c0, c1, c2, c3, a0, a1, a2, a3; - const UINT8 *cm = cropTbl + MAX_NEG_CROP; + const uint8_t *cm = cropTbl + MAX_NEG_CROP; a0 = col[8*0]; a1 = col[8*2]; @@ -457,7 +457,7 @@ /* XXX: I think a 1.0/sqrt(2) normalization should be needed to compensate the extra butterfly stage - I don't have the full DV specification */ -void simple_idct248_put(UINT8 *dest, int line_size, DCTELEM *block) +void simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block) { int i; DCTELEM *ptr; @@ -500,10 +500,10 @@ #define C2 C_FIX(0.2705980501) #define C3 C_FIX(0.5) #define C_SHIFT (4+1+12) -static inline void idct4col_add(UINT8 *dest, int line_size, const DCTELEM *col) +static inline void idct4col_add(uint8_t *dest, int line_size, const DCTELEM *col) { int c0, c1, c2, c3, a0, a1, a2, a3; - const UINT8 *cm = cropTbl + MAX_NEG_CROP; + const uint8_t *cm = cropTbl + MAX_NEG_CROP; a0 = col[8*0]; a1 = col[8*1]; @@ -531,7 +531,7 @@ static inline void idct4row(DCTELEM *row) { int c0, c1, c2, c3, a0, a1, a2, a3; - const UINT8 *cm = cropTbl + MAX_NEG_CROP; + //const uint8_t *cm = cropTbl + MAX_NEG_CROP; a0 = row[0]; a1 = row[1]; @@ -547,7 +547,7 @@ row[3]= (c0 - c1) >> R_SHIFT; } -void simple_idct84_add(UINT8 *dest, int line_size, DCTELEM *block) +void simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block) { int i; @@ -562,7 +562,7 @@ } } -void simple_idct48_add(UINT8 *dest, int line_size, DCTELEM *block) +void simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block) { int i;
--- a/simple_idct.h Mon Feb 10 22:43:30 2003 +0000 +++ b/simple_idct.h Tue Feb 11 16:35:48 2003 +0000 @@ -18,14 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -void simple_idct_put(UINT8 *dest, int line_size, DCTELEM *block); -void simple_idct_add(UINT8 *dest, int line_size, DCTELEM *block); +void simple_idct_put(uint8_t *dest, int line_size, DCTELEM *block); +void simple_idct_add(uint8_t *dest, int line_size, DCTELEM *block); void ff_simple_idct_mmx(int16_t *block); -void ff_simple_idct_add_mmx(UINT8 *dest, int line_size, int16_t *block); -void ff_simple_idct_put_mmx(UINT8 *dest, int line_size, int16_t *block); +void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block); +void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block); void simple_idct(DCTELEM *block); -void simple_idct248_put(UINT8 *dest, int line_size, DCTELEM *block); +void simple_idct248_put(uint8_t *dest, int line_size, DCTELEM *block); -void simple_idct84_add(UINT8 *dest, int line_size, DCTELEM *block); -void simple_idct48_add(UINT8 *dest, int line_size, DCTELEM *block); +void simple_idct84_add(uint8_t *dest, int line_size, DCTELEM *block); +void simple_idct48_add(uint8_t *dest, int line_size, DCTELEM *block);
--- a/svq1.c Mon Feb 10 22:43:30 2003 +0000 +++ b/svq1.c Tue Feb 11 16:35:48 2003 +0000 @@ -1083,7 +1083,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { MpegEncContext *s=avctx->priv_data; uint8_t *current, *previous;
--- a/utils.c Mon Feb 10 22:43:30 2003 +0000 +++ b/utils.c Tue Feb 11 16:35:48 2003 +0000 @@ -285,7 +285,7 @@ return 0; } -int avcodec_encode_audio(AVCodecContext *avctx, UINT8 *buf, int buf_size, +int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size, const short *samples) { int ret; @@ -295,7 +295,7 @@ return ret; } -int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size, +int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size, const AVFrame *pict) { int ret; @@ -313,7 +313,7 @@ zero. Otherwise, it is non zero */ int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { int ret; @@ -331,9 +331,9 @@ *number of bytes used. If no frame could be decompressed, *frame_size_ptr is zero. Otherwise, it is the decompressed frame *size in BYTES. */ -int avcodec_decode_audio(AVCodecContext *avctx, INT16 *samples, +int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { int ret; @@ -589,7 +589,7 @@ static int raw_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { return -1; }
--- a/wmadec.c Mon Feb 10 22:43:30 2003 +0000 +++ b/wmadec.c Tue Feb 11 16:35:48 2003 +0000 @@ -1215,7 +1215,7 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, int *data_size, - UINT8 *buf, int buf_size) + uint8_t *buf, int buf_size) { WMADecodeContext *s = avctx->priv_data; int nb_frames, bit_offset, i, pos, len;
--- a/wmv2.c Mon Feb 10 22:43:30 2003 +0000 +++ b/wmv2.c Tue Feb 11 16:35:48 2003 +0000 @@ -192,7 +192,7 @@ Wmv2Context * const w= (Wmv2Context*)s; int cbp, coded_cbp, i; int pred_x, pred_y; - UINT8 *coded_block; + uint8_t *coded_block; handle_slices(s); @@ -491,7 +491,7 @@ static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ MpegEncContext * const s= &w->s; int xy, wrap, diff, type; - INT16 *A, *B, *C, *mot_val; + int16_t *A, *B, *C, *mot_val; wrap = s->block_wrap[0]; xy = s->block_index[0]; @@ -576,8 +576,7 @@ static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ MpegEncContext * const s= &w->s; uint8_t temp[2][64]; - int i; - + switch(w->abt_type_table[n]){ case 0: if (s->block_last_index[n] >= 0) { @@ -614,12 +613,12 @@ } void ff_mspel_motion(MpegEncContext *s, - UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, - UINT8 **ref_picture, op_pixels_func (*pix_op)[4], + uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, + uint8_t **ref_picture, op_pixels_func (*pix_op)[4], int motion_x, int motion_y, int h) { Wmv2Context * const w= (Wmv2Context*)s; - UINT8 *ptr; + uint8_t *ptr; int dxy, offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize; int emu=0; @@ -700,7 +699,7 @@ { Wmv2Context * const w= (Wmv2Context*)s; int cbp, code, i; - UINT8 *coded_val; + uint8_t *coded_val; if(w->j_type) return 0;