diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-27 15:16:37 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-27 15:28:18 +0200 |
commit | 28a613b09b712494b8a82d00112d4e6e97a0df0a (patch) | |
tree | 53aa02ea38ded5c773c0a32f9b99162319b04c97 /libavcodec/h264.c | |
parent | dfacef9e735461e72a05e683da06bda5ea9c5d8e (diff) | |
download | ffmpeg-28a613b09b712494b8a82d00112d4e6e97a0df0a.tar.gz |
h264: dont mess with chroma planes for grayscale h264.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 47331ae66c..b504dcf1cb 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2179,8 +2179,10 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, uvlinesize, 1, 0, simple, pixel_shift); if (simple || !CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) { - h->hpc.pred8x8[h->chroma_pred_mode](dest_cb, uvlinesize); - h->hpc.pred8x8[h->chroma_pred_mode](dest_cr, uvlinesize); + if (CHROMA) { + h->hpc.pred8x8[h->chroma_pred_mode](dest_cb, uvlinesize); + h->hpc.pred8x8[h->chroma_pred_mode](dest_cr, uvlinesize); + } } hl_decode_mb_predict_luma(h, mb_type, is_h264, simple, |