[FFmpeg-devel] [PATCH 1/2] opusdsp: adjust and optimize C function to match assembly

Lynne dev at lynne.ee
Thu Aug 15 13:47:02 EEST 2019


The C and asm versions behaved differently _outside_ of the codec.

The C version returned pre-multiplied 'state' for the next execution
to use right away, while the assembly version outputted non-multiplied
'state' for the next execution to multiply to save instructions.
Since the initial state when initialized or seeking is always 0,
and since C and asm versions were never mixed, there was no issue.

However, comparing outputs directly in checkasm doesn't work without
dividing the initial state by CELT_EMPH_COEFF and multiplying the
returned state by CELT_EMPH_COEFF for the assembly function.

Since its actually faster to do this in C as well, copy the behavior the
asm versions use. As a reminder, add a note explaining the differences
between libopus on coefficient init.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-opusdsp-adjust-and-optimize-C-function-to-match-asse.patch
Type: text/x-diff
Size: 2777 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190815/bc530047/attachment.patch>


More information about the ffmpeg-devel mailing list