summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* fate/jpg: add RGB mjpeg fate testsLeo Izen2023-05-176-0/+41
| | | | | Adds FATE tests for RGB jpegs to test commit 0b352e350e773673f11ea380f3507923c70e1175.
* tests/fate: add a simple test for libx264Anton Khirnov2023-05-154-0/+108
| | | | | | | | Since this is an external encoder not under our control, we cannot test the encoded output exactly as is done for internal encoders. We can still test however that the output is decodable and produces the expected number of frames with expected dimensions, pixel formats, and timestamps.
* avformat/tests/imf: add invalid resource testPierre-Anthony Lemieux2023-05-111-0/+2
|
* fftools/ffprobe: print exported stream AVOptionsJames Almer2023-05-084-7/+7
| | | | | | | Similar to the decoder AVOptions, this is useful to show values from options exported by the demuxer. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg: always use the same path for setting InputStream.[next_]dtsAnton Khirnov2023-05-022-28/+28
| | | | | | | | | | | | | | | | | | | | | Currently those are set in different ways depending on whether the stream is decoded or not, using some values from the decoder if it is. This is wrong, because there may be arbitrary amount of delay between input packets and output frames (depending e.g. on the thread count when frame threading is used). Always use the path that was previously used only for streamcopy. This should not cause any issues, because these values are now used only for streamcopy and discontinuity handling. This change will allow to decouple discontinuity processing from decoding and move it to ffmpeg_demux. It also makes the code simpler. Changes output in fate-cover-art-aiff-id3v2-remux and fate-cover-art-mp3-id3v2-remux, where attached pictures are now written in the correct order. This happens because InputStream.dts is no longer reset to AV_NOPTS_VALUE after decoding, so streamcopy actually sees valid dts values.
* fftools/ffmpeg: rework audio-decode timestamp handlingAnton Khirnov2023-05-023-334/+334
| | | | | | | | | | | | | | | | | | | | | Stop using InputStream.dts for generating missing timestamps for decoded frames, because it contains pre-decoding timestamps and there may be arbitrary amount of delay between input packets and output frames (e.g. dependent on the thread count when frame threading is used). It is also in AV_TIME_BASE (i.e. microseconds), which may introduce unnecessary rounding issues. New code maintains a timebase that is the inverse of the LCM of all the samplerates seen so far, and thus can accurately represent every audio sample. This timebase is used to generate missing timestamps after decoding. Changes the result of the following FATE tests * pcm_dvd-16-5.1-96000 * lavf-smjpeg * adpcm-ima-smjpeg In all of these the timestamps now better correspond to actual frame durations.
* lavf/dv: use a more granular timebase for audioAnton Khirnov2023-05-021-8/+8
| | | | | | | | | | | | | One that is fine enough to represent all DV audio sample rates. Audio packet durations are now sample-accurate. This largely undoes commit 76fbb0052df471075858c1cb82b04c8be7adba8d. To avoid breaking the issue fixed by that commit, resync audio timestamps against video if they get more than one frame apart. The sample from issue #8762 still works correctly after this commit. Slightly changes the results of the lavf-dv seektest, due to the audio timebase being more granular.
* lavf/dv: do not set video timebase more than onceAnton Khirnov2023-05-024-44/+44
| | | | | | | | | | | | | Current code will call avpriv_set_pts_info() for each video frame, possibly setting a different timebase if the stream framerate changes. This violates API conventions, as the timebase is supposed to stay constant after stream creation. Change the demuxer to set a single timebase that is fine enough to handle all supported DV framerates. The seek tests change slightly because the new timebase is more granular.
* lavf/dauddec: set timebase to 1/samplerateAnton Khirnov2023-04-282-18/+18
| | | | | Prevents lavf from generating inexact timestamps with the default timebase of 1/90000.
* lavfi/dnn: Remove DNN native backendTing Fu2023-04-282-46/+0
| | | | | | | | | | According to discussion in https://etherpad.mit.edu/p/FF_dev_meeting_20221202 and the proposal in http://ffmpeg.org/pipermail/ffmpeg-devel/2022-December/304534.html, the DNN native backend should be removed at first step. All the DNN native backend related codes are deleted. Signed-off-by: Ting Fu <ting.fu@intel.com>
* tests: do not override movflags defaultsMarton Balint2023-04-242-2/+2
| | | | | | It does not matter if the default is 0, but still it is cleaner that way. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg_enc: always use video frame durations when availableAnton Khirnov2023-04-244-71/+71
| | | | | | | | | Previously they would only be used with trivial filtergraphs, because filters did not handle frame durations. That is no longer true - most filters process frame durations properly (there may still be some that don't - this change will help finding and fixing them). Improves output video frame durations in a number of FATE tests.
* fate/jpeg2000: add missing dependecy checksJames Almer2023-04-231-3/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/jpeg2000: add JPEG 2000 tests using ITU/ISO conformance materialsPierre-Anthony Lemieux2023-04-2216-0/+149
| | | | | | | | | Adds JPEG 2000 decoder tests using materials from the conformance suite specified in Rec. ITU-T T.803 | ISO/IEC 15444-4. The test materials are available at https://gitlab.com/wg1/htj2k-codestreams Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
* fate/h264: test disabling croppingJames Almer2023-04-222-1/+291
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add tests for RGB jpegsLeo Izen2023-04-214-0/+27
| | | | | Added framecrc tests for RGB JPEGs to verify future changes to the decoder.
* fate/png-icc-parse: update ref dataSteven Liu2023-04-211-12/+5
| | | | | | | | | | When enable lcms2, the fate-png-icc-parse will get error bellow. TEST png-icc-parse This because updated how PNG handles colors (no longer using mastering display metadata for that). Reviewed-by: Leo Izen <leo.izen@gmail.com> Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
* fftools/ffmpeg: propagate frame durations to packets when encodingAnton Khirnov2023-04-1919-133/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove now-obsolete code setting packet durations pre-muxing for CFR encoded video. Changes output in the following FATE tests: * numerous adpcm tests * ffmpeg-filter_complex_audio * lavf-asf * lavf-mkv * lavf-mkv_attachment * matroska-encoding-delay All of these change due to the fact that the output duration is now the actual input data duration and does not include padding added by the encoder. * apng-osample: less wrong packet durations are now passed to the muxer. They are not entirely correct, because the first frame duration should be 3 rather than 2. This is caused by the vsync code and should be addressed later, but this change is a step in the right direction. * tscc2-mov: last output frame has a duration of 11 rather than 1 - this corresponds to the duration actually returned by the demuxer. * film-cvid: video frame durations are now 2 rather than 1 - this corresponds to durations actually returned by the demuxer and matches the timestamps. * mpeg2-ticket6677: durations of some video frames are now 2 rather than 1 - this matches the timestamps.
* fftools/ffmpeg: stop using fake dts for generating timestampsAnton Khirnov2023-04-1353-3474/+3474
| | | | | | | | | | | | | When no packet dts values are available from the container, video decoding code will currently use its own guessed values, which will then be propagated to pkt_dts on decoded frames and used as pts in certain cases. This is inaccurate, fragile, and unnecessarily convoluted. Simply removing this allows the extrapolation code introduced in the previous commit to do a better job. Changes the results of numerous h264 and hevc FATE tests, where no spurious timestamp gaps are generated anymore. Several tests no longer need -vsync passthrough.
* fftools/ffmpeg: change video decoding timestamp generationAnton Khirnov2023-04-134-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When no timestamps are available from the container, the video decoding code will currently use fake dts values - generated in process_input_packet() based on a combination of information from the decoder and the parser (obtained via the demuxer) - to generate timestamps during decoder flushing. This is fragile, hard to follow, and unnecessarily convoluted, since more reliable information can be obtained directly from post-decoding values. The new code keeps track of the last decoded frame pts and estimates its duration based on a number of heuristics. Timestamps generated when both pts and pkt_dts are missing are then simple pts+duration of the last frame. The heuristics are somewhat complicated by the fact that lavf insists on making up packet timestamps based on its highly incomplete information. That should be removed in the future, allowing to further simplify this code. The results of the following tests change: * h264-3386 now requires -fps_mode passthrough to avoid dropping frames at the end; this is a pathology of the interaction of the new and old code, and the fact that the sample switches from field to frame coding in the last packet, and will be fixed in following commits * hevc-conformance-DELTAQP_A_BRCM_4 stops inventing an arbitrary timestamp gap at the end * hevc-small422chroma - the single frame output by this test now has a timestamp of 0, rather than an arbitrary 7
* lavf/rawdec: mark raw demuxers as having no timestampsAnton Khirnov2023-04-131-1/+1
| | | | | | Changes the result of the h264_redundant_pps-mov test, where the output timebase is now 1001/24000 instead of 1/24. This is more correct, as the source file actually is 23.98fps.
* lavf/rawdec: set avg_frame_rateAnton Khirnov2023-04-137-33/+33
| | | | | | | | | | | | Timestamps in two FATE H.264 conformance tests now start at 1 instead of 0, which also happens in some other H.264 tests before this commit and so is not a big issue. Conversely, timestamps in some HEVC conformance tests start from a smaller value now. Ideally this should be addressed later in a more general way. h264-conformance-frext-frext2_panasonic_b no longer requires -vsync passthrough.
* checkasm: pass context as pointerxufuji4562023-04-136-39/+39
| | | | | Signed-off-by: xufuji456 <839789740@qq.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm/hevc: add transform_luma testxufuji4562023-04-131-0/+29
| | | | | Signed-off-by: xufuji456 <839789740@qq.com> Signed-off-by: Martin Storsjö <martin@martin.st>
* fftools/sync_queue: make sure audio duration matches sample countAnton Khirnov2023-04-091-1/+0
| | | | | | | | | For audio AVFrames, nb_samples is typically more trustworthy than duration. Since sync queues look at durations, make sure they match the sample count. The last audio frame in the fate-shortest test is now gone. This is more correct, since it outlasts the last video frame.
* fate/matroska: add HDR10+ muxing testsJames Almer2023-04-083-0/+134
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: support writing Dynamic HDR10+ packet side dataJames Almer2023-04-0827-85/+85
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* checkasm: add hevc_deblock chroma testJ. Dekker2023-04-065-1/+105
| | | | Signed-off-by: J. Dekker <jdek@itanimul.li>
* tests/fate/vcodec.mak: drop strict experimental from j2k testsMichael Niedermayer2023-04-061-4/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: split mxf test dependencies to DV and MPEG2Marton Balint2023-04-061-1/+2
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskaenc: write a MaxBlockAdditionID elementJames Almer2023-04-0527-85/+85
| | | | | | A non zero value is mandatory for Matroska if the track has blocks with BlockAdditions. Signed-off-by: James Almer <jamrial@gmail.com>
* tests: Add more j2k tests to cover a wider range of casesMichael Niedermayer2023-04-029-1/+35
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/j2kenc: Fix funky bpno errors on decodingMichael Niedermayer2023-04-027-14/+14
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate/lavf-container: add missing swscale deps to mxf_dvcpro100 and mxf_ffv1James Almer2023-03-281-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate: specify EC-off for damaged inter samplesJ. Dekker2023-03-272-8/+8
| | | | | | | | | The previous commit allowed turning on error correction for interlaced samples. Turning it off amounts to a no-op for FATE. These samples should be tested with EC1-3 (guess_mvs/deblock/favor_inter) additionally. Signed-off-by: J. Dekker <jdek@itanimul.li>
* avformat/mxfenc: fix stored/sampled/displayed width/heightJerome Martinez2023-03-263-2/+6
| | | | | | | | | | | | | | | | | | | | According to MXF specs the Stored Rectangle corresponds to the data which is passed to the compressor and received from the decompressor, so they should contain the width / height extended to the macroblock boundary. In practice however width and height values rounded to the upper 16 multiples are only seen when muxing MPEG formats. Therefore this patch changes stored width and height values to unrounded for all non-MPEG formats, even macroblock based ones. For DNXHD the specs (ST 2019-4) explicitly indicates to use 1080 for 1088p. For ProRes the specs (RDD 44) only refer to to ST 377-1 without precision but no known commercial implementations are using rounded values. DV is not using 16x16 macroblocks, so 16 rounding makes no sense. The patch also fixes Sampled Width / Display Width to use unrounded values. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: print crop_* frame fieldsJames Almer2023-03-2617-97/+273
| | | | | Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* tests: Fix fate-source after 0fbae2178b4ffda298b10473aa6fe17ef524eff9Martin Storsjö2023-03-261-0/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/snowenc: Fix visual weight calculationMichael Niedermayer2023-03-267-38/+38
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 supportJerome Martinez2023-03-252-0/+5
|
* tests: add bwdif to fate filter testsJames Darnley2023-03-254-0/+143
|
* checkasm: add test for bwdifJames Darnley2023-03-255-0/+90
|
* fftools/ffprobe: stop using AVFrame.pkt_{pos,size}Anton Khirnov2023-03-201-159/+159
| | | | | | | | | | | | | | | | | | | These fields are ad-hoc and will be deprecated. Use the recently-added AV_CODEC_FLAG_COPY_OPAQUE to pass arbitrary user data from packets to frames. Changes the result of the flcl1905 test, which uses ffprobe to decode wmav2 with multiple frames per packet. Such packets are handled internally by calling the decoder's decode callback multiple times, offsetting the internal packet's data pointer and decreasing its size after each call. The output pkt_size value before this commit is then the remaining internal packet size at the time of each internal decode call. After this commit, output pkt_size is simply the size of the full packet submitted by the caller to the decoder. This is more correct, since internal packets are never seen by the caller and should have no observable outside effects.
* fate: add a yuv422p test for the untile filterJames Almer2023-03-162-0/+16
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fate/mov: add PCM in mp4 testZhao Zhili2023-03-154-0/+51
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* fate/vpx: add a vp9_superframe_bsf testJames Almer2023-03-102-0/+34
| | | | | | This splits a sample and merges it again, so it also tests the vp9_superframe_split bsf Signed-off-by: James Almer <jamrial@gmail.com>
* tests: actually test yadif's 10 and 16-bit functionsJames Darnley2023-03-063-62/+62
|
* avcodec/pngdec: read colorspace info when decoding with AVDISCARD_ALLLeo Izen2023-02-282-5/+5
| | | | | These chunks are lightweight and it's useful information to have when running ffmpeg -i or ffprobe, for example.
* fate/imfdec: remove imf experimental flagPierre-Anthony Lemieux2023-02-211-2/+2
| | | | Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
* fate/imfdec: add audio testPierre-Anthony Lemieux2023-02-182-0/+210
| | | | | | Adds a test where the temporal boundaries of audio and video resources do not line up. Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>