]> git.sesse.net Git - ffmpeg/commit
avcodec/asvenc: Avoid reversing output data twice
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 13 Oct 2020 01:11:37 +0000 (03:11 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 18 Oct 2020 13:29:34 +0000 (15:29 +0200)
commit746ab8327c0c8ae1b7e894f3c21d7b7a44c0a0b3
treecccc90794568d57c91007212c5f61f5cde257351
parentc9e8f031955ffc00d681bd31e6ad3c8146cf015d
avcodec/asvenc: Avoid reversing output data twice

The ASUS V2 format is designed for a little-endian bitstream reader, yet
our encoder used an ordinary big-endian bitstream writer to write it;
the bits of every byte were swapped at the end and some data (namely the
numbers not in static tables) had to be bitreversed before writing it at
all, so that it would be reversed twice.

This commit stops doing so; instead, a little-endian bitstream writer is
used. This also necessitated to switch certain static tables, which
required trivial modifications to the decoder (that uses the same
tables).

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/asv.c
libavcodec/asv.h
libavcodec/asvdec.c
libavcodec/asvenc.c