[FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS
Michael Niedermayer
michael at niedermayer.cc
Tue Oct 15 01:26:46 EEST 2024
On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote:
> The first branch of this ternary expression was intended to avoid
> having two shift operations in the case the RHS is not known at
> compile time. It only works if the LHS has a signed type however,
> otherwise the result is invalid.
If the expression is faster, why not check if its signed ?
if its not faster, then the argument could be that its not
faster and removes complexity
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241015/5f615f7b/attachment.sig>
More information about the ffmpeg-devel
mailing list