diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 05:00:00 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-07 05:00:00 +0300 |
commit | 9873ae0d444a0566dc65a68ac7663a2b994b79b3 (patch) | |
tree | d2f604ce21dc7488b2fc764ff86adbf5c278baa3 /libavcodec | |
parent | 488dba7000c6c24088fbb382feb94a4022aef144 (diff) |
Fix CAVLC+8x8DCT+MBAFF loopfiltering.
Fixes issue1250
Originally committed as revision 21665 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_loopfilter.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index 8cddfb80b7..2f14bde9fd 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -479,11 +479,18 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u 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. |