1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

112915 Commits

Author SHA1 Message Date
Paul B Mahol
42e45ea8ff avfilter/af_anlms: add double sample format support 2023-11-27 20:27:25 +01:00
sunyuechi
ea6817d2a7 checkasm: test for dcmul_add
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2023-11-27 17:55:24 +02:00
Zhao Zhili
d526a34c20 avcodec/videotoolboxenc: refactor dump encoder name
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-27 23:49:01 +08:00
Zhao Zhili
cb049d377f avcodec/videotoolboxenc: Fix build failure due to PropertyKey_EncoderID
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-27 23:48:55 +08:00
Leo Izen
36980179a0 fftools/ffplay_renderer: declare function argument as const
Declaring the function argument as const fixes a warning down the line
that the const parameter is stripped. We don't modify this argument.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-27 23:39:48 +08:00
Paul B Mahol
5f87a68cf7 avfilter/vf_colorcorrect: fix memory leaks 2023-11-27 12:10:26 +01:00
Paul B Mahol
f1f973313b avfilter/af_dialoguenhance: do output scaling once 2023-11-27 11:56:27 +01:00
Paul B Mahol
b1942734c7 avfilter/af_afwtdn: fix crash with EOF handling 2023-11-27 11:56:26 +01:00
Paul B Mahol
4671fb7dfb avfilter/af_dialoguenhance: simplify channels copy 2023-11-27 11:56:23 +01:00
Gyan Doshi
0ea9e26636 doc/filters: restore entry for libvmaf option pool
3d29724c00 removed the doc entry for the option pool while adding
a parser function for it at the same time!

The option remains available and undeprecated.

Fixes trac #10693
2023-11-27 15:37:01 +05:30
Paul B Mahol
44e9cccffa avformat: add QOA demuxer 2023-11-26 17:49:11 +01:00
Paul B Mahol
3609d2b783 avcodec: add QOA decoder 2023-11-26 17:49:09 +01:00
Geoffrey McRae
93b5d9030b libavcodec/mlpdec: add missing correction to ch_layout when downmixing
This fixes corrupted audio for applications relying on ch_layout when
codec downmixing is active.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-26 10:18:33 -03:00
Geoffrey McRae
a8677bcc8f libavcodec/dcadec: adjust the ch_layout when downmix is active
Applications making use of this codec with the `downmix` option are
segfaulting unless the `ch_layout` is overridden after `avcodec_open2`
as can be seen in projects like MythTV[1]

This patch fixes this by overriding the ch_layout as done in other
decoders such as AC3.

1: af6f362a14/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp (L4607)

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-26 10:18:33 -03:00
Wenbin Chen
47b2328076 libavfilter/vf_dnn_detect: Add yolo support
Add yolo support. Yolo model doesn't output final result. It outputs
candidate boxes, so we need post-process to remove overlap boxes to
get final results. Also, the box's coordinators relate to cell and
anchors, so we need these information to calculate boxes as well.

Model detail please refer to: https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v2-tf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-11-26 20:38:36 +08:00
Wenbin Chen
caa5d123a7 libavfilter/vf_dnn_detect: Add model_type option.
There are many kinds of detection DNN model and they have different
preprocess and postprocess methods. To support more models,
"model_type" option is added to help to choose preprocess and
postprocess function.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-11-26 20:15:55 +08:00
Anton Khirnov
2020ef9770 tools/general_assembly: restore printing HEAD 2023-11-26 10:12:01 +01:00
Anton Khirnov
56a8b34b64 tools/general_assembly: implement extra GA members 2023-11-26 10:12:01 +01:00
Paul B Mahol
e7111ba44a avfilter/vsrc_gradients: allow zero speed 2023-11-26 02:07:45 +01:00
Paul B Mahol
f1acb0d843 avfilter/vsrc_gradients: add square type 2023-11-26 02:07:44 +01:00
James Almer
72390dea00 mips/ac3dsp_mips: add missing stddef.h header include
Fixes compilation failures after 567c67c6c8.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-25 21:51:04 -03:00
James Almer
e40ea9f34b x86/ac3dsp: add ff_float_to_fixed24_avx()
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-25 21:50:56 -03:00
James Almer
d8b1a34433 x86/ac3dsp: reduce instruction count inside the float_to_fixed24 loop
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-25 21:50:56 -03:00
Paul B Mahol
2d9ed64859 avfilter/af_dialoguenhance: fix overreads 2023-11-25 13:05:31 +01:00
Paul B Mahol
37c5bcc4e8 avfilter/af_channelmap: do not override set channel layout 2023-11-25 13:05:31 +01:00
Zhao Zhili
bbdedd9663 Revert "avformat/rtmpproto: Pass rw_timeout to underlying transport protocol"
This reverts commit bec6dfcd5c.

The patch is NOP since ffurl_open_whitelist copy options from parent
automatically.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-25 10:56:00 +08:00
Rémi Denis-Courmont
7212466e73 checkasm/riscv: report an error upon SIGILL
Terminating the whole checkasm process is not very helpful. This will
report if an illegal instruction occurs while executing a tested
function. This is a common occurrence whilst developping RISC-V
assembler, due to the compatibility between vector configuration and
instruction done at run-time.
2023-11-23 19:04:07 +02:00
Rémi Denis-Courmont
286d674221 checkasm: add helper to report a fatal signal 2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
0fa421c8f1 lavc/llvidencdsp: add R-V V diff_bytes
diff_bytes_c:      163.0
diff_bytes_rvv_i32: 52.7
2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
0183c2c830 lavc/aacpsdsp: use LMUL=2 and amortise strides
The input is laid out in 16 segments, of which 13 actually need to be
loaded. There are no really efficient ways to deal with this:
1) If we load 8 segments wit unit stride, then narrow to 16 segments with
   right shifts, we can only get one half-size vector per segment, or just 2
   elements per vector (EMUL=1/2) - at least with 128-bit vectors.
   This ends up unsurprisingly about as fas as the C code.
2) The current approach is to load with strides. We keep that approach,
   but improve it using three 4-segmented loads instead of 12 single-segment
   loads. This divides the number of distinct loaded addresses by 4.
3) A potential third approach would be to avoid segmentation altogether
   and splat the scalar coefficient into vectors. Then we can use a
   unit-stride and maximum EMUL. But the downside then is that we have to
   multiply the 3 (of 16) unused segments with zero as part of the
   multiply-accumulate operations.

In addition, we also reuse vectors mid-loop so as to increase the EMUL
from 1 to 2, which also improves performance a little bit.

Oeverall the gains are quite small with the device under test, as it does
not deal with segmented loads very well. But at least the code is tidier,
and should enjoy bigger speed-ups on better hardware implementation.

Before:
ps_hybrid_analysis_c:       1819.2
ps_hybrid_analysis_rvv_f32: 1037.0 (before)
ps_hybrid_analysis_rvv_f32:  990.0 (after)
2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
b88d4058f9 lavc/g722dsp: optimise R-V V apply_qmf
This stores the constant coefficients deinterleaved, so that they can be
loaded directly with NF=0. Unfortunately, we cannot optimise loading the
input, due to insufficient memory alignment (not 32-bit).

Before:
g722_apply_qmf_c:       82.5
g722_apply_qmf_rvv_i32: 78.2

After:
g722_apply_qmf_c:       82.5
g722_apply_qmf_rvv_i32: 65.2
2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
e33ce0d9dd lavu/fixed_dsp: R-V V fmul_window_scaled
vector_fmul_window_scaled_fixed_c:       4393.7
vector_fmul_window_scaled_fixed_rvv_i64: 1642.7
2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
e49f41fb27 lavu/float_dsp: optimise R-V V fmul_reverse & fmul_window
Roll the loop to avoid slow gathers.

Before:
vector_fmul_reverse_c:       1561.7
vector_fmul_reverse_rvv_f32: 2410.2
vector_fmul_window_c:        2068.2
vector_fmul_window_rvv_f32:  1879.5

After:
vector_fmul_reverse_c:       1561.7
vector_fmul_reverse_rvv_f32:  916.2
vector_fmul_window_c:        2068.2
vector_fmul_window_rvv_f32:  1202.5
2023-11-23 18:57:18 +02:00
Rémi Denis-Courmont
3a134e8299 lavu/fixed_dsp: optimise R-V V fmul_reverse
Gathers are (unsurprisingly) a notable exception to the rule that R-V V
gets faster with larger group multipliers. So roll the function to speed
it up.

Before:
vector_fmul_reverse_fixed_c:       2840.7
vector_fmul_reverse_fixed_rvv_i32: 2430.2

After:
vector_fmul_reverse_fixed_c:       2841.0
vector_fmul_reverse_fixed_rvv_i32:  962.2

It might be possible to further optimise the function by moving the
reverse-subtract out of the loop and adding ad-hoc tail handling.
2023-11-23 18:57:18 +02:00
Paul B Mahol
4adb93dff0 avfilter/asrc_afirsrc: fix by one smaller allocation of buffer 2023-11-23 15:01:55 +01:00
James Almer
0008e1c5d5 avfilter/asrc_anullsrc: fix allowed range for sample_rate
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-22 19:41:15 -03:00
James Almer
567c67c6c8 avcodec/ac3dsp: make len a size_t in float_to_fixed24
Should simplify asm implementations, and prevent UB on at least win64.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-22 18:33:00 -03:00
Paul B Mahol
4af412be71 avfilter: use AV_OPT_TYPE_CHLAYOUT 2023-11-22 19:28:40 +01:00
James Almer
707e46dc54 test/checkasm: test llauddsp
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-22 14:22:19 -03:00
James Almer
2d9fd814d0 x86/: clear the high bits for order in scalarproduct_and_madd functions
Should fix checkasm failures on win64.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-22 14:18:42 -03:00
Michael Niedermayer
3c154e8579 doc/git-howto: use less weird username for git URL
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: J. Dekker <jdek@itanimul.li>
2023-11-22 10:21:50 +01:00
Zhao Zhili
e8a49b1424 avcodec/mmaldec: Fix build error
Fix #10670.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 21:02:04 +08:00
Zhao Zhili
bec6dfcd5c avformat/rtmpproto: Pass rw_timeout to underlying transport protocol
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 21:02:04 +08:00
Zhao Zhili
e1d6b3cb5a avformat/flvenc: add extract_extradata bsf for new video codecs
When encoders don't support global header like MediaCodec, FLV
muxer needs to add extract_extradata bsf automatically. The codec
list doesn't include VP9 since it's not supported by
extract_extradata.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 21:02:04 +08:00
Zhao Zhili
f27fce0c0c avcodec/mediacodecdec: fix return EAGAIN after EOF
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 21:02:04 +08:00
Dmitry Rogozhkin
e9c93009fc avcodec/decode: validate hw_frames_ctx when AVHWAccel.free_frame_priv is used
Validate that a hw_frames_ctx is available before using it for
the AVHWAccel.free_frame_priv callback, and don't require it to
be present when the callback is not in use by the HWAccel.

v2: check for free_frame_priv (Hendrik)
v3: return EINVAL (Christoph Reiter)
v4: better commit message (Hendrik)
v5: fix typo with missed frames_ctx (Lynne)

See[1]: https://github.com/msys2/MINGW-packages/pull/19050
Fixes: be07145109 ("avcodec: add AVHWAccel.free_frame_priv callback")
CC: Lynne <dev@lynne.ee>
CC: Christoph Reiter <reiter.christoph@gmail.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
2023-11-22 05:01:16 +01:00
Zhao Zhili
641f8a71fb fate/h264: move mp4toannexb_ticket5927 test to fate-h264
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:15 +08:00
Zhao Zhili
aa3b857101 avcodec/h264_mp4toannexb_bsf: process new extradata
For fate-h264_mp4toannexb_ticket5927 and
fate-h264_mp4toannexb_ticket5927_2, they work by accident
previously. The sample file has two 'avc1' entries, and video
samples use the second one. It means packets should be decoded with
new extradata in side data. Before this patch, only extradata was
kept in the output, new extradata has been dropped. The output can
be decoded because the two extradata are almost the same, except
level indication. This patch fixed the issue, and add another
fate test.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:14 +08:00
Zhao Zhili
d3aa0cd16f avcodec/h264_mp4toannexb_bsf: fix missing PS before IDR frames
If there is a single group of SPS/PPS before an IDR frame, but no
SPS/PPS after that, we will miss the chance to reset
idr_sps_seen/idr_pps_seen. No SPS/PPS are inserted afterwards.

This patch saves in-band SPS/PPS and insert them before IDR frames
when necessary.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:14 +08:00
Zhao Zhili
4c4b833abd avcodec/h264_mp4toannexb_bsf: remove pass padding size as argument
It's a fixed value. There is no use case to change that.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-11-22 19:42:14 +08:00