mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 14:43:52 +02:00
ffmpeg6: fix arm assembly and pointer assignments
This commit is contained in:
parent
8d69b83d72
commit
795f0d0528
3 changed files with 171 additions and 0 deletions
55
srcpkgs/ffmpeg6/patches/binutils-2.43.patch
Normal file
55
srcpkgs/ffmpeg6/patches/binutils-2.43.patch
Normal file
|
@ -0,0 +1,55 @@
|
|||
From 654bd47716c4f36719fb0f3f7fd8386d5ed0b916 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Fri, 9 Aug 2024 11:32:00 +0100
|
||||
Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
|
||||
binutils 2.43
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
binutils 2.43 has stricter validation for labels[1] and results in errors
|
||||
when building ffmpeg for armv5:
|
||||
|
||||
src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
|
||||
|
||||
Remove the leading zero in the "01" label to resolve this error.
|
||||
|
||||
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
|
||||
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
Signed-off-by: Martin Storsjö <martin@martin.st>
|
||||
---
|
||||
libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
|
||||
index 4f9aa485fd21a..d31568611c30f 100644
|
||||
--- a/libavcodec/arm/mlpdsp_armv5te.S
|
||||
+++ b/libavcodec/arm/mlpdsp_armv5te.S
|
||||
@@ -229,7 +229,7 @@ A .endif
|
||||
.endif
|
||||
|
||||
// Begin loop
|
||||
-01:
|
||||
+1:
|
||||
.if TOTAL_TAPS == 0
|
||||
// Things simplify a lot in this case
|
||||
// In fact this could be pipelined further if it's worth it...
|
||||
@@ -241,7 +241,7 @@ A .endif
|
||||
str ST0, [PST, #-4]!
|
||||
str ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
||||
str ST0, [PSAMP], #4 * MAX_CHANNELS
|
||||
- bne 01b
|
||||
+ bne 1b
|
||||
.else
|
||||
.if \fir_taps & 1
|
||||
.set LOAD_REG, 1
|
||||
@@ -333,7 +333,7 @@ T orr AC0, AC0, AC1
|
||||
str ST3, [PST, #-4]!
|
||||
str ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
|
||||
str ST3, [PSAMP], #4 * MAX_CHANNELS
|
||||
- bne 01b
|
||||
+ bne 1b
|
||||
.endif
|
||||
b 99f
|
||||
|
15
srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch
Normal file
15
srcpkgs/ffmpeg6/patches/intel-media-driver-32bit.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
Fix type to be consistent with intel-media-driver
|
||||
|
||||
diff -rup libavutil/hwcontext_vaapi.c.orig libavutil/hwcontext_vaapi.c
|
||||
--- a/libavutil/hwcontext_vaapi.c
|
||||
+++ b/libavutil/hwcontext_vaapi.c
|
||||
@@ -1203,7 +1203,7 @@ static int vaapi_map_from_drm(AVHWFrames
|
||||
|
||||
if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
|
||||
int k;
|
||||
- unsigned long buffer_handle;
|
||||
+ uintptr_t buffer_handle;
|
||||
VASurfaceAttribExternalBuffers buffer_desc;
|
||||
VASurfaceAttrib buffer_attrs[2] = {
|
||||
{
|
||||
|
101
srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch
Normal file
101
srcpkgs/ffmpeg6/patches/vulkan-gcc14.patch
Normal file
|
@ -0,0 +1,101 @@
|
|||
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>
|
||||
---
|
||||
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)
|
Loading…
Add table
Reference in a new issue