James Almer
5acec189af
checkasm/flacdsp: add a test for wasted32
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-12 17:24:08 -03:00
James Almer
1ba5287697
avcodec/flacdsp: split off wasted bit handling into dsp functions
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-12 17:23:58 -03:00
James Almer
c00c8679ed
x86/flacdsp: add a SSE4 version of lpc16
...
flac_lpc_16_13_c: 2841.3
flac_lpc_16_13_sse4: 2151.8
flac_lpc_16_16_c: 3382.8
flac_lpc_16_16_sse4: 2228.3
flac_lpc_16_29_c: 5800.3
flac_lpc_16_29_sse4: 3727.3
flac_lpc_16_32_c: 5972.8
flac_lpc_16_32_sse4: 4052.3
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-12 12:54:19 -03:00
James Almer
479d26cea2
checkasm/flacdsp: sanitize lpc arguments
...
Fixes signed integer overflows as reported by ubsan.
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-12 12:36:46 -03:00
James Almer
467d84a06d
checkasm/flacdsp: run lpc benchmarks with an unmodified buffer
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-12 12:36:46 -03:00
Yotam Ofek
02c032abcd
avcodec/aacenc_tns: remove unreachable code branch
...
the condition being tested was the same as the stop condition for the containing loop,
so inside the loop it would always test positive
2024-05-12 16:01:44 +02:00
Rémi Denis-Courmont
0d9591841b
lavc/ac3dsp: add R-V Zvbb extract_exponents
2024-05-11 11:38:49 +03:00
Rémi Denis-Courmont
5d8f62feb5
lavu/riscv: add Zvbb CPU capability detection
...
This requires Linux kernel version 6.8 or later.
2024-05-11 11:38:49 +03:00
Rémi Denis-Courmont
01c5f4ad9f
riscv: add Zvbb vector bit manipulation extension
2024-05-11 11:38:49 +03:00
sunyuechi
11f689317d
checkasm: Fix h264chroma test name
...
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-11 11:36:20 +03:00
Ramiro Polla
250c0defa2
checkasm: add test for fdct
...
Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-11 10:28:59 +02:00
Ramiro Polla
b8af0809fb
libavcodec/mpegvideo_enc: fix multi-threaded motion estimation rounding for mpeg4
...
ff_init_me() was being called after ff_update_duplicate_context(),
which caused the propagation of the initialization to other thread
contexts to be delayed by one frame.
In the case of mpeg4 (or flipflop_rounding), this would make the
hpel_put functions differ between the first thread (which would be
correctly initialized) and the other threads (which would be stale
from the previous frame).
2024-05-11 10:13:58 +02:00
Ramiro Polla
713c6eba8d
libavcodec/motion_est: fix penalty_factor for b frames
...
In direct_search() and ff_estimate_b_frame_motion(), penalty_factor
would be used before being initialized in estimate_motion_b(). Also,
the initialization would happen more than once unnecessarily.
2024-05-11 09:38:34 +02:00
Haihao Xiang
ceace488ff
lavc/vaapi_encode_av1: insert HDR_CLL metadata if have
...
Only look for HDR_CLL on key frame on the output.
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2024-05-11 15:21:57 +08:00
Haihao Xiang
0bdf71ada7
lavc/vaapi_encode_av1: Insert HDR_MDCV metadata if have
...
Only look for HDR_MDVC on key frame on the output.
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2024-05-11 15:21:57 +08:00
Haihao Xiang
7f3ba6bbfa
lavc/vaapi_encode_av1: implement write_extra_header callback
...
This can be used to insert a metadata OBU to the stream later.
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2024-05-11 15:21:57 +08:00
Niklas Haas
9c6c4f3d47
avcodec/libaomenc: properly clean up image metadata
...
This does not get consumed by aom_codec_encode().
2024-05-11 01:25:15 +02:00
Rémi Denis-Courmont
5afe734b6d
lavu/riscv: remove bespoke assembler for MIN
...
This is no longer necessary as Zbb is now always explicitly required.
2024-05-10 18:59:06 +03:00
Rémi Denis-Courmont
6c6313f1b5
swscale/riscv: explicitly require Zbb for MIN
2024-05-10 18:59:06 +03:00
Rémi Denis-Courmont
c07af340ae
lavc/riscv: explicitly require Zbb for MIN
2024-05-10 18:59:06 +03:00
Rémi Denis-Courmont
89029baebd
lavu/riscv: allow requesting a second extension
2024-05-10 18:59:06 +03:00
sunyuechi
6e77af1c22
lavc/vp8dsp: R-V V put_epel v
...
C908:
vp8_put_epel4_v4_c: 11.0
vp8_put_epel4_v4_rvv_i32: 5.0
vp8_put_epel4_v6_c: 16.5
vp8_put_epel4_v6_rvv_i32: 6.2
vp8_put_epel8_v4_c: 43.7
vp8_put_epel8_v4_rvv_i32: 11.2
vp8_put_epel8_v6_c: 68.7
vp8_put_epel8_v6_rvv_i32: 13.2
vp8_put_epel16_v4_c: 92.5
vp8_put_epel16_v4_rvv_i32: 13.7
vp8_put_epel16_v6_c: 135.7
vp8_put_epel16_v6_rvv_i32: 16.5
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-10 18:41:13 +03:00
sunyuechi
109daea619
lavc/vp8dsp: R-V V put_epel h
...
C908:
vp8_put_epel4_h4_c: 10.7
vp8_put_epel4_h4_rvv_i32: 5.0
vp8_put_epel4_h6_c: 15.0
vp8_put_epel4_h6_rvv_i32: 6.2
vp8_put_epel8_h4_c: 43.2
vp8_put_epel8_h4_rvv_i32: 11.2
vp8_put_epel8_h6_c: 57.5
vp8_put_epel8_h6_rvv_i32: 13.5
vp8_put_epel16_h4_c: 92.5
vp8_put_epel16_h4_rvv_i32: 13.7
vp8_put_epel16_h6_c: 139.0
vp8_put_epel16_h6_rvv_i32: 16.5
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-10 18:41:13 +03:00
sunyuechi
538f217bbb
lavc/vp8dsp: R-V V put_bilin_hv
...
C908:
vp8_put_bilin4_hv_c: 561.0
vp8_put_bilin4_hv_rvv_i32: 232.7
vp8_put_bilin8_hv_c: 2162.7
vp8_put_bilin8_hv_rvv_i32: 506.7
vp8_put_bilin16_hv_c: 4769.7
vp8_put_bilin16_hv_rvv_i32: 556.7
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-10 18:41:13 +03:00
sunyuechi
bb5039b3cb
lavc/vp8dsp: R-V V put_bilin_h v
...
C908:
vp8_put_bilin4_h_c: 367.0
vp8_put_bilin4_h_rvv_i32: 137.7
vp8_put_bilin4_v_c: 377.0
vp8_put_bilin4_v_rvv_i32: 137.7
vp8_put_bilin8_h_c: 1431.0
vp8_put_bilin8_h_rvv_i32: 297.5
vp8_put_bilin8_v_c: 1449.0
vp8_put_bilin8_v_rvv_i32: 297.5
vp8_put_bilin16_h_c: 2839.0
vp8_put_bilin16_h_rvv_i32: 344.7
vp8_put_bilin16_v_c: 2857.0
vp8_put_bilin16_v_rvv_i32: 344.7
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-10 18:41:13 +03:00
sunyuechi
0b8e5e5a00
lavc/vp8dsp: R-V put_vp8_pixels
...
C908:
vp8_put_pixels4_c: 78.0
vp8_put_pixels4_rvi: 33.7
vp8_put_pixels8_c: 278.0
vp8_put_pixels8_rvi: 55.0
vp8_put_pixels16_c: 999.0
vp8_put_pixels16_rvi: 86.7
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2024-05-10 18:41:13 +03:00
Michael Niedermayer
d7924a4f60
avcodec/cbs_av1: Avoid shift overflow
...
Fixes: CID1465488 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:40 +02:00
Michael Niedermayer
f44f441555
fftools/ffplay: Check return of swr_alloc_set_opts2()
...
This probably makes no difference but its more correct
Fixes: CID1503080 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:40 +02:00
Michael Niedermayer
ba7038043a
tools/opt_common: Check for malloc failure
...
Fixes: CID1539100 Negative loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:40 +02:00
Michael Niedermayer
91d27f7e02
doc/examples/demux_decode: Simplify loop
...
Fixes: CID1463550 Logically dead code
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:39 +02:00
Michael Niedermayer
a5d1497f33
avformat/concatdec: Check file
...
Fixes: null pointer dereference
Fixes: -stream_loop 1 -ss 00:00:05 -i zgclab/ffmpeg_crash/poc2 -codec:v copy -codec:a aac -y output.mp4
Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:39 +02:00
Michael Niedermayer
24bd01ea65
tools/target_enc_fuzzer: Only read pix_fmts if its set
...
Fixes: null pointer dereference
Fixes: rawvideo encoder
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:39 +02:00
Michael Niedermayer
c2918eb88e
tools/target_enc_fuzzer: replace assert by clean exit
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-09 16:17:38 +02:00
Dawid Kozinski
e4da96c6b2
avformat/evc: Small fixes in documentation
...
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2024-05-09 10:06:38 -03:00
Andreas Rheinhardt
6fa967810d
tests/checkasm/svq1enc: Use proper range for input
...
ssd_int8_vs_int16 is only called from encode_block()
in svq1enc.c; it calls it in stages: At stage 0,
the int16_t array contains the difference of two
uint16_t. At each of the following stages, the
int16_t array is filled by subtracting an int8_t from
the current stage's int16_t array. The maximum stage
is five, so the int16_t are in the range
(-255 - 5 * 127)..(255 + 5 * 128).
This commit modifies the checkasm test to only use
values from this range, fixing (undefined) integer overflow
in the test.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-09 13:40:18 +02:00
Andreas Rheinhardt
ebe78e3ef0
avfilter/af_volume: Don't free options manually
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-05-09 13:18:32 +02:00
Dawid Kozinski
e8e84dc325
avcodec/evc: Reference to ISO_IEC_23094-1-2020 document section for EVC_MAX_APS_COUNT enum has been fixed
...
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2024-05-08 21:15:05 -03:00
Dawid Kozinski
73d338d47c
avformat/avi: Added EVC codec tag to the list of supported codec_id-codec_tag pairs for AVI muxer
...
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2024-05-08 21:15:05 -03:00
Dawid Kozinski
cf45526a0d
avcodec/bitstream_filters: Declaration of the ff_evc_frame_merge_bsf variable has been moved to the appropriate following the alphabetical order
...
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2024-05-08 21:15:05 -03:00
Dawid Kozinski
0797651c12
avcodec/evc: Set the AV_FRAME_FLAG_KEY flag for a decoded frame when the decoded packet contains a keyframe
...
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
2024-05-08 21:14:56 -03:00
James Almer
214cbe29dc
x86/blockdsp: add sse2 and avx2 versions of fill_block_tab
...
blockdsp.fill_block_tab[0]_c: 34.1
blockdsp.fill_block_tab[0]_sse2: 11.1
blockdsp.fill_block_tab[0]_avx2: 10.1
blockdsp.fill_block_tab[1]_c: 10.1
blockdsp.fill_block_tab[1]_sse2: 6.1
blockdsp.fill_block_tab[1]_avx2: 5.6
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-08 21:13:23 -03:00
James Almer
b6054e57cb
checkasm/blockdsp: use smallest allowed aligned buffers for fill_block_tab tests
...
The requirement is either 8 or 16 bytes alignment, not 32.
This should help finding bugs in asm implementations.
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-08 21:13:23 -03:00
James Almer
febd9271fc
checkasm/blockdsp: don't randomize the buffers for fill_block_tab
...
It ignores and overwrites the previous values.
Fixes running the test under ubsan.
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-08 21:13:23 -03:00
PoorvaGaikar
8b6e66d0f0
avfilter/f_select.c: add support for iw and ih variables
...
Fixes ticket #10509 .
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-05-08 21:33:32 +02:00
Brad Smith
9e674b3160
lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's
...
The proper type was used until 73251678c83cbe24d08264da693411b166239bc7.
This covers all of the OS's that currently have V4L2 support, permutations
of Linux glibc/musl, Android bionic, FreeBSD, NetBSD, OpenBSD, Solaris.
Copied from FreeBSD ports patch.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-05-08 21:33:32 +02:00
Rémi Denis-Courmont
f8715d0300
lavc/vp9dsp: fix compilation with llvm-as
2024-05-08 18:26:32 +03:00
Rémi Denis-Courmont
1f150a68ac
lavu/riscv: fix build without <sys/hwprobe.h>
2024-05-08 18:26:32 +03:00
James Almer
4e069ba80a
avutil/opt: free the temporary layout in av_opt_is_set_to_default()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-07 20:11:42 -03:00
James Almer
ae0293ee41
avutil/opt: propagate av_dict_copy() errors in av_opt_{get,set}_dict_val()
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-07 20:11:42 -03:00
James Almer
9614efc258
avutil/opt: don't set a channel layout if the option is flagged as read only
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-05-07 20:11:42 -03:00