summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRodeo <[email protected]>2014-02-10 17:38:41 +0000
committerRodeo <[email protected]>2014-02-10 17:38:41 +0000
commite1e76b53cd11e7706e884d802c5985633b849e4f (patch)
tree64630e6611b46ee27a7ba8804f96a8fce1524ab2 /contrib
parente22ffd488a656f6534ce93f85dcfdb8fdb7976bd (diff)
Initial x265 integration. Patch by Zhang Zhiqiang. Thanks!
Build with --enable-x265 (requires CMake). Use via HandBrakeCLI with -a none -e x265 -f raw Only raw HEVC output is supported for now (no audio or subtitles). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6023 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib')
-rw-r--r--contrib/x265/A00-x265encoder.patch44
-rw-r--r--contrib/x265/module.defs30
-rw-r--r--contrib/x265/module.rules2
3 files changed, 76 insertions, 0 deletions
diff --git a/contrib/x265/A00-x265encoder.patch b/contrib/x265/A00-x265encoder.patch
new file mode 100644
index 000000000..d398e4c1d
--- /dev/null
+++ b/contrib/x265/A00-x265encoder.patch
@@ -0,0 +1,44 @@
+diff -Ncr x265-old/source/common/common.h x265-new/source/common/common.h
+*** x265-old/source/common/common.h Wed Jan 15 09:08:21 2014
+--- x265-new/source/common/common.h Thu Jan 23 15:16:39 2014
+***************
+*** 27,32 ****
+--- 27,42 ----
+ #include <cstdlib>
+ #include "x265.h"
+
++ const x265_cli_csp x265_cli_csps[] =
++ {
++ { 1, { 0, 0, 0 }, { 0, 0, 0 } }, /* i400 */
++ { 3, { 0, 1, 1 }, { 0, 1, 1 } }, /* i420 */
++ { 3, { 0, 1, 1 }, { 0, 0, 0 } }, /* i422 */
++ { 3, { 0, 0, 0 }, { 0, 0, 0 } }, /* i444 */
++ { 2, { 0, 0 }, { 0, 1 } }, /* nv12 */
++ { 2, { 0, 0 }, { 0, 0 } }, /* nv16 */
++ };
++
+ #define X265_MIN(a, b) ((a) < (b) ? (a) : (b))
+ #define X265_MAX(a, b) ((a) > (b) ? (a) : (b))
+ #define COPY1_IF_LT(x, y) if ((y) < (x)) (x) = (y);
+diff -Ncr x265-old/source/x265.h x265-new/source/x265.h
+*** x265-old/source/x265.h Wed Jan 15 09:08:21 2014
+--- x265-new/source/x265.h Thu Jan 23 15:16:23 2014
+***************
+*** 195,210 ****
+ int height[3];
+ } x265_cli_csp;
+
+- const x265_cli_csp x265_cli_csps[] =
+- {
+- { 1, { 0, 0, 0 }, { 0, 0, 0 } }, /* i400 */
+- { 3, { 0, 1, 1 }, { 0, 1, 1 } }, /* i420 */
+- { 3, { 0, 1, 1 }, { 0, 0, 0 } }, /* i422 */
+- { 3, { 0, 0, 0 }, { 0, 0, 0 } }, /* i444 */
+- { 2, { 0, 0 }, { 0, 1 } }, /* nv12 */
+- { 2, { 0, 0 }, { 0, 0 } }, /* nv16 */
+- };
+-
+ /* rate tolerance method */
+ typedef enum
+ {
+--- 195,200 ----
diff --git a/contrib/x265/module.defs b/contrib/x265/module.defs
new file mode 100644
index 000000000..230ac15e6
--- /dev/null
+++ b/contrib/x265/module.defs
@@ -0,0 +1,30 @@
+$(eval $(call import.MODULE.defs,X265,x265,YASM))
+$(eval $(call import.CONTRIB.defs,X265))
+
+X265.FETCH.url = http://download.handbrake.fr/contrib/x265-5825-9e923f539d89.tar.bz2
+
+X265.CONFIGURE.exe = cmake
+X265.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(X265.CONFIGURE.prefix)"
+X265.CONFIGURE.deps =
+X265.CONFIGURE.static =
+X265.CONFIGURE.shared = -DENABLE_SHARED=OFF
+X265.CONFIGURE.extra = -DENABLE_CLI=OFF -DHIGH_BIT_DEPTH=OFF
+
+ifeq (1,$(BUILD.cross))
+ X265.CONFIGURE.args.host = -DCMAKE_SYSTEM_NAME="$(X265.CONFIGURE.host)"
+else
+ X265.CONFIGURE.args.host = -DCMAKE_HOST_SYSTEM="$(X265.CONFIGURE.host)"
+ ifeq (1,$(FEATURE.local_yasm))
+ X265.CONFIGURE.env.LOCAL_PATH = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ X265.BUILD.env = PATH="$(call fn.ABSOLUTE,$(CONTRIB.build/)bin):$(PATH)"
+ endif
+endif
+
+## find CMakeLists.txt
+X265.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(X265.EXTRACT.dir/)source/)"
+
+## optional static libs need to be marked
+X265.OSL.libs = x265
+X265.OSL.files = $(foreach i,$(X265.OSL.libs),$(call fn.ABSOLUTE,$(CONTRIB.build/)lib/lib$(i).a))
+
+
diff --git a/contrib/x265/module.rules b/contrib/x265/module.rules
new file mode 100644
index 000000000..09c35f152
--- /dev/null
+++ b/contrib/x265/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,X265))
+$(eval $(call import.CONTRIB.rules,X265))