[SCM] FFmpeg packaging branch, ubuntu.karmic, updated. debian/0.5+svn20090706-1ubuntu3-22-g5aef7d4

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Tue Oct 13 21:26:17 UTC 2009


The following commit has been merged in the ubuntu.karmic branch:
commit f421ba7c78920ba2508cfedf94f46db8cac30889
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Tue Oct 13 23:03:05 2009 +0200

    Support constant-quant encoding for libtheora, LP: #356322

diff --git a/debian/patches/fix-constant-quant-encoding.patch b/debian/patches/fix-constant-quant-encoding.patch
new file mode 100644
index 0000000..b7f01cf
--- /dev/null
+++ b/debian/patches/fix-constant-quant-encoding.patch
@@ -0,0 +1,47 @@
+From: conrad <conrad at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
+Date: Wed, 30 Sep 2009 22:25:49 +0000 (+0000)
+Subject: Support constant-quant encoding for libtheora
+X-Git-Url: http://git.ffmpeg.org/?p=ffmpeg;a=commitdiff_plain;h=a5ac197b1e60ca44cbc1ea0f64e25af977f7dae5
+
+Support constant-quant encoding for libtheora
+Based on a patch by j f (gonzaz-z # operamail (d) com)
+
+git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20109 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
+---
+
+diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
+index 9da0d19..f028595 100644
+--- a/libavcodec/libtheoraenc.c
++++ b/libavcodec/libtheoraenc.c
+@@ -106,11 +106,9 @@ static av_cold int encode_init(AVCodecContext* avc_context)
+     }
+     t_info.colorspace = OC_CS_UNSPECIFIED;
+     t_info.pixelformat = OC_PF_420;
+-    t_info.target_bitrate = avc_context->bit_rate;
+     t_info.keyframe_frequency = avc_context->gop_size;
+     t_info.keyframe_frequency_force = avc_context->gop_size;
+     t_info.keyframe_mindistance = avc_context->keyint_min;
+-    t_info.quality = 0;
+ 
+     t_info.quick_p = 1;
+     t_info.dropframes_p = 0;
+@@ -120,6 +118,19 @@ static av_cold int encode_init(AVCodecContext* avc_context)
+     t_info.noise_sensitivity = 1;
+     t_info.sharpness = 0;
+ 
++    if (avc_context->flags & CODEC_FLAG_QSCALE) {
++        /* to be constant with the libvorbis implementation, clip global_quality to 0 - 10
++           Theora accepts a quality parameter p, which is:
++                * 0 <= p <=63
++                * an int value
++         */
++        t_info.quality = av_clip(avc_context->global_quality / (float)FF_QP2LAMBDA, 0, 10) * 6.3;
++        t_info.target_bitrate = 0;
++    } else {
++        t_info.target_bitrate = avc_context->bit_rate;
++        t_info.quality = 0;
++    }
++
+     /* Now initialise libtheora */
+     if (theora_encode_init( &(h->t_state), &t_info ) != 0) {
+         av_log(avc_context, AV_LOG_ERROR, "theora_encode_init failed\n");
diff --git a/debian/patches/series b/debian/patches/series
index adb4852..aa34878 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,6 +3,7 @@ ffmpeg-debian_hurd.patch
 fix-qtrle-encoding-when-previous-frame-linesize.patch
 aac-regression.patch
 fix-dv-seeking.patch
+fix-constant-quant-encoding.patch
 issue1245.patch
 900_doxyfile
 # fpic-ftbfs-fix.patch

-- 
FFmpeg packaging



More information about the pkg-multimedia-commits mailing list