1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Rostislav Pehlivanov
f41e37b84f dirac_vlc: prevent shifting a 0 by 64 bits when zeroing residue
Adding a check for bits == 0 would still make Coverity misdetect this,
so just revert to the normal way of setting the residue to 0.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-14 01:29:34 +01:00
Rostislav Pehlivanov
c4adcff976 dirac_vlc: add a SET_RESIDUE macro and fix recent regression
Can also be used in future cleanups since 99% of the time the leftover
appending will just append to an already empty residue.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-14 01:00:59 +01:00
Rostislav Pehlivanov
9c0aba434e dirac_vlc: remove redundant macro declaration
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-13 23:38:10 +01:00
Rostislav Pehlivanov
e24c31b656 dirac_vlc: fix undefined shifts
Shifting by more than 63 bits is undefined behavior, athough any
compiler not returning 0 after shifting by any amount would be insane.

Found by Coverity, fixes CID1363959 and CID1363960

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-13 23:35:03 +01:00
Michael Niedermayer
9157ac2f9c avcodec/dirac_vlc: Fix mixed declaration and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 13:30:52 +02:00
Rostislav Pehlivanov
0eb0f93109 diracdec: implement a LUT-based Golomb code parser
Still much left to optimize, but it provides a significant performance
improvement - 10% for 300Mbps (1080p30), 25% for 1.5Gbps (4k 60fps) in
comparison with the default implementation.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:40:28 +01:00