Commit Graph

112021 Commits

Author SHA1 Message Date
Andreas Rheinhardt ee77ee77a1 avformat: Remove avformat and avio headers from protocols
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:17:55 +02:00
Andreas Rheinhardt d6afd6c303 avdevice/lavfi: Remove unnecessary avio_internal.h inclusion
The stuff declared in said header is actually unusable in libavdevice.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:17:36 +02:00
Andreas Rheinhardt 7ed8c08821 avformat/teeproto: Remove useless AVClass without options
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:17:14 +02:00
Andreas Rheinhardt 90f444ef74 avformat/dashenc: Avoid relocations for short strings
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:16:54 +02:00
Andreas Rheinhardt c95cdf871c avformat/dashenc: Simplify getting format string
A switch is simpler than a lookup over a table with
three entries, only two of which can happen at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:16:26 +02:00
Andreas Rheinhardt e4ab1b8f70 avformat/dashenc: Add const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:16:09 +02:00
Andreas Rheinhardt b948aa958a avformat/dashenc: Use proper type for AVCodecIDs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:15:53 +02:00
Andreas Rheinhardt a23627ee59 avformat/dashenc: Avoid unnecessary casts
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:15:34 +02:00
llyyr ded4478b8b hevc_ps: fix fixed_rate check
Fixes: fc429d785e

Since fc429d785e splits the fixed_rate
flag into general and within_cvs, check for both.
2023-09-10 20:05:07 +01:00
llyyr 06241c3154 hevc_ps: fix cpb_cnt_minus1 initialization
Fixes: fc429d785e

cpb_cnt used to be initialized to 1 before
fc429d785e so cpb_cnt_minus1 should be
initialized to 0.

Also add +1 to the decode_sublayer_hrd call to account for the change to
the offset
2023-09-10 20:04:56 +01:00
Paul B Mahol 1a87a9d82a avcodec/magicyuvenc: add support for encoding raw slice
Switched to raw slice encoding only if huffman encoding size of slice
is bigger than raw one.
2023-09-10 17:56:04 +02:00
Andreas Rheinhardt 7b6e1fbeb9 avformat/vapoursynth: Add missing inclusion of frame.h
Broken in 0c6e5f321b.
Also add it to decklink_enc.cpp in order not to rely
on an implicit inclusion via libavfilter/ccfifo.h.

Reviewed-by: あんこ <mailcrystaldiskinfo@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 17:32:11 +02:00
Michael Niedermayer ab7d38f970
avcodec/cscd: Fix "CamStudio Lossless Codec 1.0" gzip files
Fixes: tickets/10241/cscd_1_0_306_306_gzip.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-10 16:40:49 +02:00
Michael Niedermayer d2a0464fc2
avcodec/cscd: Check for CamStudio Lossless Codec 1.0 behavior in end check of LZO files
Alternatively the check could be simply made more tolerant
Fixes: Ticket10227

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-10 16:40:49 +02:00
Paul B Mahol c6f0fd2dcd avcodec/magicyuvenc: use last slice height when correlating 2023-09-10 13:53:04 +02:00
Paul B Mahol 3b9e6a7333 avcodec/magicyuvenc: fix correlation buffers size when slices are used 2023-09-10 13:53:04 +02:00
Paul B Mahol fd1574d1ba avcodec/magicyuvenc: remove unnecessary indirection 2023-09-10 13:53:04 +02:00
Paul B Mahol 8c3169fafb avcodec/magicyuvenc: add Slice struct to simplify allocations 2023-09-10 13:53:04 +02:00
Paul B Mahol a716624293 avcodec/magicyuvenc: stop hardcoding max possible align 2023-09-10 13:53:04 +02:00
Paul B Mahol 5c87933e76 avcodec/magicyuvenc: move bit writer to stack 2023-09-10 13:52:59 +02:00
Paul B Mahol 800fbc98a5 avcodec/magicyuvenc: use const for src pointer 2023-09-10 13:51:47 +02:00
Paul B Mahol 4d1b7ff733 avcodec/magicyuvenc: check for allocation return value 2023-09-10 13:51:46 +02:00
Paul B Mahol f832a77231 avcodec/magicyuvenc: ensure no slice slot is left unset 2023-09-10 13:51:39 +02:00
Andreas Rheinhardt 67cc7aaa51 avfilter/buffersrc: Use av_frame_clone() where appropriate
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 11:19:20 +02:00
Andreas Rheinhardt 185d0acdc7 avformat/internal: Avoid casting const away
Fixes many warnings when using -Wcast-qual.

Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 11:18:48 +02:00
Paul B Mahol 5f8c113b75 avformat/flacdec: set time base for headerless flac
Fixes #6396.
2023-09-09 12:09:49 +02:00
Paul B Mahol e6923e06c2 avcodec/hcadec: small refactoring 2023-09-09 12:09:30 +02:00
Paul B Mahol dcd92aa01a avcodec/hcadec: do not hardcode max number of channels 2023-09-09 12:09:29 +02:00
Andreas Rheinhardt a234e5cd80 fate/mpegps: Fix argument order
Regression since fb548fba04.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-08 15:48:21 +02:00
James Almer fb548fba04 avcodec/av1dec: export pixel format even if no hardware decoder is present
And remove the AVOID_PROBING flag, given it's the last av1 decoder to be tested
either way.
This fixes a regression introduced in 1652f2492f,
where even if forcing the native av1 decoder, if another decoder was present,
like libdav1d or libaom-av1, they'd be used for probing and some fate tests
would have different results.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-09-08 09:42:25 -03:00
Lynne 398467f519
vulkan_decode: convert max level from vulkan to av for comparisons 2023-09-08 06:56:43 +02:00
Lynne 00e77fd21a
lavu/tx: add missing prints for the type of dctI/dstI 2023-09-08 06:56:39 +02:00
Michael Niedermayer d5cc9d8dd9
avcodec/vmixdec: Check for end of input in decode_dcac()
Fixes: Timeout
Fixes: 59952/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMIX_fuzzer-6718213736759296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-08 01:32:30 +02:00
Michael Niedermayer d48476183f
avcodec/mpeg4videodec: consider lowres in dest_pcm[]
Fixes: out of array access
Fixes: 59999/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5767982157266944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-08 01:32:30 +02:00
Michael Niedermayer 94bd1796ff
avcodec/hevcdec: Fix undefined memcpy()
There is likely a better way to fix this, this is mainly to show the problem

Fixes: MC within same frame resulting in overlapping memcpy()
Fixes: 60189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4992746590175232
Fixes: 61753/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5022150806077440
Fixes: 58062/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4717458841010176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-09-08 01:32:29 +02:00
Paul B Mahol 929eb72876 fate: add forgotten rpza reference test 2023-09-07 22:57:01 +02:00
Andreas Rheinhardt 44dcc4d606 avfilter/blend_modes: Always preserve constness
These casts cast const away temporarily; they are safe, because
the pointers that are initialized point to const data. But this
is nevertheless not nice and leads to warnings when using
-Wcast-qual. blend_modes.c generates 546 (2*39*7) such warnings
which is the majority of such warnings for FFmpeg as a whole.
vf_blend.c and vf_blend_init.h also use this pattern;
they have also been changed.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt 29c6f4329a avfilter/vf_varblur: Don't use pointer-to-const for destination
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt e34d5d1e3b avcodec/tiff: Don't cast const away
lzma_stream.next_in is const for more than 15 years now
and has been so in every release of liblzma.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt 6378a6b3fe avfilter/vsrc_testsrc: Don't use const uint8_t* when pointee changes
The const makes no sense and is later cast away.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt bdccb27ba4 avfilter/vf_vif: Don't cast const away unnecessarily
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt 2f9a33995a avcodec/v210dec: Don't cast const away
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Paul B Mahol 74375305ef fate: add rpza encoder tests 2023-09-07 20:58:08 +02:00
Paul B Mahol 03ed48aeca avcodec/rpzaenc: replace float-point calculations with integer ones 2023-09-07 20:58:08 +02:00
Paul B Mahol b97ac6b3df avcodec/utvideodec: fix possible write past end of array 2023-09-07 12:27:34 +02:00
Paul B Mahol 9c9f48e7f2 avcodec/smcenc: remove useless cast 2023-09-07 11:21:23 +02:00
Andreas Rheinhardt fd9bafc85e avfilter/f_select: Also deprecate "pos" variable name
Forgotten in 27f8c9b27b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:49:25 +02:00
Andreas Rheinhardt 41f1921f74 avfilter/af_volume: Also deprecate position enum value
Forgotten in 27f8c9b27b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:49:25 +02:00
Andreas Rheinhardt de73accd39 avcodec/vp8data: Use <> for inclusion of stdint.h
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:49:11 +02:00
Andreas Rheinhardt e999a09f19 all: Replace __FUNCTION__ by __func__
Only the latter is valid ISO C.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:48:50 +02:00