>From 19765e46ba8e03d5ce5b9b8ee2b9995ac53eaaa9 Mon Sep 17 00:00:00 2001 From: Uthayakumar Muthu <[email protected]> Date: Mon, 9 Dec 2024 15:39:04 +0530 Subject: [PATCH] Add Feature flag support in x265_config
---
source/CMakeLists.txt | 11 +++++++++++
source/x265_config.h.in | 3 +++
2 files changed, 14 insertions(+)
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index 5c6dda9..f39bcc5 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -696,17 +696,28 @@ endif(DETAILED_CU_STATS)
option(ENABLE_ALPHA "Enable alpha encoding in x265" OFF)
if(ENABLE_ALPHA)
add_definitions(-DENABLE_ALPHA)
+ set(ENABLE_ALPHA 1)
+else()
+ set(ENABLE_ALPHA 0)
endif()
option(ENABLE_MULTIVIEW "Enable Multi-view encoding in HEVC" OFF)
if(ENABLE_MULTIVIEW)
add_definitions(-DENABLE_MULTIVIEW)
+ set(ENABLE_MULTIVIEW 1)
+else()
+ set(ENABLE_MULTIVIEW 0)
endif()
option(ENABLE_SCC_EXT "Enable screen content coding extension in HEVC" OFF)
if(ENABLE_SCC_EXT)
add_definitions(-DENABLE_SCC_EXT)
+ set(ENABLE_SCC_EXT 1)
+else()
+ set(ENABLE_SCC_EXT 0)
endif()
+configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
+ "${PROJECT_BINARY_DIR}/x265_config.h")
add_subdirectory(encoder)
add_subdirectory(common)
diff --git a/source/x265_config.h.in b/source/x265_config.h.in
index 17c1ecb..83e7035 100644
--- a/source/x265_config.h.in
+++ b/source/x265_config.h.in
@@ -30,5 +30,8 @@
* the shared library SONAME on platforms which support it. It also
* prevents linking against a different version of the static lib */
#define X265_BUILD ${X265_BUILD}
+#define ENABLE_ALPHA ${ENABLE_ALPHA}
+#define ENABLE_MULTIVIEW ${ENABLE_MULTIVIEW}
+#define ENABLE_SCC_EXT ${ENABLE_SCC_EXT}
#endif
--
1.8.3.1
0001-Add-Feature-flag-support-in-x265_config.patch
Description: 0001-Add-Feature-flag-support-in-x265_config.patch
_______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
