Commit Graph

5247 Commits

Author SHA1 Message Date
Paul B Mahol 0b4d009587 fate: fix silenceremove test 2021-09-09 23:45:52 +02:00
Andreas Rheinhardt a311dfc3c4 fate/wma: Account for trimmed samples in wmapro-ism test
Fixes FATE failures after 61c2c9ef8e.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-02 19:59:34 +02:00
Wu Jianhua 133b2767cf tests/checkasm/vf_gblur.c: update check_horiz_slice for the new ff_horiz_slice_avx2/512
Co-authored-by: Cheng Yanfei <yanfei.cheng@intel.com>
Co-authored-by: Jin Jun <jun.i.jin@intel.com>
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-08-29 19:58:33 +02:00
Wu Jianhua 0c54ab20c2 tests/checkasm/vf_gblur.c: add check_verti_slice() for unit test
Co-authored-by: Cheng Yanfei <yanfei.cheng@intel.com>
Co-authored-by: Jin Jun <jun.i.jin@intel.com>
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-08-29 19:58:33 +02:00
Anton Khirnov 03f3680080 fate/pixfmt: test xyz12le 2021-08-29 18:44:46 +02:00
Anton Khirnov bdc1bdf3f5 FATE: allow multithreaded filtering 2021-08-29 18:44:38 +02:00
Paul B Mahol a6f00d4e82 avfilter/aeval: fix forgotten EOF case for activate
Bring fate test how it was previously.
2021-08-26 19:23:03 +02:00
Jan Ekström d48232fb4c tests/fate: move TTML-in-MP4 tests from subtitles.mak to mov.mak
subtitles.mak's fate-sub tests utilize a more strict comparator
("rawdiff"), which causes the tests fail in case of white space
differences, such as CRLF vs LF. This in turn causes these
ffprobe-using TTML-in-MP4 tests to fail on non-LF systems such as
Windows or wine.
2021-08-25 23:17:53 +03:00
Jan Ekström e41bd075dd avformat/movenc: add support for TTML muxing
Includes basic support for both the ISMV ('dfxp') and MP4 ('stpp')
methods. This initial version also foregoes fragmentation support
in case the built-in sample squashing is to be utilized, as this
eases the initial review.

Additionally, add basic tests for both muxing modes in MP4.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-08-25 09:26:46 +03:00
J. Dekker b492cacffd checkasm: collapse hevc pel tests
Also add to `make fate-checkasm' target.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2021-08-24 22:12:06 +02:00
James Almer fbbca7b8fa fate: update some missing refs
Forgotten in 590a7e02f0

Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-24 12:22:36 -03:00
James Almer 590a7e02f0 avcodec: add a Film Grain codec property flag
Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-24 10:00:06 -03:00
Andreas Rheinhardt 750631b098 avformat/matroskaenc: Pass dispositions through unchanged by default
Up until now, the Matroska muxer did not use the dispositions it is
given as-is; instead it by default overrode the disposition of the first
track of a kind (audio, video, subtitles) if no track of this kind has
the default disposition set. And up until recently, it also enforced
by default that no more than one track of each kind be marked as
default.

The rationale for the former is that there are lots of containers which
lack the concept of default streams, so that it is not uncommon for no
stream to be marked as default at all; the rationale for the latter was
that up until recently, it was dubious whether the Matroska specification
allowed more than one default stream for track type (e.g. mkvmerge
disallowed it). It was this point which led to the implementation of
the above mentioned behaviour inspired by mkvmerge.

Yet the Matroska specifications have changed and now explicitly allow
to set more than one track of each type as default, so that the main
reason of not using the dispositions as-is was rendered moot. Therefore
this commit changes the default to pass the disposition through.

The matroska-mpegts-remux FATE-test has been updated to still use the
old "infer" mode so that it is still covered by FATE; the
matroska-zero-length-block test has also been updated to cover
the infer_no_subs mode. The references for lots of other FATE tests
needed to be updated because of a newly added FlagDefault element with
value zero (whereas a FlagDefault with value 1 needn't be coded at all,
as it coincided with the default value of said element).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-24 04:23:29 +02:00
Andreas Rheinhardt beb60abab5 avformat/matroskaenc: Allow to set multiple streams as default
The Matroska specifications have evolved and now allow to mark
multiple tracks of the same kind as default (whether this was legal or
not before was dubious; e.g. mkvmerge disallowed it). Yet when the
Matroska muxer is set to infer default dispositions if absent, it also
enforced the now outdated restriction. So update this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-24 03:11:01 +02:00
Gyan Doshi d905af0c24 avformat/mov: add AVFMT_SHOW_IDS flag
The MOV muxer can store streamids as track ids but they aren't
visible when probing the result via lavf/dump or ffprobe due to
lack of this flag in the demuxer.
2021-08-22 17:55:31 +05:30
Paul B Mahol 99ccad843f avfilter/aevalsrc: switch to activate
Allow to set the EOF timestamp.

FATE test is updated, as last 2 frames were duplicated.
2021-08-21 16:43:21 +02:00
Andreas Rheinhardt 1cc64146e3 avcodec/options_table: Treat (request_)channel_layout as channel layout
Also adapt some FATE tests to already cover this.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-15 23:19:35 +02:00
Anton Khirnov 5fdb5ed613 FATE: add a test for sliced scaling 2021-08-08 19:26:05 +02:00
Anton Khirnov 94170e0411 tools/venc_data_dump: factor out demux/decode code
It can be shared with other simple demux/decode tools.
2021-08-08 19:21:39 +02:00
James Almer 44d5e12c8f ffprobe: remove references to frame->pkt_pts
The field was removed during the last major bump.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-08-07 10:16:07 -03:00
Derek Buitenhuis e6754d2ad2 ffprobe: Rename Audio Service Type 'type' field to 'service_type'
677a030b26 introduced more printable
side data types in ffprobe, however the Audio Service Type side data
'type' field that was introduced aliases an existing field of the same
name within the side data array, which can lead to JSON output like:

    "side_data_list": [
        {
            "side_data_type": "Audio Service Type",
            "type": 0
        },
        {
            "side_data_type": "Stereo 3D",
            "type": "side by side",
            "inverted": 1
        }
    ]

This, while technically valid JSON, is considered bad practice, since it
forces all downstream users to manually parse it and check all types;
it makes simple deserialization impossible. Worse, in som loosely
type languages, it can lead to silent bugs if exising code assumed
it was a different type.

As such, rename this second "type" field to "service_type".

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-08-06 15:48:31 +01:00
Linjie Fu 9f14396a51 lavfi/vf_scale: use default swscale flags for scaler
Currently the default swscale flags for simple filter graph is bicubic,
however for complex filter graph it uses bilinear as decleared in scale
filter.

$ffmpeg -v verbose -i input.mp4 -vf format=yuv420p,scale=800x600 -an -f null -
[Parsed_scale_1 @ 0x7f86d2c160c0] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0x4

$ffmpeg -v verbose -i input.mp4 -filter_complex format=yuv420p,scale=800x600 -an -f null -
[Parsed_scale_1 @ 0x7f8779e046c0] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0x2

Use default swscale flags (bicubic currently) for scale filter.
- Remove flags="bilinear" from vf_scale
- Update the FATE refs

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-08-05 22:23:49 +08:00
Yun Zhang a27853a730 lavd/lavfi.c: Set time_base for 608 cc to container time_base.
Suggested-By: ffmpeg@fb.com
2021-08-02 14:00:52 +02:00
Gyan Doshi b9176dbfb7 avcodec/noise_bsf: restore dropamount for backwards compatibility 2021-07-30 17:14:43 +05:30
Gyan Doshi 23da5caf09 avcodec/noise_bsf: add expr support 2021-07-29 22:05:11 +05:30
Andreas Rheinhardt 4608f7cc6a Remove unnecessary mem.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:47:57 +02:00
Andreas Rheinhardt 1be3d8a0cb avcodec/avcodec: Stop including channel_layout.h in avcodec.h
Also include channel_layout.h directly wherever used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 11:14:31 +02:00
J. Dekker c866a099b2 lavu/kperf: use ff_thread_once()
Signed-off-by: J. Dekker <jdek@itanimul.li>
2021-07-21 16:35:27 +02:00
J. Dekker 9a727235fd lavu/checkasm: add (private) kperf timing for macOS
Signed-off-by: J. Dekker <jdek@itanimul.li>
2021-07-20 19:40:03 +02:00
Tobias Rapp f531a1a4e8 fate/ffprobe: Verify ffprobe XML output against schema file
Adds schema validation for ffprobe XML output so that updating the
ffprobe.xsd file upon changes to ffprobe is not forgotten. This was
suggested by Marton Balint in:
http://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278428.html

The schema FATE test is only run if xmllint command is available.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2021-07-13 08:57:23 +02:00
Guangyu Sun b53738bf90 fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES
After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg,
the actual decoded samples become fewer. Three fate tests are failing:

fate-vorbis-20:
The samples in 6.ogg are not frame aligned. 6.pcm file was generated by
ffmpeg before the fix. After the fix, the decoded pcm file does not match
anymore. Ideally the ref file 6.pcm should be updated but it is probably
not worth it including another copy of the same file, only smaller.
SIZE_TOLERANCE is added for this test case.

fate-webm-dash-chapters:
The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm.
The ref file webm-dash-chapters needs to be updated.

fate-vorbis-encode:
This exposes another bug in the vorbis encoder that initial_padding is not
correctly set. It is fixed in the previous patch.

Signed-off-by: Guangyu Sun <gsun@roblox.com>
2021-07-12 09:55:21 +02:00
Anton Khirnov fe490ec165 sws: separate the calls to scaled vs unscaled conversion
Call the scaler function directly rather than through a function
pointer. Drop the now-unused return value from ff_getSwsFunc() and
rename the function to reflect its new role.

This will be useful in the following commits, where it will become
important that the amount of output is different for scaled vs unscaled
case.
2021-07-03 15:57:13 +02:00
Matthieu Patou b27ae2c0b7 checkasm/vp9dsp: rename the iszero function to is_zero
Suggested-by: ffmpeg@fb.com
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-08 13:11:22 -03:00
Lynne 0fd7f14c75
fate-aac: use the fast coder for tests
The twoloop coder is highly loaded with (pseudo-)perceptual metrics,
and the aim of the tests is to piece-wise test each function of the
encoder, for which the 'fast' coder is perfect, since it only decides
on which scalefactors to use, rather than enable or disable encoder
features.
2021-05-21 19:28:50 +02:00
Marton Balint f597041d57 avformat/flvdec: use milisecond precision for parsing timestamps
Also use helper function to set the timestamp. Maybe we could also use
nanosecond precision, but there were some float rounding concerns.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-05-20 20:39:14 +02:00
James Almer a42d249c91 avformat/framecrcenc: print basic side data information again
This partially reverts c6ae560a18.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-18 10:18:49 -03:00
Anton Khirnov ef58f48d59 fate: add a more extensive test for APNG_DISPOSE_OP_BACKGROUND
Uses the sample from #9184.
2021-05-14 11:15:13 +02:00
Anton Khirnov 6a9a4f34bd lavf/flvdec: normalize exporting date metadata
Export them in UTC, not the local timezone. This way the output is
the same everywhere. The timezone information stored in the file is
still ignored, since there seems to be no simple way to export it
correctly.

Format them according to ISO 8601, which we generally use for exporting
dates.

Fixes fate-flv-demux, which was broken since
958bea5248 on some platforms.
2021-05-12 20:19:02 +02:00
Anton Khirnov c6ae560a18 lavf/framecrcenc: do not hash side data
There are no guarantees that all side data types have the same
representation on all platforms.

Tests that change output due to this:

id3v2-priv-remux, cover-art-mp3-id3v2-remux, gapless-mp3: SKIP_SAMPLES,
which is tested by fate-gapless-mp3-side-data

matroska-vp8-alpha-remux: MATROSKA_BLOCKADDITIONAL, which is tested by
remux itself (side data is written into output)

matroska-mastering-display-metadata: MASTERING_DISPLAY_METADATA and
CONTENT_LIGHT_LEVEL, which are tested by ffprobe invocation in the same
test

matroska-spherical-mono-remux: STEREO3D and SPHERICAL, which are tested
by ffprobe invocation in the same test

segment-mp4-to-ts: MPEGTS_STREAM_ID, which is tested by ts remuxing
tests

webm-webvtt-remux: WEBVTT_IDENTIFIER/SETTINGS, which is tested by the
ffprobe invocation in the same test

mxf-d10-user-comments: CPB_PROPERTIES, which is tested by mxf-probe-d10

mov-cover-image: SKIP_SAMPLES, which is tested for mov by
mov-aac-2048-priming

copy-trac3074: AUDIO_SERVICE_TYPE, which is tested by fate-hls-fmp4_ac3
2021-05-09 11:07:20 +02:00
Anton Khirnov 4d28a6756c fate: drop the vp8-alpha test
It is redundant with matroska-vp8-alpha-remux.
2021-05-09 11:07:20 +02:00
Anton Khirnov af607a8838 fate-run.sh: print stream side data in probeaudiostream()
Adds a test for reading AUDIO_SERVICE_TYPE in fate-hls-fmp4_ac3
2021-05-09 11:07:20 +02:00
Anton Khirnov 1b3bd52e54 fate-webm-webvtt-remux: print packet side data in ffprobe output 2021-05-09 11:07:20 +02:00
Anton Khirnov 958bea5248 fate/demux: convert flv-demux to ffprobe
It can handle side data cleanly.
2021-05-09 11:07:20 +02:00
Anton Khirnov 471a9e706b fate-ts-demux: convert to ffprobe
It can handle side data cleanly.
2021-05-09 11:07:20 +02:00
Anton Khirnov c89460f096 fate-ts-opus-demux: convert to ffprobe
It can handle side data cleanly.
2021-05-09 11:07:20 +02:00
Anton Khirnov 99fb6ffd82 fate-ts-small-demux: convert to ffprobe
It can handle side data cleanly.
2021-05-09 11:07:19 +02:00
Anton Khirnov 40b33ee693 fate/gapless: add a test for skip samples side data 2021-05-09 11:07:17 +02:00
Anton Khirnov b8041fb838 fate-oggopus-demux: convert to ffprobe
It can print side data cleanly.
2021-05-09 10:59:21 +02:00
Anton Khirnov 677a030b26 ffprobe: support printing more packet side data types
Specifically WebVTT subtitle data, CPB properties, audio service type
and mpegts stream id.
2021-05-09 10:59:21 +02:00
Anton Khirnov 544631cab1 ffprobe: only hash extradata when it is present
Passing zero-sized/NULL buffers to av_hash_update() is invalid and may
crash with certain hashes.
2021-05-09 10:59:21 +02:00