summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-12-06 05:21:11 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-12-06 05:21:11 +0000
commite47239d09b5b60c0c7272404222ce67e939eebe1 (patch)
treeab7749ca13ecc065f34798e7e49e75894f543f63 /media-plugins
parentold (diff)
downloadgentoo-2-e47239d09b5b60c0c7272404222ce67e939eebe1.tar.gz
gentoo-2-e47239d09b5b60c0c7272404222ce67e939eebe1.tar.bz2
gentoo-2-e47239d09b5b60c0c7272404222ce67e939eebe1.zip
Fix zero-length .webm encodings with libvpx-1.1 (bug #435282, thanks to Alexandre et al.)
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key CF0ADD61)
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/gst-plugins-vp8/ChangeLog10
-rw-r--r--media-plugins/gst-plugins-vp8/files/gst-plugins-vp8-0.10.23-libvpx-1.1.patch46
-rw-r--r--media-plugins/gst-plugins-vp8/gst-plugins-vp8-0.10.23-r1.ebuild24
3 files changed, 79 insertions, 1 deletions
diff --git a/media-plugins/gst-plugins-vp8/ChangeLog b/media-plugins/gst-plugins-vp8/ChangeLog
index 7cd6d7274074..1f23f4edd37a 100644
--- a/media-plugins/gst-plugins-vp8/ChangeLog
+++ b/media-plugins/gst-plugins-vp8/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for media-plugins/gst-plugins-vp8
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-vp8/ChangeLog,v 1.13 2012/12/02 19:58:28 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-vp8/ChangeLog,v 1.14 2012/12/06 05:21:11 tetromino Exp $
+
+*gst-plugins-vp8-0.10.23-r1 (06 Dec 2012)
+
+ 06 Dec 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +gst-plugins-vp8-0.10.23-r1.ebuild,
+ +files/gst-plugins-vp8-0.10.23-libvpx-1.1.patch:
+ Fix zero-length .webm encodings with libvpx-1.1 (bug #435282, thanks to
+ Alexandre et al.)
02 Dec 2012; Gilles Dartiguelongue <eva@gentoo.org>
gst-plugins-vp8-0.10.22.ebuild, gst-plugins-vp8-0.10.23.ebuild:
diff --git a/media-plugins/gst-plugins-vp8/files/gst-plugins-vp8-0.10.23-libvpx-1.1.patch b/media-plugins/gst-plugins-vp8/files/gst-plugins-vp8-0.10.23-libvpx-1.1.patch
new file mode 100644
index 000000000000..fd26db8c2ab7
--- /dev/null
+++ b/media-plugins/gst-plugins-vp8/files/gst-plugins-vp8-0.10.23-libvpx-1.1.patch
@@ -0,0 +1,46 @@
+From 7e51c854b28f68e434523b83cd4bd76ea18aab54 Mon Sep 17 00:00:00 2001
+From: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
+Date: Fri, 18 May 2012 12:46:55 +0100
+Subject: [PATCH] vp8enc: fix target bitrate config with libvpx 1.1.0
+
+libvpx 1.1.0 disallows a bitrate of 0, which was used by
+vp8enc as a default value.
+
+Instead, we use the default libvpx bitrate, scaled to our
+video size, if no bitrate was specified.
+
+This fixes encoding VP8 video with libvpx 1.1.0.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=676245
+
+[Alexandre Rostovtsev <tetromino@gentoo.org>: backport to 0.10.23]
+---
+ ext/vp8/gstvp8enc.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/ext/vp8/gstvp8enc.c b/ext/vp8/gstvp8enc.c
+index b1f06e0..123d4dd 100644
+--- a/ext/vp8/gstvp8enc.c
++++ b/ext/vp8/gstvp8enc.c
+@@ -732,6 +732,10 @@ gst_vp8_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
+ return FALSE;
+ }
+
++ /* Scale default bitrate to our size */
++ cfg.rc_target_bitrate = gst_util_uint64_scale (cfg.rc_target_bitrate,
++ state->width * state->height, cfg.g_w * cfg.g_h);
++
+ cfg.g_w = state->width;
+ cfg.g_h = state->height;
+ cfg.g_timebase.num = state->fps_d;
+@@ -755,7 +759,6 @@ gst_vp8_enc_set_format (GstBaseVideoEncoder * base_video_encoder,
+ } else {
+ cfg.rc_min_quantizer = (gint) (63 - encoder->quality * 6.2);
+ cfg.rc_max_quantizer = (gint) (63 - encoder->quality * 6.2);
+- cfg.rc_target_bitrate = encoder->bitrate;
+ }
+ cfg.rc_dropframe_thresh = encoder->drop_frame;
+ cfg.rc_resize_allowed = encoder->resize_allowed;
+--
+1.8.0
+
diff --git a/media-plugins/gst-plugins-vp8/gst-plugins-vp8-0.10.23-r1.ebuild b/media-plugins/gst-plugins-vp8/gst-plugins-vp8-0.10.23-r1.ebuild
new file mode 100644
index 000000000000..468639d42059
--- /dev/null
+++ b/media-plugins/gst-plugins-vp8/gst-plugins-vp8-0.10.23-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/gst-plugins-vp8/gst-plugins-vp8-0.10.23-r1.ebuild,v 1.1 2012/12/06 05:21:11 tetromino Exp $
+
+EAPI="5"
+
+inherit eutils gst-plugins-bad gst-plugins10
+
+DESCRIPTION="GStreamer decoder for vpx video format"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd"
+IUSE=""
+
+RDEPEND="media-libs/libvpx"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Fix zero-bitrate vp8 encoding with libvpx-1.1, bug #435282
+ epatch "${FILESDIR}/${PN}-0.10.23-libvpx-1.1.patch"
+
+ gst-plugins10_find_plugin_dir
+ # gstbasevideo has no .pc
+ sed -e "s:\$(top_builddir)/gst-libs/gst/video/.*\.la:-lgstbasevideo-${SLOT}:" \
+ -i Makefile.am Makefile.in || die
+}