Commit Graph

112705 Commits

Author SHA1 Message Date
Rémi Denis-Courmont
300ee8b02d lavc/pixblockdsp: aligned R-V V 8-bit functions
If the scan lines are aligned, we can load each row as a 64-bit value,
thus avoiding segmentation. And then we can factor the conversion or
subtraction.

In principle, the same optimisation should be possible for high depth,
but would require 128-bit elements, for which no FFmpeg CPU flag
exists.
2023-10-30 18:14:16 +02:00
Rémi Denis-Courmont
722765687b lavc/pixblockdsp: rename unaligned R-V V functions 2023-10-30 18:14:16 +02:00
Paul B Mahol
6323ca5902 avfilter/vf_feedback: add timeline support 2023-10-30 16:06:46 +01:00
Paul B Mahol
2f268505b9 doc/filters: add one more example for feedback filter 2023-10-30 15:12:12 +01:00
James Almer
4cba3e0f07 avutil/video_enc_params: fix doxy for av_video_enc_params_block()
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-30 10:30:05 -03:00
Kieran Kunhya
2532e832d2 libavcodec/mpeg12: Reindent 2023-10-29 22:12:05 +00:00
Kieran Kunhya
7d497a1119 libavcodec/mpeg12: Remove "fast" mode 2023-10-29 22:12:02 +00:00
Rémi Denis-Courmont
04b49fb3c5 lavu/riscv: fix typo 2023-10-29 22:15:15 +02:00
TADANO Tokumei
a824c6f2f6 lavc/libaribcaption: rename replace_fullwidth_ascii to replace_msz_ascii
This should hopefully clarify that the option only affects MSZ
full-width characters, and not all full-width ASCII. Additionally,
this matches the prefix with the upstream option.

Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp>
2023-10-29 18:21:05 +02:00
TADANO Tokumei
21bfadd9b4 lavc/libaribcaption: add MSZ character related options
This patch adds two MSZ (Middle Size; half width) character
related options, mapping against newly added upstream
functionality:

* `replace_msz_japanese`, which was introduced in version 1.0.1
  of libaribcaption.
* `replace_msz_glyph`, which was introduced in version 1.1.0
  of libaribcaption.

The latter option improves bitmap type rendering if specified
fonts contain half-width glyphs (e.g., BIZ UDGothic), even
if both ASCII and Japanese MSZ replacement options are set
to false.

As these options require newer versions of libaribcaption, the
configure requirement has been bumped accordingly.

Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp>
2023-10-29 18:20:43 +02:00
TADANO Tokumei
82faba8a6c lavc/libaribcaption: switch all bool context variables to int
On some environments, a `bool` variable is of smaller size than `int`.
As AV_OPT_TYPE_BOOL is internally handled as sizeof(int), if a `bool`
option was set on such an environment, the memory of following
variables would be filled. Additionally, set values may be destroyed
by av_opt_copy().

Signed-off-by: TADANO Tokumei <aimingoff@pc.nifty.jp>
2023-10-29 18:19:58 +02:00
James Almer
ff3429991e Changelog: mark 6.1
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-29 12:55:37 -03:00
Michael Niedermayer
47e784f881
Bump versions after 6.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 16:19:14 +01:00
Michael Niedermayer
0e15b2b828
doc/APIchanges: Add 6.1 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 16:19:14 +01:00
Michael Niedermayer
9d3a7d30c4
Bump versions prior to 6.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 15:34:05 +01:00
Zhao Zhili
105657540b avutil/hwcontext_vaapi: return ENOSYS for unsupported operation
av_hwframe_transfer_data try with src_ctx first. If the operation
failed with AVERROR(ENOSYS), it will try again with dst_ctx. Return
AVERROR(EINVAL) makes the second step being skipped.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-10-29 13:58:52 +08:00
Zhao Zhili
63078b4599 avutil/hwcontext_vulkan: cuda doesn't belong to valid_sw_formats
Move it to transfer_get_formats.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-10-29 13:58:30 +08:00
Zhao Zhili
891f70c6d5 avutil/hwcontext_vulkan: fix memleak when device_create is skipped
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-10-29 13:57:43 +08:00
Lynne
1a8e766984
vulkan: return VK_NOT_READY when no queries are available
Fixes a validation issue.
The issue is that the function gets called before we've sumitted a frame
for decoding to that context. However, we cannot run queries before
they've been reset, which happens at submission time.
As we'd need to otherwise run a command queue at init-time, just check
if submissions have happened.
2023-10-28 21:16:15 +02:00
James Almer
1ad7bd0fe5 avutil/channel_layout: simplify 22.2 layout bitmask define
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-28 12:49:48 -03:00
Kyle Swanson
e5f774268a avfilter/libvmaf: fix broken cuda build
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-10-27 15:00:58 -07:00
Michael Niedermayer
e4d5ac8d7d
avformat/rtsp: Use rtsp_st->stream_index
Fixes: out of array access
Fixes: rtpdec_h264.c149/poc

Found-by: Hardik Shah of Vehere
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:47 +02:00
Michael Niedermayer
907743239d
avutil/tx_template: fix integer ovberflwo in fft3()
Fixes: signed integer overflow: -1028966111 + -1314089526 cannot be represented in type 'int'
Fixes: 63174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5853273711837184

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:47 +02:00
Michael Niedermayer
88453250db
avcodec/jpeg2000dec: Check image offset
Fixes: left shift of negative value -538967841
Fixes: 62447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6427134337613824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:47 +02:00
Michael Niedermayer
9690d71f11
avcodec/vlc: dont pass nb_elems into multi vlc code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:46 +02:00
Michael Niedermayer
9b546a0717
avcodec/vlc: merge lost 16bit end of array check
Also cleanup related code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:46 +02:00
Michael Niedermayer
a23d527ec5
avcodec/magicyuv: remove redundant check in inner loop
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:46 +02:00
Michael Niedermayer
4ddf4f5001
avcodec/magicyuv: correct end of array check in multi VLC parsing
Fixes: out of array write
Fixes: 63390/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5144552979431424.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:45 +02:00
Michael Niedermayer
ffac64a270
avcodec/bitstream_template: Basic documentation for read_vlc_multi()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-27 18:10:28 +02:00
James Almer
52a9764260 avutil: bump minor version after recent commits
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:52:35 -03:00
James Almer
35b06853d1 avutil/channel_layout: add a 3.1.2 channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:46:34 -03:00
Will Wolcott
e9397ae054 avutil/channel_layout: add a 7.1.4 channel layout
Mapping to ITU-R BS.2051-3 "Sound System J" and ITU-R BS.1196-8 "Channel
Configuration 19".

Signed-off-by: Will Wolcott <wwolcott@netflix.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:46:34 -03:00
James Almer
a41c4b923d avutil/channel_layout: add a 7.1.2 channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:46:34 -03:00
James Almer
8d46cbce4f avutil/channel_layout: add a 5.1.4 channel layout
Mapping to ITU-R BS.2051-3 "Sound System D" and ITU-R BS.1196-8 "Channel
Configuration 16".

Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:46:34 -03:00
James Almer
4b8404815d avutil/channel_layout: rename 7.1(top) channel layout to 5.1.2
This layout maps to ITU-R BS.2051-3 "Sound System C" and ITU-R BS.1196-8 "Channel
Configuration 14", and it being the first layout with top layer channels, it's
best to use a different scheme to properly convey the presence and amount of said
channels.
The new name will also be a better fit for the additions in the following commits.

Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-27 08:46:34 -03:00
Paul B Mahol
36eb774ad4 avcodec/mlpenc: try different filter parameters in case of out of range output from LPC 2023-10-27 12:45:23 +02:00
Paul B Mahol
567af48fba avcodec/mlpenc: add support for 4.0/4.1 ch layout 2023-10-27 12:45:23 +02:00
Paul B Mahol
210e844def avcodec/mlpdec: support for truehd with channels not representable with 5bit field in second stream
Fixes decoding for 4.0/4.1 layouts.
2023-10-27 12:45:23 +02:00
Paul B Mahol
deb4c28dcc avcodec/mlpenc: add 3.1 ch layout support for truehd 2023-10-27 12:45:23 +02:00
Andreas Rheinhardt
ba6a5e7a3d avcodec/hevcdec: Move collocated_ref to HEVCContext
Only the collocated_ref of the current frame (i.e. HEVCContext.ref)
is ever used*, so move it to HEVCContext directly after ref.

*: This goes so far that collocated_ref was not even synced across
threads in case of frame-threading.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-26 13:18:01 +02:00
Gyan Doshi
2b300eb533 avfilter/vidstab: add option for file format specification
The vidstab library added support in Nov 2020 for writing/reading
the transforms data in binary in addition to ASCII. The library default
was changed to binary format but no changes were made to the AVfilters
resulting in data file for writing or reading being always opened as text.
This effectively broke the filters.

Option added to vidstabdetect to specify file format and open files in
both filters with the correct attributes.
2023-10-26 15:46:18 +05:30
James Almer
ef01ab2627 ffprobe: print the non-diegetic stream disposition flag
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-25 21:55:01 -03:00
Lynne
70864e6adb
vulkan_decode: correct flipped condition in image layout
Changed by the previous commit.
Caused validation issues on hardware with !reuse_dpb_dst but not layered_dpb.
2023-10-25 22:01:21 +02:00
Lynne
0b3616231d
vulkan_decode: fix another validation issue
Surprising no one, the insane usage rule has a catch.
2023-10-25 20:51:55 +02:00
Lynne
467e411839
vulkan_decode: fix pedantic validation issue
"Validation Error: [ VUID-VkImageViewCreateInfo-imageViewType-04974 ] Object 0: handle = 0x9f9b41000000003c, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xc120e150 | vkCreateImageView():
Using pCreateInfo->viewType VK_IMAGE_VIEW_TYPE_2D and the subresourceRange.layerCount VK_REMAINING_ARRAY_LAYERS=(17) and must 1 (try looking into VK_IMAGE_VIEW_TYPE_*_ARRAY).
The Vulkan spec states: If viewType is VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, or VK_IMAGE_VIEW_TYPE_3D; and subresourceRange.layerCount is VK_REMAINING_ARRAY_LAYERS,
then the remaining number of layers must be 1"
2023-10-25 20:51:54 +02:00
Lynne
9ee4f47c94
vulkan_decode: use coded_width/height instead of the non-coded width and height
Partially fixes https://streams.videolan.org/issues/19938/20000_20180305-15.04.59.ts
The is coded as 1920x1080, meant to be rendered at 1440x1080 with cropping,
or 1680x1080 before cropping. Currently, the created DPB is 1440x1080, which results
in the image being decoded incorrectly, as the decoder overwrites output memory.
This commit fixes this.
2023-10-25 20:51:05 +02:00
James Almer
3c5bceb751 avformat/options: add missing disposition flag to AVStream class options
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-25 09:28:14 -03:00
Martin Storsjö
a4877f1ec1 aarch64: Only enable extensions in the intended files/regions
This eases actual development of the assembly functions, by only
allowing extension instructions within the sections that explicitly
enable them, instead of having all extensions enabled everywhere.

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-24 14:46:20 +03:00
Martin Storsjö
0679e85331 aarch64: Stop using asm/hwcap.h for the HWCAP_* detection
Including sys/auxv.h should be enough (it pulls in bits/hwcap.h,
which provides the same defines).

Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-24 14:46:14 +03:00
Lynne
c258623c0a
hwcontext_vulkan: improve queue family init code
When users zero-init'd the struct, or left it as-is, the encode
queue family matched the graphics queue family, which led it to be
incorrectly logged as being used for encode.

This just improves the logging so this isn't printed anymore.
2023-10-24 06:07:09 +02:00