1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

117686 Commits

Author SHA1 Message Date
Zhao Zhili
1864025458 fate/vvc: Add a sample which lose frames before 5c66a3
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-01 16:59:48 +08:00
Fei Wang
e726fdeb05 lavc/vaapi_dec: Add VVC decoder
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
4dc18c78cd lavc/vvc_dec: Add hardware decode API
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
a94aa2d61e lavc/vvc_ps: Add alf raw syntax into VVCALF
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
15a75e8e04 lavc/vvc_refs: Define VVC_FRAME_FLAG* to h header
So that hardware decoder can use the flags too.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
6bb5dc2ae7 lavc/cbs_h266: Add NumSlicesInTile to H266RawPPS
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
e543a22c38 lavc/cbs_h266: Add SliceTopLeftTileIdx to H266RawPPS
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
f42978fe29 lavc/vaapi_decode: Use a more meaningful variable name
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Fei Wang
1d8c31d5e2 lavc/vaapi_dec: Create VA parameters dynamically
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-01 12:13:07 +08:00
Peter Ross
87068b9600 fate/vp60-interlace: add test 2024-10-31 17:49:48 +11:00
Peter Ross
492a3b4b89 avcodec/vp56: decode interlace content
Modification of patch submitted by Aurelien Jacobs (November 2007).

Fixes ticket #5581 and #5582.
2024-10-31 17:49:48 +11:00
Thomas Guillem
44a0a0c050 avcodec/decode: clean-up if get_hw_frames_parameters fails
Fixes the following assert:

[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349

Reproduced from VLC with VAAPI, when fallbacking from hw to sw.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-30 21:31:17 +08:00
James Almer
bb57b78013 avutil/hwcontext_vulkan: add missing packed YUV444 format mappings
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-27 14:50:57 -03:00
Pierre-Anthony Lemieux
839f6d38a0
jpeg2000dec: fix tile-part header state reset
Fixes https://trac.ffmpeg.org/ticket/11266
2024-10-27 10:26:00 -07:00
Ramiro Polla
562524587e checkasm/sw_range_convert: indent after previous couple of commits 2024-10-27 13:20:56 +01:00
Ramiro Polla
031d98790e checkasm/sw_range_convert: test all supported bit depths
This commit also reduces the number of times ff_sws_init_scale() gets
called (only once per bit depth), and the number of times randomize_buffers()
gets called (only if the function must be checked).

Benchmarks are only performed on bit depths 8 and 16 (since they are
different functions, and not only different constants).
2024-10-27 13:20:56 +01:00
Ramiro Polla
2c44393c01 checkasm/sw_range_convert: only run benchmarks on largest input width 2024-10-27 13:20:56 +01:00
Ramiro Polla
e308d09fba checkasm/sw_range_convert: reduce number of input sizes tested
Reduce input sizes to 8 (to test that the function works with widths
smaller than the vector length) and 1920 (raising the largest input
size to improve benchmark results).
2024-10-27 13:20:56 +01:00
Ramiro Polla
d1acd68d73 checkasm/sw_range_convert: use YUV pixel formats instead of YUVJ
We are already setting the range, so we can use regular YUV pixel
formats instead of YUVJ.
2024-10-27 13:20:56 +01:00
Ramiro Polla
a8ef1fac0d checkasm: use FF_ARRAY_ELEMS instead of hardcoding size of arrays 2024-10-27 13:20:56 +01:00
Ramiro Polla
8b30daedf7 swscale/range_convert: indent after previous commit 2024-10-27 13:20:56 +01:00
Ramiro Polla
f7ee0195df swscale/range_convert: drop redundant conditionals from arch-specific init functions
These conditions are already checked for in the main init function.
2024-10-27 13:20:56 +01:00
Ramiro Polla
7728b3357d swscale/range_convert: call arch-specific init functions from main init function
This commit also fixes the issue that the call to ff_sws_init_range_convert()
from sws_init_swscale() was not setting up the arch-specific optimizations.
2024-10-27 13:20:56 +01:00
Marton Balint
9b0128aa76 avutil/wchar_filename: re-introduce explicit cast of void* to char*
Fixes compile error on windows with decklink:

In file included from ./libavformat/os_support.h:175,
                 from ./libavformat/internal.h:30,
                 from libavdevice/decklink_common.cpp:25:
./libavutil/wchar_filename.h: In function 'int wchartocp(unsigned int, const wchar_t*, char**)':
./libavutil/wchar_filename.h:59:32: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
   59 |     *filename = av_malloc_array(num_chars, sizeof **filename);
      |                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |
      |                                void*

Regression since e9e8bea2e7.

Fixes ticket #11103.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-10-27 09:37:46 +01:00
Zhao Zhili
78525bc36b tests/fate-run: Fix pixdesc failure
-u and -q doesn't work together for diff on macOS.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:40:00 +08:00
Zhao Zhili
7fe9d12f25 avcodec/mediacodecdec_common: Workaround MTK broken crop implementation
MediaTek SOC return broken crop info, e.g.,
width: int32(3840) height: int32(2160) crop: Rect(0, 0, 318, 238)

It will notify the right crop info with infoOutputFormatChanged, but
too late.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:35:13 +08:00
Zhao Zhili
0ee18ff23d avcodec/mediacodecenc: Extract configOBUs from AV1CodecConfigurationRecord
MediaCodec can generate AV1CodecConfigurationRecord, which shouldn't
be put into packet->data. Skip four bytes and extract configOBUs
if it exist.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:35:05 +08:00
Zhao Zhili
0552238570 fftools/ffplay: use swapchain_colorspace_hint to get better HDR support
For example, the default surface configuration on macOS is:
VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_PASS_THROUGH_EXT

With HDR10 content and swapchain_colorspace_hint, the surface
configuration updated to:
VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_HDR10_ST2084_EXT

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-10-27 11:34:01 +08:00
James Almer
fe21944656 avutil/hwcontext_d3d11va: drop duplicate pixfmt entry
Added by accident in ca71b0b807.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 09:26:36 -03:00
James Almer
ca71b0b807 libavutil/hwcontext_d3d11va: use the XV48 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:55 -03:00
James Almer
dad3d9800d libavutil/hwcontext_dxva2: use the XV48 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:55 -03:00
James Almer
42b748f738 avfilter/vsrc_testsrc: add support for XV48
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:55 -03:00
James Almer
707e2184ca avformat/riff: map Y416 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>
2024-10-26 00:04:55 -03:00
James Almer
a67ba3c132 swscale/output: add XV48 output support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:50 -03:00
James Almer
2f13f74791 swscale/input: add XV48 input support
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:29 -03:00
James Almer
e02a3b40a5 avutil/pixfmt: add XV48 pixel format
Much like XV30 and XV36 in d75c4693fe,
XV48 is added to support 16bit 4:4:4 as defined by Microsoft.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-26 00:04:23 -03:00
James Almer
e1bacfb523 libavutil/hwcontext_d3d11va: use the Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-25 23:57:16 -03:00
James Almer
c76d92b2e0 libavutil/hwcontext_dxva2: use the Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-25 23:57:14 -03:00
James Almer
faec8763e8 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>
2024-10-25 19:41:07 -03:00
Michael Niedermayer
db7b4fc89f
avformat/mpegts: Initialize predefined_SLConfigDescriptor_seen
Fixes: use of uninitialized variable
Fixes: 368729566/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTS_fuzzer-6044501804646400

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-25 22:46:40 +02:00
Michael Niedermayer
23088a5ff2
avformat/mxfdec: Fix overflow in midpoint computation
Fixes: signed integer overflow: 4611686016549392399 + 9223372033098784800 cannot be represented in type 'long long'
Fixes: 368503277/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5928227458056192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-25 22:46:40 +02:00
Michael Niedermayer
3fe3014405
swscale/output: used unsigned for bit accumulation
Fixes: Integer overflow
Fixes: 368725672/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5009093023563776

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-25 22:46:39 +02:00
Michael Niedermayer
14f5d67be3
swscale/rgb2rgb_template: Fix ff_rgb24toyv12_c() with odd height
Fixes: out of array access
Fixes: 368143798/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6475823425585152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-25 22:46:39 +02:00
Dale Curtis
08b1bffa49 avcodec/h2645: allocate film grain metadata dynamically
Film grain support adds a huge amount of overhead to the H264Context
structure for a feature that is rarely used. On low end devices or
pages that have lots of media this bloats memory usage rapidly.

This changes the static film grain metadata allocations to be dynamic
which reduces the H264Context size from 851808 bytes to 53444 bytes.

Bug: https://crbug.com/359358875
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Niklas Haas <git@haasn.dev>
2024-10-25 01:02:35 +02:00
Michael Niedermayer
2c71366d3b
avcodec/ffv1: Implement new slice tiling
This fixes corner cases (requires version 4 or a spec update)

Fixes: Ticket5548

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-24 23:01:14 +02:00
Michael Niedermayer
d147b3d7ec
avcodec/rangecoder: only perform renorm check/loop for callers that need it
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-24 23:01:14 +02:00
Niklas Haas
67adb30322 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>
2024-10-24 22:50:00 +02:00
Soma Lucz
153a6dc8fa doc/ffmpeg: improve -disposition, -stats, and -progress documentation
-disposition:
Clarify the meaning of the default value, and how the '+' and '-'
prefixes work. Add more examples.

-stats:
Clarify that it appears as an "info"-level log.

-progress:
Add info about the "progress" key's value being "continue" or "end".
Add an example of logging to stdout.

Signed-off-by: Soma Lucz <luczsoma@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-10-24 10:45:04 +02:00
James Almer
ae0ab5b7ce avcodec/vulkan_video: add mapping for AV_PIX_FMT_Y216
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-23 20:06:03 -03:00
James Almer
5c622d4cc1 avutil/hwcontext_vulkan: add support for AV_PIX_FMT_Y216
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-23 20:06:03 -03:00