Paul B Mahol
2bc65003e2
avcodec: AC-4 codec registration
2023-06-20 01:11:31 +02:00
James Almer
7ff3dce29a
avcodec/evc_parse: use get_bits1() where useful
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 19:43:17 -03:00
James Almer
5b372c7ff2
avcodec/evc_ps: use get_bits1() where useful
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 19:43:12 -03:00
James Almer
377da83b99
avcodec/evc_ps: check valid range for a few more elements
...
Should prevent overreads on non spec comformant input.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 17:21:14 -03:00
James Almer
199fc04d09
avcodec/evc_ps: use get_bits_long() where needed
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 16:25:13 -03:00
Michael Niedermayer
89f98acbf8
avcodec/evc_ps: Check log2_sub_gop_length
...
Fixes: 1.70141e+38 is outside the range of representable values of type 'int'
Fixes: 59883/clusterfuzz-testcase-minimized-ffmpeg_BSF_EVC_FRAME_MERGE_fuzzer-5557887217565696
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 16:00:55 -03:00
James Almer
921596e677
avcodec/evc_ps: make ff_evc_parse_{sps,pps} return an error code
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 16:00:55 -03:00
James Almer
5cb9ef9300
avcodec/evc_parse: remove ff_evc_parse_nal_unit()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
56e52e870d
avcodec/evc_frame_merge_bsf: make ff_evc_parse_nal_unit() local to the filter
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
fdd8daf899
avcodec/evc_parser: remove write only variable
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
a5663f2d9a
avcodec/evc_parser: make ff_evc_parse_nal_unit() local to the parser
...
This is in preparation for the following commits.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
ff7a4cdf04
avcodec/evc_parse: split off deriving PoC
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
f7e0af5edc
avcodec/evc_parser: stop exporting delay and gop_size
...
The former is a property a decoder may export, and the latter is only
used in encoding scenarios.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
1e189fed7a
avcodec/evc_parse: split off Parameter Set parsing into its own file
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
8ab706677c
avcodec/evc_frame_merge_bsf: use av_new_packet()
...
This ensures the buffer is padded as required by the AVPacket API.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
James Almer
96fc192733
avcodec/evc_frame_merge: use av_fast_realloc()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-19 12:57:31 -03:00
Zhao Zhili
f66e1862e3
avcodec/videotoolboxenc: inherit profile from AVCodecContext
...
This can happen when user set the avctx->profile field directly
instead of specify profile via option.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
3fafc842f1
avcodec/videotoolboxenc: remove AUTO_PROFILE define
...
Use FF_PROFILE_UNKNOWN as auto mode.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
315c66af0f
avcodec/videotoolboxenc: use int as the type of profile
...
Other than save a few bytes, it also has the benefit to show the
AV_OPT_TYPE_CONST value in help, e.g.,
-profile <int> E..V....... Profile (from 0 to INT_MAX) (default 0)
baseline 66 E..V....... Baseline Profile
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:37 +08:00
Zhao Zhili
fb85aa959a
avcodec/mediacodecenc: add profile names to options
...
H.264 high10/high422/high44 are unlikely supported by devices.
It's there for developers to do the experiment.
H.265 main10 works on my device with AV_PIX_FMT_MEDIACODEC.
OMX_COLOR_FormatYUV420Planar16 doesn't work.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com >
2023-06-19 12:19:29 +08:00
Zhao Zhili
4a00cd4fe3
avcodec/filter_units_bsf: reindent after previous commit
2023-06-19 11:52:18 +08:00
Zhao Zhili
dfa0e24e98
avcodec/filter_units_bsf: add skip frame support
2023-06-19 11:52:18 +08:00
Zhao Zhili
4144584010
avcodec/cbs_h2645: add discard_unit implementation for H.265
2023-06-19 11:52:18 +08:00
Zhao Zhili
e7cde0cbd5
avcodec/cbs_h2645: add discarded_unit implementation for H.264
2023-06-19 11:52:18 +08:00
Zhao Zhili
a8aeab107e
avcodec/cbs: add API to discard units by AVDiscard
2023-06-19 11:52:18 +08:00
Michael Niedermayer
6f2cf88771
avcodec/hevc_refs: Check that nb_refs stays <= HEVC_MAX_REFS
...
Fixes: 58528/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5834725318328320
Fixes: index 16 out of bounds for type 'int [16]'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:13 +02:00
Michael Niedermayer
a0f4d4e650
avcodec/hevcdec: Avoid null pointer dereferences in MC
...
Fixes: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffff8
Fixes: 58440/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5956015530311680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:13 +02:00
Michael Niedermayer
ff8a496d41
avcodec/takdsp: Fix integer overflows
...
Fixes: avcodec/takdsp.c:44:23: runtime error: signed integer overflow: -2097158 - 2147012608 cannot be represented in type 'int'
Fixes: 58417/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5268919664640000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
adfe003f51
avcodec/mpegvideo_dec: Add NULL pointer checks to MPV_motion_lowres()
...
This makes the null pointer checks match mpv_motion_internal()
Fixes: NULL pointer dereference
Fixes: 59671/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-4993004566609920
Fixes: 59678/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEGVIDEO_fuzzer-4893168991338496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
d7d3f1af2a
avcodec/mpegvideo_dec: consider interlaced lowres 4:2:0 chroma in edge emulation check better
...
Fixes: out of array read
Fixes: 59673/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5194311374077952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:12 +02:00
Michael Niedermayer
e736238b35
avcodec/rka: use unsigned for buf0 additions
...
Fixes: signed integer overflow: -38912000 + -2109276160 cannot be represented in type 'int'
Fixes: 59670/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-4987563245699072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Michael Niedermayer
1ee303f1e1
avcodec/rka: Avoid undefined left shift
...
Fixes: left shift of 34136248 by 6 places cannot be represented in type 'int'
Fixes: 58429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5692211592560640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Michael Niedermayer
fead656a7b
avcodec: Ignoring errors is only possible before the input end
...
Fixes: out of array read
Fixes: Ticket 10308
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2023-06-18 14:29:11 +02:00
Anton Khirnov
593e8c2c6a
lavc/binkaudio: reset input packet on errors
...
Make sure we don't repeatedly try to decode the same packet, making no
progress and possibly causing an infinite loop.
2023-06-17 18:06:33 +02:00
James Almer
dbc4c22890
avcodec/evc_parse: add missing includes
...
Fixes make checkheaders.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 12:43:15 -03:00
James Almer
f24064e627
avcodec/evc_frame_merge_bsf: free EVCFMergeContext on flush and close
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
b1d0b59d81
avcodec/evc_frame_merge_bsf: check for av_memdup() failure
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
9fc1d9adc8
avcodec/evc_parse: make freeing EVCParserContext buffers a shared function
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
46a9be01b8
avcodec/evc_parse: free pps struct on parsing failure
...
Prevents future checks for their presence from succeeding.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
811460f5c2
avcodec/evc_parse: use the correct sps when parsing slice headers
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
44f26315c8
avcodec/evc_parse: use a local EVCParserSliceHeader when parsing slices
...
There's no need to store EVC_MAX_PPS_COUNT amount of slice headers in EVCParserContext.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
57879b23bc
avcodec/evc_parse: zero sps, pps and sh structs
...
Otherwise stale values may remain in place.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:54 -03:00
James Almer
da2af70ffa
avcodec/evc_parser: export framerate to the AVCodecContext
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-17 10:08:53 -03:00
Timo Rothenpieler
16fdb48e0d
avcodec/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
2023-06-16 22:10:42 +02:00
Timo Rothenpieler
6c418ae25e
Revert "lavc/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE"
...
The implementation is flawed in that the frame opaque data is not in
fact correctly reordered along with the packets, but is being output in
packet input order, just like the dts are.
This reverts commit 3553809703 .
2023-06-16 22:10:42 +02:00
Philip Langdale
73a2252f1d
avfilter/vf_bwdif_cuda: CUDA accelerated bwdif deinterlacer
...
I've been sitting on this for 3 1/2 years now(!), and I finally got
around to fixing the loose ends and convincing myself that it was
correct. It follows the same basic structure as yadif_cuda, including
leaving out the edge handling, to avoid expensive branching.
2023-06-16 12:52:32 -07:00
James Almer
f42df8384a
avcodec/evc_parse: use the correct struct size when allocating pps
...
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-16 10:08:32 -03:00
James Almer
d00f0eebbd
avcodec/evc_parser: remove superfluous memset calls
...
The entire EVCParserContext will be zeroed during allocation.
Signed-off-by: James Almer <jamrial@gmail.com >
2023-06-16 09:57:35 -03:00
Lynne
ca818ab51c
vulkan_h264: filter out constrained/inter flags from the profile index
...
As the comment says, Vulkan signals all the constrant_set flags,
and does not want them OR'd onto the profile IDC.
So just unset them.
2023-06-15 22:00:42 +02:00
Dave Airlie
6964a97f91
vulkan/av1: fix filling out global motion params.
2023-06-15 22:00:41 +02:00