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

Michael Niedermayer michael at niedermayer.cc
Wed Jul 6 20:11:21 EEST 2022


On Wed, May 04, 2022 at 11:39:54AM +0200, Tomas Härdin wrote:
> 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

With the fuzzed sample:
before:
3263902379 decicycles in ABBB,     128 runs,      0 skips

after:
398977744 decicycles in ABBB,    1024 runs,      0 skips

the first times out after 128 runs which is why the runs differ

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220706/450e4b0f/attachment.sig>


More information about the ffmpeg-devel mailing list