Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 390646659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_OSQ_fuzzer-5040277374435328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: division by zero
Fixes: 391981061/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6691017763389440
Fixes: 392929028/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5142088307507200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Since 45eeb1f785
optimal Huffman tables are the default (without slice-threading).
This made the fate-vsynth*-mjpeg-{trell-,}-huffman tests
identical to their corresponding tests without "-huffman".
This is of course wasteful, so switch the two tests with
"-huffman" counterparts back to the default tables.
Also use one of these tests to test slice threaded encoding.
It has so far been untested.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Given that there are actually ASM functions of this type,
one can't simply remove the ff_ prefix from the definitions
and declare them as static. Yet one can do nearly that
if one keeps the ff_ prefix and removes the declarations
for the (now static) functions defined in dsp_init.c
from hevcdsp.h and if one defines the functions in the correct
order (smaller width first) so that no forward declarations
are necessary (which was already true).
The new declarations avoid nested macros to simplify things.
It nevertheless turned out to be beneficial line-wise.
(It would be possible to avoid most of these declarations:
It is legal to repeat a function declaration without static
if the first declaration declared a function as static.
So if the macros simply declared all the functions that
they call, one could avoid declarations for the functions
that are called. While this is legal C, it unfortuntaly
clashes with GCC's -Wredundant-decls (which configure enables)
and it is also ugly, as these macro definitions would
provide declarations used in ff_hevc_dsp_init_x86().)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Both GCC and Clang use unsigned as underlying type of
an enum with no negative enumeration constants, making
checks like "layout->order >= 0" here tautologically true.
Clang warns about this. Combine both range checks
by casting to unsigned to suppress this warning.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This also means that if a plane*slice has only 1 color nothing
is stored after the remap table
This also corrects the RCT offset to the exact value after remap
not a fixed 65536
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Fixes https://trac.ffmpeg.org/ticket/6949
Ordinary text frames in ID3v2 are allowed to have multiple
(null-separated) values. This technically isn't allowed in TXXX,
but it's used in practice by Picard, and supporting it is harmless.
TIPL/IPL (Involved People List) and TMCL (Musician Credits List) work
similarly to TXXX, but alternate key-value-key-value.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This is useful when multiple metadata inputs may set the same value
(e.g. both a container-specific header and an ID3 tag).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Process data in chunks of four or eight bytes, depending on host, instead of
one at a time.
before:
55561 decicycles in av_aes_ctr_crypt
after:
52204 decicycles in av_aes_ctr_crypt
Signed-off-by: James Almer <jamrial@gmail.com>
The test in its current form is just ensuring the plain text output is the same
as the plain text input, not bothering to check if anything was done with the
latter. av_aes_ctr_crypt() could be a simple memcpy under the hood and this
test would still succeed.
To check the integrity of the encrypted buffer, both the IV and the key need to
be fixed. As such, and in order to not remove the existing randomization of the
input IV, do two runs, one with random initialization data, and one with static
data.
Signed-off-by: James Almer <jamrial@gmail.com>