aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/png: use libavutil/csp.h for cHRM chunksLeo Izen2023-01-252-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | The cHRM chunk is descriptive. That is, it describes the primaries that should be used to interpret the pixel data in the PNG file. This is notably different from Mastering Display Metadata, which describes which subset of the presented gamut is relevant. MDM describes a gamut and says colors outside the gamut are not required to be preserved, but it does not actually describe the gamut that the pixel data from the frame resides in. Thus, to decode a cHRM chunk present in a PNG file to Mastering Display Metadata is incorrect. This commit changes this behavior so the cHRM chunk, if present, is decoded to color metadata. For example, if the cHRM chunk describes BT.709 primaries, the resulting AVFrame will be tagged with AVCOL_PRI_BT709, as a description of its pixel data. To do this, it utilizes libavutil/csp.h, which exposes a funcction av_csp_primaries_id_from_desc, to detect which enum value accurately describes the white point and primaries represented by the cHRM chunk. This commit also changes pngenc.c to utilize the libavuitl/csp.h API, since it previously duplicated code contained in that API. Instead, taking advantage of the API that exists makes more sense. pngenc.c does properly utilize the color tags rather than incorrectly using MDM, so that required no change. Signed-off-by: Leo Izen <leo.izen@gmail.com>
* ffprobe: fix data hash renderingStefano Sabatini2023-01-246-1220/+1220
| | | | | | | | Print data hash before side data list, fix wrong nesting level of data hash element. In particular, fix trac issue: http://trac.ffmpeg.org/ticket/7217
* avfilter/vf_cropdetect: add ability to change limit at runtimeAshyni2023-01-243-44/+44
| | | | | | Fixes: https://trac.ffmpeg.org/ticket/9851 Signed-off-by: Ashyni <jeffrey.c@tuta.io>
* avformat/segment: calculate segment durations correctly.Gyan Doshi2023-01-161-2/+2
| | | | | | | | | segment_time and segment_times are defined as duration specifications, not timestamps, so calculation of segment duration must account for initial timestamp. Fixed. FATE ref for segment-mp4-to-ts changed on account of avoiding premature segment cut at the end of the first segment.
* avcodec/h2645_sei: add support for Ambient Viewing Environment SEIJan Ekström2023-01-131-0/+12
| | | | | | | | | | Defined by H.274, this SEI message is utilized by iPhones to save the nominal ambient viewing environment for the display of recorded HDR content. The contents of the message are exposed to API users as AVFrame side data containing AVAmbientViewingEnvironment. As the DV RPU test sample is from an iPhone and includes Ambient Viewing Environment SEI messages, its test result gets updated.
* lavf/spdifdec: support EAC3rcombs2023-01-132-0/+662
| | | | | | Parsing should probably be enabled for all codecs, at least for headers, but e.g. the AAC parser produces 1-byte packets of zero padding with it, so I'm just enabling it for EAC3 for the moment.
* avcodec/av1_parser: export timing information when presentJames Almer2023-01-101-24/+24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg: always generate CFR output when -r is usedAnton Khirnov2023-01-104-91/+11
| | | | | | | | | | | | | | | | Current code may, depending on the muxer, decide to use VSYNC_VFR tagged with the specified framerate, without actually performing framerate conversion. This is clearly wrong and against the documentation, which states unambiguously that -r should produce CFR output for video encoding. FATE test changes: * nuv-rtjpeg: replace -r with '-enc_time_base -1', which keeps the original timebase. Output frames are now produced with proper durations. * filter-mpdecimate: just drop the -r option, it is unnecessary * filter-fps-r: remove, this test makes no sense and actually produces broken VFR output (with incorrect frame durations).
* lavc/tests: add a cached bitstream reader testAnton Khirnov2023-01-061-0/+10
|
* lavc/bitstream: templatize for BE/LEAnton Khirnov2023-01-061-0/+1
| | | | Allows using both BE and LE bitstream readers in the same file.
* avformat/oggenc: don't flush twice when the last packet is side data onlyJames Almer2023-01-031-1/+1
| | | | | | | | Commit 18f24527eb accidentally made side data only packets be handled like a flush request. Fix this regression by effectively ignoring them as was the original intention. Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/palettegen: make refs order deterministicClément Bœsch2023-01-032-2/+2
| | | | | | Currently, in case of equality on the first color channel, the order of the ref colors is defined by the hashing function. This commit makes the sorting deterministic and improve the hierarchical ordering.
* avfilter/palettegen: base box split decision on a perceptual modelClément Bœsch2023-01-032-2/+2
| | | | | Similar to the change in paletteuse, we rely on a perceptual model to decide how and where to split the box.
* avfilter/palettegen: change cut score from ∑e² to max e²Clément Bœsch2023-01-032-2/+2
| | | | | | This is following the results from personal research¹. ¹: https://github.com/ubitux/research/tree/main/color-quantization#results
* avfilter/palettegen: define the best axis to cut using the squared errorClément Bœsch2023-01-032-2/+2
| | | | | | This is following the results from personal research¹. ¹: https://github.com/ubitux/research/tree/main/color-quantization#results
* avfilter/paletteuse: switch to a perceptual modelClément Bœsch2023-01-034-284/+284
| | | | | Now the selection of the color is based on a distance built around human perception of color instead of the unreliable sRGB triplet one.
* avformat/oggenc: ignore empty packetsJames Almer2022-12-271-1/+1
| | | | | | | | | | Some encoders, like flac, can send side data only packets at the end. Eventually, said extradata update should ideally be used to update the header when writting to seekable output, but for now, ignore them. Should fix the undefined behavior of passing NULL to memcpy(). Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/pnm: avoid mirroring PFM images verticallyLeo Izen2022-12-274-4/+4
| | | | | | | | | | | | | | | | | | | | PFM (aka Portable FloatMap) encodes its scanlines from bottom-to-top, not from top-to-bottom, unlike other NetPBM formats. Without this patch, FFmpeg ignores this exception and decodes/encodes PFM images mirrored vertically from their proper orientation. For reference, see the NetPBM tool pfmtopam, which encodes a .pam from a .pfm, using the correct orientation (and which FFmpeg reads correctly). Also compare ffplay to magick display, which shows the correct orientation as well. See: http://www.pauldebevec.com/Research/HDR/PFM/ and see: https://netpbm.sourceforge.net/doc/pfm.html for descriptions of this image format. Signed-off-by: Leo Izen <leo.izen@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* fate/flac: Add test of 32 bps encoding/decodingMartijn van Beurden2022-12-261-0/+4
|
* checkasm/v210dec: add extra space to the destination arraysJames Darnley2022-12-211-6/+6
|
* avcodec/x86: add avx512icl function for v210decJames Darnley2022-12-201-6/+6
| | | | Ice Lake (Xeon Silver 4316): 2.01x faster (1147±36.8 vs. 571±38.2 decicycles) compared with avx2
* avfilter/vf_tinterlace: support full-range YUVNiklas Haas2022-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | This filter, when used in the "pad" mode, currently makes the distinction between limited and full range solely by testing for YUVJ pixel formats at link setup time. This is deprecated and should be improved to perform the detection based on the per-frame metadata. In order to make this distinction based on color range metadata, which is only known at the time of filtering frames, for simplicity, we simply allocate two copies of the "black" frame - one for limited range and the other for full range metadata. This could be done more dynamically (e.g. as-needed or simply by blitting the appropriate pixel value directly), but this change is relatively simple and preserves the structure of the existing code. This commit actually fixes a bug in FATE - the new output is correct for the first time. The previous md5 ref was of a frame that incorrectly combined full-range pixel data with limited-range black fields. The corresponding result has been updated. Signed-off-by: Niklas Haas <git@haasn.dev>
* avfilter/drawutils: rgb48/bgr48 is supportedPaul B Mahol2022-12-101-0/+2
|
* Revert "avcodec/decode: use a packet list to store packet properties"James Almer2022-12-071-1/+1
| | | | | | | | | | | | | | The idea behind last_pkt_props was to store the properties of the last packet fed to the decoder. Any sort of queueing required by CODEC_CAP_DELAY decoders that consume several packets before they start outputting frames should be done by the decoders in question. An example of this is libdav1d. This is required for the following commits that will fix last_pkt_props in frame threading scenarios, as well as maintain its contents during flush. This revers commit 022a12b306ab2096e6ac9fc9b149828a849d65b2. Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add QOI/XBM/XWD image2pipe testsPaul B Mahol2022-12-034-0/+12
|
* avcodec/ass: specify a permissive encodingOneric2022-12-0324-24/+24
| | | | | | | | | | | | | | | The Encoding field (and the \fe tag) allows to limit font selection to only those fonts declaring support for the specified codepage in their OS/2's table "Code Page Character Range" field. Particularly, Encoding=0 means only font's declaring support for "ANSI", or rather "Latin (Western European)", are allowed to be selected. Specifying Encoding=1 allows all fonts to be considered. We do not want to limit font selection, so specify Encoding=1. NB: at the time of writing libass only partially supports this field, thus hiding the issue in any libass-based renderer. A VSFilter-based DirectShow filter or XySubFilter will reveal the issue when a font not declaring support for latin characters is specified in a style.
* avcodec/ass: accurately preserve coloursOneric2022-12-0324-0/+24
| | | | | | | | | | | | | | | | | | Colour values used in ASS files without a "YCbCr Matrix" header set to "None" are subject to colour mangling, due to how ASS was historically conceived. A more in-depth description can be found in the documetation inside libass' public ass_types.h header. The important part is, if this header is not set to "None", the final output colours can deviate from the literal value specified in the file. When converting from non-ASS formats we do not want any colour shift to happen, so let's set the appropiate header. NB: ffmpeg's subtitle filter, does not follow libass' documentation regarding colour mangling, thus hiding the bug. Anything based on VSFilter, XySubFilter or e.g. mpv do and might show the issue. (Of course native ASS subs, which _do_ rely on colour mangling won't work properly with the subtitle filter, but this can be fixed another time)
* checkasm/v210enc: test the entire width of 10-bit planar input arraysJames Darnley2022-12-011-2/+4
|
* avcodec/h2645_sei: Also support Active Format Descriptor for HEVCAndreas Rheinhardt2022-12-012-0/+207
| | | | | | | | | | | | | | | It is valid for HEVC; in fact, the ATSC-HEVC spec [1] simply refers to the relevant H.264 spec. It is also trivial to implement now: Just move applying AFD to ff_h2645_sei_to_frame() and stop ignoring AFD when parsing a HEVC SEI containing it. A FATE-test for this has been added. [1]: https://www.atsc.org/atsc-documents/a3412017-video-hevc/ Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/aacenc: increase tolerance for ln-128k testLynne2022-11-241-1/+1
| | | | | | | | | | | The encoder is sensitive to changes in precision, and its test target was a compromise. It was already close to failing on x87 FPUs. ff_mdct_init used double precision entirely from the scale to computing the MDCT exp tables. av_tx_init uses single-precision for the scale, with a small input change which was enough to tip the test into failing on x87 FPUs. Increase the fuzz factor in line with other AAC encoder tests to fix.
* fate: Mark the tiff-zip-* tests as requiring zlibMartin Storsjö2022-11-171-2/+3
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/tiff: add read support for compressed rgb floating point formatsMark Reid2022-11-167-1/+55
| | | | | | | floating point uses a slightly different predictor technique describe here http://chriscox.org/TIFFTN3d1.pdf Signed-off-by: Anton Khirnov <anton@khirnov.net>
* libavfilter/x86/vf_convolution: add sobel filter optimization and unit test ↵bwang302022-11-145-0/+110
| | | | | | | | | | | | with intel AVX512 VNNI This commit enabled assembly code with intel AVX512 VNNI and added unit test for sobel filter sobel_c: 4537 sobel_avx512icl 2136 Signed-off-by: bwang30 <bin.wang@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* fate/video: vqc testcasePeter Ross2022-11-072-0/+9
|
* fate/audio: msnsiren test casePeter Ross2022-11-071-0/+5
|
* fate/microsoft: add mss2 region test casePeter Ross2022-11-072-1/+9
|
* imc: convert to lavu/tx, remove NIH iMDCT and replace with a standard oneLynne2022-11-061-0/+1
|
* dcaenc: convert to lavu/txLynne2022-11-061-1/+1
| | | | | | The encoder is fixed point, and uses an MDCT only for analysis. Due to the slightly different rounding, the encoder makes a different decision, so the tests have to be adjusted as well.
* dca_core: convert to lavu/txLynne2022-11-061-11/+14
| | | | | Thanks to Martin Storsjö <martin@martin.st> for fixing and testing the arm32 and aarch64 changes.
* aacdec: convert to lavu/tx and support fixed-point 960-sample decodingLynne2022-11-062-145/+145
| | | | | | | | | | | This patch replaces the transform used in AAC with lavu/tx and removes the limitation on only being able to decode 960-sample files with the float decoder. This commit also removes a whole bunch of unnecessary and slow lifting steps the decoder did to compensate for the poor accuracy of the old integer transformation code. Overall float decoder speedup on Zen 3 for 64kbps: 32%
* ac3: convert to lavu/txLynne2022-11-067-63/+63
|
* checkasm: add a verbose check function for uint32_t dataJames Darnley2022-11-042-0/+2
|
* avutil/channel_layout: add a 7.1(top) channel layoutJames Almer2022-11-031-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/tests/imf: add CPL timecode testPierre-Anthony Lemieux2022-11-031-0/+1
|
* avcodec/svq1: fix interframe mean VLC symbolsPeter Ross2022-11-011-11/+11
| | | | | | | | | | | | | | | | | | Fixes ticket #128. The SVQ1 interframe mean VLC symbols -128 and 128 are incorrectly swapped in our SVQ1 implementation, resulting in visible artifacts for some videos. This patch unswaps the order of these two symbols. The most noticable example of the artiacts caused by this error can be observed in https://trac.ffmpeg.org/attachment/ticket/128/svq1_set.7z '352_288_k_50.mov'. The artifacts are not observed when using the reference decoder (QuickTime 7.7.9 x86 binary). As a result of this patch, the reference data for the fate-svq1 test ($SAMPLES/svq1/marymary-shackles.mov) must be modified. For this file, our decoder output is now bitwise identical to the reference decoder. I have tested patch with various other samples and they are all now bitwise identical.
* avcodec/svq1enc: output ident string in extradata fieldPeter Ross2022-11-014-8/+8
| | | | | This will enable the acurate identification of FFmpeg produced SVQ1 streams, should there be new bugs found in the encoder.
* avcodec/svq1enc: do not use ambiguous interframe mean symbolsPeter Ross2022-11-015-27/+27
| | | | Don't emit interframe mean symbols -128 and 128.
* avutil/channel_layout: add a cube channel layoutJames Almer2022-10-301-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: Add display_{rotation, hflip, vflip} optionsJan Ekström2022-10-191-1/+1
| | | | | | | | | 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-111-1/+1
| | | | | | | | | 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>