summaryrefslogtreecommitdiff
path: root/libavcodec/intrax8.c
Commit message (Collapse)AuthorAge
* avcodec/intrax8: Avoid indirection when accessing VLC tableAndreas Rheinhardt2022-08-03
| | | | | | | | | | 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>
* avcodec/intrax8: Remove unused IDCTDSPContextAndreas Rheinhardt2022-08-03
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt2022-06-17
| | | | | | | | | | | | | | | | | | 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>
* avcodec/intrax8: Reduce the size of tables used to initialize VLCsAndreas Rheinhardt2020-12-08
| | | | | | | | | | 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>
* avcodec/intrax8: Avoid code duplication when initializing VLCsAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Remove VLC offsets tableAndreas Rheinhardt2020-12-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Make ff_intrax8_common_init() thread-safeAndreas Rheinhardt2020-11-24
| | | | | | | In particular, don't reinitialize VLCs every time an IntraX8Context is initialized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Replace always-false check by assertAndreas Rheinhardt2020-11-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/intrax8: Check for end of bitstream in ff_intrax8_decode_picture()Michael Niedermayer2020-04-26
| | | | | | | | Fixes: Timeout (105sec -> 1sec) Fixes: 20479/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1_fuzzer-5769846937878528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'ee59f0540875ab42496af2aacddd942757707683'Clément Bœsch2017-03-30
|\ | | | | | | | | | | | | * commit 'ee59f0540875ab42496af2aacddd942757707683': intrax8: Have function signature match across declaration and definition Merged-by: Clément Bœsch <cboesch@gopro.com>
| * intrax8: Have function signature match across declaration and definitionDiego Biurrun2016-11-03
| | | | | | | | libavcodec/intrax8.c(776) : warning C4028: formal parameter 1 different from declaration
* | Merge commit '3281d823cdc7601c4900eb103958c05f59f65555'Clément Bœsch2017-03-21
|\| | | | | | | | | | | | | * commit '3281d823cdc7601c4900eb103958c05f59f65555': intrax8: Change type of array stride parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
| * intrax8: Change type of array stride parameters to ptrdiff_tDiego Biurrun2016-09-29
| | | | | | | | | | | | ptrdiff_t is the correct type for array strides and similar. Also rename all such parameters to "stride" for consistency.
* | lavc/intrax8: Use correct printf specifier for size_t on Windows.Carl Eugen Hoyos2016-07-22
| |
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7': intrax8: Remove mpegvideo dependency Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Remove mpegvideo dependencyVittorio Giovara2016-03-29
| |
* | Merge commit '6ebd06a9b2508747a135ee4c880d8f612e08932b'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit '6ebd06a9b2508747a135ee4c880d8f612e08932b': intrax8: Drop lots of pointless parentheses Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Drop lots of pointless parenthesesDiego Biurrun2016-03-29
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit '9b57995cdd489a4cff51dcc1a1f08ac77ec5a58c': intrax8: Drop MB emulation code Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Drop MB emulation codeVittorio Giovara2016-03-29
| | | | | | | | This is already performed in init_context_frame().
* | Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit '9fa888c02801fff2e8817c24068f5296bbe60000': intrax8: Keep a reference to the decoder blocks Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Keep a reference to the decoder blocksVittorio Giovara2016-03-29
| |
* | Merge commit 'c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'c2084ffcbfc11d1b6ed3a4a0df9cafd56fbb896f': intrax8: Use the generic horizband function Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Use the generic horizband functionVittorio Giovara2016-03-29
| | | | | | | | | | This is assuming that intrax8 has no support for interlacing Carry over lowdelay value in ff_intrax8_decode_picture.
* | Merge commit 'b1268e0f032a3af3912fe3fb8d3855e12d7ea83b'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'b1268e0f032a3af3912fe3fb8d3855e12d7ea83b': intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Pass macroblock coordinates to ff_intrax8_decode_pictureVittorio Giovara2016-03-29
| | | | | | | | | | These values need to be updated with the last macroblock position, so keep them as pointers.
* | Merge commit 'd0540fd02171a6233d2016b199d013299debf7e3'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'd0540fd02171a6233d2016b199d013299debf7e3': intrax8: Pass macroblock size to ff_intrax8_common_init Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Pass macroblock size to ff_intrax8_common_initVittorio Giovara2016-03-29
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '159323897f545e7405fb9db234e0ba123e174376'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '159323897f545e7405fb9db234e0ba123e174376': intrax8: Add a local BlockDSPContext and initialize it Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Add a local BlockDSPContext and initialize itVittorio Giovara2016-03-25
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '1eaae7abb8f208fefb4e8b9e983e61b2499206a3'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '1eaae7abb8f208fefb4e8b9e983e61b2499206a3': intrax8: Reference the current AVCodecContext Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Reference the current AVCodecContextVittorio Giovara2016-03-25
| | | | | | | | It will be needed to initialize BlockDSP in the next commit.
* | Merge commit '8072345e9f86d88fbc4a15c17cb03f1e4701c9a5'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '8072345e9f86d88fbc4a15c17cb03f1e4701c9a5': intrax8: Keep a reference to the GetBitContext reader Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Keep a reference to the GetBitContext readerVittorio Giovara2016-03-25
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '65f14128c4bcf8fcd9d3ba1e20b7a22057c9cfb0'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '65f14128c4bcf8fcd9d3ba1e20b7a22057c9cfb0': intrax8: Use a constant buffer instead of a ScratchpadContext Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Use a constant buffer instead of a ScratchpadContextVittorio Giovara2016-03-25
| | | | | | | | The size of the block is fixed (8x8 plus padding).
* | Merge commit 'eaeba6f241e0de0e797be10f8fda967ef8489e64'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit 'eaeba6f241e0de0e797be10f8fda967ef8489e64': intrax8: Pass the output frame to the decoding function Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Pass the output frame to the decoding functionVittorio Giovara2016-03-25
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '577393321c389ad2973bec6168a8045c94a9e099'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '577393321c389ad2973bec6168a8045c94a9e099': intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Carry over the loopfilter value in ff_intrax8_decode_pictureVittorio Giovara2016-03-25
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a': intrax8: Keep a reference to the context idctdsp Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Keep a reference to the context idctdspVittorio Giovara2016-03-25
| | | | | | | | | | Use it instead of the embedded mpegvideo one. Update init function signature to load it directly from the callers.
* | Merge commit '65127450add50c3bca307edc0517d2e8382717a0'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '65127450add50c3bca307edc0517d2e8382717a0': intrax8: Make x8_init_block_index not use mpegvideo fields Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Make x8_init_block_index not use mpegvideo fieldsVittorio Giovara2016-03-25
| |
* | Merge commit '922b7e6d86e6197dfa5ebde602dd12cc66fb5f1f'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '922b7e6d86e6197dfa5ebde602dd12cc66fb5f1f': intrax8: Use local destination buffers Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Use local destination buffersVittorio Giovara2016-03-25
| | | | | | | | | | | | | | | | | | | | | | These buffers are just a way to store frame pointers and be able to modify them without touching the original ones. The two dependent decoders (WMV2 and VC1) do not need special care for these fields: the former does not seem to use the dest buffers, while the latter reinits them every time to the current frame data buffers. So only keep a local copy rather than the one from mpegvideo.
* | avcodec/intrax8: Remove duplicated chunk from ↵Michael Niedermayer2016-04-18
| | | | | | | | | | | | ba5bcf96124a4933eef170dfe7955809d8d54a64 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a'Derek Buitenhuis2016-04-17
|\| | | | | | | | | | | | | * commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a': Move const qualifier before type name Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>