summaryrefslogtreecommitdiff
path: root/tests/ref
Commit message (Collapse)AuthorAge
* lavc/bitstream: templatize for BE/LEAnton Khirnov2022-01-25
| | | | Allows using both BE and LE bitstream readers in the same file.
* 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>
* avformat/matroskaenc: Don't waste bytes on AttachedFiles' length fieldsAndreas Rheinhardt2022-01-19
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on SimpleTags length fieldsAndreas Rheinhardt2022-01-19
| | | | | | | Also check the (user-provided) tags for being overlong; the earlier code had an implicit unchecked size_t->int conversion. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* vf_paletteuse: fix color cache lookup for Bayer dithering mode.Rudolf Polzer2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To trigger this bug, use `paletteuse=dither=bayer:bayer_scale=0`; you will see that adjacent pixel lines will use the same dither pattern, instead of being shifted from each other by 32 units (0x20). One way to demostrate the bug is: $ convert -size 64x256 gradient:black-white -rotate 270 grad.png $ echo 'P2 2 1 255 0 255' > bw.pnm $ ffmpeg -i grad.png -filter_complex 'movie=bw.pnm,scale=256x1[bw]; [0:v][bw]paletteuse=dither=bayer:bayer_scale=0' gradbw.png Previously: https://www.rm.cloudns.org/img/uploaded/0bd152c11b9cd99e5945115534b1bdde.png Now: https://www.rm.cloudns.org/img/uploaded/89caaa5e36c38bc2c01755b30811f969.png This was caused by passing inconsistent color vs (a,r,g,b) parameters to color_get(), and NBITS being 5 meaning actually hitting the same cache node does happen in this case, but ONLY if bayer_scale is zero. The fix is passing the correct color value to color_get(). Also added a previous-failing FATE test; image comparison of the first frame: Previously: https://www.rm.cloudns.org/img/uploaded/d0ff9db8d8a7d8a3b8b88bbe92bf5fed.png Now: https://www.rm.cloudns.org/img/uploaded/a72389707e719b5cd1c58916a9e79ca8.png (on this less synthetic test image, the bug basically causes noise from cache hits vs misses) Tested: FATE passes, which exercises this filter but at the default bayer_scale. Reviewed-by: Paul B Mahol <onemda@gmail.com>
* fate/matroska: Add test for QT-modeAndreas Rheinhardt2022-01-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Add option to shift data to write cues at frontAndreas Rheinhardt2022-01-13
| | | | | | | | | | | | | This is similar to the faststart option of the mov muxer, yet in contrast to it it works together with reserve_index_space (the equivalent to reserved_moov_size): If the reserved space does not suffice, the data is shifted; if not, the Cues are written at the front without shifting the data. Several tests that cover (not only) this have been added. Implements #7017. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavu/fifo: deprecate av_fifo_peek2()Anton Khirnov2022-01-10
| | | | | | It returns a pointer inside the fifo's buffer, which cannot be safely used without accessing AVFifoBuffer internals. It is easier and safer to use av_fifo_generic_peek_at().
* avformat/movenc: fix duration in mdhd boxZhao Zhili2022-01-10
| | | | | | | mvhd and tkhd present the post-editlist duration, while mdhd should have the pre-editlist duration. Regression since c2424b1f3. Signed-off-by: Martin Storsjö <martin@martin.st>
* fate/amr[nw]b: Add remux testsAndreas Rheinhardt2022-01-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi/drawutils: re-enable P010 and P016 supportrcombs2022-01-04
| | | | These formats now work as expected.
* lavfi/drawutils: overhaul to improve pixel format supportrcombs2022-01-04
| | | | | | | | | | | | - No longer mixes u8 and u16 component accesses (this was UB) - De-duplicated 8->16 conversion - De-duplicated component -> plane+offset conversion - De-duplicated planar + packed RGB - No longer calls ff_fill_rgba_map - Removed redundant comp_mask data member - RGB0 and related formats no longer write an alpha value to the 0 byte - Non-planar YA formats now work correctly - High-bit-depth semi-planar YUV now works correctly
* lavfi/drawutils: reject shift-packed formatsrcombs2022-01-04
| | | | Disables x2bgr10/x2rgb10 (which did not behave correctly before).
* swscale: introduce isSwappedChromarcombs2022-01-04
|
* swscale: introduce isDataInHighBitsrcombs2022-01-04
|
* swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit casesrcombs2022-01-04
| | | | | | Fixes incorrect big-endian output introduced in 88d804b7ffa20caab2e8e2809da974c41f7fd8fc Avoids making the filter-time BE check more expensive
* lavc/hevcdec: Parse DOVI RPU NALsNiklas Haas2022-01-04
| | | | | | | | | | | | | | | | And expose the parsed values as frame side data. Update FATE results to match. It's worth documenting that this relies on the dovi configuration record being present on the first AVPacket fed to the decoder, which in practice is the case if if the API user has called something like av_format_inject_global_side_data, which is unfortunately not the default. This commit is not the time and place to change that behavior, though. Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: Limit Dolby Vision RPU test frame countNiklas Haas2022-01-04
| | | | | | | | | To avoid the ref for this growing to a very large size when attaching the parsed RPU side data. Since this sample does not have any dynamic metadata, two frames will serve just as well as 100. Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/imf: TestsPierre-Anthony Lemieux2021-12-31
| | | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avformat/mxfenc: fix DNxHD GC element_typeNicolas Gaullier2021-12-27
| | | | | | | | | | | | | | | | The values for the essence element type were updated in the spec from 0x05/0x06 (ST2019-4 2008) to 0x0C/0x0D (ST2019-4 2009). Fixes ticket #6380. Thanks-to: Philip de Nier <philip.denier@bbc.co.uk> Thanks-to: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: fix DNxHD GC container_ulNicolas Gaullier2021-12-27
| | | | | | | Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Marton Balint <cus@passwd.hu>
* swscale: add P210/P410/P216/P416 outputrcombs2021-12-22
|
* ffprobe: add missing separator when printing side data in compact outputJames Almer2021-12-22
| | | | | | Should fix ticket #7153 Signed-off-by: James Almer <jamrial@gmail.com>
* libavformat: add side_data copy in concat demuxerGerard Sole2021-12-22
| | | | | | | | | | | | Adds support for concat demuxer to copy the side data information from the input file to the resulting file. It will behave like the metadata copy, where the metadata of the first file is kept in the the output file. Extract the current code that already performs the stream side_data copy into a separate method and reuse the method in the concat demuxer. Signed-off-by: Gerard Sole <g.sole.ca@gmail.com>
* avcodec/cdgraphics: fix transparency handlingPaul B Mahol2021-12-18
|
* fate/ffmpeg: Fix shortest testsAndreas Rheinhardt2021-12-02
| | | | | | | | | | | | | | | | | | The mpeg4 encoder is slice-threaded and its output depends upon the number of threads used. Therefore all tests of this encoder use a hardcoded number of threads (ENC_OPTS in fate-run.sh contains "-threads 1"; only the vsynth%-mpeg4-thread tests override this for the mpeg4 encoder, but they also use a hardcoded value to be consistent across different systems); only the new shortest and copy-shortest[12] (implicitly due to the sample used) tests don't and this leads to FATE-failures. Fix this by explicitly setting the thread count. Also switch the shortest test to framecrc, because hashing side data is itchy even though the side data used here (AV_PKT_DATA_QUALITY_STATS) has a defined endianness. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/ffmpeg: add some more flags to the shortest testsJames Almer2021-12-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/ffmpeg: add missing bitexact flags to the shortest testsJames Almer2021-12-01
| | | | | | Should fix fate failures on some targets. Signed-off-by: James Almer <jamrial@gmail.com>
* fate/ffmpeg: add tests for shortest optionJames Almer2021-12-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffprobe: print size of attachment streams (extradata_size)softworkz2021-11-29
| | | | | Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* lavu/pixfmt: add high-bit-depth semi-planar 4:2:2/4:4:4 formatsrcombs2021-11-28
| | | | These are used by VideoToolbox hardware decoders.
* ffmpeg: fix loosing gaps between audio frame timestamps when filteringPaul B Mahol2021-11-18
|
* fate: Add test for Dolby Vision RPU side dataDerek Buitenhuis2021-11-17
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg: rewrite setting the stream dispositionAnton Khirnov2021-11-16
| | | | | | | | | | | | | | | | | | | | | Currently, the code doing this is spread over several places and may behave in unexpected ways. E.g. automatic 'default' marking is only done for streams fed by complex filtergraphs. It is also applied in the order in which the output streams are initialized, which is effectively random. Move processing the dispositions at the end of open_output_file(), when we already have all the necessary information. Apply the automatic default marking only if no explicit -disposition options were supplied by the user, and apply it to the first stream of each type (excluding attached pics) when there is more than one stream of that type and no default markings were copied from the input streams. Explicitly document the new behavior. Changes the results of some tests, where the output file gets a default disposition, while it previously did not.
* lavf/mov: Change default to prefer TFDT time and allow for fallback to SIDX ↵Thilo Borgmann2021-11-05
| | | | or TFDT
* swscale/input: fix planar_rgb16_to_a for gbrap10be and gbrap12be formatsMark Reid2021-11-04
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: update ref files after a recent changeJames Almer2021-10-29
| | | | | | Missed in 3925b826df365a2365118600bd7910cbca95286d. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter: split negate filter from lut filterPaul B Mahol2021-10-27
| | | | | | Using luts for negating is suboptimal. FATE test changes because filter no longer clips values into limited color range.
* avformat/argo_asf: pass name through as metadataZane van Iperen2021-10-15
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* fate: update histogram test resultsPaul B Mahol2021-10-14
|