Skip to content
Snippets Groups Projects
Commit 71bf0330 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/dvdsubdec: Avoid branch in decode_run_8bit()


Speed improvment 35.5 sec -> 34.7sec

Reviewed-by: default avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 384dcd66
No related branches found
No related tags found
No related merge requests found
......@@ -83,10 +83,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment