Hendrik Leppkes
6dd5f95093
avformat/flvdec: fix size desync when reading timestamp offsets
...
The size offset was previously being accounted for in flv_set_video_codec
for h264 and mpeg4, instead of being directly accounted for in the spot
where its read, which desynced on HEVC streams.
For clarity, move the size offset directly to the parsing, similar to
how its done for all other header fields.
2 years ago
Timo Rothenpieler
f8035bc426
avformat/flvenc: write proper timestamps when muxing hevc
2 years ago
Paul B Mahol
60244d0bec
avfilter/af_afir: fix possible array read-overflow
2 years ago
Paul B Mahol
9fb2efe3b3
avfilter/avf_showcwt: make read only variable const
2 years ago
Andreas Rheinhardt
6e5e74c55b
avcodec/evc*: Improve included headers
...
In particular, don't include avcodec.h in evc_frame_merge_bsf.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
3fe98db7bb
avcodec/vvc_mp4toannexb_bsf: Improve included headers
...
A BSF should never include avcodec.h at all.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Haihao Xiang
5b11ee9429
lavd/opengl_enc: fix a compiler error
...
glcontext was added under CONFIG_SDL2
libavdevice/opengl_enc.c: In function ‘opengl_draw’:
libavdevice/opengl_enc.c:1204:15: error: ‘OpenGLContext’ has no member
named ‘glcontext’
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2 years ago
Wenbin Chen
13f49a7c62
libavfilter/vf_dnn_detect: bbox index may bigger than bbox number
...
Fix a bug that queried bbox index may bigger than bbox's total number.
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2 years ago
Michael Niedermayer
87f76d3bee
avcodec/aacdec_template: Fix undefined signed interger operations
...
Fixed: signed integer overflow: -2 * -1085502286 cannot be represented in type 'int'
Fixed: 57986/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5123651145170944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
40cec0b465
avcodec/wavarc: Fix k limit
...
The implementation does not support k=32
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 57976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5911925807775744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Andreas Rheinhardt
071c625ad7
fftools/ffmpeg_opt: Reduce scope of variables for deprecated code
...
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
8bb1bcf47d
fftools/ffmpeg_opt: Fix leak on error
...
Fixes Coverity id #1539096 .
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
0368ded1a9
fftools/opt_common: Fix leak on error
...
Fixes Coverity issue #743443 .
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
2654347d7a
fftools/ffmpeg_opt: Fix leak on error
...
Fixes Coverity issue #1539097 .
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
2a44c4bc9e
fftools/ffmpeg_mux_init: Fix leak on error
...
Fixes Coverity issue #1539098 .
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Niklas Haas
e9e37ea2f1
avfilter/vf_libplacebo: fix skip_aa option range
...
Max incorrectly specified as 0, should be 1.
2 years ago
Zhao Zhili
89f5124d0a
avfilter: add transpose_vt for videotoolbox pix_fmt
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2 years ago
Zhao Zhili
c2c96c4c24
avfilter: add scale_vt for videotoolbox pix_fmt
...
For example,
./ffmpeg -hwaccel videotoolbox \
-hwaccel_output_format videotoolbox_vld \
-i ios-265.mov \
-c:v hevc_videotoolbox \
-profile:v main \
-b:v 3M \
-vf scale_vt=w=iw/2:h=ih/2:color_matrix=bt709:color_primaries=bt709:color_transfer=bt709 \
-c:a copy \
-tag:v hvc1 \
/tmp/test.mp4
Input: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160
Output: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709, progressive), 1920x1080
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2 years ago
Zhao Zhili
6c90fcd9e6
avcodec/videotoolboxenc: use color parameters conversion from avutil
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2 years ago
Paul B Mahol
b2ceed406b
avfilter/avf_showcwt: reduce memory usage
2 years ago
Rémi Denis-Courmont
f25ad0fe02
checkasm: improve Linux perf error message
...
Report the failing system call name, as is convention, rather than just
a rather unhelpful "syscall".
2 years ago
Rémi Denis-Courmont
983af74452
macos_kperf: fix incomplete prototype
2 years ago
Rémi Denis-Courmont
c644aabec8
timer: don't leak perf FD if zero
2 years ago
Paul B Mahol
ffa3edbf51
avfilter/avf_showcwt: extend min frequency accepted range
...
Also always check that min frequency is lower than max frequency.
2 years ago
Paul B Mahol
c24c7bcc95
avfilter/avf_showcwt: no need for big forward FFT with small sample rates
2 years ago
Paul B Mahol
e6168e43a2
avfilter/avf_showcwt: improve analysis
...
Make inverse FFT step always power of 2 in size.
2 years ago
Michael Niedermayer
c41ab871c7
avformat/id3v2: Free buffer in decode_str()
...
Fixes: memleak
Fixes: 60058/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5665259244093440
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
f9b29451e4
avcodec/rka: Fix integer overflow in decode_filter()
...
Fixes: signed integer overflow: 2147443649 + 65535 cannot be represented in type 'int'
Fixes: 60054/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5095674572832768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
167b4f56f1
avformat/rka: bps < 8 is invalid
...
Fixes: division by zero
Fixes: 57828/clusterfuzz-testcase-minimized-ffmpeg_dem_RKA_fuzzer-6571818338353152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
fd5aa93a37
avcodec: Rename ff_kbd_window_init() as it will be needed from outside libavcodec
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
cf00f60bab
avcodec/kbdwin: Support arbitrary sized windows
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
94d44dbe21
avcodec/pcm: allow Changing parameters
...
SDR needs this for switching between mono and stereo stations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Michael Niedermayer
8f48a62151
avutil/tx_template: extend to 2M
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2 years ago
Kieran Kunhya
a4e616824b
libavutil: Remove TOMI CPU
2 years ago
Rémi Denis-Courmont
c2b38619c0
swscale/rgb2rgb2: rework RISC-V V shuffle_bytes_{1230,3012}
...
This avoids strided loads.
Before:
shuffle_bytes_1230_rvv_i32: 308.7
shuffle_bytes_3012_rvv_i32: 308.7
After:
shuffle_bytes_1230_rvv_i32: 46.7
shuffle_bytes_3012_rvv_i32: 46.7
2 years ago
Rémi Denis-Courmont
15982554e6
swscale/rgb2rgb2: rework RISC-V V shuffle_bytes_{0321,2103}
...
This avoids strided loads.
Before:
shuffle_bytes_0321_rvv_i32: 307.7
shuffle_bytes_2103_rvv_i32: 308.7
After:
shuffle_bytes_0321_rvv_i32: 59.7
shuffle_bytes_2103_rvv_i32: 61.5
2 years ago
Rémi Denis-Courmont
d3948e4db5
swscale: inline ff_shuffle_bytes_3210_rvv
...
No functional changes.
2 years ago
Lynne
e6a12a5214
vulkan_av1: remove an invalid debug print
...
Leftover.
2 years ago
Lynne
3e3d46309b
lavu/vulkan: remove unused field from the execution pool structure
2 years ago
Lynne
97890c2b55
lavu/vulkan: remove threadsafe buffer index load and fix a signed overflow
...
It's not needed anymore.
2 years ago
Lynne
c06ad641ec
lavc/vulkan_decode: use a single execution pool per thread
...
The spec says command buffer pools must be externally synchronized
objects.
This still lets us pool some, just not as much.
2 years ago
Jan Beich
e6bd8b1323
hwcontext_vulkan: hide Linux-only header after 571756bf2f
...
major/minor are in <sys/types.h> on BSDs and <sys/mkdev.h> on Solaris-like.
libavutil/hwcontext_vulkan.c:55:10: fatal error: 'sys/sysmacros.h' file not found
#include <sys/sysmacros.h>
^~~~~~~~~~~~~~~~~
2 years ago
Paul B Mahol
74474a551b
avfilter/avf_showcwt: fix index storing
2 years ago
Paul B Mahol
86a1904f41
avfilter/avf_showcwt: move variables out of loop
2 years ago
Paul B Mahol
3dc93acc56
avfilter/vf_pseudocolor: add four more presets
2 years ago
Rémi Denis-Courmont
44cac1def0
lavc/audiodsp: rework RISC-V V scalar product
...
Take vector reduction out of the loop and unroll.
Before:
audiodsp.scalarproduct_int16_c: 12321.0
audiodsp.scalarproduct_int16_rvv_i32: 4175.7
After:
audiodsp.scalarproduct_int16_c: 12320.5
audiodsp.scalarproduct_int16_rvv_i32: 1230.2
2 years ago
Rémi Denis-Courmont
29b9d616c2
lavu/float_dsp: rework RISC-V V scalar product
...
1) Take the reductive sum out of the loop,
leaving a regular vector addition in the loop.
2) Merge the addition and the multiplication.
3) Unroll.
Before:
scalarproduct_float_rvv_f32: 832.5
After:
scalarproduct_float_rvv_f32: 275.2
2 years ago
Rémi Denis-Courmont
b710f881ce
lavu/float_dsp: unroll RISC-V V loops
...
butterflies_float_c: 1057.0
butterflies_float_rvv_f32: 351.0 (before)
butterflies_float_rvv_f32: 329.5 (after)
vector_dmac_scalar_c: 819.0
vector_dmac_scalar_rvv_f64: 670.5 (before)
vector_dmac_scalar_rvv_f64: 431.0 (after)
vector_dmul_c: 800.2
vector_dmul_rvv_f64: 541.5 (before)
vector_dmul_rvv_f64: 426.0 (after)
vector_dmul_scalar_c: 545.7
vector_dmul_scalar_rvv_f64: 670.7 (before)
vector_dmul_scalar_rvv_f64: 324.7 (after)
vector_fmac_scalar_c: 804.5
vector_fmac_scalar_rvv_f32: 412.7 (before)
vector_fmac_scalar_rvv_f32: 214.5 (after)
vector_fmul_c: 811.2
vector_fmul_rvv_f32: 285.7 (before)
vector_fmul_rvv_f32: 214.2 (after)
vector_fmul_add_c: 1313.0
vector_fmul_add_rvv_f32: 349.0 (before)
vector_fmul_add_rvv_f32: 290.2 (after)
vector_fmul_reverse_c: 815.7
vector_fmul_reverse_rvv_f32: 529.2 (before)
vector_fmul_reverse_rvv_f32: 515.7 (after)
vector_fmul_scalar_c: 546.0
vector_fmul_scalar_rvv_f32: 350.2 (before)
vector_fmul_scalar_rvv_f32: 169.5 (after)
2 years ago
Rémi Denis-Courmont
effadce6c7
avcodec/x86/mathops: clip constants used with shift instructions within inline assembly
...
Fixes assembling with binutil as >= 2.41
Signed-off-by: James Almer <jamrial@gmail.com>
2 years ago
Anton Khirnov
ccc6849932
fftools/ffmpeg: stop calling exit_program()
...
Remove exit_program() and register_exit(), as they are no longer used.
2 years ago