[FFmpeg-cvslog] lavc/vulkan: add SPIR-V compilation support
Lynne
git at videolan.org
Sun Oct 6 02:34:37 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Oct 4 11:28:06 2024 +0200| [893f3fde4cdeb4a28fce3833193b0c1c8f9fd33d] | committer: Lynne
lavc/vulkan: add SPIR-V compilation support
This is the same as with libavfilter.
We will need SPIR-V compilation for at least three different things,
like the VC-2 encoder and decoder, AV1 film grain synthesis for
hardware with no support for it, and possibly other codecs.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=893f3fde4cdeb4a28fce3833193b0c1c8f9fd33d
---
libavcodec/Makefile | 4 ++++
libavcodec/vulkan_glslang.c | 19 +++++++++++++++++++
libavcodec/vulkan_shaderc.c | 19 +++++++++++++++++++
3 files changed, 42 insertions(+)
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index ec4f3861f3..9950a9d1db 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1258,6 +1258,10 @@ OBJS-$(HAVE_THREADS) += pthread.o pthread_slice.o pthread_fram
OBJS-$(CONFIG_FRAME_THREAD_ENCODER) += frame_thread_encoder.o
+# vulkan libs
+OBJS-$(CONFIG_LIBGLSLANG) += vulkan_glslang.o
+OBJS-$(CONFIG_LIBSHADERC) += vulkan_shaderc.o
+
# Windows resource file
SHLIBOBJS-$(HAVE_GNU_WINDRES) += avcodecres.o
diff --git a/libavcodec/vulkan_glslang.c b/libavcodec/vulkan_glslang.c
new file mode 100644
index 0000000000..9aa41567a3
--- /dev/null
+++ b/libavcodec/vulkan_glslang.c
@@ -0,0 +1,19 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/vulkan_glslang.c"
diff --git a/libavcodec/vulkan_shaderc.c b/libavcodec/vulkan_shaderc.c
new file mode 100644
index 0000000000..9f60bf4dfd
--- /dev/null
+++ b/libavcodec/vulkan_shaderc.c
@@ -0,0 +1,19 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/vulkan_shaderc.c"
More information about the ffmpeg-cvslog
mailing list