summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* lavfilter: Add SITI filterBoris Baracaldo2022-04-01
| | | | | | Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, as defined in ITU-T P.910: Subjective video quality assessment methods for multimedia applications.
* avcodec/vc1: Introduce fast path for unescaping bitstream bufferBen Avison2022-04-01
| | | | | | | Includes a checkasm test. Signed-off-by: Ben Avison <bavison@riscosopen.org> Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm: Add idctdsp add/put-pixels-clamped testsBen Avison2022-04-01
| | | | | Signed-off-by: Ben Avison <bavison@riscosopen.org> Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm: Add vc1dsp inverse transform testsBen Avison2022-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test deliberately doesn't exercise the full range of inputs described in the committee draft VC-1 standard. It says: input coefficients in frequency domain, D, satisfy -2048 <= D < 2047 intermediate coefficients, E, satisfy -4096 <= E < 4095 fully inverse-transformed coefficients, R, satisfy -512 <= R < 511 For one thing, the inequalities look odd. Did they mean them to go the other way round? That would make more sense because the equations generally both add and subtract coefficients multiplied by constants, including powers of 2. Requiring the most-negative values to be valid extends the number of bits to represent the intermediate values just for the sake of that one case! For another thing, the extreme values don't look to occur in real streams - both in my experience and supported by the following comment in the AArch32 decoder: tNhalf is half of the value of tN (as described in vc1_inv_trans_8x8_c). This is done because sometimes files have input that causes tN + tM to overflow. To avoid this overflow, we compute tNhalf, then compute tNhalf + tM (which doesn't overflow), and then we use vhadd to compute (tNhalf + (tNhalf + tM)) >> 1 which does not overflow because it is one instruction. My AArch64 decoder goes further than this. It calculates tNhalf and tM then does an SRA (essentially a fused halve and add) to compute (tN + tM) >> 1 without ever having to hold (tNhalf + tM) in a 16-bit element without overflowing. It only encounters difficulties if either tNhalf or tM overflow in isolation. I haven't had sight of the final standard, so it's possible that these issues were dealt with during finalisation, which could explain the lack of usage of extreme inputs in real streams. Or a preponderance of decoders that only support 16-bit intermediate values in their inverse transforms might have caused encoders to steer clear of such cases. I have effectively followed this approach in the test, and limited the scale of the coefficients sufficient that both the existing AArch32 decoder and my new AArch64 decoder both pass. Signed-off-by: Ben Avison <bavison@riscosopen.org> Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm: Add vc1dsp in-loop deblocking filter testsBen Avison2022-04-01
| | | | | | | | | | | Note that the benchmarking results for these functions are highly dependent upon the input data. Therefore, each function is benchmarked twice, corresponding to the best and worst case complexity of the reference C implementation. The performance of a real stream decode will fall somewhere between these two extremes. Signed-off-by: Ben Avison <bavison@riscosopen.org> Signed-off-by: Martin Storsjö <martin@martin.st>
* test: tiny_ssim: Don't include config.hMartin Storsjö2022-03-30
| | | | | | | | | | | tiny_ssim is built for the build host, not for the target platform. Therefore, it mustn't include the config.h header, which is set up specifically for the target platform and compiler. This fixes cross building for older WinStore platforms, where config.h contains "#define getenv(x) NULL". Signed-off-by: Martin Storsjö <martin@martin.st>
* avutil/tests/channel_layout: also test ambisonic layouts in ↵James Almer2022-03-25
| | | | | | av_channel_layout_subset() Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add crystalizer testPaul B Mahol2022-03-25
|
* avutil/tests/channel_layout: test the output of av_channel_layout_subset()James Almer2022-03-25
| | | | | | Should increase test coverage a bit Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/channel_layout: test the output of av_channel_layout_standard()James Almer2022-03-25
| | | | | | Should increase test coverage. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/tests/channel_layout: test generating a custom layout using ambisonic ↵James Almer2022-03-25
| | | | | | | | channels and a non diegetic channel with a custom name Should increase test coverage a bit Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/tests: add test for ff_rescale_interval()Pierre-Anthony Lemieux2022-03-19
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* fate: add tpad filter testsPaul B Mahol2022-03-18
|
* fate: add a setts bsf testJames Almer2022-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mxfenc: allow more bits for variable part in uuid generationMarton Balint2022-03-16
| | | | | | Also make sure we do not change the product UID. Signed-off-by: Marton Balint <cus@passwd.hu>
* fate: add epx testsPaul B Mahol2022-03-16
|
* fate: add chromashift testsPaul B Mahol2022-03-16
|
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* tests: Add fate-bsf-dv-error-markerMichael Niedermayer2022-03-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* channel_layout: add support for AmbisonicVittorio Giovara2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* tests: convert to new channel layout-APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: convert to new channel layout APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ac3: convert to new channel layout APIVittorio Giovara2022-03-15
| | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* framehash: convert to new channel layout APIAnton Khirnov2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu: support AVChannelLayout AVOptionsAnton Khirnov2022-03-15
| | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add a channel_layout API testJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add decimate filter testPaul B Mahol2022-03-14
|
* fate/mov: Add test for muxing chaptersAndreas Rheinhardt2022-03-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/cpu: add AVX512 Icelake flagWu Jianhua2022-03-10
| | | | | | Signed-off-by: Wu Jianhua <jianhua.wu@intel.com> Reviewed-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add a test for HDR Vivid metadata in HEVCLimin Wang2022-03-10
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/pngdec: support alpha blending for palette apngPaul B Mahol2022-03-08
| | | | Update clock test, as PAL8 apngs are now decoded as RGBA.
* tests: update hash as output have changed again for fate-lavf-mxf_opatomPaul B Mahol2022-03-06
|
* avcodec/dnxhdenc: retry increasing qscale to not overflow max_bitsPaul B Mahol2022-03-05
| | | | | | | Increase mb_bits type from uint16_t to uint32_t to fix possible overflows in bit size calculations. Update fate test that needs change.
* configure: stop allowing disabling lzoJames Almer2022-02-26
| | | | | | The module is now always compiled in. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale: Take the destination range into account for yuv->rgb->yuv conversionsMartin Storsjö2022-02-25
| | | | | | | | | | | | The range parameters need to be set up before calling sws_init_context (which selects which fastpaths can be used; this gets called by sws_getContext); solely passing them via sws_setColorspaceDetails isn't enough. This fixes producing full range YUV range output when doing YUV->YUV conversions between different YUV color spaces. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat/imf: fix packet pts, dts and muxingPierre-Anthony Lemieux2022-02-20
| | | | | | | | | | The IMF demuxer does not set the DTS and PTS of packets accurately in all scenarios. Moreover, audio packets are not trimmed when they exceed the duration of the underlying resource. imf-cpl-with-repeat FATE ref file is regenerated. Addresses https://trac.ffmpeg.org/ticket/9611
* avformat/imf: add IMF CPL with repeated resources to FATEPierre-Anthony Lemieux2022-02-03
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/mpeg4: Add test for MPEG-4 Simple Studio ProfileAndreas Rheinhardt2022-01-29
| | | | | | | The sample mpeg4/mpeg4_sstp_dpcm.m4v existed in the FATE-suite, but it was surprisingly unused. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/h264: move some shared code from h264dec to h264_parseAnton Khirnov2022-01-26
|
* tests: add test for ffmpeg's fix_sub_duration featureJan Ekström2022-01-24
| | | | | | | | This long-existing feature calculates subtitle durations by keeping it around until the following subtitle is decoded, and then utilizes the following subtitle's pts as the end point of the previous one. Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
* fate/ffmpeg: Add test for autorotating videoAndreas Rheinhardt2022-01-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Peek into the muxing queue for avoid_negative_tsAndreas Rheinhardt2022-01-21
| | | | | | | | | | | Peeking into the muxing queue can improve the estimate of the lowest timestamp needed for avoid_negative_ts in case the lowest timestamp is in a packet other than the first packet to be muxed. This fixes tickets #4536 and #5784 as well as the output from the matroska-avoid-negative-ts FATE-test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mux: Preserve sync even if later packet has negative tsAndreas Rheinhardt2022-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | write_packet() has code to shift the packets timestamps to make them nonnegative or even make them start at ts zero; this code inspects every packet that is written and if a packet with negative timestamp (whether this is dts or pts depends upon another flag; basically: Matroska uses pts, everyone else dts) is encountered, this is offset to make the timestamp zero. All further packets will be offset accordingly (with the offset converted according to the streams' timebases). This is based around an assumption, namely that the timestamps are indeed non-decreasing, so that the first packet with negative timestamps is the first packet with timestamps. This assumption is often fulfilled given that the default interleavement function by default interleaves per dts; yet there are scenarios in which it may not be fulfilled: a) av_write_frame() instead of av_interleaved_write_frame() is used. b) The audio_preload option is used. c) When the timestamps that are made nonnegative/zero are pts (i.e. with Matroska), because the packet with the smallest dts is not necessarily the packet with the smallest pts. d) Possibly with custom interleavement functions. In these cases the relative sync of the first few packet(s) is offset relative to the later packets. This contradicts the documentation ("When shifting is enabled, all output timestamps are shifted by the same amount"). Therefore this commit changes this: As soon as the first packet with valid timestamps is output, it is checked and recorded whether the timestamps need to be shifted. Further packets are no longer checked for needing to be offset; instead they are simply offset. In the cases above this leads to packets with negative timestamps (and the appropriate warnings) instead of desync. This will mostly be fixed in the next commit. This commit also factors handling the avoid_negative_ts stuff out of write_packet() in order to be able to return immediately. Tickets #4536 and #5784 as well as the matroska-avoid-negative-ts-test are examples of c); as has been said, some timestamps are now negative, yet the ref file update does not show it because ffmpeg.c sanitizes the timestamps (-copyts disables it; ffprobe and mkvinfo also show the original timestamps). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/matroska: Add test for avoiding negative timestampsAndreas Rheinhardt2022-01-21
| | | | | | | This tests the issue from tickets #4536, #5784; the output of this test is currently broken. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/matroska: Add test for reading/writing BlockAdditionMapping elementsquietvoid2022-01-20
| | | | | | | | Tests the parsing and writing of AVDOVIDecoderConfigurationRecord, when it is present as a Dolby Vision configuration block addition mapping. Signed-off-by: quietvoid <tcChlisop0@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Remove duplicated code for writing WebVTT subsAndreas Rheinhardt2022-01-19
| | | | | | | | | | | | | | | | | | | | | | Up until now, the WebM variant of WebVTT subtitles has been handled specially: It had its own function to write it, because the data had to be reformatted before writing. But given that other codecs also need reformatting, this is no good reason to also duplicate the generic stuff for writing Block(Group)s. This commit therefore uses an ordinary reformatting function for this task; writing WebVTT subtitles now uses the generic code and therefore automatically uses the least amount of bytes for its BlockGroup length fields whereas the earlier code used an overestimation for the length of the Duration element. This is the reason for the changes to the webm-webvtt-remux FATE-test. (This commit does not implement support for Matroska's way of muxing WebVTT; it also does not add checks to ensure that WebM-style subtitles don't get muxed in Matroska. But the function for reformatting gets a webm prefix to indicate that this is for WebM.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on BlockGroup length fieldsAndreas Rheinhardt2022-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit uses the new EbmlWriter API to write the length fields of the BlockGroup and its descendants that are themselves Master elements (namely BlockAdditions and BlockMore) on the least amount of bytes. This fixes regressions introduced when the special code for writing general subtitles was removed. Accordingly, the binsub-mksenc and matroska-zero-length-block FATE-tests have now been reverted back to their old state again; the advantages of this approach are evident with the matroska-vp8-alpha-remux test which up until now wrote all the length fields of all BlockGroups, BlockAdditions and BlockMore on eight bytes. Using the EbmlWriter API also allowed to improve locality in mkv_write_block(): E.g. both DiscardPadding as well as the BlockAdditional side-data are now directly used to add elements to the writer whereas the earlier code had to first check for whether a BlockGroup should be used and then check again (after the place where a BlockGroup would be opened if one were used) for whether there is DiscardPadding or BlockAdditional side-data to write. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Remove special code for writing subtitlesAndreas Rheinhardt2022-01-19
| | | | | | | | | | | | | | | | | | Once upon a time, mkv_write_block() only wrote a (Simple)Block, not a BlockGroup which is needed for subtitles to convey the duration. But with the introduction of support for writing BlockAdditions and DiscardPadding (both of which require a BlockGroup), mkv_write_block() can also open and close a BlockGroup of its own. This naturally led to some code duplication which is removed in this commit. This new code leads to one regression: It always uses eight bytes for the BlockGroup's length field, whereas the earlier code usually used the lowest amount of bytes needed. This will be fixed in a future commit. This temporary regression is also the reason for changes to the binsub-mksenc and matroska-zero-length-block fate tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on ChapterAtoms length fieldsAndreas Rheinhardt2022-01-19
| | | | | | Also check the (user-provided) metadata tags for being too long. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on Video element length fieldsAndreas Rheinhardt2022-01-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>