1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

6237 Commits

Author SHA1 Message Date
Christian Helmrich
865cd3c056
avfilter: add XPSNR filter
Add XPSNR video filter
Register new filter xpsnr.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-09-08 17:51:37 +02:00
Ramiro Polla
e0cc06184c checkasm/sw_rgb: add rgb24toyv12 tests 2024-09-06 23:06:35 +02:00
Ramiro Polla
c08bb33e41 checkasm/sw_rgb: add deinterleaveBytes 2024-09-06 23:05:06 +02:00
Frank Plowman
6df0c5f9f4 lavc/vvc: Remove experimental flag
This reverts commit 110d8549d5.

I have been working through fixing bugs, particularly crashes I've
found using a fuzzer, in the VVC decoder for the past few months.
While I won't claim it is now bug-free, it is considerably more
resilient than it was and I think in a position to have the
experimental flag removed for release 7.1.

Additionally, most of the Main 10 features of VVC which were missing
version of the decoder released in 7.0 have now been implemented.
This includes the most major missing features: IBC, subpictures and RPR.

Signed-off-by: Frank Plowman <post@frankplowman.com>
2024-09-06 22:14:52 +08:00
James Almer
2a6f84718b fate/checkasm/sw_gbrp: don't randomly set internal values
They are set by sws_init_context().
May help with signed integer overflows reported by gcc-usan.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-09-05 22:19:47 -03:00
Rémi Denis-Courmont
d9f594209f checkasm/riscv: print official extension names 2024-09-04 22:04:11 +03:00
Nicolas Gaullier
ee9ae4e8ba fftools/ffmpeg: Fix honor -r output option with streamcopy
Fix "ost->st->avg_frame_rate = ost->frame_rate" in streamcopy_init()
being reset to input's frame rate a few lines below.
Note that in current code, there are some discrepancies amongst the
muxers. For example, avienc relies on time_base, so it is not affected
by this patch, whereas mxfenc and matroskaenc do use avg_frame_rate,
so this patch fixes -r being honored.

In the updated fate test, the input is (wrongly) probed as 50fps. With
this patch, the correct value (25fps) is successfully forced with -r.

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Nicolas Gaullier
c14573a4d2 tests: Remove void -time_base overrides when streamcopying to mxf
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Nicolas Gaullier
59d2900df7 avformat/mxfenc: Fix guess frame_rate
The time_base was a bad guess.

Currently, fate-time_base test data assumed that overriding the input
time_base would affect the frame_rate, but this behaviour is not
documented, so just fix the fate data now that this is fixed.

Fix regression since 10185e2d4c:
previously, when streamcopying, the time_base was guessed from the
frame_rate considering it is often constant, so guessing the frame_rate
back from the time_base was often not a problem.

To reproduce:
ffmpeg -i fate-suite/mpeg2/dvd_still_frame.vob -an -c copy out.mxf

Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-09-04 13:01:37 +02:00
Anton Khirnov
3f9ca51015 lavc/opus*: move to opus/ subdir 2024-09-02 11:56:53 +02:00
Ramiro Polla
6aafe61285 avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t 2024-09-01 13:42:30 +02:00
James Almer
9c0e0c0b3f fate/iamf: add a demuxing test for a stereo AAC IAMF sample
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-31 11:22:08 -03:00
Nuo Mi
7175544c0b checkasm: add vvc_bdof test
apply_bdof_8_8x16_c: 5776.5
apply_bdof_8_8x16_avx2: 396.2
apply_bdof_8_16x8_c: 5722.0
apply_bdof_8_16x8_avx2: 216.0
apply_bdof_8_16x16_c: 11213.2
apply_bdof_8_16x16_avx2: 434.5
apply_bdof_10_8x16_c: 5657.7
apply_bdof_10_8x16_avx2: 1096.0
apply_bdof_10_16x8_c: 5531.7
apply_bdof_10_16x8_avx2: 212.5
apply_bdof_10_16x16_c: 11043.7
apply_bdof_10_16x16_avx2: 1252.7
apply_bdof_12_8x16_c: 5680.0
apply_bdof_12_8x16_avx2: 1096.5
apply_bdof_12_16x8_c: 5646.2
apply_bdof_12_16x8_avx2: 624.5
apply_bdof_12_16x16_c: 11076.0
apply_bdof_12_16x16_avx2: 1241.5
2024-08-31 14:08:54 +08:00
J. Dekker
e758b24396 checkasm: add wildcompares for test & functions
Added:

  --test=<pattern>    Filter tests by glob style pattern.
  --bench[=<pattern>] Run benchmark and optionally filter functions
                      by glob style pattern.

Example:

$ ./tests/checkasm/checkasm --bench=yuva*
[...]
yuva420p_bgr24_8_c:                                     34.5 ( 1.00x)
yuva420p_bgr24_8_ssse3:                                 31.1 ( 1.11x)
yuva420p_bgr24_128_c:                                  310.6 ( 1.00x)
yuva420p_bgr24_128_ssse3:                              178.1 ( 1.74x)
yuva420p_bgr24_1080_c:                                2509.6 ( 1.00x)
yuva420p_bgr24_1080_ssse3:                            1471.5 ( 1.71x)
yuva420p_bgr24_1920_c:                                4462.6 ( 1.00x)
yuva420p_bgr24_1920_ssse3:                            2331.1 ( 1.91x)
[...]

Ported from dav1d.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2024-08-28 11:45:46 +02:00
J. Dekker
d0986709a8 checkasm: improve print format
Port dav1d's checkasm output format to FFmpeg's checkasm, includes
relative speedups and aligns results.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2024-08-28 11:45:46 +02:00
J. Dekker
03f26549cd checkasm: print only results to stdout
Signed-off-by: J. Dekker <jdek@itanimul.li>
2024-08-28 11:45:46 +02:00
J. Dekker
42528ff835 checkasm: add csv/tsv bench output
When collecting performance information from checkasm it is common
to parse the output for use in graphs to compare vs different
architectures.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2024-08-28 11:45:46 +02:00
Anton Khirnov
d89930f866 lavu/opt: add API for retrieving array-type option values
Previously one could only convert the entire array to a string, not
access individual elements.
2024-08-27 16:53:16 +02:00
Ramiro Polla
834964ce1a checkasm/mpegvideoencdsp: add pix_sum, pix_norm1, and draw_edges 2024-08-26 12:48:09 +02:00
Ramiro Polla
98610fe95f fate/checkasm: run the sw_yuv2yuv test 2024-08-26 12:16:40 +02:00
Ramiro Polla
a2e01cade8 checkasm/yuv2yuv: add tests for semiplanar unscaled converters 2024-08-26 11:04:46 +02:00
Ramiro Polla
4545205a26 swscale/yuv2rgb: add yuv42{0,2}p -> gbrp unscaled colorspace converters 2024-08-18 22:26:11 +02:00
Niklas Haas
ae31acd702 fate/scalechroma: switch to standard chroma location
Replace the manually specified chroma location by one using standard
notation, arbitrarily "bottomleft" as it is a less common path.

Required if we want to phase out the use of manual chroma locations.
2024-08-16 11:43:37 +02:00
Nuo Mi
7eb1df44ae checkasm: add tests for vvc dmvr
dmvr_8_12x20_c: 186.2
dmvr_8_12x20_avx2: 25.7
dmvr_8_20x12_c: 181.7
dmvr_8_20x12_avx2: 25.2
dmvr_8_20x20_c: 283.2
dmvr_8_20x20_avx2: 32.0
dmvr_10_12x20_c: 90.0
dmvr_10_12x20_avx2: 15.7
dmvr_10_20x12_c: 41.0
dmvr_10_20x12_avx2: 14.7
dmvr_10_20x20_c: 81.5
dmvr_10_20x20_avx2: 26.7
dmvr_12_12x20_c: 190.7
dmvr_12_12x20_avx2: 20.2
dmvr_12_20x12_c: 187.2
dmvr_12_20x12_avx2: 20.2
dmvr_12_20x20_c: 292.7
dmvr_12_20x20_avx2: 27.2
dmvr_h_8_12x20_c: 317.0
dmvr_h_8_12x20_avx2: 37.0
dmvr_h_8_20x12_c: 340.0
dmvr_h_8_20x12_avx2: 41.0
dmvr_h_8_20x20_c: 540.7
dmvr_h_8_20x20_avx2: 64.0
dmvr_h_10_12x20_c: 322.7
dmvr_h_10_12x20_avx2: 30.7
dmvr_h_10_20x12_c: 344.2
dmvr_h_10_20x12_avx2: 34.0
dmvr_h_10_20x20_c: 529.0
dmvr_h_10_20x20_avx2: 51.5
dmvr_h_12_12x20_c: 326.7
dmvr_h_12_12x20_avx2: 33.5
dmvr_h_12_20x12_c: 331.7
dmvr_h_12_20x12_avx2: 51.2
dmvr_h_12_20x20_c: 534.0
dmvr_h_12_20x20_avx2: 62.7
dmvr_hv_8_12x20_c: 650.0
dmvr_hv_8_12x20_avx2: 57.2
dmvr_hv_8_20x12_c: 676.2
dmvr_hv_8_20x12_avx2: 70.0
dmvr_hv_8_20x20_c: 1068.5
dmvr_hv_8_20x20_avx2: 103.2
dmvr_hv_10_12x20_c: 649.0
dmvr_hv_10_12x20_avx2: 48.2
dmvr_hv_10_20x12_c: 677.7
dmvr_hv_10_20x12_avx2: 59.7
dmvr_hv_10_20x20_c: 1093.5
dmvr_hv_10_20x20_avx2: 91.7
dmvr_hv_12_12x20_c: 660.0
dmvr_hv_12_12x20_avx2: 58.7
dmvr_hv_12_20x12_c: 682.7
dmvr_hv_12_20x12_avx2: 72.0
dmvr_hv_12_20x20_c: 1094.0
dmvr_hv_12_20x20_avx2: 113.2
dmvr_v_8_12x20_c: 325.7
dmvr_v_8_12x20_avx2: 31.2
dmvr_v_8_20x12_c: 326.2
dmvr_v_8_20x12_avx2: 38.5
dmvr_v_8_20x20_c: 538.5
dmvr_v_8_20x20_avx2: 54.2
dmvr_v_10_12x20_c: 318.5
dmvr_v_10_12x20_avx2: 23.7
dmvr_v_10_20x12_c: 330.7
dmvr_v_10_20x12_avx2: 40.5
dmvr_v_10_20x20_c: 567.5
dmvr_v_10_20x20_avx2: 48.0
dmvr_v_12_12x20_c: 335.2
dmvr_v_12_12x20_avx2: 30.0
dmvr_v_12_20x12_c: 330.2
dmvr_v_12_20x12_avx2: 39.5
dmvr_v_12_20x20_c: 535.2
dmvr_v_12_20x20_avx2: 60.0
2024-08-15 20:19:45 +08:00
Josh Allmann
374824cbc7 avcodec/h264_mp4toannexb: Prepend SPS/PPS to buffering period SEI
Encoders may emit a buffering period SEI without a corresponding
SPS/PPS if the SPS/PPS is carried out-of-band, eg with avcc.

During Annex B conversion, this may result in the SPS/PPS being
inserted *after* the buffering period SEI but before the IDR NAL.

Since the buffering period SEI references the SPS, the SPS/PPS
needs to come first.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-08-14 13:20:56 +02:00
James Almer
66592e8b10 swscale/output: don't leave the alpha channel undefined in vuyx and xv36le
It's non-determistic, as shown by poisoning avfilter buffers instead of zeroing them.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-13 14:49:41 -03:00
James Almer
8d700eab85 tests/iamf: match stream group by id in some tests
Increases specifier parsing code coverage a little bit.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-12 11:41:38 -03:00
Rémi Denis-Courmont
d1326b6347 lavu/riscv: drop probing for zba CPU capability 2024-08-05 21:16:26 +03:00
James Almer
eb3cc508d8 fate/mov: add an IAMF+video muxing test
Signed-off-by: James Almer <jamrial@gmail.com>
2024-08-04 12:09:40 -03:00
Rémi Denis-Courmont
1b2a925e94 lavc/riscv: drop probing for F & D extensions
F and D extensions are included in all RISC-V application profiles ever
made (so starting from RV64GC a.k.a. RVA20). Realistically they need to be
selected at compilation time.

Currently, there are no consumers for these two flags. If there is ever a
need to reintroduce F- or D-specific optimisations, we can always use
__riscv_f or __riscv_d compiler predefined macros respectively.
2024-08-01 22:56:50 +03:00
Rémi Denis-Courmont
656a9664bf checkasm/riscv: preserve T1 whilst calling...
This preserves T1 whilst calling the instrumented function. In a Sci-Fi
setting where type-based Control Flow Integrity (CFI) is supported, the
calling code (i.e., the `checkasm` test case) will set T1 to the expected
value of the landing pad label (LPL) of the instrumented function.

The call wrapper will always use LPL zero which is a wild card. We should
preserve the value of T1 at least until the indirect call to the
instrumented function. Of course this is Sci-Fi, because:
1) there is no hardware (or even QEMU) support yet,
2) all our assembler functions currently use LPL zero anyway.

This uses T3 rather than T2 because indirect branches with T2 is reserved
for notionally direct calls made with an indirect call instruction (e.g.
due to GOT indirection), and are exempted from forward-edge CFI checks.
2024-08-01 18:44:01 +03:00
Anton Khirnov
8e19c24634 tests/fate/vcodec: add vsynth tests for FFV1 version 2 2024-08-01 10:09:25 +02:00
Niklas Haas
b5aeafc00a fftools/ffprobe: implement dv_md_compression 2024-07-28 12:20:07 +02:00
Rémi Denis-Courmont
8030876d1c checkasm/riscv: align the landing pads 2024-07-25 23:10:14 +03:00
Rémi Denis-Courmont
7dde8be29f checkasm/riscv: add forward-edge CFI landing pads 2024-07-25 23:10:14 +03:00
Rémi Denis-Courmont
45d7078a21 lavu/riscv: add CPU flag for B bit manipulations
The B extension was finally ratified in May 2024, encompassing:
- Zba (addresses),
- Zbb (basics) and
- Zbs (single bits).
It does not include Zbc (base-2 polynomials).
2024-07-25 23:09:58 +03:00
Martin Storsjö
97a708a507 checkasm: Increase the tolerance for ac3_sum_square_butterfly_float
Increase the tolerance from 10 ulp to 11 ulp. This fixes occasional
errors for some inputs; the errors could be reproduced on
aarch64/neon builds, with "checkasm --test=ac3dsp 3446175925".

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-24 12:10:33 +03:00
Rémi Denis-Courmont
c4c811b3d9 checkasm/h264dsp: test TX bypass 2024-07-21 22:36:48 +03:00
Leo Izen
e30bc8a963
fate/png: add mDCv and cLLi read and write test
This test confirms that we can write mDCv and cLLi chunks and read them
back via the png decoder. It uses an HEVC conformance sample with this
metadata as the base source for the side data in the frames.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-07-19 11:30:19 -04:00
James Almer
97fd5d3363 checkasm/lls: increase epsilon value for the update_lls test
Should fix failures for some seeds on x86_32.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-19 09:24:59 -03:00
James Almer
7dabad079b avformat/iamf: byteswap values in OpusHeader
Clause 3.11.1 of IAMF[1] states the values are stored in big endian, in
contrast to the Ogg Encapsulation for Opus[2] where they are in little endian.

[1]https://aomediacodec.github.io/iamf/v1.0.0-errata.html#opus-specific
[2]https://datatracker.ietf.org/doc/html/rfc7845#section-5.1

Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-18 23:27:20 -03:00
Felicia Lim
180c869faf avformat/movenc: fix channel count and samplerate fields for IAMF tracks
Clause 6.2.3 of IAMF[1] states both of these shall be set to 0.

[1]https://aomediacodec.github.io/iamf/v1.0.0-errata.html#iasampleentry-section

Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-18 23:27:20 -03:00
James Almer
5d74dcf0e3 fate/lavf-container: add a test for L-HEVC remuxing
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-15 18:19:00 -03:00
James Almer
32588a9394 avformat/movenc: support writing cropping values
Finishes implementing ticket #7437.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-11 10:22:47 -03:00
James Almer
93be6b425e avformat/mov: export cropping values from clap boxes
Addresses part of ticket #7437.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-11 10:22:47 -03:00
Anton Khirnov
10185e2d4c fftools/ffmpeg_mux_init: default to input timebase for streamcopy
Stop trying to invent some "framerate-based" timebase when there is no
reason to think the stream is CFR at all.
2024-07-09 11:14:08 +02:00
James Almer
a696b28886 avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
Derek Buitenhuis
46f7ea4456 avformat: Add a new stream disposition for multilayer video
This lets us detect when a container has flagged a stream as multilayer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-07-07 12:38:50 -03:00
Anton Khirnov
24b3bad811 tests/fate/mov: add a test for VFR muxing 2024-07-07 11:37:43 +02:00
Anton Khirnov
6cde03739e tests/fate/filter-audio: convert atempo test to oneoff
Filter output is not bitexact.
2024-07-07 11:34:13 +02:00