Credit Andrew - fix bug in render farm usage when using in/out pointers or selection
[goodguy/cinelerra.git] / cinelerra-5.1 / thirdparty / src / ffmpeg-6.1.patchE
1 From fef22c87ada4517441701e6e61e062c9f4399c8e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <jeebjp@gmail.com>
3 Date: Wed, 14 Feb 2024 22:40:54 +0200
4 Subject: [PATCH] {avcodec,tests}: rename the bundled Mesa AV1 vulkan video
5  headers
6
7 This together with adjusting the inclusion define allows for the
8 build to not fail with latest Vulkan-Headers that contain the
9 stabilized Vulkan AV1 decoding definitions.
10
11 Compilation fails currently as the AV1 header is getting included
12 via hwcontext_vulkan.h -> <vulkan/vulkan.h> -> vulkan_core.h, which
13 finally includes vk_video/vulkan_video_codec_av1std.h and the decode
14 header, leading to the bundled header to never defining anything
15 due to the inclusion define being the same.
16
17 This fix is imperfect, as it leads to additional re-definition
18 warnings for things such as
19 VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is
20 not clear how to otherwise have the bundled version trump the
21 actually standardized one for a short-term compilation fix.
22
23 (cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24)
24 ---
25  libavcodec/Makefile                                           | 4 ++--
26  libavcodec/vulkan_video.h                                     | 4 ++--
27  ...v1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} | 4 ++--
28  ..._video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} | 4 ++--
29  tests/ref/fate/source                                         | 4 ++--
30  5 files changed, 10 insertions(+), 10 deletions(-)
31  rename libavcodec/{vulkan_video_codec_av1std_decode.h => vulkan_video_codec_av1std_decode_mesa.h} (89%)
32  rename libavcodec/{vulkan_video_codec_av1std.h => vulkan_video_codec_av1std_mesa.h} (99%)
33
34 diff --git a/libavcodec/Makefile b/libavcodec/Makefile
35 index ec57e53e300f9..eb25707ef5db9 100644
36 --- a/libavcodec/Makefile
37 +++ b/libavcodec/Makefile
38 @@ -1284,7 +1284,7 @@ SKIPHEADERS                            += %_tablegen.h                  \
39                                            aacenc_quantization.h         \
40                                            aacenc_quantization_misc.h    \
41                                            bitstream_template.h          \
42 -                                          vulkan_video_codec_av1std.h   \
43 +                                          vulkan_video_codec_av1std_mesa.h \
44                                            $(ARCH)/vpx_arith.h          \
45  
46  SKIPHEADERS-$(CONFIG_AMF)              += amfenc.h
47 @@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC)             += xvmc.h
48  SKIPHEADERS-$(CONFIG_VAAPI)            += vaapi_decode.h vaapi_hevc.h vaapi_encode.h
49  SKIPHEADERS-$(CONFIG_VDPAU)            += vdpau.h vdpau_internal.h
50  SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX)     += videotoolbox.h vt_internal.h
51 -SKIPHEADERS-$(CONFIG_VULKAN)           += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h
52 +SKIPHEADERS-$(CONFIG_VULKAN)           += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h
53  SKIPHEADERS-$(CONFIG_V4L2_M2M)         += v4l2_buffers.h v4l2_context.h v4l2_m2m.h
54  SKIPHEADERS-$(CONFIG_ZLIB)             += zlib_wrapper.h
55  
56 diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h
57 index b28e3fe0bde85..51f44dd54314d 100644
58 --- a/libavcodec/vulkan_video.h
59 +++ b/libavcodec/vulkan_video.h
60 @@ -23,8 +23,8 @@
61  #include "vulkan.h"
62  
63  #include <vk_video/vulkan_video_codecs_common.h>
64 -#include "vulkan_video_codec_av1std.h"
65 -#include "vulkan_video_codec_av1std_decode.h"
66 +#include "vulkan_video_codec_av1std_mesa.h"
67 +#include "vulkan_video_codec_av1std_decode_mesa.h"
68  
69  #define CODEC_VER_MAJ(ver) (ver >> 22)
70  #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1))
71 diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h
72 similarity index 89%
73 rename from libavcodec/vulkan_video_codec_av1std_decode.h
74 rename to libavcodec/vulkan_video_codec_av1std_decode_mesa.h
75 index a697c00593c63..e2f37b4e6e0dc 100644
76 --- a/libavcodec/vulkan_video_codec_av1std_decode.h
77 +++ b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h
78 @@ -14,8 +14,8 @@
79   * limitations under the License.
80   */
81  
82 -#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
83 -#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
84 +#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_
85 +#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1
86  
87  /*
88  ** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
89 diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std_mesa.h
90 similarity index 99%
91 rename from libavcodec/vulkan_video_codec_av1std.h
92 rename to libavcodec/vulkan_video_codec_av1std_mesa.h
93 index c46236c457238..c91589eee2bfe 100644
94 --- a/libavcodec/vulkan_video_codec_av1std.h
95 +++ b/libavcodec/vulkan_video_codec_av1std_mesa.h
96 @@ -14,8 +14,8 @@
97   * limitations under the License.
98   */
99  
100 -#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
101 -#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
102 +#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_
103 +#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1
104  
105  /*
106  ** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
107 diff --git a/tests/ref/fate/source b/tests/ref/fate/source
108 index c575789dd55e7..8bb58b61f144e 100644
109 --- a/tests/ref/fate/source
110 +++ b/tests/ref/fate/source
111 @@ -23,8 +23,8 @@ compat/djgpp/math.h
112  compat/float/float.h
113  compat/float/limits.h
114  libavcodec/bitstream_template.h
115 -libavcodec/vulkan_video_codec_av1std.h
116 -libavcodec/vulkan_video_codec_av1std_decode.h
117 +libavcodec/vulkan_video_codec_av1std_decode_mesa.h
118 +libavcodec/vulkan_video_codec_av1std_mesa.h
119  tools/decode_simple.h
120  Use of av_clip() where av_clip_uintp2() could be used:
121  Use of av_clip() where av_clip_intp2() could be used: