Commit Graph

88 Commits

Author SHA1 Message Date
Anton Khirnov
cfbf10412f tests/fate/filter-audio: add a test for handling more than 64 channels
The test constructs 66 sine waves of different frequencies and joins
them into a 7th order ambisonic layout with extra non-diegetic
stereo. The channels are then shifted circularly with channelmap and
separated into individual streams for muxing with channelsplit.

Note that the last step is necessary because swr is not capable of
interleaving planar to packed for more than 64 channels, which would be
necessary to mux such a stream as PCM.
2024-09-09 17:26:17 +02:00
Anton Khirnov
6cde03739e tests/fate/filter-audio: convert atempo test to oneoff
Filter output is not bitexact.
2024-07-07 11:34:13 +02:00
Martin Storsjö
affc1acde7 tests: Add a missing dependency for the filter-atempo test
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-07-04 23:03:20 +03:00
Rajiv Harlalka
fc446eea05 tests/fate/filter-audio.mak: add test for atempo audio filter
Signed-off-by: Rajiv Harlalka <rajivharlalka009@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-07-03 11:37:40 +02:00
Marton Balint
1bea3e9ee2 avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified
In this case in_channel_idx was never set and the default 0 was used.
Suprisingly no one noticed that the respective fate test output was wrong.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-24 21:27:55 +01:00
Andreas Rheinhardt
c6bc2d4fea fate/filter-audio: Don't use pcm output for channelsplit test
This test muxes two streams into a single pcm file, although
the two streams are of course not recoverable from the output
(unless one has extra information). So use the streamhash muxer
instead (which also provides coverage for it; it was surprisingly
unused in FATE so far). This is in preparation for actually
enforcing a limit of one stream for the PCM muxers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-22 23:57:19 +01:00
James Almer
4c8b8bc52b fate/filter-audio: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-15 12:37:42 -03:00
Marton Balint
2129d66a66 fate: use atrim filter instead of -frames:a 20 for fate-filter-tremolo
To make it independent of incoming wav demuxer packet size.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-14 01:37:31 +01:00
Marton Balint
6fc6cac4c6 fate: use a fixed wav demux packet size for amix tests
The dropout transition feature of the amix filter depends on the incoming
packet size.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-14 01:37:31 +01:00
Marton Balint
8c8ce4f233 fate: make filter-channelsplit test use a fixed frame size
Muxing multiple streams to raw files is allowed but the packets are
interleaved, so the output is dependant of packet size.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-03-14 01:37:31 +01:00
Anton Khirnov
a8bc79c3fd fftools/ffmpeg: deprecate -filter_script
It is equivalent to -/filter.
2024-01-20 10:23:24 +01:00
Anton Khirnov
c316c4c77b fftools/ffmpeg: deprecate -filter_complex_script
It is equivalent to -/filter_complex.
2024-01-20 10:23:24 +01:00
Paul B Mahol
3047f05a99 tests/fate: add asegment filter tests 2023-12-05 14:50:40 +01:00
Paul B Mahol
2b5166addf avfilter/af_silenceremove: add real peak detector
Rename old peak detector to more correct name one.
2023-05-26 10:13:37 +02:00
Paul B Mahol
89083142fa fate: add crystalizer test 2022-03-25 18:18:44 +01:00
rcombs
0e7684e554 FATE: always pass -nostdin to ffmpeg
This avoids making terminal config changes that may not be reverted properly
during parallel testing.
2021-12-22 18:38:40 -06:00
Paul B Mahol
0b4d009587 fate: fix silenceremove test 2021-09-09 23:45:52 +02:00
Paul B Mahol
f41de0436c avfilter/af_earwax: fix filter behavior
Previous filter output was incorrect. New one actually follows
graph in comments described on side of filter taps.
2020-12-07 21:09:08 +01:00
Nicolas George
f08e024ac7 fate: disable automatic conversions on many tests.
Explicitly insert the scale or aresample filter where it would
have been inserted by the negotiation.
Re-enable conversions if it cannot be done easily.

If a conversion is needed in a test, we want to know about it.
If the negotiation changes and makes new conversion necessary,
we want to know about it even more.
2020-09-08 14:16:08 +02:00
Martin Storsjö
c27a85b983 fate: Use a oneoff test for the tremolo filter
The tremolo filter uses floating point internally, and uses
multiplication factors derived from sin(fmod()), neither of
which is bitexact for use with framecrc.

This fixes running this test when built with for mingw/x86_32
with clang.

In this case, a 1 ulp difference in the output from fmod() would
end up in an output from the filter that differs by 1 ulp, but
which makes the lrint() in swresample/audioconvert.c round in a
different direction.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-11 22:20:00 +02:00
Andreas Rheinhardt
e5e5be4c7f avcodec/flac_parser: Fix off-by-one error
The flac parser uses a fifo to buffer its data. Consequently, when
searching for sync codes of flac packets, one needs to take care of
the possibility of wraparound. This is done by using an optimized start
code search that works on each of the continuous buffers separately and
by explicitly checking whether the last pre-wrap byte and the first
post-wrap byte constitute a valid sync code.

Moreover, the last MAX_FRAME_HEADER_SIZE - 1 bytes ought not to be searched
for (the start of) a sync code because a header that might be found in this
region might not be completely available. These bytes ought to be searched
lateron when more data is available or when flushing.

Unfortunately there was an off-by-one error in the calculation of the
length to search of the post-wrap buffer: It was too large, because the
calculation was based on the amount of bytes available in the fifo from
the last pre-wrap byte onwards. This meant that a header might be
parsed twice (once prematurely and once regularly when more data is
available); it could also mean that an invalid header will be treated as
valid (namely if the length of said invalid header is
MAX_FRAME_HEADER_SIZE and the invalid byte that will be treated as the
last byte of this potential header happens to be the right CRC-8).

Should a header be parsed twice, the second instance will be the best child
of the first instance; the first instance's score will be
FLAC_HEADER_BASE_SCORE - FLAC_HEADER_CHANGED_PENALTY ( = 3) higher than
the second instance's score. So the frame belonging to the first
instance will be output and it will be done as a zero length frame (the
difference of the header's offset and the child's offset). This has
serious consequences when flushing, as returning a zero length buffer
signals to the caller that no more data will be output; consequently the
last frames not yet output will be dropped.

Furthermore, a "sample/frame number mismatch in adjacent frames" warning
got output when returning the zero-length frame belonging to the first
header, because the child's sample/frame number of course didn't match
the expected sample frame/number given its parent.

filter/hdcd-mix.flac from the FATE-suite was affected by this (the last
frame was omitted) which is the reason why several FATE-tests needed to
be updated.

Fixes ticket #5937.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-10-07 22:27:18 +02:00
Carl Eugen Hoyos
96fc0cbfde tests: Add EXESUF to program calls.
Fixes fate in Windows subsystem for Linux.
2019-04-19 01:11:39 +02:00
Paul B Mahol
c07bc1d6ee avfilter/af_silenceremove: add options to keep min duration of silence 2018-10-15 19:03:01 +02:00
Tobias Rapp
ec517ad9f9 fate: add tests for audio channel up-/downmixing with pan filter
Add tests for upmixing and downmixing with audio channel counts that
have a corresponding default layout and also tests where there is no
default layout.

Update the existing "stereo4" test so it actually outputs stereo like
the other stereo tests. Rename the previous "stereo4" test into
"upmix1".

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-07-30 10:46:19 +02:00
Steven Liu
387464bea5 from RTCTIME to N*23, step is 23
fix ticket: 7225

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-06-25 14:06:45 +08:00
Tobias Rapp
56f77b0f67 fate: add tests for pan audio filter
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-02-19 08:32:44 +01:00
Steven Liu
9302d77525 Revert "tests/fate: addition of test case for hls variant stream creation with master playlist"
This reverts commit 218ce1f623.
2017-11-21 00:22:25 +08:00
Vishwanath Dixit
218ce1f623 tests/fate: addition of test case for hls variant stream creation with master playlist
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:05:33 +08:00
James Almer
a2b0602cda Merge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7'
* commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7':
  Use modern avconv syntax for codec selection in documentation and tests

Merged-by: James Almer <jamrial@gmail.com>
2017-10-03 21:28:07 -03:00
Tobias Rapp
d47159a42d fate: add test for asetnsamples filter with padding disabled
Adds another test for asetnsamples filter where padding of the last
frame is switched off. Renames the existing test to make the difference
obvious.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-09-08 08:54:20 +02:00
James Almer
ec07574a15 fate: stop using deprecated filter syntax in hls tests
Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-30 14:15:25 -03:00
Marton Balint
7ed6f9168b fate: use do_md5sum instead of the md5 protocol for most md5 fate tests
The md5 protocol has no seek support, but some tests use seeks. This changes
the fate tests to actually create the output files and calculate the md5 on the
written files, which also makes the tests independent of the size of the output
buffers and output buffering in general.

A new md5pipe fate test method is also introduced to keep the old functionality
for tests where using a non-seekable output was intentional, and matroska md5
tests are changed to use that.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-06-18 23:19:48 +02:00
Rostislav Pehlivanov
a8fe8d6b4a lavfi: remove af_asynts filter
Long overdue for removal, af_aresample should be used instead.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-03-27 14:06:16 +01:00
Clément Bœsch
71d541751e Merge commit '043b0b9fb1481053b712d06d2c5b772f1845b72b'
* commit '043b0b9fb1481053b712d06d2c5b772f1845b72b':
  Replace leftover uses of -aframes|-dframes|-vframes with -frames:a|d|v

The merge also includes all our own occurences.

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-24 11:40:35 +01:00
Burt P
f317080024 af_hdcd: more FATE tests
Additional/Modified FATE tests improve code coverage from 63.7% to 98.1%.

Changed fate-suite sample files:
* filter/hdcd-mix.flac (958K) added. It is a much better test than
  filter/hdcd.flac (910K), which is now unused, but can't be removed.
* filter/hdcd-fake20bit.flac (168K) added. It is the first second of
  filter/hdcd.flac, with the 16-bit LSB copied into bit 20 of a 24-bit
  stream. There isn't an actual non-16-bit HDCD sample available to test.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-12-28 03:46:10 -06:00
Muhammad Faiz
c593a70cda fate: add test for firequalizer filter
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-10-14 01:46:37 +07:00
Steven Liu
30a09eae98 tests/fate:Add FATE for hls_flags append option
add tests/ref/fate/filter-hls-append for FATE
add hls-list-append fate use filter make audio data and test hls_flags
append options

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-07 18:39:08 +02:00
Burt P
eb0086588f af_hdcd: tweak hdcd_analyze_prepare() a bit
* use the actual sample rate
* use a more sensible frequency for the tone
* update fate test result

Signed-off-by: Burt P <pburt0@gmail.com>
2016-09-07 10:54:30 -05:00
Burt P
0cfe6acbe4 fate: add test for af_hdcd analyze mode
Signed-off-by: Burt P <pburt0@gmail.com>
2016-08-24 09:08:29 -05:00
Petru Rares Sincraian
777697a62c fate: add test for compand filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-12 23:54:04 +02:00
Petru Rares Sincraian
7be021d949 fate: add test for tremolo filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-02 12:50:04 +02:00
Petru Rares Sincraian
286368099a fate: add test for stereotools filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-29 00:30:22 +02:00
Petru Rares Sincraian
08c1b6bb72 fate: add test for silenceremove filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-29 00:30:22 +02:00
Burt P
bfe9155aee fate: Add HDCD filter tests for false positive and error detection
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-27 22:21:43 +02:00
Michael Niedermayer
783a2568b2 tests/fate/filter-audio: fate-filter-chorus: Randomly change parameters to some values which pass on arm/mips/x86-32/64
If this still doesnt give the same results on all platforms then this should be
disabled

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-24 03:52:55 +02:00
Petru Rares Sincraian
fa393e3061 fate: add test for extrastereo filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-22 13:13:24 +02:00
Petru Rares Sincraian
3fd2ef922e fate: add test for earwax filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-20 23:09:04 +02:00
Petru Rares Sincraian
7403dcc34e fate: add test for dcshift filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-20 23:09:04 +02:00
Petru Rares Sincraian
2383618a40 fate: add test for chorus filter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-20 02:53:42 +02:00
Petru Rares Sincraian
3f5b7a2d73 fate: add test for asetrate
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 01:20:21 +02:00