mirror of
https://git.yoctoproject.org/poky
synced 2026-04-19 06:32:13 +02:00
ffmpeg: update 6.1.1 -> 7.0.2
(From OE-Core rev: d913e9cf997a2b2455bc336565fc69e76eac9b70) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bd048df594
commit
aa463a8da1
@@ -1,4 +1,4 @@
|
||||
From 0b541aa54b9573d8eef7401a0cc58c422fe60a9a Mon Sep 17 00:00:00 2001
|
||||
From e52fc2c11c3935085ccf1a5707ce50223ad62b58 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Thu, 8 Aug 2024 18:04:17 +0100
|
||||
Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
From cafb4c554845332eeb33284cf6498049997dc67e Mon Sep 17 00:00:00 2001
|
||||
From: Mark Thompson <sw@jkqxz.net>
|
||||
Date: Wed, 20 Mar 2024 20:35:28 +0000
|
||||
Subject: [PATCH] lavc/cbs_av1: Save more frame ordering information
|
||||
|
||||
This is wanted by the Vulkan decoder.
|
||||
|
||||
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
|
||||
Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ecdc94b97f809d5f2b88640842fd0541951ad295]
|
||||
---
|
||||
libavcodec/cbs_av1.h | 5 +++++
|
||||
libavcodec/cbs_av1_syntax_template.c | 25 +++++++++++++++++++++----
|
||||
2 files changed, 26 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h
|
||||
index a5402f069d..a027013bc7 100644
|
||||
--- a/libavcodec/cbs_av1.h
|
||||
+++ b/libavcodec/cbs_av1.h
|
||||
@@ -427,6 +427,8 @@ typedef struct AV1ReferenceFrameState {
|
||||
int bit_depth; // RefBitDepth
|
||||
int order_hint; // RefOrderHint
|
||||
|
||||
+ int saved_order_hints[AV1_TOTAL_REFS_PER_FRAME]; // SavedOrderHints[ref]
|
||||
+
|
||||
int8_t loop_filter_ref_deltas[AV1_TOTAL_REFS_PER_FRAME];
|
||||
int8_t loop_filter_mode_deltas[2];
|
||||
uint8_t feature_enabled[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX];
|
||||
@@ -464,6 +466,9 @@ typedef struct CodedBitstreamAV1Context {
|
||||
int tile_rows;
|
||||
int tile_num;
|
||||
|
||||
+ int order_hints[AV1_TOTAL_REFS_PER_FRAME]; // OrderHints
|
||||
+ int ref_frame_sign_bias[AV1_TOTAL_REFS_PER_FRAME]; // RefFrameSignBias
|
||||
+
|
||||
AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES];
|
||||
|
||||
// AVOptions
|
||||
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
|
||||
index 3be1f2d30f..2979c5d98f 100644
|
||||
--- a/libavcodec/cbs_av1_syntax_template.c
|
||||
+++ b/libavcodec/cbs_av1_syntax_template.c
|
||||
@@ -1414,6 +1414,8 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
priv->ref[i].valid = 0;
|
||||
priv->ref[i].order_hint = 0;
|
||||
}
|
||||
+ for (i = 0; i < AV1_REFS_PER_FRAME; i++)
|
||||
+ priv->order_hints[i + AV1_REF_FRAME_LAST] = 0;
|
||||
}
|
||||
|
||||
flag(disable_cdf_update);
|
||||
@@ -1568,11 +1570,20 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
else
|
||||
flag(use_ref_frame_mvs);
|
||||
|
||||
- infer(allow_intrabc, 0);
|
||||
- }
|
||||
+ for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
|
||||
+ int ref_frame = AV1_REF_FRAME_LAST + i;
|
||||
+ int hint = priv->ref[current->ref_frame_idx[i]].order_hint;
|
||||
+ priv->order_hints[ref_frame] = hint;
|
||||
+ if (!seq->enable_order_hint) {
|
||||
+ priv->ref_frame_sign_bias[ref_frame] = 0;
|
||||
+ } else {
|
||||
+ priv->ref_frame_sign_bias[ref_frame] =
|
||||
+ cbs_av1_get_relative_dist(seq, hint,
|
||||
+ current->order_hint) > 0;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (!frame_is_intra) {
|
||||
- // Derive reference frame sign biases.
|
||||
+ infer(allow_intrabc, 0);
|
||||
}
|
||||
|
||||
if (seq->reduced_still_picture_header || current->disable_cdf_update)
|
||||
@@ -1674,6 +1685,12 @@ update_refs:
|
||||
.bit_depth = priv->bit_depth,
|
||||
.order_hint = priv->order_hint,
|
||||
};
|
||||
+
|
||||
+ for (int j = 0; j < AV1_REFS_PER_FRAME; j++) {
|
||||
+ priv->ref[i].saved_order_hints[j + AV1_REF_FRAME_LAST] =
|
||||
+ priv->order_hints[j + AV1_REF_FRAME_LAST];
|
||||
+ }
|
||||
+
|
||||
memcpy(priv->ref[i].loop_filter_ref_deltas, current->loop_filter_ref_deltas,
|
||||
sizeof(current->loop_filter_ref_deltas));
|
||||
memcpy(priv->ref[i].loop_filter_mode_deltas, current->loop_filter_mode_deltas,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,102 +0,0 @@
|
||||
From 2f24f10d9cf34ddce274496c4daa73f732d370c1 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Wed, 20 Dec 2023 12:32:43 +0000
|
||||
Subject: [PATCH] libavcodec: fix -Wint-conversion in vulkan
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
FIx warnings (soon to be errors in GCC 14, already so in Clang 15):
|
||||
```
|
||||
src/libavcodec/vulkan_av1.c: In function ‘vk_av1_create_params’:
|
||||
src/libavcodec/vulkan_av1.c:183:43: error: initialization of ‘long long unsigned int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
|
||||
183 | .videoSessionParametersTemplate = NULL,
|
||||
| ^~~~
|
||||
src/libavcodec/vulkan_av1.c:183:43: note: (near initialization for ‘(anonymous).videoSessionParametersTemplate’)
|
||||
```
|
||||
|
||||
Use Vulkan's VK_NULL_HANDLE instead of bare NULL.
|
||||
|
||||
Fix Trac ticket #10724.
|
||||
|
||||
Was reported downstream in Gentoo at https://bugs.gentoo.org/919067.
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
Upstream-Status: Backport [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/2f24f10d9cf34ddce274496c4daa73f732d370c1]
|
||||
---
|
||||
libavcodec/vulkan_av1.c | 2 +-
|
||||
libavcodec/vulkan_decode.c | 6 +++---
|
||||
libavcodec/vulkan_h264.c | 2 +-
|
||||
libavcodec/vulkan_hevc.c | 2 +-
|
||||
libavcodec/vulkan_video.c | 2 +-
|
||||
5 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
|
||||
index 4998bf7ebc55f..9730e4b08dd40 100644
|
||||
--- a/libavcodec/vulkan_av1.c
|
||||
+++ b/libavcodec/vulkan_av1.c
|
||||
@@ -180,7 +180,7 @@ static int vk_av1_create_params(AVCodecContext *avctx, AVBufferRef **buf)
|
||||
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
|
||||
.pNext = &av1_params,
|
||||
.videoSession = ctx->common.session,
|
||||
- .videoSessionParametersTemplate = NULL,
|
||||
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
|
||||
};
|
||||
|
||||
err = ff_vk_decode_create_params(buf, avctx, ctx, &session_params_create);
|
||||
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
|
||||
index a89d84fcaa972..fdbcbb450a1e0 100644
|
||||
--- a/libavcodec/vulkan_decode.c
|
||||
+++ b/libavcodec/vulkan_decode.c
|
||||
@@ -188,9 +188,9 @@ int ff_vk_decode_prepare_frame(FFVulkanDecodeContext *dec, AVFrame *pic,
|
||||
return 0;
|
||||
|
||||
vkpic->dpb_frame = NULL;
|
||||
- vkpic->img_view_ref = NULL;
|
||||
- vkpic->img_view_out = NULL;
|
||||
- vkpic->img_view_dest = NULL;
|
||||
+ vkpic->img_view_ref = VK_NULL_HANDLE;
|
||||
+ vkpic->img_view_out = VK_NULL_HANDLE;
|
||||
+ vkpic->img_view_dest = VK_NULL_HANDLE;
|
||||
|
||||
vkpic->destroy_image_view = vk->DestroyImageView;
|
||||
vkpic->wait_semaphores = vk->WaitSemaphores;
|
||||
diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c
|
||||
index e727aafb162d3..39c123ddca57e 100644
|
||||
--- a/libavcodec/vulkan_h264.c
|
||||
+++ b/libavcodec/vulkan_h264.c
|
||||
@@ -315,7 +315,7 @@ static int vk_h264_create_params(AVCodecContext *avctx, AVBufferRef **buf)
|
||||
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
|
||||
.pNext = &h264_params,
|
||||
.videoSession = ctx->common.session,
|
||||
- .videoSessionParametersTemplate = NULL,
|
||||
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
|
||||
};
|
||||
|
||||
/* SPS list */
|
||||
diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c
|
||||
index 99fdcf3b45839..033172cbd6958 100644
|
||||
--- a/libavcodec/vulkan_hevc.c
|
||||
+++ b/libavcodec/vulkan_hevc.c
|
||||
@@ -653,7 +653,7 @@ static int vk_hevc_create_params(AVCodecContext *avctx, AVBufferRef **buf)
|
||||
.sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
|
||||
.pNext = &h265_params,
|
||||
.videoSession = ctx->common.session,
|
||||
- .videoSessionParametersTemplate = NULL,
|
||||
+ .videoSessionParametersTemplate = VK_NULL_HANDLE,
|
||||
};
|
||||
|
||||
HEVCHeaderSet *hdr;
|
||||
diff --git a/libavcodec/vulkan_video.c b/libavcodec/vulkan_video.c
|
||||
index 5fa8292b28eaf..fb20315db4bbf 100644
|
||||
--- a/libavcodec/vulkan_video.c
|
||||
+++ b/libavcodec/vulkan_video.c
|
||||
@@ -287,7 +287,7 @@ av_cold void ff_vk_video_common_uninit(FFVulkanContext *s,
|
||||
if (common->session) {
|
||||
vk->DestroyVideoSessionKHR(s->hwctx->act_dev, common->session,
|
||||
s->hwctx->alloc);
|
||||
- common->session = NULL;
|
||||
+ common->session = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
if (common->nb_mem && common->mem)
|
||||
@@ -24,13 +24,10 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
|
||||
SRC_URI = " \
|
||||
https://www.ffmpeg.org/releases/${BP}.tar.xz \
|
||||
file://av1_ordering_info.patch \
|
||||
file://vulkan_av1_stable_API.patch \
|
||||
file://vulkan_fix_gcc14.patch \
|
||||
file://0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"
|
||||
SRC_URI[sha256sum] = "8646515b638a3ad303e23af6a3587734447cb8fc0a0c064ecdb8e95c4fd8b389"
|
||||
|
||||
# https://nvd.nist.gov/vuln/detail/CVE-2023-39018
|
||||
# https://github.com/bramp/ffmpeg-cli-wrapper/issues/291
|
||||
Reference in New Issue
Block a user