1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

6368 Commits

Author SHA1 Message Date
Marth64
90af8e07b0 fftools/ffprobe: add analyze_frames option for CC and grain detection
Currently, ffprobe has two stream-level fields that do not work,
closed_captions and film_grain).

Their value is always 0 because ffprobe cannot access the internal
codec properties when it is setting up its stream contexts.

In this commit, add the new option -analyze_frames to ffprobe,
allowing the user to read frames up to the interval they have defined
and fill these fields based on what is exposed in AVPacketSideData.

Additionally, in the same commit, don't write these fields to
the output unless analyze_frames is enabled. Finally, fix the
FATE test refs accordingly and update the docs.

Signed-off-by: Marth64 <marth64@proxyid.net>
2024-12-13 22:41:31 -06:00
James Almer
b164dea68c fate/iamf: add a test for expanded layouts
Signed-off-by: James Almer <jamrial@gmail.com>
2024-12-13 16:36:10 -03:00
James Almer
6eb4bf04e9 avutil/channel_layout: add a 9.1.6 layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-12-13 16:35:47 -03:00
Martin Storsjö
eb79c316c7 fate: Add a dependency on ffprobe for fate-flcl1905
This fixes occasional failed tests, if doing "make fate" without a
regular "make" or "make all" inbetween.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-12-13 09:48:17 +02:00
Martin Storsjö
1e76bd2f39 fate: Add a target for listing failed tests
If running tests with "make -j<N> fate", the execution will stop
after the first failing test. To get an overview of the whole
test suite, one rather would run "make -k -j<N> fate", which then
again buries the results about what tests actually failed further
up in the console log.

Add a target so one can run "make fate-list-failing", to see a list
of all tests that failed the last time they were executed.

Also add a companion target "fate-clear-reports" which removes all
the old test reports. (When executing a subset of tests, the report
files of all tests that aren't executed stay untouched. This also
allows getting rid of reports for tests that no longer are present
in the testsuite.)

Co-authored-by: Alexander Strasser <eclipse7@gmx.net>

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-12-11 14:10:22 +02:00
Martin Storsjö
4b524649ff checkasm: Print benchmarks of C-only functions
This corresponds to commit 9278a14cf406f8edb5052c42b83750112bf5b515
in dav1d.

Omitting the C-only functions doesn't speed up benchmarking
anyway (as those has to be benchmarked before we know if we have
any corresponding assembly functions), and being able to benchmark
those functions without corresponding assembly can be valuable in
a number of cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-12-11 10:51:15 +02:00
sunyuechi
82da769492 checkasm/rv40dsp: cover more cases
Co-Authored-By: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2024-12-10 11:24:45 -05:00
Martin Storsjö
47b1e1bd84 checkasm: vvc: Use checkasm_check for printing failing output
Share the checkasm_check_pixel macro from hevc_pel in checkasm.h,
to allow other tests to use the same. (To use it in other tests,
those tests need to have a similar setup for high bitdepth pixels,
with a local variable named "bit_depth".)

This simplifies the code for checking the output, and can print
the failing output (including a map of matching/mismatching
elements) if checkasm is run with the -v/--verbose option.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-12-10 11:26:09 +02:00
Leo Izen
c1e3d55f99
avcodec/png{dec,enc}: update mDCV and cLLI chunk capitalization
The PNGv3 Specification Draft [1] has changed the capitalization
of mDCV and cLLI chunks (formerly mDCv and cLLi). This patch updates
FFmpeg to work with the new chunk names while retaining decode-side
compatibility with files created using the old names.

[1]: https://w3c.github.io/png/

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2024-12-09 15:16:59 -05:00
Paul B Mahol
8050a7955e avformat/mm: fix packets pts generation and add seek support
Signed-off-by: Peter Ross <pross@xvid.org>
2024-12-08 09:32:35 +11:00
Zhao Zhili
018ec4fe5f tests/checkasm: Simplify logic for WASI signal handling
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Reviewed-by: Martin Storsjö <martin@martin.st>
2024-12-06 10:48:11 +08:00
Ramiro Polla
384fe39623 swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats
There is an issue with the constants used in YUV to YUV range conversion,
where the upper bound is not respected when converting to mpeg range.

With this commit, the constants are calculated at runtime, depending on
the bit depth. This approach also allows us to more easily understand how
the constants are derived.

For bit depths <= 14, the number of fixed point bits has been set to 14
for all conversions, to simplify the code.
For bit depths > 14, the number of fixed points bits has been raised and
set to 18, to allow for the conversion to be accurate enough for the mpeg
range to be respected.

The convert functions now take the conversion constants (coeff and offset)
as function arguments.
For bit depths <= 14, coeff is unsigned 16-bit and offset is 32-bit.
For bit depths > 14, coeff is unsigned 32-bit and offset is 64-bit.

x86_64:
chrRangeFromJpeg8_1920_c:    2127.4   2125.0  (1.00x)
chrRangeFromJpeg16_1920_c:   2325.2   2127.2  (1.09x)
chrRangeToJpeg8_1920_c:      3166.9   3168.7  (1.00x)
chrRangeToJpeg16_1920_c:     2152.4   3164.8  (0.68x)
lumRangeFromJpeg8_1920_c:    1263.0   1302.5  (0.97x)
lumRangeFromJpeg16_1920_c:   1080.5   1299.2  (0.83x)
lumRangeToJpeg8_1920_c:      1886.8   2112.2  (0.89x)
lumRangeToJpeg16_1920_c:     1077.0   1906.5  (0.56x)

aarch64 A55:
chrRangeFromJpeg8_1920_c:   28835.2  28835.6  (1.00x)
chrRangeFromJpeg16_1920_c:  28839.8  32680.8  (0.88x)
chrRangeToJpeg8_1920_c:     23074.7  23075.4  (1.00x)
chrRangeToJpeg16_1920_c:    17318.9  24996.0  (0.69x)
lumRangeFromJpeg8_1920_c:   15389.7  15384.5  (1.00x)
lumRangeFromJpeg16_1920_c:  15388.2  17306.7  (0.89x)
lumRangeToJpeg8_1920_c:     19227.8  19226.6  (1.00x)
lumRangeToJpeg16_1920_c:    15387.0  21146.3  (0.73x)

aarch64 A76:
chrRangeFromJpeg8_1920_c:    6324.4   6268.1  (1.01x)
chrRangeFromJpeg16_1920_c:   6339.9  11521.5  (0.55x)
chrRangeToJpeg8_1920_c:      9656.0   9612.8  (1.00x)
chrRangeToJpeg16_1920_c:     6340.4  11651.8  (0.54x)
lumRangeFromJpeg8_1920_c:    4422.0   4420.8  (1.00x)
lumRangeFromJpeg16_1920_c:   4420.9   5762.0  (0.77x)
lumRangeToJpeg8_1920_c:      5949.1   5977.5  (1.00x)
lumRangeToJpeg16_1920_c:     4446.8   5946.2  (0.75x)

NOTE: all simd optimizations for range_convert have been disabled.
      they will be re-enabled when they are fixed for each architecture.

NOTE2: the same issue still exists in rgb2yuv conversions, which is not
       addressed in this commit.
2024-12-05 21:10:29 +01:00
Ramiro Polla
536a44e8dc checkasm/sw_range_convert: test negative input values 2024-12-05 21:10:29 +01:00
Niklas Haas
7b73ea501d avutil/tests/color_utils: add tests for av_csp_itu_eotf 2024-12-05 12:27:33 +01:00
Niklas Haas
bf0a6c4111 avutil/csp: add av_csp_trc_inv_from_id()
Mathematical inverse of av_csp_trc_from_id(), plus testing to make sure it
roundtrips correctly with the corresponding TRC.
2024-12-05 12:26:49 +01:00
Niklas Haas
28f217780b avutil/tests/color_utils: clean up slightly (cosmetic)
Rewrite this test slightly to fix the formatting, improve the readability of
the output, and eliminate some unnecessary branching.
2024-12-05 11:51:18 +01:00
Zhao Zhili
ea3d21c349 tests/checkasm: Add partial support for wasm
WASI mssing signal and siglongjmp support. This patch workaround
build error and add simd128 flag. Please note that many tests use
large array on stack, so you need to increase the stack size when
build checkasm, e.g., --extra-ldflags='-Wl,-z,stack-size=10485760'

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-12-04 16:43:07 +08:00
Marton Balint
4100a2da29 tests/fate/filter-audio: add aloop test
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:59:56 +01:00
Marton Balint
f5948543f4 fate: revert previous frequency adjustments of the sine filter
With more precise frequency support in the sine filter, several fate tests will
change.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:16:22 +01:00
Marton Balint
6189cb47fc fate: adjust frequencies of the sine filter
The filter currently uses inaccurate frequencies, this is in preparation for
fixing that, by using numbers that will map to the equivalent value in the
future code.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-29 21:15:22 +01:00
Ramiro Polla
4e1a91112d tests/fate/filter-video: don't convert owdenoise test to mpeg range 2024-11-28 00:58:21 +01:00
James Almer
19f7dae81a avformat/mov: add missing stts array syncing in mov_build_index
Also fix checks for sc->stts_count that assume it may not be in sync with
sample count.
Missed in 865c73c86f9d9d167be7e41ad6cef71eba92dadd. Fixes parsing durations in
some cases.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-25 14:40:15 -03:00
Niklas Haas
6a91a165fd swscale: eliminate redundant SwsInternal accesses
This is a purely cosmetic commit aimed at replacing accesses to
SwsInternal.opts by direct access to SwsContext wherever convenient.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-11-25 10:59:52 +01:00
James Almer
4e6d31755b avformat/spdifdec: parse headers for audio codecs
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-24 20:14:11 -03:00
Darren Mo
865c73c86f avformat/mov: Populate packet duration using stts atom instead of guessing
Fixes tickets #7855 and #11312.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-22 20:50:05 -03:00
Niklas Haas
2d077f9acd swscale/internal: group user-facing options together
This is a preliminary step to separating these into a new struct. This
commit contains no functional changes, it is a pure search-and-replace.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-11-21 12:49:56 +01:00
James Almer
9d8f7bf4b8 tests/checkasm/diracdsp: fix alignment for src and ombc_weight buffers
They are supposed to be 16 byte aligned, not 8.
Should fix crashes in some systems.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-19 12:32:49 -03:00
Rémi Denis-Courmont
55aa81d5cc checkasm: add RISC-V vector width to arch info 2024-11-17 11:28:21 +02:00
Kyosuke Kawakami
711290f9a3 checkasm/diracdsp: test add_dirac_obmc
Signed-off-by: Kyosuke Kawakami <kawakami150708@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2024-11-15 13:44:53 -05:00
James Almer
edc7b67508 avformat/iamf: use the new Binaural channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-13 12:38:04 -03:00
James Almer
20af68b63a avutil/channel_layout: add Binaural channels and layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-13 12:38:04 -03:00
James Almer
2b1bf3e228 fate/pixfmt: reintroduce scale filter dependency for some tests
Removed by mistake in 271aea60a4cd211d92923c53b72cd074c3030897.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-10 20:22:22 -03:00
Osamu Watanabe
82467b635e
avcodec/jpeg2000: Improve FF_DWT97_INT to pass ISO/IEC 15444-4 conformance tests
Fixes https://trac.ffmpeg.org/ticket/10123

Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
2024-11-08 08:30:07 -08:00
James Almer
3330b733d3 fate/pixfmt: disable dithering in the scale filter
Should fix fate failures across different systems.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-08 09:19:06 -03:00
James Almer
2eb9c35010 x86/swscale: disable AVX2 yuv2nv12cX functions if accurate_rnd is requested
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-07 11:16:42 -03:00
James Almer
271aea60a4 fate/pixfmts: extend the high bit depth test
Also test 8bit formats, and try bitdepth conversion paths.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-06 17:44:25 -03:00
James Almer
ae8ef645ec swscale/swscale_unscaled: add unscaled x2rgb10le to planar RGB
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-06 17:34:31 -03:00
Peter Ross
2d81eaa37b fate/rv60: add test 2024-11-03 10:53:15 +11:00
James Almer
40878dfb11 fate/pixfmts: test conversion of high bitdepth formats
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
c029a2f7dd swscale/swscale_unscaled: add unscaled rgb to planar rgba
The fate test reference changes are due to the conversion being a simple
lossless deinterleave, instead of going through a RGB -> YUV -> RGB roundtrip.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
febc9e8162 swscale/output: add full chroma interpolation support for x2rgb10
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
430bec8666 fate/filter-video: add more rgbtestsrc tests
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
Zhao Zhili
1864025458 fate/vvc: Add a sample which lose frames before 5c66a3
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-01 16:59:48 +08:00
Peter Ross
87068b9600 fate/vp60-interlace: add test 2024-10-31 17:49:48 +11:00
Ramiro Polla
562524587e checkasm/sw_range_convert: indent after previous couple of commits 2024-10-27 13:20:56 +01:00
Ramiro Polla
031d98790e checkasm/sw_range_convert: test all supported bit depths
This commit also reduces the number of times ff_sws_init_scale() gets
called (only once per bit depth), and the number of times randomize_buffers()
gets called (only if the function must be checked).

Benchmarks are only performed on bit depths 8 and 16 (since they are
different functions, and not only different constants).
2024-10-27 13:20:56 +01:00
Ramiro Polla
2c44393c01 checkasm/sw_range_convert: only run benchmarks on largest input width 2024-10-27 13:20:56 +01:00
Ramiro Polla
e308d09fba checkasm/sw_range_convert: reduce number of input sizes tested
Reduce input sizes to 8 (to test that the function works with widths
smaller than the vector length) and 1920 (raising the largest input
size to improve benchmark results).
2024-10-27 13:20:56 +01:00
Ramiro Polla
d1acd68d73 checkasm/sw_range_convert: use YUV pixel formats instead of YUVJ
We are already setting the range, so we can use regular YUV pixel
formats instead of YUVJ.
2024-10-27 13:20:56 +01:00
Ramiro Polla
a8ef1fac0d checkasm: use FF_ARRAY_ELEMS instead of hardcoding size of arrays 2024-10-27 13:20:56 +01:00