[FFmpeg-devel] & vs. &&
Måns Rullgård
mans
Mon Oct 12 16:11:26 CEST 2009
Kostya <kostya.shishkov at gmail.com> writes:
> On Mon, Oct 12, 2009 at 02:21:06PM +0200, Benoit Fouet wrote:
>> Hi,
>>
> [...]
>> second one:
>> libavcodec/vc1dec.c:2318: warning: suggest parentheses around operand of
>> ?!? or change ?&? to ?&&? or ?!? to ?~?
>> =========== ><8 ===========
>> if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
>> =========== 8>< ===========
>>
>> although this is the same functionnaly as '!is_intra[i] && is_coded[i]',
>> I find the latter more close to what we really want to test.
>>
>> I'd suspect the second case should be fixed as suggested (i.e. '&' =>
>> '&&'), but would like to hear knowledgeable people for the first one.
>
> Yep, it should be the same for the second case, so change it if you like.
Beware, the && version might be slower.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list