summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* ffmpeg: Add display_{rotation, hflip, vflip} optionsJan Ekström2022-10-19
| | | | | | | | | This enables overriding the rotation as well as horizontal/vertical flip state of a specific video stream on the input side. Additionally, switch the singular test that was utilizing the rotation metadata to instead override the input display rotation, thus leading to the same result.
* checkasm/idctdsp: Use declare_func_emms only when neededAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for (add|put|put_signed)_pixels_clamped since commit bfb28b5ce89f3e950214b67ea95b45e3355c2caf, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/llviddspenc: Use declare_func_emms only when neededAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for diff_bytes since commit 230ea38de143368729ee1cce47b3a87fbafad8e4, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/huffyuvdsp: Use declare_func_emms only when neededAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for add_int16 since commit 4b6ffc2880e33d05ed1ab6bbc38e5a795f14b504, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/llviddsp: Be strict about MMXAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for llviddsp after commit fed07efcde72824ac1ada80d4af4e91ac4fcfc14, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/pixblockdsp: Be strict about MMXAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for pixblockdsp after commit 92b58002776edd3a3df03c90e8a3ab24b8f987de, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/audiodsp: Be strict about MMXAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for audiodsp after commit 3d716d38abdae1982e84e30becb57458244656bd, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/blockdsp: Be strict about MMXAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for blockdsp after commit ee551a21ddcbf81afe183d9489c534ee80f263a0, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm/vc1dsp: Use declare_func_emms only when neededAndreas Rheinhardt2022-10-11
| | | | | | | | | There is no MMX code for vc1_inv_trans_8x8 or vc1_unescape_buffer, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* checkasm: RISC-V 64-bit assembler test harnessRémi Denis-Courmont2022-10-10
|
* checkasm/vp8dsp: Use declare_func_emms only when neededAndreas Rheinhardt2022-10-08
| | | | | | | | | | There is no MMX code for loop filters since commit 6a551f14050674fb685920eb1b0640810cacccf9, so use declare_func instead of declare_func_emms() to also test that we are not in MMX mode after return. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/vcodec: Add speedhq testsAndreas Rheinhardt2022-10-06
| | | | | | The vsynth3 tests are disabled, because the encoder produces garbage. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/sgidec: Use planar pixel formatsAndreas Rheinhardt2022-10-05
| | | | | | | The data in SGI images is stored planar, so exporting it via planar pixel formats is natural. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/riscv: CPU flag for the Zbb extensionRémi Denis-Courmont2022-10-05
| | | | | | | | | | | | Unfortunately, it is common, and will remain so, that the Bit manipulations are not enabled at compilation time. This is an official policy for Debian ports in general (though they do not support RISC-V officially as of yet) to stick to the minimal target baseline, which does not include the B extension or even its Zbb subset. For inline helpers (CPOP, REV8), compiler builtins (CTZ, CLZ) or even plain C code (MIN, MAX, MINU, MAXU), run-time detection seems impractical. But at least it can work for the byte-swap DSP functions.
* tests/fate/truehd: Add test for shortened Ticket1726 testcaseMichael Niedermayer2022-10-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate/opus: add silk LBRR test (refs #9890)Tristan Matthews2022-10-04
| | | | | | This adds a fate test for a sample with LBRR packets. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/rl2: Remove wrong checkAndreas Rheinhardt2022-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This check is intended to be avoid buffer overflows, yet there are four problems with it: 1. It has an in-built off-by-one error: len == out_end - out is perfectly fine and nothing to worry about. This off-by-one error led to the pixel in the lower-right corner not being set properly for the back frame of the sample from the rl2 FATE-test. This pixel is copied to every frame which is the reason for the update to the reference file of said test. With this patch, the output of the decoder matches the output as captured from the reference decoder* (apart from the fact that said reference somehow lacks the top part of the frame (copied over from the background frame)). 2. Given that the stride of the buffer may be different from the width of the video (despite one pixel taking one byte), there is a second check lateron making the first check redundant (if one returns immediately; a simple break at the second check is not sufficient, because it only exits the inner loop). 3. The check is based around the assumption of the stride being positive (it has this in common with the other check which will be fixed in a future commit). 4. Even after fixing the off-by-one error, the check in question is still triggered by all the non-background frames in the FATE sample as well as by A1100100.RL2. In all these cases, they use len == 255 and val == 128. For videos with background frame this just means "copy from the background frame", which would be done anyway lateron.* Yet for videos without it copying it is necessary to avoid leaving uninitialized parts in the video. *: Available in https://samples.mplayerhq.hu/game-formats/voyeur-rl2/ **: Due to this, the code that copies the rest from the back frame is no longer executed for any of the samples available on the sample server. Given that these are only the files from the demo version of this game, I don't know whether this code is executed for any file in existence or not. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/cpu: CPU flags for the RISC-V Vector extensionRémi Denis-Courmont2022-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RVV defines a total of 12 different extensions, including: - 5 different instruction subsets: - Zve32x: 8-, 16- and 32-bit integers, - Zve32f: Zve32x plus single precision floats, - Zve64x: Zve32x plus 64-bit integers, - Zve64f: Zve32f plus Zve64x, - Zve64d: Zve64f plus double precision floats. - 6 different vector lengths: - Zvl32b (embedded only), - Zvl64b (embedded only), - Zvl128b, - Zvl256b, - Zvl512b, - Zvl1024b, - and the V extension proper: equivalent to Zve64f and Zvl128b. In total, there are 6 different possible sets of supported instructions (including the empty set), but for convenience we allocate one bit for each type sets: up-to-32-bit ints (RVV_I32), floats (RVV_F32), 64-bit ints (RVV_I64) and doubles (RVV_F64). Whence the vector size is needed, it can be retrieved by reading the unprivileged read-only vlenb CSR. This should probably be a separate helper macro if needed at a later point.
* lavu/cpu: detect RISC-V base extensionsRémi Denis-Courmont2022-09-27
| | | | | | | | | | This introduces compile-time and run-time CPU detection on RISC-V. In practice, I doubt that FFmpeg will ever see a RISC-V CPU without all of I, F and D extensions, and if it does, it probably won't have run-time detection. So the flags are essentially always set. But as things stand, checkasm wants them that way. Compare the ARMV8 flag on AArch64. We are nowhere near running short on CPU flag bits.
* avutil: add RGBA single-float precision packed formatsPaul B Mahol2022-09-25
|
* avutil: add RGB single-precision float formatsPaul B Mahol2022-09-25
|
* fate/cbs: Add tests for h264_redundant_pps BSFAndreas Rheinhardt2022-09-25
| | | | | | | | This also tests writing slice data in the unaligned mode (some of these files use CAVLC) as well as updating side data as well as parsing ISOBMFF avcc extradata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* x86/tx_float: add 15xN PFA FFT AVX SIMDLynne2022-09-23
| | | | | | | | | ~4x faster than the C version. The shuffles in the 15pt dim1 are seriously expensive. Not happy with it, but I'm contempt. Can be easily converted to pure AVX by removing all vpermpd/vpermps instructions.
* tests/checkasm/lpc: correct arithmetic when randomizing buffersLynne2022-09-23
| | | | Results weren't signed.
* tests/checkasm/lpc: reduce range and use signed valuesLynne2022-09-23
| | | | | This is more similar to its regular use, and prevents inaccuracies of huge float*float multiplications from failing the tests.
* tests/checkasm/lpc: print mismatching valuesJames Almer2022-09-22
| | | | | | Will help debugging. Signed-off-by: James Almer <jamrial@gmail.com>
* tests/checkasm/lpc: randomize buffer lengthJames Almer2022-09-22
| | | | | | | Simplifies the test, while trying more values and preventing pointlessly running benchmarks in a loop. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/lpc: use ptrdiff_t for length parametersJames Almer2022-09-22
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/checkasm: add LPC test to listLynne2022-09-22
|
* x86/lpc: fix even scalar loop overreads/writesLynne2022-09-22
| | | | Passes checkasm with valgrind, tested to sizes of more than 4000 samples.
* avcodec/fmtconvert: Remove unused AVCodecContext parameterAndreas Rheinhardt2022-09-21
| | | | | | | Unused since d74a8cb7e42f703be5796eeb485f06af710ae8ca. Reviewed-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/blockdsp: Remove unused AVCodecContext parameterAndreas Rheinhardt2022-09-21
| | | | | | | Possible since be95df12bb06b183c8d2aea3b0831fdf05466cf3. Reviewed-by: Rémi Denis-Courmont <remi@remlab.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-*: Add missing dependency on pipe protocolAndreas Rheinhardt2022-09-21
| | | | | | Forgotten in bf1337f99c66ac574c6e4da65c305ca878f1d65d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* x86/lpc: implement a new Welch windowing functionLynne2022-09-21
| | | | | | | | | | | | Old one was written with the assumption only even inputs would be given. This very messy replacement supports even and odd inputs, and supports AVX2 for extra speed. The buffers given are usually quite big (4k samples), so the speedup is worth it. The new SSE version is still faster than the old inline asm version by 33%. Also checkasm is provided to make sure this monstrosity works. This fixes some FATE tests.
* fate/segafilm: Add tests for segafilm (de)muxerAndreas Rheinhardt2022-09-20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/ffmpeg: Set max_delay for shortest-subAndreas Rheinhardt2022-09-20
| | | | | | | | | | The aim of this test is to show the interleavement of the file generated in the first pass; so make the interleavement queue in the framecrc muxer in the second pass as small as possible so that the framecrc muxer does not fix wrong interleavement of the input file behind our backs. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/ffmpeg: Use transcode instead of enc_dec in shortest-sub testAndreas Rheinhardt2022-09-20
| | | | | | | | | | | | | | | enc_dec is designed for raw input and output and computes the PSNR between these two. The input of the shortest-sub test is the idx file of a vobsub sub+idx combination and the output is the output of framecrc of said vobsub subtitle muxed into Matroska together with a synthesized video. Calculating the PSNR between these two files makes no sense, therefore switch to a transcode test, where the ref file file contains the output of framecrc directly, making the interleavement better visible in the ref file at the cost of a larger ref file (>400 lines). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/mxf: add JPEG 2000 testPierre-Anthony Lemieux2022-09-20
| | | | | Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/mxf: Add ProRes remux testAndreas Rheinhardt2022-09-20
| | | | | | | Also covers writing mastering display metadata. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/mxf: Fix test requirementsAndreas Rheinhardt2022-09-20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/checkasm: add a test for VorbisDSPContextJames Almer2022-09-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aptxenc: Process data in complete blocks of four samples onlyAndreas Rheinhardt2022-09-19
| | | | | | | | | | | Do this by setting AVCodecInternal.pad_samples. This prevents reading into the frame's padding and writing into the packet's padding. This actually happened in our FATE tests (where the number of samples is 2 mod 4), which therefore needed to be updated. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/utils: Support APTX (HD) in av_get_audio_frame_duration()Andreas Rheinhardt2022-09-19
| | | | | | | | | | | | APTX decodes four bytes of input to four stereo samples; APTX HD does the same with six bytes of input. So it can be easily supported in av_get_audio_frame_duration(). This fixes invalid durations and (derived) timestamps of demuxed APTX HD packets and therefore fixed the timestamp in the aptx-hd FATE test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/audio: Add tests for APTX (HD)Andreas Rheinhardt2022-09-19
| | | | | | | | | | | | | | | We have de- and encoders for APTX and APTX HD, yet not FATE tests. This commit therefore adds a transcoding test to utilize them. Furthermore, during creating these tests it turned out that the duration is set incorrectly for APTX HD. This will be fixed in a future commit. (Thanks to Andriy Gelman for finding an issue in an earlier version that used a 192kHz input sample which does not work reliably accross platforms.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-audio: Add dfpwm testAndreas Rheinhardt2022-09-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/pixdesc: favour formats where depth and subsampling exactly matchPhilip Langdale2022-09-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since introducing the various packed formats used by VAAPI (and p012), we've noticed that there's actually a gap in how av_find_best_pix_fmt_of_2 works. It doesn't actually assign any value to having the same bit depth as the source format, when comparing against formats with a higher bit depth. This usually doesn't matter, because av_get_padded_bits_per_pixel() will account for it. However, as many of these formats use padding internally, we find that av_get_padded_bits_per_pixel() actually returns the same value for the 10 bit, 12 bit, 16 bit flavours, etc. In these tied situations, we end up just picking the first of the two provided formats, even if the second one should be preferred because it matches the actual bit depth. This bug already existed if you tried to compare yuv420p10 against p016 and p010, for example, but it simply hadn't come up before so we never noticed. But now, we actually got a situation in the VAAPI VP9 decoder where it offers both p010 and p012 because Profile 3 could be either depth and ends up picking p012 for 10 bit content due to the ordering of the testing. In addition, in the process of testing the fix, I realised we have the same gap when it comes to chroma subsampling - we do not favour a format that has exactly the same subsampling vs one with less subsampling when all else is equal. To fix this, I'm introducing a small score penalty if the bit depth or subsampling doesn't exactly match the source format. This will break the tie in favour of the format with the exact match, but not offset any of the other scoring penalties we already have. I have added a set of tests around these formats which will fail without this fix.
* fate/spdif: Add spdif testsAndreas Rheinhardt2022-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tests test both the demuxer as well as the muxer wherever possible. It is not always possible due to the fact that the muxer supports more codecs than the demuxer. The spdif demuxer does currently not set the need_parsing flag. If one were to set this to AVSTREAM_PARSE_FULL, the test results would change as follows: - For spdif-aac-remux, the packets are currently padded to 16bits, i.e. if the actual packet size is odd, there is a padding byte. The parser splits this byte away into a one byte packet of its own. Insanely, these one byte packets get the same duration as normal packets, i.e. timing is ruined. - The DCA-remux tests get proper duration/timestamps. - In the spdif-mp2-remux test the demuxer marks the stream as being MP2; the parser sets it to MP3 and this triggers the "Codec change in IEC 61937" codepath; this test therefore returns only two packets with the parser. - For spdif-mp3-remux some bytes end up in different packets: Some input packets of this file have an odd length (417B instead of 418B like all the other packets) and are padded to 418B. Without a parser, all returned packets from the spdif-demuxer are 418B. With a parser, the packets that were originally 417B are 417B again, but the padding byte has not been discarded, but added to the next packet which is now 419B. This fixes "Multiple frames in a packet" warning and avoids an "Invalid data found when processing input" error when decoding. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/subtitles: Add PGS remux testAndreas Rheinhardt2022-09-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/id3v2: Add test for reading and writing UTF-16 BOM tagsAndreas Rheinhardt2022-09-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/output: add support for Y210LE and Y212LEPhilip Langdale2022-09-10
|