comparison h264_loopfilter.c @ 11087:1b8e11679883 libavcodec

Fix CAVLC+8x8DCT+MBAFF loopfiltering. Fixes issue1250
author michael
date Sun, 07 Feb 2010 02:00:00 +0000
parents 86ec27e828b5
children d9725977b699
comparison
equal deleted inserted replaced
11086:d4222f5b6dea 11087:1b8e11679883
477 DECLARE_ALIGNED_8(int16_t, bS)[4]; 477 DECLARE_ALIGNED_8(int16_t, bS)[4];
478 int qp; 478 int qp;
479 if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) { 479 if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) {
480 *(uint64_t*)bS= 0x0003000300030003ULL; 480 *(uint64_t*)bS= 0x0003000300030003ULL;
481 } else { 481 } else {
482 const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 4+3*8; //FIXME 8x8dct? 482 if(!CABAC && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])){
483 bS[0]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+0]);
484 bS[1]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+1]);
485 bS[2]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+2]);
486 bS[3]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+3]);
487 }else{
488 const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 4+3*8;
483 int i; 489 int i;
484 for( i = 0; i < 4; i++ ) { 490 for( i = 0; i < 4; i++ ) {
485 bS[i] = 1 + !!(h->non_zero_count_cache[scan8[0]+i] | mbn_nnz[i]); 491 bS[i] = 1 + !!(h->non_zero_count_cache[scan8[0]+i] | mbn_nnz[i]);
492 }
486 } 493 }
487 } 494 }
488 // Do not use s->qscale as luma quantizer because it has not the same 495 // Do not use s->qscale as luma quantizer because it has not the same
489 // value in IPCM macroblocks. 496 // value in IPCM macroblocks.
490 qp = ( s->current_picture.qscale_table[mb_xy] + s->current_picture.qscale_table[mbn_xy] + 1 ) >> 1; 497 qp = ( s->current_picture.qscale_table[mb_xy] + s->current_picture.qscale_table[mbn_xy] + 1 ) >> 1;