Commit Graph

6627 Commits

Author SHA1 Message Date
Andreas Rheinhardt
54598238e4 tests/checkasm: Add CAVS qpel test
This test already uncovered a bug in the vertical qpel motion
compensation code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-08 20:40:08 +02:00
Andreas Rheinhardt
3e2d9b73c1 avcodec/h264qpel: Move Snow-only code to snow.c
Blocksize 2 is Snow-only, so move all the code pertaining
to it to snow.c. Also make the put array in H264QpelContext
smaller -- it only needs three sets of 16 function pointers.
This continues 6eb8bc4217
and b0c91c2fba.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-07 18:06:40 +02:00
James Almer
660983b7f3 avformat/mccenc: use Lavf version string instead of FFmpeg
The muxed subtitle is created by libavformat, and as such that's what should be
reported. This is in line with the string we write for every other muxer.
After this change, the muxer will no longer be recompiled every time a commit
is made.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-06 11:51:50 -03:00
James Almer
9b709532d5 avformat/demux: don't overwrite container level color information if set
If the information is coded at the container level, then that's what should be
exported. The user will still have access to values coded at the bitstream
level by firing a decoder.

Fixes issue #20121

Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-05 13:22:17 -03:00
James Almer
95850f339e tests/checkasm: add a test for dcadsp
Signed-off-by: James Almer <jamrial@gmail.com>
2025-10-05 10:09:04 -03:00
Andreas Rheinhardt
6eb8bc4217 avcodec/h264qpel: Don't build unused 2x2 size funcs for bitdepths > 8
The 2x2 put functions are only used by Snow and Snow uses
only the eight bit versions. The rest is dead code. Disabling
it saved 41277B here.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:33 +02:00
Andreas Rheinhardt
8820e2205c tests/checkasm/hpeldsp: Use instruction-set independent height
Otherwise the benchmark numbers are incomparable.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Andreas Rheinhardt
9a0581fca0 tests/checkasm: Add qpeldsp checkasm
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-04 07:06:32 +02:00
Andreas Rheinhardt
ab7d1c64c9 avcodec/x86/h263_loopfilter: Port loop filter to SSE2
Old benchmarks:
h263dsp.h_loop_filter_c:                                41.2 ( 1.00x)
h263dsp.h_loop_filter_mmx:                              39.5 ( 1.04x)
h263dsp.v_loop_filter_c:                                43.5 ( 1.00x)
h263dsp.v_loop_filter_mmx:                              16.9 ( 2.57x)

New benchmarks:
h263dsp.h_loop_filter_c:                                41.6 ( 1.00x)
h263dsp.h_loop_filter_sse2:                             28.2 ( 1.48x)
h263dsp.v_loop_filter_c:                                42.4 ( 1.00x)
h263dsp.v_loop_filter_sse2:                             15.1 ( 2.81x)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-03 17:05:46 +00:00
Andreas Rheinhardt
a8a16c15c8 tests/checkasm/llviddsp: Use the same width for each cpuflag
Otherwise the benchmark numbers would be incomparable nonsense.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-10-03 17:05:46 +00:00
Romain Beauxis
cb4052beae libavformat/oggparseopus.c: Parse comments from secondary chained streams header packet. 2025-10-01 14:20:55 +00:00
Romain Beauxis
45d7d5d3e2 libavformat/oggparseflac.c: Parse ogg/flac comments in new ogg packets, add them to ogg stream
new_metadata.
2025-10-01 14:20:55 +00:00
Romain Beauxis
7dbf7d2a45 libavformat/oggdec.c: Use AV_PKT_DATA_STRINGS_METADATA to pass metadata updates. 2025-10-01 14:20:55 +00:00
Romain Beauxis
de8d57e4c5 ogg/vorbis: implement header packet skip in chained ogg bitstreams. 2025-10-01 14:20:55 +00:00
Kacper Michajłow
d6cb0d2c2b ALL: move av_unused to conform with standard requirement
This is required placement by standard [[maybe_unused]] attribute, works
the same for __attribute__((unused)).

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2025-09-26 16:15:46 +00:00
Andreas Rheinhardt
4e2ef29cba tests/checkasm: Add hpeldsp checkasm
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-26 06:21:02 +02:00
Paul B Mahol
e0638cee0a avcodec/adpcm: improve decooding output for 4-bit ADPCM IMA WAV
(cherry picked from commit f11422f1a6251e2b3c42b4044efbc722b863778d)
2025-09-22 23:46:29 +00:00
Niklas Haas
00e05bcd68 tests/checkasm: add vf_idet checkasm 2025-09-21 11:02:41 +00:00
Zhao Zhili
e02e6d54b0 tests/fate/demux: add hxvs test case 2025-09-21 17:42:19 +08:00
James Almer
c6297b689f tests/fate/image: add Exif rotation metadata tests
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-17 02:17:09 +00:00
James Almer
796b3ba63b tests/fate/prores: add a probe test
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-16 15:42:03 -03:00
James Almer
e0ddb4ac82 tests/fate-run: pass threads argument to ffprobe
Ensures it honors the THREADS variable if set to anything other than 1, which will be
useful to detect bugs.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-16 15:42:03 -03:00
Andreas Rheinhardt
a35c91dc14 avfilter/vf_colordetect: Rename header to vf_colordetectdsp.h
It is more in line with our naming conventions.

Reviewed-by: Martin Storsjö <martin@martin.st>
Reviewed-by: Niklas Haas <ffmpeg@haasn.dev>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-16 18:22:24 +02:00
Jan Ekström
af35a13f6d avformat/movenc: add support for fragmented TTML muxing
Attempts to base the fragmentation timing on other streams
as most receivers expect media fragments to be more or less
aligned.

Currently does not support fragmentation on subtitle track
only, as the subtitle packet queue timings would have to be
checked in addition to the current fragmentation timing logic.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2025-09-16 16:29:48 +03:00
Jan Ekström
5c222d7ade tests/fate-run: add support for specifying the final encode muxer in transcode
This allows for direct dumping of the packets' contents (useful for
text based formats), while getting the timestamps/sizes etc from
ffprobe.

If used via TRANSCODE, the actually utilized muxer should be added
within the last argument as an additional dependency, as that is not
done automatically.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2025-09-16 15:17:12 +03:00
Timo Rothenpieler
0362cb3806 build: link with CXX when -lstdc++ on linker commandline 2025-09-14 11:45:11 +00:00
Andreas Rheinhardt
bc545bae3b tests/checkasm/sw_ops: Avoid 1 << 32
It is UB.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-09-13 21:27:27 +02:00
averne
5aa541c690 fate/prores: Fix missing dependency
Signed-off-by: averne <averne381@gmail.com>
2025-09-09 12:04:05 +00:00
Leo Izen
74e61981b5 avcodec/decode: treat orientation 1 as valid displaymatrix
Since 9dc79241d9 we now always pop the
orientation off of the IFD and use a display matrix instead. This means
we should not produce a warning and refuse if the orientation field
indicates a default orientation (i.e. 1).

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Reported-by: Ramiro Polla <ramiro.polla@gmail.com>
2025-09-06 13:15:24 -04:00
Niklas Haas
8ff34b29c7 fate/filter-audio: update acrossfade to test multiple inputs 2025-09-04 23:12:34 +00:00
Niklas Haas
2032820e90 fftools/ffprobe: add AVFrame.alpha_mode support 2025-09-02 17:06:25 +02:00
Maryla Ustarroz-Calonge
5e210f0552 avcodec/libaom: Add test for HDR10+ metadata support
Signed-off-by: Maryla Ustarroz-Calonge <maryla@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2025-09-02 16:05:45 +02:00
Martin Storsjö
5a893c1806 checkasm: sw_ops: Avoid division by zero
If we're invoked with range == UINT_MAX, we end up doing
"rnd() % (UINT_MAX + 1)", which is equal to "rnd() % 0". On
arm (on all platforms) and on MSVC i386, this ends up crashing
at runtime.

This fixes the crash.
2025-09-02 14:28:56 +03:00
Niklas Haas
5e6ffa0376 tests/checkasm: add checkasm tests for swscale ops
Because of the lack of an external ABI on low-level kernels, we cannot
directly test internal functions. Instead, we construct a minimal op chain
consisting of a read, the op to be tested, and a write.

The bigger complication arises from the fact that the backend may generate
arbitrary internal state that needs to be passed back to the implementation,
which means we cannot directly call `func_ref` on the generated chain. To get
around this, always compile the op chain twice - once using the backend to be
tested, and once using the reference C backend.

The actual entry point may also just be a shared wrapper, so we need to
be very careful to run checkasm_check_func() on a pseudo-pointer that will
actually be unique for each combination of backend and active CPU flags.
2025-09-01 19:28:36 +02:00
Niklas Haas
8406c56b0c tests/checkasm: generalize DEF_CHECKASM_CHECK_FUNC to floats
We split the standard macro into its body (implementation) and declaration,
and use a macro argument in place of the raw `memcmp` call, with the major
difference that we now take the number of pixels to compare instead of the
number of bytes (to match the signature of float_near_ulp_array).
2025-09-01 19:27:53 +02:00
Niklas Haas
faf62cbdf5 tests/checkasm: increase number of runs in between measurements
Sometimes, when measuring very small functions, rdtsc is not accurate enough
to get a reliable measurement. This increases the number of runs inside the
inner loop from 4 to 32, which should help a lot. Less important when using
the more precise linux-perf API, but still useful.

There should be no user-visible change since the number of runs is adjusted
to keep the total time spent measuring the same.
2025-09-01 19:27:53 +02:00
Zhao Zhili
6450e01446 checkasm/vf_colordetect: test non-aligned width 2025-09-01 15:35:16 +00:00
James Almer
6a15183e6a avcodec/decode: parse Exif packet side data before passing it to frames
Extract Orientation and export it as a display matrix if present, and set the
frame's metadata with the remaining Exif entries.

Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-01 12:07:59 -03:00
James Almer
310be1c5a4 avformat/mov: export Exif metadata from HEIF streams
Signed-off-by: James Almer <jamrial@gmail.com>
2025-09-01 12:07:35 -03:00
Zhao Zhili
9a34ddc345 avformat/movenc: remove mvex from final mp4 in hybrid_fragmented mode
In hybrid_fragmented mode, the first moov at start should contain
mvex tag, since it's fmp4. When writing the moov at the second time,
it's not fmp4 any more, so mvex should be skipped.
2025-09-01 12:41:38 +00:00
Peter Ross
16d32a1c1d libavcodec/dpxenc: map AVCodecContext color transfer and color primaries fields 2025-08-31 07:05:36 +00:00
Marton Balint
7a774829f9 avutil/opt: also print option names on parse error
It is more user-friendly to print which option caused the parse error.

Signed-off-by: Marton Balint <cus@passwd.hu>
2025-08-30 18:46:15 +00:00
Daniil Cherednik
0828a3b636 avcodec/atrac3: fix inconsistent band num calculation
'decode_spectrum' reads 5 bits from bitstream to get
number of encoded subbands – so 31 means all 32
subbands are encoded. This value also is used to
determinate the number of used band in the hybrid
filterbank.

'subband_tab' array contains 33 values of MDCT spec
line positions started from 0 line and used to map
subband number in to the range of mdct lines.

Since the subband_num returned by decode_spectrum
actually is number – 1 and subband_tab started from 0
we need to add 1 to make num_bands calculation correct.
2025-08-29 12:29:52 +00:00
Henrik Gramner
10a061ba99 vp9: Add AVX-512ICL asm for 8bpc subpel mc 2025-08-28 12:45:52 +00:00
Leo Izen
5d4f873ff3 fftools/ffprobe: print EXIF side data size
We don't need to print the tags here because they're added as dict
elements to AVFrame->metadata and are printed elsewhere with ffprobe
-show_frames.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:48 -04:00
Leo Izen
1e816ebefe avcodec/tiff: decode TIFF non-image-data tags into EXIF metadata struct
This commit will cause TIFF files to store their tags in the EXIF
struct so tags such as orientation can be transfered to other formats
(such as PNG) in a way that doesn't corrupt the IFD.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:48 -04:00
Leo Izen
d3190a64c3 avcodec/pngenc: support writing EXIF profiles
Add support to write EXIF profiles using the new EXIF framework, namely
ff_exif_get_buffer, and writing them into eXIf chunks.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:47 -04:00
Leo Izen
c6cc2115f4 avcodec/webp: use new EXIF parse API
Switch over to the new API to parse EXIF metadata.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:47 -04:00
Leo Izen
52dba25661 avcodec/mjpegdec: use new EXIF parse API
Switch over to the new API to parse EXIF metadata.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:47 -04:00
Leo Izen
ad77345a5d avcodec/exif: add EXIF parser and struct API
This commit adds a structure to contain parsed EXIF metadata, as well
as code to read and write that struct from/to binary EXIF buffers. Some
internal functions have been moved to exif_internal.h. Code to read
from this new struct and write to an AVDictionary **dict has been added
as well in order to preserve interoperability with existing callers.
The only codec changes so far as of this commit are to call these
interop functions, but in future commits there will be codec changes to
use the new parsing routines instead.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
2025-08-19 11:26:46 -04:00