Commit Graph

6321 Commits

Author SHA1 Message Date
James Almer
014e99eb2b avformat/riff: map Y210 and Y216 fourcc to RAWVIDEO decoder
As defined in https://learn.microsoft.com/en-us/windows/win32/medfound/10-bit-and-16-bit-yuv-video-formats#422-formats

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:28:05 +02:00
Niklas Haas
7d8a5e3aee swscale: rename SwsContext to SwsInternal
And preserve the public SwsContext as separate name. The motivation here
is that I want to turn SwsContext into a public struct, while keeping the
internal implementation hidden. Additionally, I also want to be able to
use multiple internal implementations, e.g. for GPU devices.

This commit does not include any functional changes. For the most part, it is
a simple rename. The only complications arise from the public facing API
functions, which preserve their current type (and hence require an additional
unwrapping step internally), and the checkasm test framework, which directly
accesses SwsInternal.

For consistency, the affected functions that need to maintain a distionction
have generally been changed to refer to the SwsContext as *sws, and the
SwsInternal as *c.

In an upcoming commit, I will provide a backing definition for the public
SwsContext, and update `sws_internal()` to dereference the internal struct
instead of merely casting it.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-26 09:25:17 +02:00
James Almer
efc963fee6 swscale/output: add Y216LE output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:49 +02:00
James Almer
3373ec5ab7 avutil/pixfmt: add Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-24 09:57:49 +02:00
Emily
71bc88b8ee fate/ffmpeg: add samples dependency to fate-ffmpeg-spec-disposition
This test utilizes an MPEG-TS sample from FATE suite, yet was
marked as not requiring samples.

Reviewed-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-22 08:53:05 +02:00
James Almer
f67c76aaee fate/filter-video: make fate-filter-pixdesc compare the hashed output with and without pixdesctest filtering
This helps detecting inconsistencies in swscale input/output code and
a av_read_image_line()/av_write_image_line() pass.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-22 08:53:05 +02:00
James Almer
1a442ad19a swscale/swscale_unscaled: clear the low bits in planar8ToP01xleWrapper
This makes the unscaled output of p010le and p016le match the generic path.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-22 08:53:04 +02:00
James Almer
711d9d5f0f avfilter/vf_pixdesctest: also take into account undefined alpha components
Ensure those bits are copied, which will result in the output being the same as
the input, where swscale set them to the equivalent of fully opaque.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-22 08:53:04 +02:00
James Almer
5c2be4b256 avfilter/vsrc_testsrc: use the alpha component information for XV3{0,6} and V30X
And add a few more tests to ensure all the pixfmts affected by this change
are tested.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-22 08:53:04 +02:00
James Almer
743da127cf fate/vcodec: update reference files for v410 vsynth tests
Forgotten in 601a3479466f4f03d27487dfc6fcb9430efb8fc6.

Found-by: ramiro
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:14 +02:00
James Almer
0199d80b87 swscale/output: fix alpha endianness in XV36
Mistakenly written in native endianness in 42098f92662c47659df85173d8076b62a23269aa.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:14 +02:00
James Almer
cb5fa2f5a5 avfilter/vsrc_testsrc: fill the xv30le alpha bits
As with other pixel formats, set the undefined alpha bits to opaque.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:13 +02:00
James Almer
251b75b674 swscale/output: fill the xv30le alpha bits
As with other pixel formats, set the undefined alpha bits to opaque.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:13 +02:00
James Almer
214251b9ad avfilter/vsrc_testsrc: add support for XV36 and AYUV64
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:13 +02:00
James Almer
1cbdd8124b swscale/output: add AYUV64BE output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:13 +02:00
James Almer
17a31a220d swscale/output: add X36VBE output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:12 +02:00
James Almer
3f900ee858 swscale/output: fill all the xv36le alpha bits
The format is 10 bit per component, not 8.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:12 +02:00
James Almer
6127e1611e tests/checkasm/sw_rgb: don't write random data past the end of the buffer
Should fix fate-checkasm-sw_rgb under gcc-ubsan.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ramiro Polla <ramiro.polla@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-18 10:04:11 +02:00
Paul B Mahol
0ebd22c893 avfilter/vf_waveform: convert to query_func2() 2024-10-17 13:21:33 +02:00
Paul B Mahol
6cd03da059 avfilter/vf_vectorscope: convert to query_func2() 2024-10-17 13:21:32 +02:00
Paul B Mahol
735d5e3f61 avfilter/vf_histogram: convert to query_func2() 2024-10-17 13:21:31 +02:00
Anton Khirnov
3666601290 lavf/flvdec: replace a private option with a field in FFFormatContext
The demuxer's 'missing_streams' private option is used to communicate
information from the demuxer to avformat_find_stream_info(). However,
that is not only unnecessarily complicated, it also leaks internal
information to users, e.g. this option appears in the results of the
fate-flv-demux test.

Use a new field in FFFormatContext to communicate this information
instead.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-17 09:30:45 +02:00
James Almer
b83f60aa85 fate/vcodec: add a test for v410 pixel format raw video
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-17 09:30:44 +02:00
James Almer
ec8d184741 fate/vcodec: stop using the deprecated v408 codec
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-17 09:30:44 +02:00
James Almer
a3e59b6bdd fate/vcodec: stop using the deprecated v308 codec
stddev and PSNR values change by the removal of format conversion and because
of the added sws_flags. Either or will have the same effect even on their own.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-17 09:30:44 +02:00
Lynne
66c5281a46 lavu/pixfmt: add AV_PIX_FMT_RGB96
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-15 17:53:37 +02:00
Lynne
6e678acf82 lavu/pixfmt: add AV_PIX_FMT_RGBA128
This format is useful for doing certain lossless transforms on images,
RCT in particular, which require you to escalate the size from 16 to
32 bits to avoid overflows.

APIchanges will be done alongside when comitting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-15 17:53:37 +02:00
Martin Schitter
308a9c6eb8 avutil: add RGBF16 pix_fmt
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-15 08:45:45 +02:00
Ramiro Polla
bd1d4eab64 avcodec/flashsvenc: add compression_level option
This allows setting the compression level used by zlib.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-15 08:45:44 +02:00
James Almer
842ce28370 fate/filter-video: add tests for packed YUV in yuvtestsrc
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-14 18:00:55 +02:00
James Almer
129706111c avformat/riff: map Y410 fourcc to RAWVIDEO decoder
md5 values change because the nut container now reports rawvideo as encoder
and Y410 as codec type instead of the bogus RGB[15].

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-14 15:08:37 +02:00
James Almer
3cc6b9a4e9 avformat/riff: map v410 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:26 +02:00
James Almer
6ef58067e2 avformat/riff: map v308 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:26 +02:00
James Almer
f9cd395355 avformat/riff: map v408 fourcc to RAWVIDEO decoder
There's no need to keep using a custom decoder for this pixel format.
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:26 +02:00
James Almer
e323e721d1 avformat/riff: map y408 fourcc to RAWVIDEO decoder
md5 values change because the nut container now reports rawvideo as encoder.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:26 +02:00
James Almer
b89e5ac3cc swscale/output: add V30X output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:25 +02:00
James Almer
8edb2bfdb7 swscale/output: add VYU444 output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:25 +02:00
James Almer
d51b7ca7ed swscale/output: add UYVA output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:25 +02:00
James Almer
76be2c5dd6 swscale/output: add AYUV output support
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-12 17:55:24 +02:00
Martin Storsjö
5e84f3d5dd checkasm: lls: Use relative tolerances rather than absolute ones
Depending on the magnitude of the output values, the potential
errors can be larger.

This fixes errors in the lls tests on x86_32 for some seeds,
observed with GCC 11 (on Ubuntu 22.04, with the distro compiler,
with -m32).

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:35:27 +02:00
Niklas Haas
b3d6b2120d swscale/rgb2xyz: add explicit width parameter
This fixes an 11-year-old bug in the rgb2xyz functions, when used with a
negative stride. The current loop bounds turned it into a no-op.

Additionally, this increases performance on highly cropped images, whose
stride may be substantially higher than the effective width.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:35:26 +02:00
James Almer
3746ef09d3 avutil/pixfmt: add V30X pixel format
This maps to the 444YpCbCr10 pixel format as defined by Apple.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:33:46 +02:00
James Almer
e416f52cd4 avutil/pixfmt: add VYU444 pixel format
This maps to the 444YpCbCr8 pixel format as defined by Apple, which is ordered
Cr Y' Cb.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:33:46 +02:00
James Almer
e6bd1e2ff3 avutil/pixfmt: add UYVA pixel format
This maps to the 4444YpCbCrA8 pixel format as defined by Apple, which is ordered
Cb Y' Cr A.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:33:45 +02:00
James Almer
1e72543b8f avutil/pixfmt: add AYUV pixel format
This maps to the 4444AYpCbCr8 pixel format as defined by Apple, which is ordered
A Y’ Cb Cr.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-10 13:33:45 +02:00
Paul B Mahol
b5e18e161e tests/ref/fate: update some audio filter results 2024-10-04 17:13:56 +02:00
Paul B Mahol
68383c8aaf tests: update alimiter results 2024-10-04 17:02:01 +02:00
Paul B Mahol
5c212cffd8 avfilter/af_channelsplit: simplify channels option 2024-10-04 16:10:45 +02:00
James Almer
0db7ad0a9d fate/mov: add a test for heic images with cropping and rotation metadata
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-10-04 09:34:49 +02:00
James Almer
36026488e8 fate/filter-audio: add missing aresample filter dependency to fate-filter-crazychannels
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2024-09-30 19:18:52 +02:00