You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
avcodec/ffv1: Simplify fold()
No speed difference, or slightly faster (the difference is too small so it may be noise that this appears faster) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -153,9 +153,7 @@ static av_always_inline int fold(int diff, int bits)
|
|||||||
if (bits == 8)
|
if (bits == 8)
|
||||||
diff = (int8_t)diff;
|
diff = (int8_t)diff;
|
||||||
else {
|
else {
|
||||||
diff += 1 << (bits - 1);
|
diff = sign_extend(diff, bits);
|
||||||
diff = av_mod_uintp2(diff, bits);
|
|
||||||
diff -= 1 << (bits - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return diff;
|
return diff;
|
||||||
|
Reference in New Issue
Block a user