Mercurial > libavcodec.hg
comparison h264.c @ 2834:fd5d7c732c6b libavcodec
kill a bunch of compiler warnings
author | mru |
---|---|
date | Sun, 14 Aug 2005 15:42:40 +0000 |
parents | 636133fccbdc |
children | 5f20ab245501 |
comparison
equal
deleted
inserted
replaced
2833:1f117208d20f | 2834:fd5d7c732c6b |
---|---|
1275 | 1275 |
1276 if(IS_16X16(*mb_type)){ | 1276 if(IS_16X16(*mb_type)){ |
1277 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref[0], 1); | 1277 fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref[0], 1); |
1278 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, ref[1], 1); | 1278 fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, ref[1], 1); |
1279 if(!IS_INTRA(mb_type_col) | 1279 if(!IS_INTRA(mb_type_col) |
1280 && ( l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 1 | 1280 && ( (l1ref0[0] == 0 && ABS(l1mv0[0][0]) <= 1 && ABS(l1mv0[0][1]) <= 1) |
1281 || l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 1 | 1281 || (l1ref0[0] < 0 && l1ref1[0] == 0 && ABS(l1mv1[0][0]) <= 1 && ABS(l1mv1[0][1]) <= 1 |
1282 && (h->x264_build>33 || !h->x264_build))){ | 1282 && (h->x264_build>33 || !h->x264_build)))){ |
1283 if(ref[0] > 0) | 1283 if(ref[0] > 0) |
1284 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4); | 1284 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mv[0][0],mv[0][1]), 4); |
1285 else | 1285 else |
1286 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); | 1286 fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); |
1287 if(ref[1] > 0) | 1287 if(ref[1] > 0) |
1306 fill_rectangle(&h->ref_cache[0][scan8[i8*4]], 2, 2, 8, ref[0], 1); | 1306 fill_rectangle(&h->ref_cache[0][scan8[i8*4]], 2, 2, 8, ref[0], 1); |
1307 fill_rectangle(&h->ref_cache[1][scan8[i8*4]], 2, 2, 8, ref[1], 1); | 1307 fill_rectangle(&h->ref_cache[1][scan8[i8*4]], 2, 2, 8, ref[1], 1); |
1308 | 1308 |
1309 /* col_zero_flag */ | 1309 /* col_zero_flag */ |
1310 if(!IS_INTRA(mb_type_col) && ( l1ref0[x8 + y8*h->b8_stride] == 0 | 1310 if(!IS_INTRA(mb_type_col) && ( l1ref0[x8 + y8*h->b8_stride] == 0 |
1311 || l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0 | 1311 || (l1ref0[x8 + y8*h->b8_stride] < 0 && l1ref1[x8 + y8*h->b8_stride] == 0 |
1312 && (h->x264_build>33 || !h->x264_build))){ | 1312 && (h->x264_build>33 || !h->x264_build)))){ |
1313 const int16_t (*l1mv)[2]= l1ref0[x8 + y8*h->b8_stride] == 0 ? l1mv0 : l1mv1; | 1313 const int16_t (*l1mv)[2]= l1ref0[x8 + y8*h->b8_stride] == 0 ? l1mv0 : l1mv1; |
1314 for(i4=0; i4<4; i4++){ | 1314 for(i4=0; i4<4; i4++){ |
1315 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*h->b_stride]; | 1315 const int16_t *mv_col = l1mv[x8*2 + (i4&1) + (y8*2 + (i4>>1))*h->b_stride]; |
1316 if(ABS(mv_col[0]) <= 1 && ABS(mv_col[1]) <= 1){ | 1316 if(ABS(mv_col[0]) <= 1 && ABS(mv_col[1]) <= 1){ |
1317 if(ref[0] == 0) | 1317 if(ref[0] == 0) |
1345 }else{ | 1345 }else{ |
1346 for(i8=0; i8<4; i8++){ | 1346 for(i8=0; i8<4; i8++){ |
1347 const int x8 = i8&1; | 1347 const int x8 = i8&1; |
1348 const int y8 = i8>>1; | 1348 const int y8 = i8>>1; |
1349 int ref0, dist_scale_factor; | 1349 int ref0, dist_scale_factor; |
1350 int16_t (*l1mv)[2]= l1mv0; | 1350 const int16_t (*l1mv)[2]= l1mv0; |
1351 | 1351 |
1352 if(is_b8x8 && !IS_DIRECT(h->sub_mb_type[i8])) | 1352 if(is_b8x8 && !IS_DIRECT(h->sub_mb_type[i8])) |
1353 continue; | 1353 continue; |
1354 h->sub_mb_type[i8] = sub_mb_type; | 1354 h->sub_mb_type[i8] = sub_mb_type; |
1355 if(IS_INTRA(mb_type_col)){ | 1355 if(IS_INTRA(mb_type_col)){ |
2325 const int l##y = (SRC(-1,y-1) + 2*SRC(-1,y) + SRC(-1,y+1) + 2) >> 2; | 2325 const int l##y = (SRC(-1,y-1) + 2*SRC(-1,y) + SRC(-1,y+1) + 2) >> 2; |
2326 #define PREDICT_8x8_LOAD_LEFT \ | 2326 #define PREDICT_8x8_LOAD_LEFT \ |
2327 const int l0 = ((has_topleft ? SRC(-1,-1) : SRC(-1,0)) \ | 2327 const int l0 = ((has_topleft ? SRC(-1,-1) : SRC(-1,0)) \ |
2328 + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \ | 2328 + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \ |
2329 PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \ | 2329 PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \ |
2330 const int l7 = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2 | 2330 const int l7 attribute_unused = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2 |
2331 | 2331 |
2332 #define PT(x) \ | 2332 #define PT(x) \ |
2333 const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2; | 2333 const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2; |
2334 #define PREDICT_8x8_LOAD_TOP \ | 2334 #define PREDICT_8x8_LOAD_TOP \ |
2335 const int t0 = ((has_topleft ? SRC(-1,-1) : SRC(0,-1)) \ | 2335 const int t0 = ((has_topleft ? SRC(-1,-1) : SRC(0,-1)) \ |
2336 + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \ | 2336 + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \ |
2337 PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \ | 2337 PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \ |
2338 const int t7 = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \ | 2338 const int t7 attribute_unused = ((has_topright ? SRC(8,-1) : SRC(7,-1)) \ |
2339 + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 2 | 2339 + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 2 |
2340 | 2340 |
2341 #define PTR(x) \ | 2341 #define PTR(x) \ |
2342 t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2; | 2342 t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2; |
2343 #define PREDICT_8x8_LOAD_TOPRIGHT \ | 2343 #define PREDICT_8x8_LOAD_TOPRIGHT \ |
6186 pix += stride; | 6186 pix += stride; |
6187 } | 6187 } |
6188 } | 6188 } |
6189 } | 6189 } |
6190 static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) { | 6190 static void filter_mb_edgecv( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) { |
6191 int i, d; | 6191 int i; |
6192 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 ); | 6192 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 ); |
6193 const int alpha = alpha_table[index_a]; | 6193 const int alpha = alpha_table[index_a]; |
6194 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )]; | 6194 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )]; |
6195 | 6195 |
6196 if( bS[0] < 4 ) { | 6196 if( bS[0] < 4 ) { |
6416 } | 6416 } |
6417 } | 6417 } |
6418 } | 6418 } |
6419 | 6419 |
6420 static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) { | 6420 static void filter_mb_edgech( H264Context *h, uint8_t *pix, int stride, int bS[4], int qp ) { |
6421 int i, d; | 6421 int i; |
6422 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 ); | 6422 const int index_a = clip( qp + h->slice_alpha_c0_offset, 0, 51 ); |
6423 const int alpha = alpha_table[index_a]; | 6423 const int alpha = alpha_table[index_a]; |
6424 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )]; | 6424 const int beta = beta_table[clip( qp + h->slice_beta_offset, 0, 51 )]; |
6425 | 6425 |
6426 if( bS[0] < 4 ) { | 6426 if( bS[0] < 4 ) { |