1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

6506 Commits

Author SHA1 Message Date
Marton Balint
d884606ce0 avutil/rational: never return greater num/den than the maximum allowed in av_d2q
This reverts 887d74c47efa70d7d1513e9492d41cf7f88dee0b, because it ignores the
maximum allowed numerator/denominator. Even if the result was rounded to zero
or infinity, it should not be cause to ignore the maximum allowed number, this
"feature" is unintuitive and undocumented.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-16 20:58:49 +01:00
Marton Balint
25efe34e6f avutil/parseutils: do no rely on av_d2q returning higher num/den than allowed in av_parse_video_rate 2024-11-16 20:58:49 +01:00
Marton Balint
e9af7b7b5d avutil/opt: do no rely on av_d2q returning higher num/den than allowed when parsing rational opts
Signed-off-by: Marton Balint <cus@passwd.hu>
2024-11-16 20:58:49 +01:00
James Almer
edc7b67508 avformat/iamf: use the new Binaural channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-13 12:38:04 -03:00
James Almer
20af68b63a avutil/channel_layout: add Binaural channels and layout
Signed-off-by: James Almer <jamrial@gmail.com>
2024-11-13 12:38:04 -03: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
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
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
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
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 e9e8bea2e79bc3c481a6f81f75f6c871e3e0f367.

Fixes ticket #11103.

Signed-off-by: Marton Balint <cus@passwd.hu>
2024-10-27 09:37:46 +01:00
James Almer
fe21944656 avutil/hwcontext_d3d11va: drop duplicate pixfmt entry
Added by accident in ca71b0b807b4d5588ec765976b8b18d3efde40fb.

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
e02a3b40a5 avutil/pixfmt: add XV48 pixel format
Much like XV30 and XV36 in d75c4693fef51e8f0a1b88798530f4c5147ea906,
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
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
James Almer
f462ba05f5 avutil/pixfmt: add Y216 pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-23 14:11:16 -03:00
Lynne
9eb7e8d2a4
vulkan: move alignment of host-visible allocations outside of ff_vk_alloc_mem
The issue is that if dedicated allocation is used, VkBufferCreateInfo.size
and the actual allocated size mismatched, which is a validation error.
2024-10-23 08:14:10 +02:00
James Almer
8d940a07d1 avutil/pixdesc: fix alpha offset for X2{RGB,BGR}10BE
fixes fate-pixelutils

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-21 10:24:03 -03:00
James Almer
8f1de9ccd9 avutil/pixdesc: add alpha component information to pixfmts with reserved but undefined alpha bits
This can be useful to simplify certain processes that need to know how many
reserved bits there are and where they are placed, even if they are ultimately
unused, as will be shown in the next commit.
For any other case where the user simply looks at nb_components components, it
will make no difference.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-21 09:52:50 -03:00
James Almer
72f8f76d45 avutil/pixdesc: ensure the component being read or writen to is valid
If depth is 0, then the component is invalid/unset.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-21 09:43:45 -03:00
Lynne
dfaade76db
vulkan: move buffer allocation av_log message
Its more useful when buffers are allocated, not in the
pool.
2024-10-18 11:18:35 +02:00
Anton Khirnov
31b5b3badc lavu/opt: deprecate av_opt_ptr()
It has no more internal callers, and we do not want to support direct
pointer access via AVOptions, as that constrains AVOption API
extensions.
2024-10-16 16:46:29 +02:00
Lynne
931d45d4d6
vulkan: do not create imageviews with video encode/decode usage
This function is only used for filtering and generic compute.
The issue is that a view inherits the usage flags from the image
by default, and the spec says the view format must be compatible
with the usage. VkImageViewUsageCreateInfo allows us to filter out
the indeded uses of the imageview.

Pffff.
2024-10-16 12:48:16 +02:00
Lynne
4b128de44a
vulkan: enable selecting a compatible representation of format
When using **integer** images inside shaders, it turns out
that conversion doesn't automatically happen, but we need to
explicitly use the imageviews to get the image exposed as
a suitable representation for the shader.

Finally enables bitexact image representations.
2024-10-16 12:48:15 +02:00
Lynne
76e8afa8a6
hwcontext_vulkan: always enable MUTABLE creation flag
We need it even for something as simple as bitexact opening
of images.
2024-10-16 12:48:13 +02:00
Lynne
98f6d43146
vulkan: keep track of mapped memory in the buffer structure
Can/could be useful to know which buffers are mapped.
2024-10-15 17:45:20 +02:00
Lynne
3afdfe830f
vulkan: add support for AV_PIX_FMT_RGB96 2024-10-15 17:45:19 +02:00
Lynne
903f7f053a
vulkan: add support for AV_PIX_FMT_RGBA128 2024-10-15 17:45:18 +02:00
Lynne
2336e68565
lavu: bump minor and add APIChanges entries for new 32bpc pixfmts 2024-10-15 17:45:18 +02:00
Lynne
4f387a1c4e
lavu/pixfmt: add AV_PIX_FMT_RGB96 2024-10-15 17:45:17 +02:00
Lynne
281bba1d26
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.
2024-10-15 17:45:12 +02:00
Martin Schitter
c993a91bea
avutil: add RGBF16 pix_fmt
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-10-14 20:46:24 +02:00
James Almer
fd8b0dcfed avutil/hwcontext_vulkan: add proper maps for XV3{0,6}
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-14 15:12:49 -03:00
James Almer
d41e5b0fc7 avutil/hwcontext_videotoolbox: add support for AYUV pixel format
Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-12 11:21:14 -03:00
Lynne
0e19b05375
vulkan: fix layout qualifiers for 32-bit RGBA float storage reps
r8
r16/r16f
r32f

Sure, GLSL. Makes sense.
2024-10-12 00:38:49 +02:00
Lynne
8c47cf9eea
hwcontext_vulkan: enable shaderBufferInt64Atomics if supported 2024-10-11 23:54:23 +02:00
Lynne
168e8ae9bf
hwcontext_vulkan: add support for AV_PIX_FMT_RGBF32 2024-10-11 23:54:23 +02:00
Lynne
d55a351741
hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32 2024-10-11 23:54:22 +02:00
Lynne
1addd0fdca
vulkan: use correct signed image type for storage images
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
2024-10-11 23:54:22 +02:00
Lynne
c982376076
vulkan: extend ff_vk_shader_rep_fmt to be useful for bitexactness
The original either reported 8 or 16-bit conversion from the
original, rather than being able to return the actual original.

This makes it usable in a situation where preserving exactness
is required.
2024-10-11 23:54:18 +02:00
James Almer
1cead90292 avutil/pixdesc: use a bigger variable type when writing bitstream formats
Fixes fate-imgutils and fate-pixelutils under gcc-usan after
29ea34728f1064877a0ab9b8dee0f3de69a2d750.

Signed-off-by: James Almer <jamrial@gmail.com>
2024-10-10 16:03:22 -03:00
Lynne
80a0567a2f
vulkan: fix ImageView flexible array struct allocation
Same as the previous commit, the compiler may insert padding.
Thanks to Marvin Scholz for pointing this out.
2024-10-09 02:39:34 +02:00
Marvin Scholz
f5e2914a89 libavutil/vulkan: fix flexible array struct allocation
The flexible array member struct can have padding added by
the compiler which was not taken into account properly, which
could lead to a heap buffer overflow.
2024-10-09 02:36:12 +02:00
Lynne
4ad4f8101a
hwcontext_vulkan: set hwctx->device_features
This was forgotten during the recent device feature refactor.
2024-10-09 01:01:32 +02:00
Lynne
31def0c3ce
hwcontext_vulkan: remove redundant hostQueryReset setting
Its set just a few lines earlier.
2024-10-09 01:01:32 +02:00
Lynne
b8d1b4358b
vulkan: add a #define when printf debugging is enabled 2024-10-09 01:01:31 +02:00
James Almer
29ea34728f 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>
2024-10-08 19:45:10 -03:00
James Almer
1f9424e0b1 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>
2024-10-08 14:10:07 -03:00