summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264pred.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-28 20:38:41 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-28 21:01:54 +0100
commit07abf13da4a7c3d23ce6bc6542d72e6252161736 (patch)
treee9fac6b420033b7c254f3fa583fd7ca74f61ba23 /libavcodec/h264pred.c
parent507956824c642e44b0ab7af669a2700c9e57878a (diff)
downloadffmpeg-streaming-07abf13da4a7c3d23ce6bc6542d72e6252161736.zip
ffmpeg-streaming-07abf13da4a7c3d23ce6bc6542d72e6252161736.tar.gz
h264: avoid a grayscale related if() in hl_decode_mb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264pred.c')
-rw-r--r--libavcodec/h264pred.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
index f83924d..db483c9 100644
--- a/libavcodec/h264pred.c
+++ b/libavcodec/h264pred.c
@@ -406,7 +406,7 @@ static void pred8x8_tm_vp8_c(uint8_t *src, ptrdiff_t stride)
* Set the intra prediction function pointers.
*/
void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth,
- const int chroma_format_idc)
+ int chroma_format_idc)
{
// MpegEncContext * const s = &h->s;
@@ -566,6 +566,9 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth,
h->pred16x16_add[VERT_PRED8x8]= FUNCC(pred16x16_vertical_add , depth);\
h->pred16x16_add[ HOR_PRED8x8]= FUNCC(pred16x16_horizontal_add , depth);\
+ if(!chroma_format_idc)
+ chroma_format_idc = 1;
+
switch (bit_depth) {
case 9:
H264_PRED(9)
OpenPOWER on IntegriCloud