changeset 7919:17b22bf9fac6 libavcodec

Fix CAVLC+8x8+MBAFF loop filter. Fixes FREXT02_JVC_C.
author michael
date Thu, 25 Sep 2008 00:41:49 +0000
parents 84b37de61d98
children b731ef917a01
files h264.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Wed Sep 24 23:24:24 2008 +0000
+++ b/h264.c	Thu Sep 25 00:41:49 2008 +0000
@@ -6383,8 +6383,10 @@
                 if( IS_INTRA( s->current_picture.mb_type[mbn_xy] ) )
                     bS[i] = 4;
                 else if( h->non_zero_count_cache[12+8*(i>>1)] != 0 ||
-                         /* FIXME: with 8x8dct + cavlc, should check cbp instead of nnz */
-                         h->non_zero_count[mbn_xy][MB_FIELD ? i&3 : (i>>2)+(mb_y&1)*2] )
+                         ((!h->pps.cabac && IS_8x8DCT(s->current_picture.mb_type[mbn_xy])) ?
+                            (h->cbp_table[mbn_xy] & ((MB_FIELD ? (i&2) : (mb_y&1)) ? 8 : 2))
+                                                                       :
+                            h->non_zero_count[mbn_xy][MB_FIELD ? i&3 : (i>>2)+(mb_y&1)*2]))
                     bS[i] = 2;
                 else
                     bS[i] = 1;