Commit Graph

117034 Commits

Author SHA1 Message Date
Zhao Zhili
b051bc7cb8 aarch64/h26x: Remove duplicate b.eq instruction
b.eq is added by calc_all after each calc.
2024-09-14 16:36:34 +08:00
Zhao Zhili
11443cc9b1 avcodec/hevc: ff_hevc_(qpel/epel)_filters are signed type 2024-09-14 16:36:34 +08:00
Zhao Zhili
9f6c8eb412 aarch64/vvc: Add put_qpel_hx i8mm
Benchmark on Android pixel 8 with -fno-vectorize

put_luma_h_8_4x4_c:                                      0.2 ( 1.00x)
put_luma_h_8_4x4_neon:                                   0.2 ( 1.00x)
put_luma_h_8_4x4_i8mm:                                   0.0 ( 0.00x)
put_luma_h_8_8x8_c:                                      1.5 ( 1.00x)
put_luma_h_8_8x8_neon:                                   0.5 ( 3.00x)
put_luma_h_8_8x8_i8mm:                                   0.5 ( 3.00x)
put_luma_h_8_16x16_c:                                    6.2 ( 1.00x)
put_luma_h_8_16x16_neon:                                 2.0 ( 3.12x)
put_luma_h_8_16x16_i8mm:                                 1.5 ( 4.17x)
put_luma_h_8_32x32_c:                                   25.5 ( 1.00x)
put_luma_h_8_32x32_neon:                                 9.0 ( 2.83x)
put_luma_h_8_32x32_i8mm:                                 6.8 ( 3.78x)
put_luma_h_8_64x64_c:                                   99.8 ( 1.00x)
put_luma_h_8_64x64_neon:                                35.2 ( 2.83x)
put_luma_h_8_64x64_i8mm:                                27.2 ( 3.66x)
put_luma_h_8_128x128_c:                                422.0 ( 1.00x)
put_luma_h_8_128x128_neon:                             138.5 ( 3.05x)
put_luma_h_8_128x128_i8mm:                             109.2 ( 3.86x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
25448d1716 aarch64/vvc: Add put_pel/put_pel_uni/put_pel_uni_w
put_luma_pixels_8_4x4_c:                                 0.2 ( 1.00x)
put_luma_pixels_8_4x4_neon:                              0.2 ( 1.00x)
put_luma_pixels_8_8x8_c:                                 0.7 ( 1.00x)
put_luma_pixels_8_8x8_neon:                              0.2 ( 3.22x)
put_luma_pixels_8_16x16_c:                               2.2 ( 1.00x)
put_luma_pixels_8_16x16_neon:                            0.2 ( 9.89x)
put_luma_pixels_8_32x32_c:                               8.2 ( 1.00x)
put_luma_pixels_8_32x32_neon:                            1.2 ( 6.71x)
put_luma_pixels_8_64x64_c:                              33.7 ( 1.00x)
put_luma_pixels_8_64x64_neon:                            2.5 (13.63x)
put_luma_pixels_8_128x128_c:                           145.5 ( 1.00x)
put_luma_pixels_8_128x128_neon:                         10.2 (14.23x)
put_uni_pixels_luma_8_4x4_c:                             0.5 ( 1.00x)
put_uni_pixels_luma_8_4x4_neon:                          0.0 ( 0.00x)
put_uni_pixels_luma_8_8x8_c:                             0.5 ( 1.00x)
put_uni_pixels_luma_8_8x8_neon:                          0.2 ( 2.11x)
put_uni_pixels_luma_8_16x16_c:                           1.2 ( 1.00x)
put_uni_pixels_luma_8_16x16_neon:                        0.2 ( 5.44x)
put_uni_pixels_luma_8_32x32_c:                           3.0 ( 1.00x)
put_uni_pixels_luma_8_32x32_neon:                        0.5 ( 6.26x)
put_uni_pixels_luma_8_64x64_c:                           3.0 ( 1.00x)
put_uni_pixels_luma_8_64x64_neon:                        1.7 ( 1.72x)
put_uni_pixels_luma_8_128x128_c:                         6.5 ( 1.00x)
put_uni_pixels_luma_8_128x128_neon:                      6.5 ( 1.00x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
20f2bf5530 aarch64/vvc: Add put_qpel_h_* and put_qpel_uni_h_*
Just share hevc implementation.

checkasm --test=vvc_mc --benchmark:

put_luma_h_8_4x4_c:                                      0.2 ( 1.00x)
put_luma_h_8_4x4_neon:                                   0.2 ( 1.00x)
put_luma_h_8_8x8_c:                                      1.0 ( 1.00x)
put_luma_h_8_8x8_neon:                                   0.2 ( 4.33x)
put_luma_h_8_16x16_c:                                    3.2 ( 1.00x)
put_luma_h_8_16x16_neon:                                 1.2 ( 2.63x)
put_luma_h_8_32x32_c:                                   13.7 ( 1.00x)
put_luma_h_8_32x32_neon:                                 4.0 ( 3.45x)
put_luma_h_8_64x64_c:                                   48.2 ( 1.00x)
put_luma_h_8_64x64_neon:                                15.7 ( 3.07x)
put_luma_h_8_128x128_c:                                203.5 ( 1.00x)
put_luma_h_8_128x128_neon:                              62.0 ( 3.28x)
put_uni_h_luma_8_4x4_c:                                  0.2 ( 1.00x)
put_uni_h_luma_8_4x4_neon:                               0.2 ( 1.00x)
put_uni_h_luma_8_8x8_c:                                  1.5 ( 1.00x)
put_uni_h_luma_8_8x8_neon:                               0.2 ( 6.56x)
put_uni_h_luma_8_16x16_c:                                5.7 ( 1.00x)
put_uni_h_luma_8_16x16_neon:                             1.2 ( 4.67x)
put_uni_h_luma_8_32x32_c:                               24.0 ( 1.00x)
put_uni_h_luma_8_32x32_neon:                             4.7 ( 5.07x)
put_uni_h_luma_8_64x64_c:                               90.0 ( 1.00x)
put_uni_h_luma_8_64x64_neon:                            17.0 ( 5.30x)
put_uni_h_luma_8_128x128_c:                            357.7 ( 1.00x)
put_uni_h_luma_8_128x128_neon:                          67.5 ( 5.30x)
2024-09-14 16:36:34 +08:00
Zhao Zhili
46f07ce7d1 aarch64/hevc: Move epel/qpel to h26x directory
So vvc can reuse the implementation.
2024-09-14 16:36:34 +08:00
Zhao Zhili
8beafb5656 aarch64/hevc: Simplify function prototypes by macro 2024-09-14 16:36:34 +08:00
jiangjie
f606872ed0 avformat/dashdec: The segments in dash file doesn't read completely when segment's size and duration is very small.
If the segment is very small, avformat_find_stream_info
will read all audio/video data in this segment.
cur->is_restart_needed is set to 0 later in dash_read_packet,
and no chance to be set to 1 again in the read_data function.

Reproduction:
ffmpeg -f lavfi -i mandelbrot -f lavfi -i anullsrc -c:v vp8 \
 -g 5 -r 5 -c:a libopus -use_template 0 -seg_duration 1 \
 -t 15 -y test_720.mpd
ffprobe -show_packets test_720.mpd
2024-09-14 11:42:09 +08:00
Marvin Scholz
6229e4ac42 avformat/mxfdec: narrow variable scopes 2024-09-13 19:48:15 +02:00
Marvin Scholz
f5107e79ce avformat/mxfdec: fix variable shadowing 2024-09-13 19:48:08 +02:00
Marvin Scholz
dd002f1588 fftools/ffmpeg_demux: narrow variable scope 2024-09-13 19:41:23 +02:00
Marvin Scholz
0753d17664 avcodec/libx264: fix variable shadowing 2024-09-13 19:40:46 +02:00
Marvin Scholz
0f87ff0db4 avcodec/g2meet: fix variable shadowing 2024-09-13 19:39:58 +02:00
Marvin Scholz
fd4f7d0d14 avcodec/mjpegdec: fix variable shadowing 2024-09-13 19:39:19 +02:00
Marvin Scholz
3ebc68d25d fftools/ffmpeg_mux_init: fix variable shadowing 2024-09-13 19:38:40 +02:00
Marvin Scholz
25f0fff9ec fftools/ffmpeg_demux: fix variable shadowing 2024-09-13 19:37:40 +02:00
Marvin Scholz
c59a073abe lavfi/af_channelmap: fix channelmap_init error handling
The channelmap_init function was returning success even on error after
7dc81d33c2 due to shadowing of the
outer ret variable.

Fixes CID1619297 Logically dead code
2024-09-13 19:12:58 +02:00
Anton Khirnov
c079ebdc57 tests/fate/hevc: add a periodic intra refresh decode test
Would trigger #10887 before it was fixed, sample cut from the one
attached to the bug.
2024-09-13 12:10:11 +02:00
Anton Khirnov
536bb98888 lavc/hevcdec: set per-CTB filter parameters for WPP
Fixes #10887
2024-09-13 12:10:11 +02:00
Anton Khirnov
21ef80f3d9 lavc/hevcdec: remove a duplicate variable
In hls_decode_entry_wpp(), self_id is always identical to thread.
2024-09-13 12:10:11 +02:00
Anton Khirnov
b88c88f920 Changelog: elaborate on what YUVJ is
Not all changelog readers may be familiar with it.
2024-09-13 11:56:53 +02:00
Anton Khirnov
b53800691c lavc/hevcdec: set output frame pkt_dts
pkt_dts needs to be set manually when using the receive_frame() callback, so
it was unset after 2fdecbb239.

Fixes PTS guessing for certain files with broken timestamps. Cf.
https://github.com/mpv-player/mpv/issues/14806

Reported-by: llyyr <llyyr.public@gmail.com>
2024-09-13 11:56:53 +02:00
Marvin Scholz
bb91425eb8 fftools/ffmpeg_mux_init: remove unused variable
This dict is declared and freed but nothing is ever written to it.
2024-09-13 00:31:19 +02:00
Marvin Scholz
0c84b977a9 avdevice/jack: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:30:48 +02:00
Marvin Scholz
5dfc547f25 avutil/file: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:29:10 +02:00
Marvin Scholz
074bf9faf7 avformat/crypto: fix variable shadowing 2024-09-13 00:27:35 +02:00
Marvin Scholz
24711b00c6 avformat/network: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:26:53 +02:00
Marvin Scholz
e7126d9648 lavfi/vf_signature: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:26:23 +02:00
Marvin Scholz
8fac5beaf8 lavfi/f_metadata: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:24:47 +02:00
Marvin Scholz
59244a0c50 lavfi/vf_ssim: narrow variable scopes 2024-09-13 00:24:20 +02:00
Marvin Scholz
3f8061afe8 lavfi/vf_ssim: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:23:00 +02:00
Marvin Scholz
bd3038b28c lavfi/vf_vmafmotion: fix variable shadowing 2024-09-13 00:22:29 +02:00
Marvin Scholz
e93f20c017 lavfi/vf_vmafmotion: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:21:23 +02:00
Marvin Scholz
29d7ed089e lavfi/vf_psnr: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only
ever passed to av_log, so av_err2str can be used.
2024-09-13 00:21:02 +02:00
Marvin Scholz
4c6d07dd28 fftools/cmdutils: fix variable shadowing 2024-09-13 00:20:12 +02:00
Marvin Scholz
bbde886b63 lavfi/vf_ssim360: fix variable shadowing 2024-09-13 00:19:46 +02:00
Marvin Scholz
c6ab95d009 lavfi/vf_ssim360: use av_err2str to simplify code
No need to explicitly specify the buffer here as it is only ever passed
to av_log, so av_err2str can be used.
2024-09-13 00:19:20 +02:00
Marvin Scholz
990b80c004 fftools/ffmpeg_opt: fix variable shadowing 2024-09-13 00:17:53 +02:00
Niklas Haas
ca77fc2177 avfilter: fix YUV colorspace negotiation for YUVJ
Ironically, despite being introduced to make YUVJ unnecessary, the new
YUV negotiation logic failed to actually negotiate YUVJ formats
themselves correctly, leading to errors when passing YUVJ frames into
a filter graph. (They were effectively treated like RGB or Grayscale
formats, rather than as forced-full-range YUV, and hence did not have
their colorspace matrix correctly negotiated)

Fix this by splitting off the YUVJ check from ff_fmt_is_regular_yuv().
Obviously, we can trivially undo this change again once YUVJ is actually
deleted from the codebase.

Fixes: #11179
2024-09-12 19:13:21 +02:00
Niklas Haas
da80ee21ca tests/fate: force MPEG range for rawvideo tests
The input file is MPEG range, so we should also encode to MPEG range
before comparing against it. This bug was avoided in the past because
YUVJ inputs were automatically converted back to limited range when converting
to a different pixfmt (in the absence of tagging). However, with proper YUV
negotiation in place, the default behavior is to preserve the YUV range
wherever possible. Since `rawvideo` does not signal or care about the YUV
range, we need to explicitly request the desired output range to force a
conversion.

Affects all rawvideo tests, in particular vsynth and owdenoise.
2024-09-12 19:13:21 +02:00
Marvin Scholz
504c1ffcd8 fftools/ffmpeg: remove useless error check
When ret is checked here, it was never assigned anything, making this
check useless, as highlighted by Coverity.

It seems to be a copy paste mistake given that opt_match_per_stream_str
does not return an error code that could be checked and the previous
value assigned to ret is already checked above. So just remove this
check.

Fixes: CID1616292
2024-09-12 05:11:14 +02:00
James Almer
2e91532ead avfilter/af_join: pass the correct input layouts to ff_channel_layouts_ref
Should fix memory leaks show in fate-filter-join and fate-filter-crazychannels.

Reviewed-by: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-11 16:26:55 -03:00
Cameron Gutman
a15d2fdfd9 avcodec/amfenc: Fix AV1 HDR metadata for delayed surfaces
AMF_VIDEO_ENCODER_AV1_INPUT_HDR_METADATA was set above in the normal
input case but forgotten for the same in the delayed surface codepath.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii@gmail.com>
2024-09-11 15:45:59 +02:00
Lynne
4646a74d1e
lavc/Makefile: only compile hw_base_encode_h264.c when actually needed 2024-09-10 04:59:22 +02:00
Lynne
15c03b79d2
hw_base_encode_h264: remove unused AUD unit structure
Each codec initializes its own AUD structure when needed, which takes 2 lines.
2024-09-10 04:57:29 +02:00
Michael Riedl
9bcb86b0fa avdevice/decklink_dec: extend available actions on signal loss
Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action',
which controls the behavior when the input signal is not available
(including the behavior previously available through draw_bars).
The default behavior remains unchanged to be backwards compatible.
The new option is more flexible for extending now and in the future.

The new value 'repeat' repeats the last video frame.
This is useful for very short dropouts and was not available before.

Signed-off-by: Michael Riedl <michael.riedl@nativewaves.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-09-09 23:47:49 +02:00
Zhao Zhili
071c499026 avfilter/unsharp: Call function directly rather than via function pointer
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-09-10 00:59:30 +08:00
Anton Khirnov
691e0a1082 lavfi/af_pan: convert to query_func2()
Also, drop redundant calls that also happen implicitly in generic code.
2024-09-09 17:26:18 +02:00
Anton Khirnov
b38f4e7f86 lavfi/af_pan: stop modifying private data in query_formats()
It is not supposed to have any side effects, and the modification in
question can just as well be done in filter init.
2024-09-09 17:26:18 +02:00
Anton Khirnov
d0f4c08207 lavfi/af_lv2: convert to query_func2() 2024-09-09 17:26:18 +02:00