Browse Source

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>
tags/n4.2
Michael Niedermayer 7 years ago
parent
commit
5d0139d5f0
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      libavcodec/ffv1.h

+ 1
- 3
libavcodec/ffv1.h View File

@@ -153,9 +153,7 @@ static av_always_inline int fold(int diff, int bits)
if (bits == 8)
diff = (int8_t)diff;
else {
diff += 1 << (bits - 1);
diff = av_mod_uintp2(diff, bits);
diff -= 1 << (bits - 1);
diff = sign_extend(diff, bits);
}

return diff;


Loading…
Cancel
Save