# HG changeset patch # User michael # Date 1265508000 0 # Node ID 1b8e11679883e5179db3c1e85f9df6ac8f90840a # Parent d4222f5b6dea625bbb7ba6778477e485087c93fe Fix CAVLC+8x8DCT+MBAFF loopfiltering. Fixes issue1250 diff -r d4222f5b6dea -r 1b8e11679883 h264_loopfilter.c --- a/h264_loopfilter.c Sun Feb 07 01:18:00 2010 +0000 +++ b/h264_loopfilter.c Sun Feb 07 02:00:00 2010 +0000 @@ -479,11 +479,18 @@ if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) { *(uint64_t*)bS= 0x0003000300030003ULL; } else { - const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 4+3*8; //FIXME 8x8dct? + if(!CABAC && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])){ + bS[0]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+0]); + bS[1]= 1+((h->cbp_table[mbn_xy] & 4)||h->non_zero_count_cache[scan8[0]+1]); + bS[2]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+2]); + bS[3]= 1+((h->cbp_table[mbn_xy] & 8)||h->non_zero_count_cache[scan8[0]+3]); + }else{ + const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy] + 4+3*8; int i; for( i = 0; i < 4; i++ ) { bS[i] = 1 + !!(h->non_zero_count_cache[scan8[0]+i] | mbn_nnz[i]); } + } } // Do not use s->qscale as luma quantizer because it has not the same // value in IPCM macroblocks.