Andreas Rheinhardt
59422955cf
avcodec/mpegpicture: Rename Picture->MPVPicture
...
Picture is just too generic.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-06-12 11:36:09 +02:00
Andreas Rheinhardt
790f793844
avutil/common: Don't auto-include mem.h
...
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.
Keep it for external users in order to not cause breakages.
Also improve the other headers a bit while just at it.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
Andreas Rheinhardt
4a134eb14a
avcodec/intrax8: Fix assert
...
Commit 900ce6f8c3 replaced
IntraX8Context.ac_vlc by IntraX8Context.ac_vlc_table,
but forgot to update an av_assert2()*.
cf7ed01938 then
replaced this with a check for j_ac_vlc[mode],
but this makes no sense as j_ac_vlc is of type
const VLCElem [2][2][8][].
Worse yet, mode can be up to three and then
j_ac_vlc[mode] is undefined behaviour. This happened
during the wmv8-x8intra FATE test.
*: Since 84f16bb5e6
config.h was no longer auto-included in avassert.h
and this disabled av_assert1() and av_assert2()
in files where config.h has not been included before
the inclusion of avassert.h.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-02-29 10:30:16 +01:00
Andreas Rheinhardt
c95e123e8c
avcodec/intrax8: Avoid superfluous VLC structures
...
Of all these VLCs here, only VLC.table was really used
after init, so use the ff_vlc_init_tables API
to get rid of them.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-31 20:47:00 +01:00
Andreas Rheinhardt
9cdf82c2c2
avcodec/vlc: Use proper namespace
...
Therefore use a proper prefix for this API, e.g.
ff_init_vlc_sparse -> ff_vlc_init_sparse
ff_free_vlc -> ff_vlc_free
INIT_VLC_LE -> VLC_INIT_LE
INIT_VLC_USE_NEW_STATIC -> VLC_INIT_USE_STATIC
(The ancient INIT_VLC_USE_STATIC has been removed
in 595324e143 , so that
the NEW has been dropped.)
Finally, reorder the flags and change their values
accordingly.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-11 00:27:45 +02:00
Nicolas George
cf7ed01938
lavc/intrax8: fix an assert
2023-07-12 15:35:37 +02:00
Andreas Rheinhardt
d1d30edf42
avcodec/msmpeg4data: Move data shared between msmpeg4 and VC-1 out
...
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>
2022-11-06 17:41:26 +01:00
Andreas Rheinhardt
ec2b07db79
avcodec/intrax8: Only keep what is used from ScanTable
...
Namely ScanTable.permutated.
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-24 00:47:07 +02:00
Andreas Rheinhardt
fd72d8aea3
avcodec/blockdsp: Remove unused AVCodecContext parameter
...
Possible since be95df12bb .
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-21 20:24:40 +02:00
Andreas Rheinhardt
900ce6f8c3
avcodec/intrax8: Avoid indirection when accessing VLC table
...
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>
2022-08-03 21:23:35 +02:00
Andreas Rheinhardt
eb5c5ae658
avcodec/intrax8: Remove unused IDCTDSPContext
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-03 21:10:00 +02:00
Andreas Rheinhardt
2d764069be
avcodec/vlc: Use structure instead of VLC_TYPE array as VLC element
...
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>
2022-06-17 16:47:29 +02:00
Andreas Rheinhardt
abf1a4f05c
avcodec/intrax8: Reduce the size of tables used to initialize VLCs
...
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>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
d1a1f11712
avcodec/intrax8: Avoid code duplication when initializing VLCs
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
ba69ee8801
avcodec/intrax8: Remove VLC offsets table
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-12-08 17:51:47 +01:00
Andreas Rheinhardt
b1af617f51
avcodec/intrax8: Make ff_intrax8_common_init() thread-safe
...
In particular, don't reinitialize VLCs every time an IntraX8Context is
initialized.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
Andreas Rheinhardt
802baf212d
avcodec/intrax8: Replace always-false check by assert
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-11-24 11:35:03 +01:00
Michael Niedermayer
0a9ccc2514
avcodec/intrax8: Check for end of bitstream in ff_intrax8_decode_picture()
...
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>
2020-04-26 18:23:16 +02:00
ClĂ©ment BÅ“sch
b76dd6a678
Merge commit ' ee59f05408'
...
* commit 'ee59f05408 ':
intrax8: Have function signature match across declaration and definition
Merged-by: ClĂ©ment BÅ“sch <cboesch@gopro.com>
2017-03-30 10:03:59 +02:00
ClĂ©ment BÅ“sch
6eb75e7d59
Merge commit ' 3281d823cd'
...
* commit '3281d823cd ':
intrax8: Change type of array stride parameters to ptrdiff_t
Merged-by: ClĂ©ment BÅ“sch <u@pkh.me>
2017-03-21 15:13:36 +01:00
Diego Biurrun
ee59f05408
intrax8: Have function signature match across declaration and definition
...
libavcodec/intrax8.c(776) : warning C4028: formal parameter 1 different from declaration
2016-11-03 15:50:48 +01:00
Diego Biurrun
3281d823cd
intrax8: Change type of array stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
Also rename all such parameters to "stride" for consistency.
2016-09-29 14:48:03 +02:00
Carl Eugen Hoyos
db8e8c9731
lavc/intrax8: Use correct printf specifier for size_t on Windows.
2016-07-22 19:23:01 +02:00
ClĂ©ment BÅ“sch
8ef57a0d61
Merge commit ' 41ed7ab45f'
...
* commit '41ed7ab45f ':
cosmetics: Fix spelling mistakes
Merged-by: ClĂ©ment BÅ“sch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Derek Buitenhuis
e811ebcd9c
Merge commit ' ca8c759173'
...
* commit 'ca8c759173 ':
intrax8: Remove mpegvideo dependency
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:41:27 +01:00
Derek Buitenhuis
f2c7812839
Merge commit ' 6ebd06a9b2'
...
* commit '6ebd06a9b2 ':
intrax8: Drop lots of pointless parentheses
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:21 +01:00
Derek Buitenhuis
741960e2f3
Merge commit ' 9b57995cdd'
...
* commit '9b57995cdd ':
intrax8: Drop MB emulation code
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:40:05 +01:00
Derek Buitenhuis
f110c624b1
Merge commit ' 9fa888c028'
...
* commit '9fa888c028 ':
intrax8: Keep a reference to the decoder blocks
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:39:44 +01:00
Derek Buitenhuis
c59c792470
Merge commit ' c2084ffcbf'
...
* commit 'c2084ffcbf ':
intrax8: Use the generic horizband function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:37:32 +01:00
Derek Buitenhuis
123fef54cc
Merge commit ' b1268e0f03'
...
* commit 'b1268e0f03 ':
intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:36:54 +01:00
Derek Buitenhuis
578fb5a27d
Merge commit ' d0540fd021'
...
* commit 'd0540fd021 ':
intrax8: Pass macroblock size to ff_intrax8_common_init
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-05-07 21:35:20 +01:00
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Derek Buitenhuis
896fce8509
Merge commit ' 159323897f'
...
* commit '159323897f ':
intrax8: Add a local BlockDSPContext and initialize it
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:36:23 +01:00
Derek Buitenhuis
52692eed61
Merge commit ' 1eaae7abb8'
...
* commit '1eaae7abb8 ':
intrax8: Reference the current AVCodecContext
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:34:58 +01:00
Derek Buitenhuis
50fa5715bc
Merge commit ' 8072345e9f'
...
* commit '8072345e9f ':
intrax8: Keep a reference to the GetBitContext reader
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:34:16 +01:00
Derek Buitenhuis
93c61c980d
Merge commit ' 65f14128c4'
...
* commit '65f14128c4 ':
intrax8: Use a constant buffer instead of a ScratchpadContext
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:33:07 +01:00
Derek Buitenhuis
36dad14693
Merge commit ' eaeba6f241'
...
* commit 'eaeba6f241 ':
intrax8: Pass the output frame to the decoding function
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:32:38 +01:00
Derek Buitenhuis
e5c655b098
Merge commit ' 577393321c'
...
* commit '577393321c ':
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:31:14 +01:00
Derek Buitenhuis
83e0b1b1d7
Merge commit ' 68127e1bf8'
...
* commit '68127e1bf8 ':
intrax8: Keep a reference to the context idctdsp
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:19:53 +01:00
Derek Buitenhuis
627115b3e4
Merge commit ' 65127450ad'
...
* commit '65127450ad ':
intrax8: Make x8_init_block_index not use mpegvideo fields
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:16:16 +01:00
Derek Buitenhuis
1a9ffc59d2
Merge commit ' 922b7e6d86'
...
* commit '922b7e6d86 ':
intrax8: Use local destination buffers
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 12:08:11 +01:00
Michael Niedermayer
76d0209db4
avcodec/intrax8: Remove duplicated chunk from ba5bcf9612
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-18 00:59:18 +02:00
Derek Buitenhuis
9d4799c247
Merge commit ' 8dead2aaca'
...
* commit '8dead2aaca ':
Move const qualifier before type name
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:35:03 +01:00
Derek Buitenhuis
f64b53f2bf
Merge commit ' 0372e73f91'
...
* commit '0372e73f91 ':
intrax8: Check and propagate errors from ff_intrax8_common_init
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:31:32 +01:00
Derek Buitenhuis
c29ac4abb8
Merge commit ' ad8aa8e6c6'
...
* commit 'ad8aa8e6c6 ':
intrax8: Move documentation from implementation to header file
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:30:01 +01:00
Derek Buitenhuis
ba5bcf9612
Merge commit ' 2ade1cdafb'
...
* commit '2ade1cdafb ':
intrax8: K&R formatting cosmetics
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:27:53 +01:00
Derek Buitenhuis
7120bff0a3
Merge commit ' 6f5ff559db'
...
* commit '6f5ff559db ':
intrax8: Adjust printf conversion specifier for sizeof expression
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:13:30 +01:00
Derek Buitenhuis
2c3e38f44f
Merge commit ' 42244ce07a'
...
* commit '42244ce07a ':
intrax8: Move a comment to the place it corresponds
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:11:43 +01:00
Derek Buitenhuis
e445b80c74
Merge commit ' 750562549c'
...
* commit '750562549c ':
intrax8: Wrap multiline macros in do{}while(0) clauses
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:11:17 +01:00
Derek Buitenhuis
909f5e7100
Merge commit ' 0c6a70873f'
...
* commit '0c6a70873f ':
intrax8: Move error resilience out of intrax8
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:09:12 +01:00