mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avcodec/dvdsubdec: Avoid branch in decode_run_8bit()
Speed improvment 35.5 sec -> 34.7sec Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 71bf0330505e2108935d05c5c018ec65eac4b946) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fb0cd972a7
commit
6645783a3a
@ -82,10 +82,7 @@ static int decode_run_8bit(GetBitContext *gb, int *color)
|
||||
{
|
||||
int len;
|
||||
int has_run = get_bits1(gb);
|
||||
if (get_bits1(gb))
|
||||
*color = get_bits(gb, 8);
|
||||
else
|
||||
*color = get_bits(gb, 2);
|
||||
*color = get_bits(gb, 2 + 6*get_bits1(gb));
|
||||
if (has_run) {
|
||||
if (get_bits1(gb)) {
|
||||
len = get_bits(gb, 7);
|
||||
|
Loading…
x
Reference in New Issue
Block a user