Skip to content

Commit 3325452

Browse files
authored
[ffmpeg] Add vulkan feature (#47069)
1 parent 1313dcf commit 3325452

File tree

6 files changed

+42
-2
lines changed

6 files changed

+42
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
2+
index 6317ab7d0e..f1f70e9b96 100644
3+
--- a/libavutil/hwcontext_vulkan.c
4+
+++ b/libavutil/hwcontext_vulkan.c
5+
@@ -453,7 +453,7 @@ static const VulkanOptExtension optional_device_exts[] = {
6+
{ VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 },
7+
};
8+
9+
-static VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
10+
+static VKAPI_ATTR VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
11+
VkDebugUtilsMessageTypeFlagsEXT messageType,
12+
const VkDebugUtilsMessengerCallbackDataEXT *data,
13+
void *priv)

ports/ffmpeg/portfile.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ vcpkg_from_github(
1717
0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium
1818
0041-add-const-for-opengl-definition.patch
1919
0043-fix-miss-head.patch
20+
0044-fix-vulkan-debug-callback-abi.patch
2021
)
2122

2223
if(SOURCE_PATH MATCHES " ")
@@ -526,6 +527,12 @@ else()
526527
set(WITH_VPX OFF)
527528
endif()
528529

530+
if("vulkan" IN_LIST FEATURES)
531+
set(OPTIONS "${OPTIONS} --enable-vulkan")
532+
else()
533+
set(OPTIONS "${OPTIONS} --disable-vulkan")
534+
endif()
535+
529536
if("webp" IN_LIST FEATURES)
530537
set(OPTIONS "${OPTIONS} --enable-libwebp")
531538
set(WITH_WEBP ON)

ports/ffmpeg/vcpkg.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ffmpeg",
33
"version": "7.1.1",
4-
"port-version": 4,
4+
"port-version": 5,
55
"description": [
66
"A library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
77
"FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations."
@@ -62,6 +62,7 @@
6262
"theora",
6363
"vorbis",
6464
"vpx",
65+
"vulkan",
6566
"webp",
6667
"xml2",
6768
"zlib"
@@ -680,6 +681,12 @@
680681
"libvpx"
681682
]
682683
},
684+
"vulkan": {
685+
"description": "H.264, HEVC and AV1 de/encoding via Vulkan",
686+
"dependencies": [
687+
"vulkan-headers"
688+
]
689+
},
683690
"webp": {
684691
"description": "WebP encoding via libwebp",
685692
"dependencies": [

scripts/test_ports/vcpkg-ci-ffmpeg/vcpkg.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@
189189
"nvcodec"
190190
],
191191
"platform": "!android & !osx & !uwp & !(arm64 & windows)"
192+
},
193+
{
194+
"name": "ffmpeg",
195+
"default-features": false,
196+
"features": [
197+
"vulkan"
198+
],
199+
"platform": "(linux | windows) & !arm & !uwp"
192200
}
193201
]
194202
}

versions/baseline.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@
28862886
},
28872887
"ffmpeg": {
28882888
"baseline": "7.1.1",
2889-
"port-version": 4
2889+
"port-version": 5
28902890
},
28912891
"ffnvcodec": {
28922892
"baseline": "12.2.72.0",

versions/f-/ffmpeg.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "0988005f333aa87d797fb08535d33995f6ec302f",
5+
"version": "7.1.1",
6+
"port-version": 5
7+
},
38
{
49
"git-tree": "f61f5a41a01c6228401fc2ae93496fb8617be96e",
510
"version": "7.1.1",

0 commit comments

Comments
 (0)