Commit Graph

6033 Commits

Author SHA1 Message Date
Andreas Rheinhardt
5b585ba560 fate/video: Only use bitexact IDCT in avid meridian
Precludes the usage of the altivec IDCT which fixes
the avid-meridian FATE test on ppc64be here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-02 14:58:53 +02:00
Andreas Rheinhardt
a1a1d49355 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-04-01 19:51:37 +02:00
Andreas Rheinhardt
ed6f9bf08b fate/image: Fix EXR tests on big endian
These tests need a scale filter to convert to the prescribed
pixel format (the native format is endian-dependent).

Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 21:00:43 +01:00
Sean McGovern
3515a6782d fate: fix sub2video_{basic, time_limited} on big-endian targets
The reference file uses BGRA pixel format, so request it here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 21:00:41 +01:00
Anton Khirnov
4c3dc0df22 lavfi/setpts: unset frame durations
Actual frame durations are, in general, not computable without buffering
a frame.

FIxes #10886

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 13:46:45 +01:00
Anton Khirnov
4428b0f519 lavf/vf_setpts: unset output framerate
This filter produces VFR output in general.

Avoids dropping frames in the setpts test.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-30 13:46:45 +01:00
Tobias Rapp
209bc9c1ce tests/audiogen: Fix total RIFF chunk size
The "RIFF" identifier and chunk size fields should not be included
within the size value.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-28 22:25:54 +01:00
Anton Khirnov
46ef0baf71 fftools/ffmpeg_dec: apply cropping manually
lavfi does not require aligned buffers, so we can safely apply top/left
cropping by any amount, without passing any special flags to lavc.
Longer term, an even better solution would probably be auto-inserting
the crop filter (or its hwaccel versions) as needed.

Multiple FATE tests no longer need -flags unaligned.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-28 22:25:53 +01:00
Zhao Zhili
51f0437eeb tests: Remove fate-libx265-hdr10
The test depends on the compile option of x265. It failed when
HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled
because of memory issue inside of x265, which I don't think can
be fixed within FFmpeg.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-27 19:21:51 +01:00
Marton Balint
359600f01a avutil/timestamp: change precision of av_ts_make_time_string()
By calling the av_ts_make_time_string2() from the function we can fix the
precision issue.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 22:54:44 +01:00
Andreas Rheinhardt
366ed95718 fate/source: Fix FATE reference file
Forgotten in ecdc94b97f809d5f2b88640842fd0541951ad295.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 22:54:43 +01:00
Marton Balint
fd5a5e85ae 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>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-25 01:34:01 +01:00
Anton Khirnov
d4fd74b786 tests/fate/ffmpeg: evaluate thread count in fate-run.sh rather than make
Fixes fate-ffmpeg-loopback-decoding with THREADS=random*

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:47 +01:00
Andreas Rheinhardt
e2fe34f485 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>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-23 14:23:45 +01:00
Jan Ekström
540edf66be avcodec/libx265: add support for writing out CLL and MDCV
The newer of these two are the separate integers for content light
level, introduced in 3952bf3e98c76c31594529a3fe34e056d3e3e2ea ,
with X265_BUILD 75. As we already require X265_BUILD of at least
89, no further conditions are required.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
94bb479eb6 avcodec/libx264: add support for writing out CLL and MDCV
Both of these two structures were first available with X264_BUILD
163, so make relevant functionality conditional on the version
being at least such.

Keep handle_side_data available in all cases as this way X264_init
does not require additional version based conditions within it.

Finally, add a FATE test which verifies that pass-through of the
MDCV/CLL side data is working during encoding.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
7ecbfe38fa avcodec/libsvtav1: add support for writing out CLL and MDCV
These two were added in 28e23d7f348c78d49a726c7469f9d4e38edec341
and 3558c1f2e97455e0b89edef31b9a72ab7fa30550 for version 0.9.0 of
SVT-AV1, which is also our minimum requirement right now.

In other words, no additional version limiting conditions seem
to be required.

Additionally, add a FATE test which verifies that pass-through of
the MDCV/CLL side data is working during encoding.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:41 +01:00
Jan Ekström
f47eaeb9c4 avutil/frame: add helper for adding side data to array
Additionally, add an API test to check that the no-duplicates
addition works after duplicates have been inserted.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-21 20:32:40 +01:00
Andreas Rheinhardt
37ca591b3d fate/atrac: Add atrac->aea, atrac->matroska remux tests
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-20 00:31:19 +01:00
Andreas Rheinhardt
8a670310e0 tests/ref/lavf-fate/hevc.flv: Fix ref file
Unbreaks the lavf-fate-hevc.flv FATE test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Gyan Doshi
3cb537f56b fate/lavf-container: correct operator; unbreak build
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Zhu Pengfei
6188f20363 fate/flvenc: support enhanced flv PacketTypeMetadata
Signed-off-by: Zhu Pengfei <411294962@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-18 14:18:45 +01:00
Andreas Rheinhardt
424f982eed fate/lavf-audio: Test writing AIFF-native tags
In particular, test writing tags with odd strlen.
(These tags are zero-padded to even size.)

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:55 +01:00
Marton Balint
e8c292f613 avutil/channel_layout: add specific text versions for unknown and unused channels
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
ca87cd6b81 avutil/channel_layout: factorize parsing list of channel names
Also make use of the av_channel_from_string() function to determine the channel
id. This fixes some parse issues in av_channel_layout_from_string().

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
d1a3a48638 avutil/tests/channel_layout: add some av_channel_from_string and av_channel_layout_from_string tests
We lacked tests which supposed to fail, and there are some which should fail
but right now it does not. This will be fixed in a later commit.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
869bcb1760 avutil/tests/channel_layout: make printing results part of the tests
Deduplicates a lot of code.

Some minor differences (mostly white space and inconsistent use of quotes) are
expected in the fate tests, there was no point aiming for exactly the same
formatting.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:54 +01:00
Marton Balint
8d8697f741 avformat/pcm: decrease target audio frame per sec to 10
This makes the wav and pcm demuxer demux bigger packets, which is more
efficient.

As a side effect of the bigger packets, audio durations can become less exact
for command lines such as "ffmpeg -i $INPUT -c:a copy -t 1.0 $OUTPUT".

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:53 +01:00
Marton Balint
b71cd5ec7c avformat/wavdec: use ff_pcm_default_packet_size for the default packet size
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:53 +01:00
Marton Balint
5626772ac8 avformat/pcm: factorize and improve determining the default packet size
- Remove the 1024 cap on the number of samples, for high sample rate audio it
  was suboptimal, calculate the low neighbour power of two for the number of
  samples (audio blocks) instead.
- Make the function work correctly also for non-pcm codecs by using the stream
  bitrate to estimate the target packet size. A previous version of this patch
  used av_get_audio_frame_duration2() the estimate the desired packet size, but
  for some codecs that returns the duration of a single audio frame regardless
  of frame_bytes.
- Fallback to 4096/block_align*block_align if bitrate is not available.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
24465faf64 fate/wmavoice: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
c1094751c2 fate/vqf: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
b73ad63ae3 fate/voice: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:52 +01:00
James Almer
ad04ecd87a fate/vorbis: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
6f80c4454a fate/real: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
3680c2c773 fate/pcm: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
7733470cc4 fate/mpc: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
96889012d1 fate/mp3: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
de7a49b871 fate/monkeysaudio: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
f307f89d15 fate/lossless-audio: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
b9f4691069 fate/libswresample: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
04254184c8 fate/hlsenc: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:51 +01:00
James Almer
771f68386e fate/gapless: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
be378384ab fate/ffprobe: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
c4df312c65 fate/ffmpeg: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
0fabd402ea fate/filter-audio: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
562b028cfb fate/fate-container: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
dd4e13f11e fate/demux: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
19d542aad2 fate/audio: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00
James Almer
cb0754e4c3 fate/atrac: add missing aresample filter dependency
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-03-17 19:46:50 +01:00