[FFmpeg-cvslog] af_pan: comment a tricky piece of code.
nicolas.george at normalesup.org
Thu Feb 16 13:26:44 CET 2012
Le septidi 27 pluviôse, an CCXX, Reimar Döffinger a écrit :
> If we ever used all 64 bits, (int64_t)1 << channel_id would actually be
> a signed overflow.
Actually, only if the 63rd bit is the only one set. And the 63rd bit is
already a reserved value (AV_CH_LAYOUT_NATIVE), and a layout with that flag
can not possibly be returned by av_get_channel_layout. So in this case, we
Furthermore, the integer overflow would only happen to compare the result
with a value that would have suffered the same overflow: would it be a
In other words: is there any known supported architecture where signed
integer overflows are actually a problem by themselves (as opposed as:
because the result is unexpectedly negative)? Or, for that matter, where
signed integer overflows are anything else than 2's complement?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-cvslog