1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

117757 Commits

Author SHA1 Message Date
Leandro Santiago
fd0cacc472 fftools/ffplay: fix crash when vk renderer is null
When vulkan rendering is requested by the user and fails, ffplay should
exit graciously instead of crash due to a null pointer deref.

Signed-off-by: Leandro Santiago <leandrosansilva@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-11-06 16:34:02 +08:00
Kacper Michajłow
7b20985d8d
avcodec/jpegxl_parser: check entropy_decoder_read_symbol return value
Found by OSS-Fuzz.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
2024-11-05 08:44:43 -05:00
Fei Wang
c845a07302 libavutil/hwcontext_{d3d11va, dxva2}: Support Y212/XV36 pixel format
Use DXGI/D3DFMT 16bit pixel format to compatible with 12bit Y212/XV36
since there is no 12bit pixel defined in D3D11/D3D9.

Fix cmdline on Windows:

$ ffmpeg.exe -hwaccel qsv -init_hw_device qsv:hw,child_device_type=
{d3d11, dxva2} -i input_12bit.bin -f null -

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2024-11-05 10:28:03 +08:00
Michael Niedermayer
df00705e00
INSTALL: explain the circular dependency issue and solution
Sponsored-by: Sovereign Tech Fund
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-11-03 19:35:23 +01:00
Michael Niedermayer
ebffb8b68e
avcodec/ffv1enc: Tighter maxsize
This allows using smaller buffers

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-11-03 19:20:40 +01:00
Peter Ross
2d81eaa37b fate/rv60: add test 2024-11-03 10:53:15 +11:00
Peter Ross
33802e7c32 avcodec/rv60: RealVideo 6.0 decoder
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2024-11-03 10:53:15 +11:00
Peter Ross
ae8295417a avformat/rmdec: support RMHD file format
Signed-off-by: Peter Ross <pross@xvid.org>
2024-11-03 10:53:15 +11:00
Sean McGovern
c325f9c619 libavutil/ppc: defines involving bit shifts should be unsigned
Otherwise, these can overflow at the boundaries of the integer type.

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-11-03 22:05:06 -05:00
James Almer
40878dfb11 fate/pixfmts: test conversion of high bitdepth formats
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
5f5421ec66 swscale/swscale: prevent integer overflow in chrRangeToJpeg16_c
Same as it's done in lumRangeToJpeg16_c(). Plenty of allowed input values can
overflow here.

Fixes: src/libswscale/swscale.c:198:47: runtime error: signed integer overflow: 475328 * 4663 cannot be represented in type 'int'
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
c029a2f7dd swscale/swscale_unscaled: add unscaled rgb to planar rgba
The fate test reference changes are due to the conversion being a simple
lossless deinterleave, instead of going through a RGB -> YUV -> RGB roundtrip.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
5ccc3f0fca swscale/swscale_unscaled: add unscaled hbd planar RGB to x2rgb10le
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
febc9e8162 swscale/output: add full chroma interpolation support for x2rgb10
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
430bec8666 fate/filter-video: add more rgbtestsrc tests
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
165f124129 vsrc_testsrc: add support for x2rgb10le to rgbtestsrc
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
78ba06928a swscale/x86/rgb2rgb: add optimized versions of the remaining shuffle_bytes functions
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
James Almer
a686d34fea swscale/swscale_unscaled: add unscaled conversion for AYUV/VUYA/UYVA
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-02 15:01:31 -03:00
Brad Smith
d6b2d08fc7 libavutil/ppc: Include the hardware feature flags like the other archs
Also include the hardware feature flags like the other archs do and
clean up the code a bit.

Tested on Linux POWER9.

Signed-off-by: Brad Smith <brad@comstyle.com>
2024-11-03 03:27:39 -05:00
Timo Rothenpieler
d724584d68 avcodec/nvenc: set bitstreamRestrictionFlag when neccesary
This mimics the behaviour of libx264 for setting this flag.

Fixes #11131
2024-11-01 17:59:27 +01:00
Koushik Dutta
0cdcbab9e9 avfilter/scale_cuda: frame crop support
The crop filter has no effect on scale_cuda:

-vf crop=100:100,scale_cuda=100x100

Hardware frames (AV_PIX_FMT_FLAG_HWACCEL) are expected to use the crop_* properties,
as seen in the implementation vf_crop.c.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2024-11-01 17:10:34 +01:00
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