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_loopfilter.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_loopfilter.c')
-rw-r--r-- | libavcodec/h264_loopfilter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c index f3a5ff6783..63956077d8 100644 --- a/libavcodec/h264_loopfilter.c +++ b/libavcodec/h264_loopfilter.c @@ -245,7 +245,7 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h, int pixel_shift) { MpegEncContext * const s = &h->s; - int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); + int chroma = CHROMA && !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); int chroma444 = CHROMA444; int chroma422 = CHROMA422; @@ -713,7 +713,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4; int first_vertical_edge_done = 0; av_unused int dir; - int chroma = !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); + int chroma = CHROMA && !(CONFIG_GRAY && (s->flags&CODEC_FLAG_GRAY)); int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8); int a = h->slice_alpha_c0_offset - qp_bd_offset; int b = h->slice_beta_offset - qp_bd_offset; |