Author: kwizart
Update of /cvs/free/rpms/libquicktime/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv31771
Modified Files:
libquicktime.spec
Added Files:
libquicktime-1.1.3-x264_b78.patch
Log Message:
- backport patch from Alexis Ballier.
libquicktime-1.1.3-x264_b78.patch:
--- NEW FILE libquicktime-1.1.3-x264_b78.patch ---
diff -up libquicktime-1.1.3/plugins/x264/lqt_x264.c.b78
libquicktime-1.1.3/plugins/x264/lqt_x264.c
--- libquicktime-1.1.3/plugins/x264/lqt_x264.c.b78 2008-12-06 15:03:10.000000000 +0100
+++ libquicktime-1.1.3/plugins/x264/lqt_x264.c 2009-10-27 22:44:02.792431855 +0100
@@ -94,6 +94,17 @@ static lqt_parameter_info_static_t encod
.val_max = { .val_int = 100 },
.help_string = TRS("Influences how often B-frames are used"),
},
+#if X264_BUILD >= 78
+ {
+ .name = "x264_i_bframe_pyramid",
+ .real_name = TRS("B-frame pyramid"),
+ .type = LQT_PARAMETER_INT,
+ .val_default = { .val_int = 0 },
+ .val_min = { .val_int = 0 },
+ .val_max = { .val_int = 2 },
+ .help_string = TRS("Keep some B-frames as references")
+ },
+#else
{
.name = "x264_b_bframe_pyramid",
.real_name = TRS("B-frame pyramid"),
@@ -103,6 +114,7 @@ static lqt_parameter_info_static_t encod
.val_max = { .val_int = 1 },
.help_string = TRS("Keep some B-frames as references")
},
+#endif
{
.name = "x264_ratecontrol",
.real_name = TRS("Ratecontrol"),
@@ -537,3 +549,4 @@ LQT_EXTERN lqt_init_video_codec_func_t g
}
return (lqt_init_video_codec_func_t)0;
}
+
diff -up libquicktime-1.1.3/plugins/x264/x264.c.b78
libquicktime-1.1.3/plugins/x264/x264.c
--- libquicktime-1.1.3/plugins/x264/x264.c.b78 2009-03-11 15:25:50.000000000 +0100
+++ libquicktime-1.1.3/plugins/x264/x264.c 2009-10-27 22:44:14.134432973 +0100
@@ -67,7 +67,11 @@ static void dump_params(x264_param_t * p
lqt_dump(" i_bframe: %d\n", params->i_bframe);
// 0.. X264_BFRAME_MAX
lqt_dump(" b_bframe_adaptive: %d\n",
params->b_bframe_adaptive);
lqt_dump(" i_bframe_bias: %d\n", params->i_bframe_bias);
+#if X264_BUILD >= 78
+ lqt_dump(" i_bframe_pyramid: %d\n",
params->i_bframe_pyramid);
+#else
lqt_dump(" b_bframe_pyramid: %d\n",
params->b_bframe_pyramid);
+#endif
lqt_dump(" b_deblocking_filter: %d\n",
params->b_deblocking_filter);
lqt_dump(" i_deblocking_filter_alphac0: %d\n",
params->i_deblocking_filter_alphac0); // -6..6
@@ -174,14 +178,21 @@ encode_nals(uint8_t *buf, int size, x264
{
uint8_t *p = buf;
int i;
+#if X264_BUILD < 76
int s;
+#endif
for(i = 0; i < nnal; i++)
{
+#if X264_BUILD >= 76
+ memcpy(p, nals[i].p_payload, nals[i].i_payload);
+ p+=nals[i].i_payload;
+#else
s = x264_nal_encode(p, &size, 1, nals + i);
if(s < 0)
return -1;
p += s;
+#endif
}
return p - buf;
@@ -407,7 +418,11 @@ static int flush_frame(quicktime_t *file
pic_out.i_pts = 0;
/* Encode frames, get nals */
+#if X264_BUILD >= 76
+ if(x264_encoder_encode(codec->enc, &nal, &nnal, pic_in, &pic_out)<0)
+#else
if(x264_encoder_encode(codec->enc, &nal, &nnal, pic_in, &pic_out))
+#endif
return 0;
/* Encode nals -> get h264 stream */
@@ -782,7 +797,11 @@ static int set_parameter(quicktime_t *fi
ENUMPARAM("x264_i_bframe_adaptive", codec->params.i_bframe_adaptive,
bframe_adaptives);
#endif
INTPARAM("x264_i_bframe_bias", codec->params.i_bframe_bias);
+#if X264_BUILD >= 78
+ INTPARAM("x264_i_bframe_pyramid", codec->params.i_bframe_pyramid);
+#else
INTPARAM("x264_b_bframe_pyramid", codec->params.b_bframe_pyramid);
+#endif
ENUMPARAM("x264_i_rc_method", codec->params.rc.i_rc_method, rc_methods);
INTPARAM("x264_i_bitrate", codec->params.rc.i_bitrate);
@@ -921,3 +940,4 @@ void quicktime_init_codec_x264(quicktime
x264_param_default(&(codec->params));
}
+
Index: libquicktime.spec
===================================================================
RCS file: /cvs/free/rpms/libquicktime/devel/libquicktime.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- libquicktime.spec 16 Oct 2009 05:55:05 -0000 1.11
+++ libquicktime.spec 27 Oct 2009 21:52:54 -0000 1.12
@@ -1,11 +1,12 @@
Summary: Library for reading and writing Quicktime files
Name: libquicktime
Version: 1.1.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL:
http://libquicktime.sourceforge.net/
Source0:
http://downloads.sourceforge.net/libquicktime/%{name}-%{version}.tar.gz
+Patch0: libquicktime-1.1.3-x264_b78.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libdv-devel
@@ -54,6 +55,7 @@
%prep
%setup -q
+%patch0 -p1 -b .b78
# --------------------------------------------------------------------
@@ -132,6 +134,9 @@
# --------------------------------------------------------------------
%changelog
+* Tue Oct 27 2009 kwizart <kwizart at
gmail.com > - 1.1.3-2
+- backport patch from Alexis Ballier.
+
* Thu Oct 15 2009 kwizart <kwizart at
gmail.com > - 1.1.3-1
- Update to 1.1.3
- Conditionalize faac