[FFmpeg-devel] [PATCH] fix warning in vc1dec.c
Reimar Döffinger
Reimar.Doeffinger
Sun Feb 21 17:31:29 CET 2010
On Sun, Feb 21, 2010 at 04:03:16PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > On Sun, Feb 21, 2010 at 04:53:50PM +0100, Janne Grunau wrote:
> >> fixes following warning
> >> libavcodec/vc1dec.c: In function 'vc1_decode_p_mb':
> >> libavcodec/vc1dec.c:2319: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
> >>
> >>
> >> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> >> index 611b845..f607949 100644
> >> --- a/libavcodec/vc1dec.c
> >> +++ b/libavcodec/vc1dec.c
> >> @@ -2316,7 +2316,7 @@ static int vc1_decode_p_mb(VC1Context *v)
> >> }
> >> if(i == 4) vc1_mc_4mv_chroma(v);
> >> v->mb_type[0][s->block_index[i]] = is_intra[i];
> >> - if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
> >> + if(!coded_inter) coded_inter = !is_intra[i] && is_coded[i];
> >
> > There are concerns this will result in slower code.
>
> Those concerns are valid.
Didn't claim otherwise.
> > Unless we can get a decision, I'd suggest just adding a () to
> > silence the compiler.
>
> Or disable the stupid warning.
Well, I have no problem just ignoring it either.
Just seems a bit of a waste when people send patches for it.
I doubt it's better liked, but adding a comment that it is intentional
for speed reasons would be a possibility as well.
More information about the ffmpeg-devel
mailing list