aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit ↵Ramiro Polla2024-12-05179-699/+751
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* checkasm/sw_range_convert: test negative input valuesRamiro Polla2024-12-051-0/+14
|
* avutil/tests/color_utils: add tests for av_csp_itu_eotfNiklas Haas2024-12-051-0/+2650
|
* avutil/csp: add av_csp_trc_inv_from_id()Niklas Haas2024-12-051-304/+304
| | | | | Mathematical inverse of av_csp_trc_from_id(), plus testing to make sure it roundtrips correctly with the corresponding TRC.
* avutil/tests/color_utils: clean up slightly (cosmetic)Niklas Haas2024-12-051-304/+304
| | | | | Rewrite this test slightly to fix the formatting, improve the readability of the output, and eliminate some unnecessary branching.
* tests/checkasm: Add partial support for wasmZhao Zhili2024-12-042-2/+21
| | | | | | | | | 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>
* tests/fate/filter-audio: add aloop testMarton Balint2024-11-292-0/+48
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fate: revert previous frequency adjustments of the sine filterMarton Balint2024-11-2913-560/+560
| | | | | | | With more precise frequency support in the sine filter, several fate tests will change. Signed-off-by: Marton Balint <cus@passwd.hu>
* fate: adjust frequencies of the sine filterMarton Balint2024-11-296-78/+78
| | | | | | | | 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>
* tests/fate/filter-video: don't convert owdenoise test to mpeg rangeRamiro Polla2024-11-281-2/+2
|
* avformat/mov: add missing stts array syncing in mov_build_indexJames Almer2024-11-252-2/+2
| | | | | | | | | 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>
* swscale: eliminate redundant SwsInternal accessesNiklas Haas2024-11-254-40/+43
| | | | | | | | 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>
* avformat/spdifdec: parse headers for audio codecsJames Almer2024-11-242-1179/+1179
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: Populate packet duration using stts atom instead of guessingDarren Mo2024-11-229-13/+15
| | | | | | Fixes tickets #7855 and #11312. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/internal: group user-facing options togetherNiklas Haas2024-11-214-30/+30
| | | | | | | | 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>
* tests/checkasm/diracdsp: fix alignment for src and ombc_weight buffersJames Almer2024-11-191-2/+2
| | | | | | | They are supposed to be 16 byte aligned, not 8. Should fix crashes in some systems. Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm: add RISC-V vector width to arch infoRémi Denis-Courmont2024-11-171-0/+6
|
* checkasm/diracdsp: test add_dirac_obmcKyosuke Kawakami2024-11-155-0/+97
| | | | | Signed-off-by: Kyosuke Kawakami <kawakami150708@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avformat/iamf: use the new Binaural channel layoutJames Almer2024-11-132-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/channel_layout: add Binaural channels and layoutJames Almer2024-11-131-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/pixfmt: reintroduce scale filter dependency for some testsJames Almer2024-11-101-1/+2
| | | | | | Removed by mistake in 271aea60a4cd211d92923c53b72cd074c3030897. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/jpeg2000: Improve FF_DWT97_INT to pass ISO/IEC 15444-4 conformance testsOsamu Watanabe2024-11-089-41/+41
| | | | | | Fixes https://trac.ffmpeg.org/ticket/10123 Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
* fate/pixfmt: disable dithering in the scale filterJames Almer2024-11-085-5/+5
| | | | | | Should fix fate failures across different systems. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/swscale: disable AVX2 yuv2nv12cX functions if accurate_rnd is requestedJames Almer2024-11-0710-10/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/pixfmts: extend the high bit depth testJames Almer2024-11-06649-53/+1362
| | | | | | Also test 8bit formats, and try bitdepth conversion paths. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/swscale_unscaled: add unscaled x2rgb10le to planar RGBJames Almer2024-11-062-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/rv60: add testPeter Ross2024-11-033-0/+57
|
* fate/pixfmts: test conversion of high bitdepth formatsJames Almer2024-11-02130-2/+373
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/swscale_unscaled: add unscaled rgb to planar rgbaJames Almer2024-11-023-6/+6
| | | | | | | 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>
* swscale/output: add full chroma interpolation support for x2rgb10James Almer2024-11-021-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/filter-video: add more rgbtestsrc testsJames Almer2024-11-025-0/+52
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/vvc: Add a sample which lose frames before 5c66a3Zhao Zhili2024-11-012-1/+37
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fate/vp60-interlace: add testPeter Ross2024-10-313-0/+318
|
* checkasm/sw_range_convert: indent after previous couple of commitsRamiro Polla2024-10-271-24/+24
|
* checkasm/sw_range_convert: test all supported bit depthsRamiro Polla2024-10-271-31/+63
| | | | | | | | | 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).
* checkasm/sw_range_convert: only run benchmarks on largest input widthRamiro Polla2024-10-271-0/+2
|
* checkasm/sw_range_convert: reduce number of input sizes testedRamiro Polla2024-10-271-4/+4
| | | | | | 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).
* checkasm/sw_range_convert: use YUV pixel formats instead of YUVJRamiro Polla2024-10-271-4/+4
| | | | | We are already setting the range, so we can use regular YUV pixel formats instead of YUVJ.
* checkasm: use FF_ARRAY_ELEMS instead of hardcoding size of arraysRamiro Polla2024-10-273-24/+10
|
* tests/fate-run: Fix pixdesc failureZhao Zhili2024-10-271-1/+1
| | | | | | | -u and -q doesn't work together for diff on macOS. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avfilter/vsrc_testsrc: add support for XV48James Almer2024-10-262-0/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/riff: map Y416 fourcc to RAWVIDEO decoderJames Almer2024-10-2611-11/+11
| | | | | | As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/output: add XV48 output supportJames Almer2024-10-2612-0/+22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add XV48 pixel formatJames Almer2024-10-263-1/+12
| | | | | | | Much like XV30 and XV36 in d75c4693fef51e8f0a1b88798530f4c5147ea906, XV48 is added to support 16bit 4:4:4 as defined by Microsoft. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoderJames Almer2024-10-259-16/+16
| | | | | | As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats Signed-off-by: James Almer <jamrial@gmail.com>
* swscale: rename SwsContext to SwsInternalNiklas Haas2024-10-246-114/+138
| | | | | | | | | | | | | | | | | | | | | | | | And preserve the public SwsContext as separate name. The motivation here is that I want to turn SwsContext into a public struct, while keeping the internal implementation hidden. Additionally, I also want to be able to use multiple internal implementations, e.g. for GPU devices. This commit does not include any functional changes. For the most part, it is a simple rename. The only complications arise from the public facing API functions, which preserve their current type (and hence require an additional unwrapping step internally), and the checkasm test framework, which directly accesses SwsInternal. For consistency, the affected functions that need to maintain a distionction have generally been changed to refer to the SwsContext as *sws, and the SwsInternal as *c. In an upcoming commit, I will provide a backing definition for the public SwsContext, and update `sws_internal()` to dereference the internal struct instead of merely casting it. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale/output: add Y216LE output supportJames Almer2024-10-238-0/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/pixfmt: add Y216 pixel formatJames Almer2024-10-233-1/+12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/ffmpeg: add samples dependency to fate-ffmpeg-spec-dispositionEmily2024-10-211-1/+1
| | | | | | | This test utilizes an MPEG-TS sample from FATE suite, yet was marked as not requiring samples. Reviewed-by: Jan Ekström <jeebjp@gmail.com>
* fate/filter-video: make fate-filter-pixdesc compare the hashed output with ↵James Almer2024-10-212-1/+22
| | | | | | | | | and without pixdesctest filtering This helps detecting inconsistencies in swscale input/output code and a av_read_image_line()/av_write_image_line() pass. Signed-off-by: James Almer <jamrial@gmail.com>