Skip to contentSkip to conversation

x265: new package

PATCH New Thijs Vermeir 3 participants 8 messages Oct 24, 2015 – Oct 26, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 x265: new package

x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.

http://x265.org

---
 package/Config.in      |  1 +
 package/x265/Config.in | 23 +++++++++++++++++++++++
 package/x265/x265.hash |  2 ++
 package/x265/x265.mk   | 31 +++++++++++++++++++++++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 package/x265/Config.in
 create mode 100644 package/x265/x265.hash
 create mode 100644 package/x265/x265.mk
package/Config.in +1 -0
index 2f74439..10ff94e 100644
@@ -978,6 +978,7 @@ menu "Multimedia"
 	source "package/live555/Config.in"
 	source "package/mediastreamer/Config.in"
 	source "package/x264/Config.in"
+	source "package/x265/Config.in"
 endmenu
 
 menu "Networking"
package/x265/Config.in new file +23 -0
new file mode 100644
index 0000000..4d202a9
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_X265
+	bool "x265"
+	depends on BR2_INSTALL_LIBSTDCPP
+	help
+	  x265 is an open source free software and library for encoding video
+	  using the High Efficiency Video Coding (HEVC/H.265) standard. x265 is
+	  offered under either the GNU General Public License (GPL) 2 license or
+	  a commercial license, similar to the x264 project.
+
+	  http://x265.org
+
+if BR2_PACKAGE_X265
+
+config BR2_PACKAGE_X265_CLI
+	bool "CLI"
+	help
+	  Command-line tool to encode video streams into the
+	  H.265/HEVC compression format.
+
+endif
+
+comment "x265 needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
package/x265/x265.hash new file +2 -0
new file mode 100644
index 0000000..714ec2a
@@ -0,0 +1,2 @@
+# Locally generated
+sha256 760e6280c688f1ea90c492d19fc6d4084ca1c4b0ea9b2e3c736d32565c30d857 x265_1.8.tar.gz
package/x265/x265.mk new file +31 -0
new file mode 100644
index 0000000..5b34eb4
@@ -0,0 +1,31 @@
+################################################################################
+#
+# x265
+#
+################################################################################
+
+X265_VERSION = 1.8
+X265_SOURCE = x265_$(X265_VERSION).tar.gz
+X265_SITE = https://bitbucket.org/multicoreware/x265/downloads
+X265_LICENSE = GPLv2+
+X265_LICENSE_FILES = COPYING
+X265_SUBDIR = source/
+X265_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+X265_DEPENDENCIES += host-yasm
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+X265_CONF_OPTS += -DENABLE_SHARED=true -DENABLE_PIC=true
+else
+X265_CONF_OPTS += -DENABLE_SHARED=false
+endif
+
+ifeq ($(BR2_PACKAGE_X265_CLI),)
+X265_CONF_OPTS += -DENABLE_CLI=false
+else
+X265_CONF_OPTS += -DENABLE_CLI=true
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 gst1-plugins-bad: add x265 plugin

---
 package/gstreamer1/gst1-plugins-bad/Config.in           | 7 ++++++-
 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)
package/gstreamer1/gst1-plugins-bad/Config.in +6 -1
index a28243b..26a963e 100644
@@ -635,7 +635,12 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS
 
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265
 	bool "x265"
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_X265
 	help
-	  x265 plugin
+	  x265 encoding plugin
+
+comment "x265 needs a toolchain w/ C++"
+	depends on !BR2_INSTALL_LIBSTDCPP
 
 endif
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +2 -0
index fe5f242..1c42a60 100644
@@ -760,6 +760,8 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265),y)
 GST1_PLUGINS_BAD_CONF_OPTS += --enable-x265
+GST1_PLUGINS_BAD_DEPENDENCIES += x265
+GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y
 else
 GST1_PLUGINS_BAD_CONF_OPTS += --disable-x265
 endif
Signature · 1 line
2.1.0
#3 lore raw

PATCH 1/2 x265: new package

In reply to Thijs Vermeir
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thijs" == Thijs Vermeir <[email protected]> writes:

x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.

http://x265.org

+++ b/package/x265/x265.mk

package/x265/x265.mk new file +2 -0
@@ -0,0 +1,31 @@
+################################################################################
+#

package/x265/x265.mk line 12

Quoted 10 lines
package/x265/x265.mk new file +10 -0
+# x265
+#
+################################################################################
+
+X265_VERSION = 1.8
+X265_SOURCE = x265_$(X265_VERSION).tar.gz
+X265_SITE = https://bitbucket.org/multicoreware/x265/downloads
+X265_LICENSE = GPLv2+
+X265_LICENSE_FILES = COPYING
+X265_SUBDIR = source/

NIT: we normally don't append the trailing '/'.

package/x265/x265.mk line 23

Quoted 11 lines
package/x265/x265.mk new file +11 -0
+X265_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+X265_DEPENDENCIES += host-yasm
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+X265_CONF_OPTS += -DENABLE_SHARED=true -DENABLE_PIC=true
+else
+X265_CONF_OPTS += -DENABLE_SHARED=false
+endif

Any idea why the x265 developers don't use the "standard" BUILD_SHARED_LIBS=ON|OFF flag like other packages?

package/x265/x265.mk line 29

Quoted 6 lines
package/x265/x265.mk new file +6 -0
+
+ifeq ($(BR2_PACKAGE_X265_CLI),)
+X265_CONF_OPTS += -DENABLE_CLI=false
+else
+X265_CONF_OPTS += -DENABLE_CLI=true
+endif

We prefer positive logic, so I've swapped these around.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/2 x265: new package

\Peter, All,

On 2015-10-25 22:29 +0100, Peter Korsgaard spake thusly:

Quoted 25 lines
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thijs" == Thijs Vermeir <[email protected]> writes:

x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.

http://x265.org

+++ b/package/x265/x265.mk

package/x265/x265.mk new file +2 -0
@@ -0,0 +1,31 @@
+################################################################################
+#

package/x265/x265.mk line 12

Quoted 10 lines
package/x265/x265.mk new file +10 -0
+# x265
+#
+################################################################################
+
+X265_VERSION = 1.8
+X265_SOURCE = x265_$(X265_VERSION).tar.gz
+X265_SITE = https://bitbucket.org/multicoreware/x265/downloads
+X265_LICENSE = GPLv2+
+X265_LICENSE_FILES = COPYING
+X265_SUBDIR = source/

NIT: we normally don't append the trailing '/'.

Quoted 14 lines

package/x265/x265.mk line 23

Quoted 11 lines
package/x265/x265.mk new file +11 -0
+X265_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+X265_DEPENDENCIES += host-yasm
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+X265_CONF_OPTS += -DENABLE_SHARED=true -DENABLE_PIC=true
+else
+X265_CONF_OPTS += -DENABLE_SHARED=false
+endif

Any idea why the x265 developers don't use the "standard" BUILD_SHARED_LIBS=ON|OFF flag like other packages?

I gues it would work, since they do things like:

if(ENABLE_SHARED)
and
if(ENABLE_PIC)

Ditto for CLI.

Thijs, care to check if changing true/false to ON/OFF still works, please? If so, can you send an patch? This way, all our Cmake-based packages will look the same, which is good for consistency.

Regards,
Yann E. MORIN.

Quoted 16 lines

package/x265/x265.mk line 29

Quoted 5 lines
package/x265/x265.mk new file +5 -0
+ifeq ($(BR2_PACKAGE_X265_CLI),)
+X265_CONF_OPTS += -DENABLE_CLI=false
+else
+X265_CONF_OPTS += -DENABLE_CLI=true
+endif

We prefer positive logic, so I've swapped these around.

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/2 x265: new package

Hi,

Quoted 49 lines · Yann E. MORIN

\Peter, All,

On 2015-10-25 22:29 +0100, Peter Korsgaard spake thusly:

Quoted 25 lines
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thijs" == Thijs Vermeir <[email protected]> writes:

x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream.

http://x265.org

+++ b/package/x265/x265.mk

package/x265/x265.mk new file +2 -0
@@ -0,0 +1,31 @@
+################################################################################
+#

package/x265/x265.mk line 12

Quoted 10 lines
package/x265/x265.mk new file +10 -0
+# x265
+#
+################################################################################
+
+X265_VERSION = 1.8
+X265_SOURCE = x265_$(X265_VERSION).tar.gz
+X265_SITE = https://bitbucket.org/multicoreware/x265/downloads
+X265_LICENSE = GPLv2+
+X265_LICENSE_FILES = COPYING
+X265_SUBDIR = source/

NIT: we normally don't append the trailing '/'.

Quoted 14 lines

package/x265/x265.mk line 23

Quoted 11 lines
package/x265/x265.mk new file +11 -0
+X265_INSTALL_STAGING = YES
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+X265_DEPENDENCIES += host-yasm
+endif
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+X265_CONF_OPTS += -DENABLE_SHARED=true -DENABLE_PIC=true
+else
+X265_CONF_OPTS += -DENABLE_SHARED=false
+endif

Any idea why the x265 developers don't use the "standard" BUILD_SHARED_LIBS=ON|OFF flag like other packages?

I gues it would work, since they do things like:

if(ENABLE_SHARED)
and
if(ENABLE_PIC)

Quoted 8 lines

Ditto for CLI.

Thijs, care to check if changing true/false to ON/OFF still works, please? If so, can you send an patch? This way, all our Cmake-based packages will look the same, which is good for consistency.

Regards,
Yann E. MORIN.

Yes, I can look at it. To be clear you mean by the "standard" way:
- create a patch to accept BUILD_SHARED_LIBS (and enable fPIC) and remove all the shared lib stuff from the mk file
- and change values in the mk file for the CLI option from true/false -> ON/OFF

Gr,
Thijs

Quoted 25 lines
Quoted 9 lines

package/x265/x265.mk line 29

Quoted 6 lines
package/x265/x265.mk new file +5 -0
+ifeq ($(BR2_PACKAGE_X265_CLI),)
+X265_CONF_OPTS += -DENABLE_CLI=false
+else
+X265_CONF_OPTS += -DENABLE_CLI=true
+endif

We prefer positive logic, so I've swapped these around.

Quoted 8 lines

Committed, thanks.

--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#6 lore raw

PATCH 1/2 x265: new package

Thijs, All,

On 2015-10-26 13:53 +0100, Thijs Vermeir spake thusly:

Quoted 1 line · Yann E. MORIN

[--SNIP--]

Quoted 10 lines
Quoted 6 lines

Thijs, care to check if changing true/false to ON/OFF still works, please? If so, can you send an patch? This way, all our Cmake-based packages will look the same, which is good for consistency.

Regards,
Yann E. MORIN.

Yes, I can look at it. To be clear you mean by the "standard" way:
- create a patch to accept BUILD_SHARED_LIBS (and enable fPIC) and remove all the shared lib stuff from the mk file

No, it should not be needed to patch the sources of the package.

Just check if changing true/false in x265.mk to ON/OFF still works. If so, do the change and send a patch to Buildroot to use ON/OFF instead of true/false.

If it does not work, we will keep true/false.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/2 x265: new package

Hi,

Quoted 6 lines · Yann E. MORIN

Thijs, All,

On 2015-10-26 13:53 +0100, Thijs Vermeir spake thusly:

Quoted 1 line · Yann E. MORIN

...

Quoted 7 lines

No, it should not be needed to patch the sources of the package.

Just check if changing true/false in x265.mk to ON/OFF still works. If so, do the change and send a patch to Buildroot to use ON/OFF instead of true/false.

If it does not work, we will keep true/false.

Works like a charm!

Gr,
Thijs

Quoted 11 lines

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'