Skip to content

Commit bd2f449

Browse files
committed
merge
1 parent 89dc838 commit bd2f449

2 files changed

Lines changed: 6 additions & 16 deletions

File tree

debian/patches/0002-update-cuda-func-header.patch

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,15 @@ Index: FFmpeg/compat/cuda/cuda_runtime.h
22
===================================================================
33
--- FFmpeg.orig/compat/cuda/cuda_runtime.h
44
+++ FFmpeg/compat/cuda/cuda_runtime.h
5-
@@ -23,7 +23,16 @@
6-
#ifndef COMPAT_CUDA_CUDA_RUNTIME_H
5+
@@ -24,6 +24,7 @@
76
#define COMPAT_CUDA_CUDA_RUNTIME_H
87

9-
+// On MinGW (clangarm64), msys2's _mingw.h defines __prefetch as an inline
10-
+// function, but clang treats __prefetch as a builtin on ARM64 -> redefinition
11-
+// error during .cu compilation (this header is force-included before stdint.h
12-
+// pulls in _mingw.h). Renaming the mingw inline keeps clang's builtin intact.
13-
+#ifdef __MINGW32__
14-
+#define __prefetch __ff_cuda_skipped_prefetch
15-
+#endif
16-
+
178
// Common macros
189
+#define __constant__ __attribute__((constant))
1910
#define __global__ __attribute__((global))
2011
#define __device__ __attribute__((device))
2112
#define __device_builtin__ __attribute__((device_builtin))
22-
@@ -39,59 +48,59 @@
13+
@@ -39,59 +40,59 @@
2314
// Basic typedefs
2415
typedef __device_builtin__ unsigned long long cudaTextureObject_t;
2516

@@ -125,7 +116,7 @@ Index: FFmpeg/compat/cuda/cuda_runtime.h
125116
uint3 ret; \
126117
unsigned tmp; \
127118
GETCOMP(reg, x) \
128-
@@ -109,18 +118,8 @@ GET(getThreadIdx, tid)
119+
@@ -109,18 +110,8 @@ GET(getThreadIdx, tid)
129120
#define blockDim (getBlockDim())
130121
#define threadIdx (getThreadIdx())
131122

@@ -145,7 +136,7 @@ Index: FFmpeg/compat/cuda/cuda_runtime.h
145136

146137
TEX2D(unsigned char, a & 0xFF)
147138
TEX2D(unsigned short, a & 0xFFFF)
148-
@@ -134,19 +133,19 @@ TEX2D(float4, make_float4(a, b, c, d))
139+
@@ -134,19 +125,19 @@ TEX2D(float4, make_float4(a, b, c, d))
149140

150141
// Template calling tex instruction and converting the output to the selected type
151142
template<typename T>
@@ -174,7 +165,7 @@ Index: FFmpeg/compat/cuda/cuda_runtime.h
174165
{
175166
float4 ret;
176167
asm("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" :
177-
@@ -156,39 +155,43 @@ inline __device__ float4 tex2D<float4>(c
168+
@@ -156,39 +147,43 @@ inline __device__ float4 tex2D<float4>(c
178169
}
179170

180171
template<>

libavfilter/vf_scale_cuda.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
#define AVFILTER_SCALE_CUDA_H
2525

2626
#if defined(__CUDACC__) || defined(__CUDA__)
27-
#include <stdint.h>
2827
typedef cudaTextureObject_t CUtexObject;
29-
typedef uint8_t* CUdeviceptr;
28+
typedef unsigned char* CUdeviceptr;
3029
#else
3130
#include <ffnvcodec/dynlink_cuda.h>
3231
#endif

0 commit comments

Comments
 (0)