<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.video.ffmpeg.devel">
    <title>gmane.comp.video.ffmpeg.devel</title>
    <link>http://blog.gmane.org/gmane.comp.video.ffmpeg.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77935"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77934"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77933"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77932"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77931"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77930"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77929"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77928"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77927"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77926"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77925"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77924"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77923"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77922"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77921"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77920"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77919"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77918"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77917"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77916"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77935">
    <title>Re: [PATCH]Fix for issue694. Dirac A/V sync loss</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77935</link>
    <description>Hi, 

Sorry for the delayed response. My replies are inline.

On Sat, 2008-11-29 at 02:44 +0100, Michael Niedermayer wrote:

Dirac, the specification, has a flexible GOP structure. So the frame
re-ordering can be anything. This said, the current implementations of
Dirac (dirac-research and Schroedinger) use a frame-reordering on 1.
Intra and backward predicted frames can be delayed but bi-directional
frames are not.  So the mpeg1/2 logic for has_b_frames holds. In Dirac
it is not possible to tell whether a frame is a backward predicted frame
(similar to 'P' frame) or a bi-directional frame (similar to 'B' frame)
easily without processing its reference frames. So I set has_b_frames to
1 if I come across any predicted frame (buf[4] &amp;0x08) == 0x08 - mean the
parse unit is a picture, and (buf[4] &amp; 0x03 checks the number of
references) . So an I-frame only sequence will set has_b_frames to 0 but
a sequence having only P or P&amp;B frames will set it to 1 since
has_b_frames=1 does not require that there be any 'B' frames in the
sequence.


Will change it to av_fast_realloc in the next update to the patch.


Will fix this.


Dirac is a bit trickier. Since we use Arithmetic coding for entropy
coding the sync sequence 'BBCD' can occur in the entropy data and can
trigger a false start of frame. We can't go by frame size (here the next
parse offset) alone because of this. So we need to use the parse offsets
of the current frame and the next frame to validate the current frame.
The previous parse offset of the next frame must match the next parse
offset of the current frame. If they don't match the current frame gets
thrown out. So I decided to implement a Dirac specific combine frame.
Hope this explains it.
 

Regards,
Anuradha

</description>
    <dc:creator>Anuradha Suraparaju</dc:creator>
    <dc:date>2008-12-02T02:39:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77934">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77934</link>
    <description>Hi,
On Mon, Dec 1, 2008 at 3:32 PM, Kenan Gillet &lt;kenan.gillet&lt; at &gt;gmail.com&gt; wrote:

here is an updated version of qcelp_lsp.c which had been already oked
Index: libavcodec/qcelp_lsp.c
===================================================================
--- libavcodec/qcelp_lsp.c(revision 0)
+++ libavcodec/qcelp_lsp.c(revision 0)
&lt; at &gt;&lt; at &gt; -0,0 +1,100 &lt; at &gt;&lt; at &gt;
+/*
+ * QCELP decoder
+ * Copyright (c) 2007 Reynaldo H. Verdejo Pinochet
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * &lt; at &gt;file qcelp_lsp.c
+ * QCELP decoder
+ * &lt; at &gt;author Reynaldo H. Verdejo Pinochet
+ */
+
+#include "libavutil/mathematics.h"
+
+/**
+ * initial coefficient to perform bandwidth expansion on LPC
+ *
+ * &lt; at &gt;note: 0.9883 looks like an approximation of 253/256.
+ *
+ * TIA/EIA/IS-733 2.4.3.3.6 6
+ */
+#define QCELP_BANDWITH_EXPANSION_COEFF 0.9883
+
+/**
+ * Computes the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients
+ * needed for LSP to LPC conversion.
+ * We only need to calculate the 6 first elements of the polynomial.
+ *
+ * &lt; at &gt;param lspf line spectral pair frequencies
+ * &lt; at &gt;param f [out] polynomial input/output as a vector
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5-1/2
+ */
+static void lsp2polyf(const float *lspf, double *f, int lp_half_order)
+{
+    int i, j;
+
+    f[0] = 1.0;
+    f[1] = -2 * cos(M_PI * lspf[0]);
+    lspf -= 2;
+    for(i=2; i&lt;=lp_half_order; i++)
+    {
+        double val = -2 * cos(M_PI * lspf[2*i]);
+        f[i] = val * f[i-1] + 2*f[i-2];
+        for(j=i-1; j&gt;1; j--)
+            f[j] += f[j-1] * val + f[j-2];
+        f[1] += val;
+    }
+}
+
+/**
+ * Reconstructs LPC coefficients from the line spectral pair frequencies
+ * and performs bandwidth expansion.
+ *
+ * &lt; at &gt;param lspf line spectral pair frequencies
+ * &lt; at &gt;param lpc linear predictive coding coefficients
+ *
+ * &lt; at &gt;note: bandwith_expansion_coeff could be precalculated into a table
+ *        but it seems to be slower on x86
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5
+ */
+void ff_qcelp_lspf2lpc(const float *lspf, float *lpc)
+{
+    double pa[6], qa[6];
+    int   i;
+    double bandwith_expansion_coeff = -QCELP_BANDWITH_EXPANSION_COEFF * 0.5;
+
+    lsp2polyf(lspf,     pa, 5);
+    lsp2polyf(lspf + 1, qa, 5);
+
+    for (i=4; i&gt;=0; i--)
+    {
+        double paf = pa[i+1] + pa[i];
+        double qaf = qa[i+1] - qa[i];
+
+        lpc[i  ] = paf + qaf;
+        lpc[9-i] = paf - qaf;
+    }
+    for (i=0; i&lt;10; i++)
+    {
+        lpc[i] *= bandwith_expansion_coeff;
+        bandwith_expansion_coeff *= QCELP_BANDWITH_EXPANSION_COEFF;
+    }
+}
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Kenan Gillet</dc:creator>
    <dc:date>2008-12-02T01:45:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77933">
    <title>Re: [PATCH] remove useless extern keywords</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77933</link>
    <description>

I'll comment on the files I maintain.


Wrong.  Those are function pointers.


OK


OK.  No maintainer, but I seem to be the only one around here who
knows SH4.  (Yes, those should have an ff_ prefix.)


OK


OK


OK


OK


OK


OK


Those declarations don't belong there at all.  The definitions are in
utils.c.  I don't know what the proper place would be.  Michael?

</description>
    <dc:creator>Måns Rullgård</dc:creator>
    <dc:date>2008-12-02T01:32:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77932">
    <title>[PATCH] remove useless extern keywords</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77932</link>
    <description>In the nvidia patch review there were complaints about unnecessary
extern keywords being added to the code.  Since this was apparently a
copy and paste issue from the xvmc code, I wondered why they were there
in the first place.

Here is a patch to get rid of them so no bad examples remain.

Diego
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-02T01:16:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77931">
    <title>Re: [PATCH] remove duplicate declarationsfromlibswscale/rgb2rgb.c</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77931</link>
    <description>
Forget this one.

Diego
</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-02T01:13:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77930">
    <title>[PATCH] remove duplicate declarations fromlibswscale/rgb2rgb.c</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77930</link>
    <description>There are a bunch of pointless forward declarations in rgb2rgb.c.  The
same already exist in rgb2rgb.h.  Here is a patch to remove them.

Diego
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-02T00:32:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77929">
    <title>Re: [PATCH] remove unused codefromlibswscale/rgb2rgb.c</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77929</link>
    <description>
Applied.

Diego
</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-02T00:22:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77928">
    <title>Re: [PATCH] remove unused codefromlibswscale/rgb2rgb.c</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77928</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-02T00:16:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77927">
    <title>[PATCH] remove unused code from libswscale/rgb2rgb.c</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77927</link>
    <description>Here is a patch to remove a bunch of unused declarations from
libswscale/rgb2rgb.c.

Diego
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-02T00:00:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77926">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77926</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-01T23:57:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77925">
    <title>Re: [PATCH]NVIDIA VDPAU patch for h264</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77925</link>
    <description>
I have yet to see anyone use Baseline features that aren't a subset of
Main for any serious purpose.  Thus, your approach of splitting things
by profiles and "only playing Main and High" will completely kill
support for all Baseline streams which would have otherwise worked
just fine.  I have never seen FMO, ASO, or RS used outside of a
research paper.

Splitting by profile simply doesn't make any sense to me.  If you need
to pass the profile to the decoder, why not just create a variable and
enums?


Certainly not, since I doubt your graphics cards support SVQ3!  SVQ3
is a proprietary ripoff of H.264 with some minor modifications used by
some Quicktime videos.  RV30/RV40 are similar, except ripoffs by Real
instead of Sorenson.


I'm pretty sure you should go back and read the C spec here.


I don't think we should let features that nobody use and libavcodec
doesn't (and probably will never) support hold us up for implementing
things the right way.

Dark Shikari
</description>
    <dc:creator>Jason Garrett-Glaser</dc:creator>
    <dc:date>2008-12-01T23:52:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77924">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77924</link>
    <description>
On Dec 1, 2008, at 3:18 PM, Michael Niedermayer wrote:


how about a note in the doxy?
&lt; at &gt;note: 0.9883 looks like an approximation of 253/256

I'll add it to the next round of patches if it is ok.



:)
</description>
    <dc:creator>Kenan Gillet</dc:creator>
    <dc:date>2008-12-01T23:32:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77923">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77923</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-01T23:25:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77922">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77922</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-01T23:18:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77921">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77921</link>
    <description>Hi,

On Mon, Dec 1, 2008 at 1:39 PM, Michael Niedermayer &lt;michaelni&lt; at &gt;gmx.at&gt; wrote:

[...]



[...]



done, and var renamed to pitch_lag



done, and var renamed to pitch_gain



[...]



when removed, some samples wav output changes,
plus QCELP only handles mono.


round 15 attached.

note: there is a small update to the glue code in libavformat/mov.c
so I repost the doc-glue patch for this particular round but it has not
changed otherwise.

thanks for all your help,

Kenan
Index: libavcodec/qcelpdec.c
===================================================================
--- libavcodec/qcelpdec.c(revision 15975)
+++ libavcodec/qcelpdec.c(working copy)
&lt; at &gt;&lt; at &gt; -65,8 +65,8 &lt; at &gt;&lt; at &gt;
     float             last_codebook_gain;
     int               prev_g1[2];
     int               prev_bitrate;
-    float             prev_pitch_gain[4];
-    uint8_t           prev_pitch_lag[4];
+    float             pitch_gain[4];
+    uint8_t           pitch_lag[4];
     uint16_t          first16bits;
 } QCELPContext;
 
&lt; at &gt;&lt; at &gt; -75,7 +75,7 &lt; at &gt;&lt; at &gt;
  *
  * TIA/EIA/IS-733 2.4.3.3.5
  */
-void qcelp_lspf2lpc(const float *lspf, float *lpc);
+void ff_qcelp_lspf2lpc(const float *lspf, float *lpc);
 
 static void weighted_vector_sumf(float *out, const float *in_a,
                                  const float *in_b, float weight_coeff_a,
&lt; at &gt;&lt; at &gt; -495,6 +495,58 &lt; at &gt;&lt; at &gt;
 }
 
 /**
+ * Apply pitch synthesis filter and pitch prefilter to the scaled codebook vector.
+ * TIA/EIA/IS-733 2.4.5.2
+ *
+ * &lt; at &gt;param q the context
+ * &lt; at &gt;param cdn_vector the scaled codebook vector
+ */
+static void apply_pitch_filters(QCELPContext *q,
+                                float *cdn_vector) {
+    int         i;
+    const float *v_synthesis_filtered, *v_pre_filtered;
+
+    if (q-&gt;bitrate &gt;= RATE_HALF ||
+       (q-&gt;bitrate == I_F_Q &amp;&amp; (q-&gt;prev_bitrate &gt;= RATE_HALF))) {
+
+        if (q-&gt;bitrate &gt;= RATE_HALF) {
+
+            // Compute gain &amp; lag for the whole frame.
+            for (i = 0; i &lt; 4; i++) {
+                q-&gt;pitch_gain[i] = q-&gt;frame.plag[i] ? (q-&gt;frame.pgain[i] + 1) * 0.25 : 0.0;
+
+                q-&gt;pitch_lag[i] = q-&gt;frame.plag[i] + 16;
+            }
+        } else {
+            float max_pitch_gain = q-&gt;erasure_count &lt; 3 ? 0.9 - 0.3 * (q-&gt;erasure_count - 1)
+                                                        : 0.0;
+            for (i = 0; i &lt; 4; i++)
+                q-&gt;pitch_gain[i] = FFMIN(q-&gt;pitch_gain[i], max_pitch_gain);
+
+            memset(q-&gt;frame.pfrac, 0, sizeof(q-&gt;frame.pfrac));
+        }
+
+        // pitch synthesis filter
+        v_synthesis_filtered = do_pitchfilter(q-&gt;pitch_synthesis_filter_mem, cdn_vector,
+                                              q-&gt;pitch_gain, q-&gt;pitch_lag, q-&gt;frame.pfrac);
+
+        // pitch prefilter update
+        for (i = 0; i &lt; 4; i++)
+            q-&gt;pitch_gain[i] = 0.5 * FFMIN(q-&gt;pitch_gain[i], 1.0);
+
+        v_pre_filtered = do_pitchfilter(q-&gt;pitch_pre_filter_mem, v_synthesis_filtered,
+                                        q-&gt;pitch_gain, q-&gt;pitch_lag, q-&gt;frame.pfrac);
+
+        apply_gain_ctrl(cdn_vector, v_synthesis_filtered, v_pre_filtered);
+    } else {
+        memcpy(q-&gt;pitch_synthesis_filter_mem, cdn_vector + 17, 143 * sizeof(float));
+        memcpy(q-&gt;pitch_pre_filter_mem,       cdn_vector + 17, 143 * sizeof(float));
+        memset(q-&gt;pitch_gain, 0, sizeof(q-&gt;pitch_gain));
+        memset(q-&gt;pitch_lag,  0, sizeof(q-&gt;pitch_lag));
+    }
+}
+
+/**
  * Interpolates LSP frequencies and computes LPC coefficients
  * for a given bitrate &amp; pitch subframe.
  *
&lt; at &gt;&lt; at &gt; -522,9 +574,9 &lt; at &gt;&lt; at &gt;
     {
         weighted_vector_sumf(interpolated_lspf, curr_lspf, q-&gt;prev_lspf,
                              weight, 1.0 - weight, 10);
-        qcelp_lspf2lpc(interpolated_lspf, lpc);
+        ff_qcelp_lspf2lpc(interpolated_lspf, lpc);
     }else if(q-&gt;bitrate &gt;= RATE_QUARTER || (q-&gt;bitrate == I_F_Q &amp;&amp; !subframe_num))
-        qcelp_lspf2lpc(curr_lspf, lpc);
+        ff_qcelp_lspf2lpc(curr_lspf, lpc);
 }
 
 static int buf_size2bitrate(const int buf_size)
Index: Changelog
===================================================================
--- Changelog(revision 15975)
+++ Changelog(working copy)
&lt; at &gt;&lt; at &gt; -141,6 +141,7 &lt; at &gt;&lt; at &gt;
 - Speex decoding via libspeex
 - Electronic Arts TGQ decoder
 - RV40 decoder
+- QCELP / PureVoice decoder
 
 version 0.4.9-pre1:
 
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile(revision 15975)
+++ libavcodec/Makefile(working copy)
&lt; at &gt;&lt; at &gt; -158,6 +158,7 &lt; at &gt;&lt; at &gt;
 OBJS-$(CONFIG_PNG_ENCODER)             += png.o pngenc.o
 OBJS-$(CONFIG_PPM_ENCODER)             += pnmenc.o pnm.o
 OBJS-$(CONFIG_PTX_DECODER)             += ptx.o
+OBJS-$(CONFIG_QCELP_DECODER)           += qcelpdec.o qcelp_lsp.o celp_math.o celp_filters.o
 OBJS-$(CONFIG_QDM2_DECODER)            += qdm2.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o
 OBJS-$(CONFIG_QDRAW_DECODER)           += qdrw.o
 OBJS-$(CONFIG_QPEG_DECODER)            += qpeg.o
Index: libavcodec/allcodecs.c
===================================================================
--- libavcodec/allcodecs.c(revision 15975)
+++ libavcodec/allcodecs.c(working copy)
&lt; at &gt;&lt; at &gt; -204,6 +204,7 &lt; at &gt;&lt; at &gt;
     REGISTER_DECODER (MPC7, mpc7);
     REGISTER_DECODER (MPC8, mpc8);
     REGISTER_ENCDEC  (NELLYMOSER, nellymoser);
+    REGISTER_DECODER (QCELP, qcelp);
     REGISTER_DECODER (QDM2, qdm2);
     REGISTER_DECODER (RA_144, ra_144);
     REGISTER_DECODER (RA_288, ra_288);
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h(revision 15975)
+++ libavcodec/avcodec.h(working copy)
&lt; at &gt;&lt; at &gt; -30,7 +30,7 &lt; at &gt;&lt; at &gt;
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR  5
+#define LIBAVCODEC_VERSION_MINOR  6
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
Index: doc/general.texi
===================================================================
--- doc/general.texi(revision 15975)
+++ doc/general.texi(working copy)
&lt; at &gt;&lt; at &gt; -397,6 +397,7 &lt; at &gt;&lt; at &gt;
 &lt; at &gt;item Musepack               &lt; at &gt;tab     &lt; at &gt;tab  X
     &lt; at &gt;tab SV7 and SV8 are supported.
 &lt; at &gt;item Nellymoser ASAO        &lt; at &gt;tab  X  &lt; at &gt;tab  X
+&lt; at &gt;item QCELP / PureVoice      &lt; at &gt;tab     &lt; at &gt;tab  X
 &lt; at &gt;item Qdesign QDM2           &lt; at &gt;tab     &lt; at &gt;tab  X
     &lt; at &gt;tab There are still some distortions.
 &lt; at &gt;item QT IMA ADPCM           &lt; at &gt;tab  X  &lt; at &gt;tab  X
Index: libavformat/mov.c
===================================================================
--- libavformat/mov.c(revision 15975)
+++ libavformat/mov.c(working copy)
&lt; at &gt;&lt; at &gt; -988,7 +988,9 &lt; at &gt;&lt; at &gt;
 #endif
     /* no ifdef since parameters are always those */
     case CODEC_ID_QCELP:
+        st-&gt;codec-&gt;frame_size= 160;
         st-&gt;codec-&gt;channels= 1; /* really needed */
+        break;
     case CODEC_ID_AMR_NB:
     case CODEC_ID_AMR_WB:
         st-&gt;codec-&gt;frame_size= sc-&gt;samples_per_frame;
Index: libavcodec/qcelp_lsp.c
===================================================================
--- libavcodec/qcelp_lsp.c(revision 0)
+++ libavcodec/qcelp_lsp.c(revision 0)
&lt; at &gt;&lt; at &gt; -0,0 +1,98 &lt; at &gt;&lt; at &gt;
+/*
+ * QCELP decoder
+ * Copyright (c) 2007 Reynaldo H. Verdejo Pinochet
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * &lt; at &gt;file qcelp_lsp.c
+ * QCELP decoder
+ * &lt; at &gt;author Reynaldo H. Verdejo Pinochet
+ */
+
+#include "libavutil/mathematics.h"
+
+/**
+ * initial coefficient to perform bandwidth expansion on LPC
+ *
+ * TIA/EIA/IS-733 2.4.3.3.6 6
+ */
+#define QCELP_BANDWITH_EXPANSION_COEFF 0.9883
+
+/**
+ * Computes the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients
+ * needed for LSP to LPC conversion.
+ * We only need to calculate the 6 first elements of the polynomial.
+ *
+ * &lt; at &gt;param lspf line spectral pair frequencies
+ * &lt; at &gt;param f [out] polynomial input/output as a vector
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5-1/2
+ */
+static void lsp2polyf(const float *lspf, double *f, int lp_half_order)
+{
+    int i, j;
+
+    f[0] = 1.0;
+    f[1] = -2 * cos(M_PI * lspf[0]);
+    lspf -= 2;
+    for(i=2; i&lt;=lp_half_order; i++)
+    {
+        double val = -2 * cos(M_PI * lspf[2*i]);
+        f[i] = val * f[i-1] + 2*f[i-2];
+        for(j=i-1; j&gt;1; j--)
+            f[j] += f[j-1] * val + f[j-2];
+        f[1] += val;
+    }
+}
+
+/**
+ * Reconstructs LPC coefficients from the line spectral pair frequencies
+ * and performs bandwidth expansion.
+ *
+ * &lt; at &gt;param lspf line spectral pair frequencies
+ * &lt; at &gt;param lpc linear predictive coding coefficients
+ *
+ * &lt; at &gt;note: bandwith_expansion_coeff could be precalculated into a table
+ *        but it seems to be slower on x86
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5
+ */
+void ff_qcelp_lspf2lpc(const float *lspf, float *lpc)
+{
+    double pa[6], qa[6];
+    int   i;
+    double bandwith_expansion_coeff = -QCELP_BANDWITH_EXPANSION_COEFF * 0.5;
+
+    lsp2polyf(lspf,     pa, 5);
+    lsp2polyf(lspf + 1, qa, 5);
+
+    for (i=4; i&gt;=0; i--)
+    {
+        double paf = pa[i+1] + pa[i];
+        double qaf = qa[i+1] - qa[i];
+
+        lpc[i  ] = paf + qaf;
+        lpc[9-i] = paf - qaf;
+    }
+    for (i=0; i&lt;10; i++)
+    {
+        lpc[i] *= bandwith_expansion_coeff;
+        bandwith_expansion_coeff *= QCELP_BANDWITH_EXPANSION_COEFF;
+    }
+}
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Kenan Gillet</dc:creator>
    <dc:date>2008-12-01T23:15:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77920">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77920</link>
    <description>
On Dec 1, 2008, at 2:05 PM, Michael Niedermayer wrote:


probably but in specs and reference code it is 0.9883 not 0.98828125.
do you want to replace 0.9883 by 253/256 ?



done



done

also I am interested to know if u had any comments on the benchmarks [1]
between old double vs old float
and new double vs new float

[1] http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-December/056795.html
</description>
    <dc:creator>Kenan Gillet</dc:creator>
    <dc:date>2008-12-01T23:00:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77919">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77919</link>
    <description>
Ok'ed parts applied.

-Vitor
</description>
    <dc:creator>Vitor Sessak</dc:creator>
    <dc:date>2008-12-01T22:07:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77918">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77918</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-01T22:05:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77917">
    <title>Re: [PATCH]NVIDIA VDPAU patch for h264</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77917</link>
    <description>
you can check out some ffmpeg guidelines here:
http://ffmpeg.org/general.html#SEC21

-compn
</description>
    <dc:creator>compn</dc:creator>
    <dc:date>2008-12-01T21:51:38</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77916">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77916</link>
    <description>
The glue/documentation/build system patch is OK, no need to resend it.

Diego
</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-12-01T21:48:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77915">
    <title>Re: [PATCH] QCELP decoder</title>
    <link>http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/77915</link>
    <description>_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Michael Niedermayer</dc:creator>
    <dc:date>2008-12-01T21:41:47</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.video.ffmpeg.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.video.ffmpeg.devel</link>
  </textinput>
</rdf:RDF>
