diff options
author | Zdenek Kabelac | 2003-02-11 16:35:48 +0000 |
---|---|---|
committer | Zdenek Kabelac | 2003-02-11 16:35:48 +0000 |
commit | 0c1a9edad463bd6e22b30c19b700b099c7093fc1 (patch) | |
tree | d16ccbe29c8dbfc2cdc4e92cac31b22c181ed940 /libavcodec/error_resilience.c | |
parent | 4596673c062e3834b6d31d1e8e210b64d74ce26b (diff) |
* UINTX -> uintx_t INTX -> intx_t
Originally committed as revision 1578 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 3cb8d40bcf..195f31fce6 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -54,7 +54,7 @@ static void put_dc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t } } -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 @@ static void filter181(INT16 *data, int width, int height, int stride){ * @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 @@ static void guess_dc(MpegEncContext *s, INT16 *dc, int w, int h, int stride, int 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 @@ static void guess_dc(MpegEncContext *s, INT16 *dc, int w, int h, int stride, int 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 @@ static void guess_dc(MpegEncContext *s, INT16 *dc, int w, int h, int stride, int * @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 @@ static void h_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stri 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 @@ static void h_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stri * @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 @@ static void v_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stri 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 v_block_filter(MpegEncContext *s, UINT8 *dst, int w, int h, int stri } 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 @@ int score_sum=0; 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 @@ static int is_intra_more_likely(MpegEncContext *s){ 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 @@ void ff_error_resilience(MpegEncContext *s){ 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 @@ void ff_error_resilience(MpegEncContext *s){ 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]; |