[FFmpeg-devel] [PATCH 2/2] avcodec/smacker: Optimize constant 16bit audio output

Tomas Härdin tjoppen at acc.umu.se
Wed May 4 12:39:54 EEST 2022


tis 2022-05-03 klockan 18:30 +0200 skrev Michael Niedermayer:
> 
> +        } else if (stereo) {
> +            val  = 256*values[1] + values[0];
> +            val2 = 256*values[3] + values[2];
> +            for(; i < unp_size; i+=2) {
> +                pred[0] += val;
> +                pred[1] += val2;
> +                *samples++ = pred[0];
> +                *samples++ = pred[1];
> +            }
> +        } else {
> +            val = 256*values[1] + values[0];
> +            for(; i < unp_size; i++) {
> +                pred[0] += val;
> +                *samples++ = pred[0];
> +            }
> +        }

Got any numbers on how much faster this is? Just out of curiosity

Probably want to follow this up with a reindent patch

/Tomas



More information about the ffmpeg-devel mailing list