Set gray (128) U/V planes for chroma-less samples. Fixes two fate samples
authorRonald S. Bultje <rsbultje@gmail.com>
Thu, 20 Jan 2011 19:00:34 +0000 (14:00 -0500)
committerRonald S. Bultje <rsbultje@gmail.com>
Thu, 20 Jan 2011 22:24:44 +0000 (17:24 -0500)
when played with -flags emu_edge.

libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c

index 5aad4d7f586c578fe2a12de52cdf7401995021e6..efc2b7108703947aa2f025a2991a3c5a006b6492 100644 (file)
@@ -1373,6 +1373,8 @@ decode_intra_mb:
             pred_mode= ff_h264_check_intra_pred_mode( h, pred_mode );
             if( pred_mode < 0 ) return -1;
             h->chroma_pred_mode= pred_mode;
             pred_mode= ff_h264_check_intra_pred_mode( h, pred_mode );
             if( pred_mode < 0 ) return -1;
             h->chroma_pred_mode= pred_mode;
+        } else {
+            h->chroma_pred_mode= DC_128_PRED8x8;
         }
     } else if( partition_count == 4 ) {
         int i, j, sub_partition_count[4], list, ref[2][4];
         }
     } else if( partition_count == 4 ) {
         int i, j, sub_partition_count[4], list, ref[2][4];
index 55ff02294b1790b6ebd99181f54ed5b32f18f36f..c9d28d0f9b5ceec2b9a873e37ce90ce668f4a5cc 100644 (file)
@@ -665,6 +665,8 @@ decode_intra_mb:
             if(pred_mode < 0)
                 return -1;
             h->chroma_pred_mode= pred_mode;
             if(pred_mode < 0)
                 return -1;
             h->chroma_pred_mode= pred_mode;
+        } else {
+            h->chroma_pred_mode = DC_128_PRED8x8;
         }
     }else if(partition_count==4){
         int i, j, sub_partition_count[4], list, ref[2][4];
         }
     }else if(partition_count==4){
         int i, j, sub_partition_count[4], list, ref[2][4];