This is in preparation for splitting VC-1 from msmpeg4.
(msmpeg4data.c was originally intended to be just this;
9488b966c7 changed it).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To do so, store the pointer to the VLC table and not to the VLC.
This is possible, because all the VLCs of the same type use
the same number of bits.
Also use a const VLCElem*, because the target is static and must
therefore not be modified after its initialization.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
In C, qualifiers for arrays are broken:
const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE
elements and unfortunately this is not compatible with a pointer
to a const array of two VLC_TYPE, because the latter does not exist
as array types are never qualified (the qualifier applies to the base
type instead). This is the reason why get_vlc2() doesn't accept
a const VLC table despite not modifying the table at all, as
there is no automatic conversion from VLC_TYPE (*)[2] to
const VLC_TYPE (*)[2].
Fix this by using a structure VLCElem for the VLC table.
This also has the advantage of making it clear which
element is which.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
By switching from ff_init_vlc_sparse() to ff_init_vlc_from_lengths() one
can replace an array of codes of type uint16_t with an array of symbols
of type uint8_t, saving space.
Also remove some more code duplication while at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* commit 'ee59f0540875ab42496af2aacddd942757707683':
intrax8: Have function signature match across declaration and definition
Merged-by: Clément Bœsch <cboesch@gopro.com>
* commit '9fa888c02801fff2e8817c24068f5296bbe60000':
intrax8: Keep a reference to the decoder blocks
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit 'c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f':
intrax8: Use the generic horizband function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '159323897f545e7405fb9db234e0ba123e174376':
intrax8: Add a local BlockDSPContext and initialize it
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '8072345e9f86d88fbc4a15c17cb03f1e4701c9a5':
intrax8: Keep a reference to the GetBitContext reader
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '65f14128c4bcf8fcd9d3ba1e20b7a22057c9cfb0':
intrax8: Use a constant buffer instead of a ScratchpadContext
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit 'eaeba6f241e0de0e797be10f8fda967ef8489e64':
intrax8: Pass the output frame to the decoding function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '577393321c389ad2973bec6168a8045c94a9e099':
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a':
intrax8: Keep a reference to the context idctdsp
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '65127450add50c3bca307edc0517d2e8382717a0':
intrax8: Make x8_init_block_index not use mpegvideo fields
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit '42244ce07a1f4f5108ae86d50fe72db785d483ed':
intrax8: Move a comment to the place it corresponds
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>