summaryrefslogtreecommitdiff
path: root/tests/ref
Commit message (Collapse)AuthorAge
* avcodec/mpegpicture: Move mb_var, mc_mb_var and mb_mean to MpegEncCtxAndreas Rheinhardt2022-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These tables are only used by encoders and only for the current picture; ergo they need not be put into the picture at all, but rather into the encoder's context. They also don't need to be refcounted, because there is only one owner. In contrast to this, the earlier code refcounts them which incurs unnecessary overhead. These references are not unreferenced in ff_mpeg_unref_picture() (they are kept in order to have something like a buffer pool), so that several buffers are kept at the same time, although only one is needed, thereby wasting memory. The code also propagates references to other pictures not part of the pictures array (namely the copy of the current/next/last picture in the MpegEncContext which get references of their own). These references are not unreferenced in ff_mpeg_unref_picture() (the buffers are probably kept in order to have something like a pool), yet if the current picture is a B-frame, it gets unreferenced at the end of ff_mpv_encode_picture() and its slot in the picture array will therefore be reused the next time; but the copy of the current picture also still has its references and therefore these buffers will be made duplicated in order to make them writable in the next call to ff_mpv_encode_picture(). This is of course unnecessary. Finally, ff_find_unused_picture() is supposed to just return any unused picture and the code is supposed to work with it; yet for the vsynth*-mpeg4-adap tests the result depends upon the content of these buffers; given that this patchset changes the content of these buffers (the initial content is now the state of these buffers after encoding the last frame; before this patch the buffers used came from the last picture that occupied the same slot in the picture array) their ref-files needed to be changed. This points to a bug somewhere (if one removes the initialization, one gets uninitialized reads in adaptive_quantization in ratecontrol.c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale/output: fix reading chroma values when generating vuya outputJames Almer2022-08-08
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate: fix reference file for fate-pixfmt_bestJames Almer2022-08-07
| | | | | | Missed in 85c59bd6de88aafa7b5682d7b71ff1adefe21a9e Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/riff: map AYUV fourcc to RAWVIDEO decoderJames Almer2022-08-07
| | | | | | There's no need to keep using a custom decoder for this pixel format. Signed-off-by: James Almer <jamrial@gmail.com>
* swscale/output: add VUYA output supportJames Almer2022-08-07
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: WBMP (Wireless Application Protocol Bitmap) image formatPeter Ross2022-08-07
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Peter Ross <pross@xvid.org>
* lavu/pixfmt: Add packed 4:4:4 formatPhilip Langdale2022-08-03
| | | | | | | | | The "AYUV" format is defined by Microsoft as their preferred format for 4:4:4 content, and so it is the format used by Intel VAAPI and QSV. As Microsoft like to define their byte ordering in little-endian fashion, the memory order is reversed, and so our pix_fmt, which follows memory order, has a reversed name (VUYA).
* avformat/flvenc: fix timestamp of key frame indexZhao Zhili2022-08-03
| | | | | | | | | Firstly, the timestamps generated from framerate are inaccurate for variable framerate mode. Secondly, the timestamps always start from zero, while pts/dts can start from nonzero. FLV demuxer rejects such index with message: "Found invalid index entries, clearing the index".
* fate/lavf-image: Disable file checksums for exr testsAndreas Rheinhardt2022-08-02
| | | | | | | | | | The generated files are endian-dependent, so no checksums may be part of the ref files. Fixes ticket #9854. Tested-by: Sebastian Ramacher <sramacher@debian.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate-run: Allow to skip file checksums for lavf_imageAndreas Rheinhardt2022-08-02
| | | | | | | | | | | | | | The output file (even the filesize) of the recently added EXR tests depends on the endianness; therefore checksums of these files must not be part of the ref file. Therefore this commit adds an option (unused for now) to disable these checksums on a per-test basis. In order to avoid having to check twice, the checksum and the filesize info are moved to immediately follow one another; this results into updates to the ref files of all lavf-image tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/ref/fate/filter-metadata-cropdetect[12]: Fix ref fileAndreas Rheinhardt2022-07-30
| | | | | | | | Necessitated by 6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b and 425b309fa43236f4b7c098c7829b70a421fc1dd7. Reviewed-by: Martin Storsjö <martin@martin.st> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi/cropdetect: Add new mode to detect crop-area based on motion vectors ↵Thilo Borgmann2022-07-30
| | | | | | and edges This filter allows crop detection even if the video is embedded in non-black areas.
* fate/png: add test for ICC profile parsingNiklas Haas2022-07-30
| | | | | | | This tests the new "-flags2 icc_profiles" option by making sure the embedded ICC profile gets correctly detected as sRGB. Signed-off-by: Niklas Haas <git@haasn.dev>
* fate/hevc: add clip for persistent_rice_adaptation_enabled_flagXu Guangxin2022-07-25
| | | | | | Tests the issue fixed in c8bc0f66a875bc3708d8dc11b757f2198606ffd7. Signed-off-by: Xu Guangxin <oddstone@gmail.com>
* fftools/ffmpeg: use the sync queues to handle -framesAnton Khirnov2022-07-23
| | | | | | | | | | | | | | | | Same issues apply to it as to -shortest. Changes the results of the following tests: - matroska-flac-extradata-update The test reencodes two input FLAC streams into three output FLAC streams. The last output stream is limited to 8 frames. The current code results in the first two output streams having 12 frames, after this commit all three streams have 8 frames and are the same length. This new result is better, since it is predictable. - mkv-1242 The test streamcopies one video and one audio stream, video is limited to 11 frames. The new result shortens the audio stream so that it is not longer than the video.
* fftools/ffmpeg: rework -shortest implementationAnton Khirnov2022-07-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -shortest option (which finishes the output file at the time the shortest stream ends) is currently implemented by faking the -t option when an output stream ends. This approach is fragile, since it depends on the frames/packets being processed in a specific order. E.g. there are currently some situations in which the output file length will depend unpredictably on unrelated factors like encoder delay. More importantly, the present work aiming at splitting various ffmpeg components into different threads will make this approach completely unworkable, since the frames/packets will arrive in effectively random order. This commit introduces a "sync queue", which is essentially a collection of FIFOs, one per stream. Frames/packets are submitted to these FIFOs and are then released for further processing (encoding or muxing) when it is ensured that the frame in question will not cause its stream to get ahead of the other streams (the logic is similar to libavformat's interleaving queue). These sync queues are then used for encoding and/or muxing when the -shortest option is specified. A new option – -shortest_buf_duration – controls the maximum number of queued packets, to avoid runaway memory usage. This commit changes the results of the following tests: - copy-shortest[12]: the last audio frame is now gone. This is correct, since it actually outlasts the last video frame. - shortest-sub: the video packets following the last subtitle packet are now gone. This is also correct.
* fate/ffmpeg: add a test for interleaving video+subsAnton Khirnov2022-07-23
|
* avcodec/aacdec: remove skip samples multiplierJames Almer2022-07-22
| | | | | | | | | The amount of padding samples reported by containers take into account the extended samplerate in HE-AAC. Fixes ticket #9671. Signed-off-by: James Almer <jamrial@gmail.com>
* ffprobe: print AVFrame.durationAnton Khirnov2022-07-19
|
* swscale: add NV16 input/outputMatthieu Bouron2022-07-19
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/wrapped_avframe: Don't leak frame metadata, side-dataAndreas Rheinhardt2022-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapped_avframe_decode() uses an AVFrame as dst in av_frame_move_ref() after having called ff_decode_frame_props() to attach side-date to this very frame. This leaks all the side-data and metadata that ff_decode_frame_props() has attached. This happens in various fate-filter-metadata tests since 6ca43a9675d651d7ea47c7ba2fafb1bf831c4d0b. These particular leaks (which affect metadata-only) could be fixed by not adding metadata side-data to AVPackets in libavdevice if they are also available from the AVFrames. Yet this would break users that extract the metadata from AVPackets. The changes to FATE happen because of the way av_dict_set() works when it overwrites an already existing entry: It overwrites the entry to be overwritten with the last entry and adds the new entry at the end. The end result is that the first entry of the dict is the second-to-last-entry of the original dict, the last entry of the dict is the last entry of the old dict and the first count - 2 entries of the original dict are at positions 1..count - 2 in their original order. Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avdevice/lavfi: output wrapped AVFramesTimo Rothenpieler2022-07-18
| | | | | | | | | | | | | This avoids an extra copy of potentially quite big video frames. Instead of copying the entire frames data into a rawvideo packet it packs the frame into a wrapped avframe packet and passes it through as-is. Unfortunately, wrapped avframes are set up to be video frames, so the audio frames continue to be copied. Additionally, this enabled passing through video frames that previously were impossible to process, like hardware frames or other special formats that couldn't be packed into a rawvideo packet.
* fate/pcm: Add pcm_dvd transcode testsAndreas Rheinhardt2022-07-10
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo_enc: Fix a chroma mb size error in sse_mb()Wenbin Chen2022-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 422 frames we should not use hard coded 8 to calculate mb size for uv plane. Chroma shift should be taken into consideration to be compatiple with different sampling format. The error is reported by fate test when av_cpu_max_align() return 64 on the platform supporting AVX512. This is a hidden error and it is exposed after commit 17a59a634c39b00a680c6ebbaea58db95594d13d. mpeg2enc has a mechanism to reuse frames. When it computes SSE (sum of squared error) on current mb, reconstructed mb will be wrote to the previous mb space, so that the memory can be saved. However if the align is 64, the frame is shared in somewhere else, so the frame cannot be reused and a new frame to store reconstrued data is created. Because the height of mb is wrong when compute sse on 422 frame, starting from the second line of macro block, changed data is read when frame is reused (we need to read row 16 rather than row 8 if frame is 422), and unchanged data is read when frame is not reused (a new frame is created so the original frame will not be changed). That is why commit 17a59a634c39b00a680c6ebbaea58db95594d13d exposes this issue, because it add av_cpu_max_align() and this function return 64 on platform supporting AVX512 which lead to creating a frame in mpeg2enc, and this lead to the different outputs. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* fate/h264: Add Active Format Descriptor testAndreas Rheinhardt2022-07-09
| | | | | | | | Some samples contain Active Format Descriptors, yet the output of no test depends upon them, so that they are de-facto untested. So add a dedicated test for them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: add PFM encoder testsPaul B Mahol2022-07-03
|
* fate: add EXR encoder testsPaul B Mahol2022-07-03
|
* avformat/mov: Only read the primary item for AVIFVignesh Venkatasubramanian2022-06-29
| | | | | | | | | | | | | | | | | | | | Update the still AVIF parser to only read the primary item. With this patch, AVIF still images with exif/icc/alpha channel will no longer fail to parse. For example, this patch enables parsing of files in: https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Microsoft Adding two fate tests: 1) demuxing of still image with 1 item - this test will pass regardless of this patch. 2) demuxing of still image with 2 items - this test will fail without this patch and will pass with patch applied. Partially fixes trac ticket #7621 Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: James Zern <jzern@google.com>
* avformat/matroskaenc: Split updating CodecPrivate from writing itAndreas Rheinhardt2022-06-24
| | | | | | | | | | | | | | | | | | | | | | Up until now, updating extradata was very ad-hoc: The amount of space reserved for extradata was not recorded when writing the header; instead the AAC code simply presumed that it was enough. This commit changes this by recording how much space is available. This brings with it that the code for writing of and reserving space for the CodecPrivate and for updating it diverges. They are therefore split; this allows to put other common tasks like seeking to right offset as well as writing padding (in case the new extradata did not fill the whole reserved space) to this common function. The code for filling up the reserved space is smarter than the code it replaces; therefore it is no longer necessary to reserve more than necessary just to be sure that one can add an EBML Void element (whose minimum size is two) lateron. This is the reason for the change to the aac-autobsf-adtstoasc test. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: enable compressorname for mp4 modeZhao Zhili2022-06-24
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/matroskaenc: Don't waste bytes to Write Tag length fieldsAndreas Rheinhardt2022-06-20
| | | | | | | This is possible by using a dynamic buffer to write them; said dynamic buffer is (re)used and reset as appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi/drawutils: improve colorspace supportrcombs2022-06-19
| | | | | | | | | | | | | | | | | | | | | - Introduce ff_draw_init2, which takes explicit colorspace and range args - Use lavu/csp and lavfi/colorspace for conversion, rather than the lavu/colorspace.h macros - Use the passed-in colorspace when performing RGB->YUV conversions The upshot of this is: - Support for YUV spaces other than BT601 - Better rounding for all conversions - Particular rounding improvements in >8-bit formats, which previously used simple left-shifts - Support for limited-range RGB - Support for full-range YUV in non-J pixfmts Due to the rounding improvements, this results in a large number of minor changes to FATE tests. Signed-off-by: rcombs <rcombs@rcombs.me>
* avcodec/texturedspenc: Fix indexing in color distribution determinationMichael Niedermayer2022-06-09
| | | | | | | | | | Fixes CID1396405 MSE and PSNR is slightly improved, and some noticable corruptions disappear as well. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* fate: add test for QOI formatPaul B Mahol2022-06-05
|
* fate/wavpack: Test APE cuesheet tagsAndreas Rheinhardt2022-05-31
| | | | | | | | | The cue_sheet.wv sample contains a cue sheet as APE tags, yet this is not really covered by fate-wavpack-cuesheet because the metadata does not affect the output of said test. So add a proper test for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ffv1enc: Eliminate float/double from find_best_state()Michael Niedermayer2022-05-30
| | | | | | | | | | log2() remains, this can either be replaced by a integer implementation or the table hardcoded if needed Tested-by: Anton Khirnov <anton@khirnov.net> Tested-by: Martin Storsjö <martin@martin.st> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tests/fate/vcodec: add tests for ffv1 2pass modeAnton Khirnov2022-05-24
|
* avfilter: Add blockdetect filterThilo Borgmann2022-05-24
|
* libavutil: Deprecate av_fopen_utf8, provide an avpriv versionMartin Storsjö2022-05-23
| | | | | | | | | | | | | | | | | | | | | | Since every DLL can use an individual CRT on Windows, having an exported function that opens a FILE* won't work if that FILE* is going to be used from a different DLL (or from user application code). Internally within the libraries, the issue can be worked around by duplicating the function in all libraries (this already happened implicitly because the function resided in file_open.c) and renaming the function to ff_fopen_utf8 (so that it doesn't end up exported from the DLLs) and duplicating it in all libraries that use it. This makes the avpriv_fopen_utf8 / ff_fopen_utf8 function work in the exact same way as the existing avpriv_open / ff_open, with the same setup as introduced in e743e7ae6ee7e535c4394bec6fe6650d2b0dbf65. That mechanism doesn't work for external users, thus deprecate the existing function. Signed-off-by: Martin Storsjö <martin@martin.st>
* tests/fate: Remove intermediate file of flv-add_keyframe_index testAndreas Rheinhardt2022-05-20
| | | | | | | | Do this by making this test a transcode test. Also fix the test requirements and don't add this test to FATE_AFILTER; instead use a new variable and a new target for flvenc-tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec/cinepakenc: Mark no-skip frames as keyframesTomas Härdin2022-05-12
| | | | | Reset curframe whenever we generate a keyframe. Use -g instead of -keyint_min.
* fate/matroska: Add test for remuxing DVB subtitles to MatroskaAndreas Rheinhardt2022-05-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/matroska: Add tests for muxing PGS into MatroskaAndreas Rheinhardt2022-05-10
| | | | | | They test the new pgs_frame_merge BSF. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/filter-video: Remove intermediate file of meta-4560-rotate0 testAndreas Rheinhardt2022-05-06
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-audio: Disable CRC for lavf-peak_only.wav testAndreas Rheinhardt2022-05-06
| | | | | | | | | The output of this test is just a file containing the positions of peaks; it is not a wave file and trying to demux it just returns AVERROR_INVALIDDATA; said error has just been ignored as the return value from do_avconv_crc is the return value from echo. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/ref: Remove unused reference filesAndreas Rheinhardt2022-05-03
| | | | | | | | | | Accidentally resurrected in fc49f22c3b735db5aaac5f98e40b7124a2be13b8 and 7711f19eda40a7fd1c8a327f1700ffdd115e1667, forgotten in 6ebc71847e21a8abaf7ff3d902cb1cf63511e7b4 and 1a6a088f7c7b164042ad16d43d05543ce1bacfa4 or never needed (filter-aemphasis). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: sidx earliest_presentation_time is applied after editlistZhao Zhili2022-04-29
| | | | | | Fix #8334 Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fate/acodec: Remove acodec-adpcm-adx-trellis testAndreas Rheinhardt2022-04-28
| | | | | | | adx ignores the trellis option, making this test identical to acodec-adpcm-adx. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/fits: Use transcode for transcode-like testAndreas Rheinhardt2022-04-28
| | | | | | | | | Each of the intermediately generated lena-*.fits files is only used for exactly one test; so it could be deleted right after the test. Switching to a transcode test (which is also more natural) achieves this. It also adds checksums of the intermediate files to the ref-file. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavfi: Add blurdetect filterThilo Borgmann2022-04-25
|