Fix target-bitrate for vp8enc
This commit is contained in:
parent
e6e4f6978c
commit
240f7836cc
@ -0,0 +1,35 @@
|
|||||||
|
From 7ceef442a7d84c660d370c8e206503c1d4d8ab0f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege@collabora.co.uk>
|
||||||
|
Date: Mon, 15 Oct 2012 15:36:04 +0200
|
||||||
|
Subject: [PATCH] vp8enc: And this time fix the default target-bitrate value
|
||||||
|
for real
|
||||||
|
|
||||||
|
---
|
||||||
|
ext/vpx/gstvp8enc.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
|
||||||
|
index 2ae7a32..1f46163 100644
|
||||||
|
--- a/ext/vpx/gstvp8enc.c
|
||||||
|
+++ b/ext/vpx/gstvp8enc.c
|
||||||
|
@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
|
||||||
|
g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE,
|
||||||
|
g_param_spec_int ("target-bitrate", "Target bitrate",
|
||||||
|
"Target bitrate (in bits/sec)",
|
||||||
|
- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000,
|
||||||
|
+ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE,
|
||||||
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER,
|
||||||
|
@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
|
||||||
|
"Coding layer target bitrates",
|
||||||
|
"Target bitrates for coding layers (one per layer, decreasing)",
|
||||||
|
g_param_spec_int ("target-bitrate", "Target bitrate",
|
||||||
|
- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000,
|
||||||
|
+ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.12.1
|
||||||
|
|
53
0001-vp8enc-Fix-default-target-bitrate-value.patch
Normal file
53
0001-vp8enc-Fix-default-target-bitrate-value.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 1962384cffc037f704c586c85c0cf590c68f8d89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege@collabora.co.uk>
|
||||||
|
Date: Mon, 15 Oct 2012 15:30:33 +0200
|
||||||
|
Subject: [PATCH] vp8enc: Fix default target-bitrate value
|
||||||
|
|
||||||
|
---
|
||||||
|
ext/vpx/gstvp8enc.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c
|
||||||
|
index f465174..2ae7a32 100644
|
||||||
|
--- a/ext/vpx/gstvp8enc.c
|
||||||
|
+++ b/ext/vpx/gstvp8enc.c
|
||||||
|
@@ -441,7 +441,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
|
||||||
|
g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE,
|
||||||
|
g_param_spec_int ("target-bitrate", "Target bitrate",
|
||||||
|
"Target bitrate (in bits/sec)",
|
||||||
|
- 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE,
|
||||||
|
+ 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000,
|
||||||
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER,
|
||||||
|
@@ -565,7 +565,7 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
|
||||||
|
"Coding layer target bitrates",
|
||||||
|
"Target bitrates for coding layers (one per layer, decreasing)",
|
||||||
|
g_param_spec_int ("target-bitrate", "Target bitrate",
|
||||||
|
- "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE,
|
||||||
|
+ "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE / 1000,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
@@ -724,7 +724,7 @@ gst_vp8_enc_init (GstVP8Enc * gst_vp8_enc)
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_vp8_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE;
|
||||||
|
- gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE;
|
||||||
|
+ gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000;
|
||||||
|
gst_vp8_enc->rc_target_bitrate_set = FALSE;
|
||||||
|
gst_vp8_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER;
|
||||||
|
gst_vp8_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER;
|
||||||
|
@@ -1504,7 +1504,8 @@ gst_vp8_enc_set_format (GstVideoEncoder * video_encoder,
|
||||||
|
if (!encoder->rc_target_bitrate_set)
|
||||||
|
encoder->cfg.rc_target_bitrate =
|
||||||
|
gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE,
|
||||||
|
- GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), 320 * 240);
|
||||||
|
+ GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info),
|
||||||
|
+ 320 * 240 * 1000);
|
||||||
|
|
||||||
|
encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info);
|
||||||
|
encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info);
|
||||||
|
--
|
||||||
|
1.7.12.1
|
||||||
|
|
@ -9,12 +9,14 @@
|
|||||||
|
|
||||||
Name: gstreamer1-plugins-good
|
Name: gstreamer1-plugins-good
|
||||||
Version: 1.0.1
|
Version: 1.0.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: GStreamer plugins with good code and licensing
|
Summary: GStreamer plugins with good code and licensing
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://gstreamer.freedesktop.org/
|
URL: http://gstreamer.freedesktop.org/
|
||||||
Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz
|
Source0: http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-%{version}.tar.xz
|
||||||
|
Patch0: 0001-vp8enc-Fix-default-target-bitrate-value.patch
|
||||||
|
Patch1: 0001-vp8enc-And-this-time-fix-the-default-target-bitrate-.patch
|
||||||
|
|
||||||
BuildRequires: gstreamer1-devel >= %{version}
|
BuildRequires: gstreamer1-devel >= %{version}
|
||||||
BuildRequires: gstreamer1-plugins-base-devel >= %{version}
|
BuildRequires: gstreamer1-plugins-base-devel >= %{version}
|
||||||
@ -83,6 +85,8 @@ to be installed.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n gst-plugins-good-%{version}
|
%setup -q -n gst-plugins-good-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -199,6 +203,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 24 2012 Debarshi Ray <rishi@fedoraproject.org> - 1.0.1-2
|
||||||
|
- Fix target-bitrate for vp8enc
|
||||||
|
|
||||||
* Sun Oct 7 2012 Brian Pepple <bpepple@fedoraproject.org> - 1.0.1-1
|
* Sun Oct 7 2012 Brian Pepple <bpepple@fedoraproject.org> - 1.0.1-1
|
||||||
- Update to 1.0.1
|
- Update to 1.0.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user