diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-17 12:58:44 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-17 12:58:44 +0200 |
commit | 83356cf6cceb835e9bbed0ca94accb2cc32fcf03 (patch) | |
tree | cf2794e55b3ff31b1fb3f8b8195740a9305c7b14 /libavcodec/vc1_mc.c | |
parent | ee8c18387d02a7ee5ee3317cf1cecd84a7e0d91a (diff) | |
download | ffmpeg-83356cf6cceb835e9bbed0ca94accb2cc32fcf03.tar.gz |
lavc/vc1: Never decode vc1 as gray if gray decoding was not enabled.
Diffstat (limited to 'libavcodec/vc1_mc.c')
-rw-r--r-- | libavcodec/vc1_mc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/vc1_mc.c b/libavcodec/vc1_mc.c index 569aad03e8..6236036dbf 100644 --- a/libavcodec/vc1_mc.c +++ b/libavcodec/vc1_mc.c @@ -270,7 +270,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) } /* for grayscale we should not try to read from unknown area */ - if (s->flags & CODEC_FLAG_GRAY) { + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) { srcU = s->edge_emu_buffer + 18 * s->linesize; srcV = s->edge_emu_buffer + 18 * s->linesize; } @@ -332,7 +332,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir) s->hdsp.put_no_rnd_pixels_tab[0][dxy](s->dest[0], srcY, s->linesize, 16); } - if (s->flags & CODEC_FLAG_GRAY) return; + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) return; /* Chroma MC always uses qpel bilinear */ uvmx = (uvmx & 3) << 1; uvmy = (uvmy & 3) << 1; @@ -517,7 +517,7 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir) if (!v->field_mode && !v->s.last_picture.f->data[0]) return; - if (s->flags & CODEC_FLAG_GRAY) + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) return; /* calculate chroma MV vector from four luma MVs */ @@ -654,7 +654,7 @@ void ff_vc1_mc_4mv_chroma4(VC1Context *v, int dir, int dir2, int avg) int use_ic; uint8_t (*lutuv)[256]; - if (s->flags & CODEC_FLAG_GRAY) + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) return; for (i = 0; i < 4; i++) { @@ -800,7 +800,7 @@ void ff_vc1_interp_mc(VC1Context *v) } /* for grayscale we should not try to read from unknown area */ - if (s->flags & CODEC_FLAG_GRAY) { + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) { srcU = s->edge_emu_buffer + 18 * s->linesize; srcV = s->edge_emu_buffer + 18 * s->linesize; } @@ -864,7 +864,7 @@ void ff_vc1_interp_mc(VC1Context *v) s->hdsp.avg_no_rnd_pixels_tab[dxy](s->dest[0], srcY, s->linesize, 16); } - if (s->flags & CODEC_FLAG_GRAY) return; + if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY) return; /* Chroma MC always uses qpel blilinear */ uvmx = (uvmx & 3) << 1; uvmy = (uvmy & 3) << 1; |