[FFmpeg-devel] [PATCH][RFC] Improve and fix put_vc2_ue_uint() function.
ikalvachev at gmail.com
Wed Feb 28 22:14:15 EET 2018
Replace two bit handling loops and internal conditional branch
with simple formula using few logical operations.
The old function would generate wrong output
if the input does not fit into 15 bits.
Fix this by using 64 bit math and put_bits64().
This case should be quite rare, since the bug
has not asserted itself.
It's attempt for speed optimization, but in the
process it turned out it needs also bugfixing.
I only tested the old case of the code,
to confirm i've implemented the correct function.
Haven't done any benchmarks or run fate.
It should be faster, especially because currently coefficients bellow
2048 are written using lookup table and bypass this function.
If you like it, use it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2400 bytes
Desc: not available
More information about the ffmpeg-devel