<?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://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77932"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77930"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77927"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77897"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77885"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77860"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77845"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77816"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77813"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77808"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77806"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77800"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77798"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77789"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77774"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77770"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77769"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77758"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77752"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77704"/>
      </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://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77932">
    <title>[PATCH] remove useless extern keywords</title>
    <link>http://comments.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://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77930">
    <title>[PATCH] remove duplicate declarations fromlibswscale/rgb2rgb.c</title>
    <link>http://comments.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://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77927">
    <title>[PATCH] remove unused code from libswscale/rgb2rgb.c</title>
    <link>http://comments.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://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77897">
    <title>[PATCH] use macho32 object format in 32-bits arch</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77897</link>
    <description>Hello folks,

The attached patch should fix crashes that some users of libavcodec
experienced (MPlayer users if you want me to do some finger-pointing).

The problem comes from the fact that the code considers that "-f macho"
is the 32-bits flavor, and that "-f macho64" should be used to get the
64-bits flavor.

"yasm -f macho" leads to the generation of a 32-bits Mach-O object on a
32-bits machine, and a 64-bit Mach-O object on a 64-bits machine.

Attached patch should fix this (I must admit I didn't test it yet), but
it's not meant to be applied since it leads to code duplication as I'm
not comfortable with yasm.

Guillaume

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Guillaume Poirier</dc:creator>
    <dc:date>2008-12-01T17:24:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77885">
    <title>buf in avformat/utils.c?</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77885</link>
    <description>Hello

I wonder if the function "set_codec_from_probe_data(AVStream *st, 
AVProbeData *pd, int score)"

should not be modifed to handle ALL known input formats?

Btw maybe the AVInputFormat  structure should be modified  to include 
prefered_codec_id and codec_type fields?


Any opinions?

Thanks  Vadim
</description>
    <dc:creator>Vadim Lebedev</dc:creator>
    <dc:date>2008-12-01T11:21:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77860">
    <title>seeking bug in theora codec libavcodec/vp3.c ?</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77860</link>
    <description>Hello,
  As you may be aware, ffmpeg is unable to correctly seek Theora video.
Attempting to seek (even to frame 0) shows only the moving parts of the
first few seconds, with static areas of the scene showing the contents of
the frame prior to seeking.
After a short while (presumably when a keyframe is hit) the video picture
becomes perfect again.
Am I correct in thinking these artefacts are occurring because the player
has seeked to an intermediate frame, instead of a keyframe ???

The Theora codec is stil using the the old pre 1.0 theora_* api, is nobody
activly maintining libabcodev/vp3.c ?

I intend to correct this problem, any pointers on where to start ?
I notice that the "flush" field of AVCodec is set to NULL, is this likely to
be the cause of the seeking artifacts ?

Where is seeking implemented, it does not seem to be codec specific.. i
assume it is container specific ?

Forgive the stupid questions, I'm new to video video encoding / decoding.

Thanks.

Christopher Stones (chris.stones&lt; at &gt;gmail.com)
</description>
    <dc:creator>Chris Stones</dc:creator>
    <dc:date>2008-11-30T22:06:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77845">
    <title>[PATCH]NVIDIA VDPAU patch for h264</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77845</link>
    <description>Hi!

Attached is the h.264 part of the VDPAU patch.
Tested on GeForce9400.

ENABLE* is bad for mplayer-based options: It is also never used for xvmc.

Please comment, Carl Eugen
Index: configure
===================================================================
--- configure(Revision 15958)
+++ configure(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -969,6 +969,7 &lt; at &gt;&lt; at &gt;
 h263_encoder_select="aandct"
 h263p_encoder_select="aandct"
 h264_decoder_select="golomb"
+h264_vdpau_decoder_deps="vdpau"
 imc_decoder_select="fft mdct"
 jpegls_decoder_select="golomb"
 jpegls_encoder_select="golomb"
Index: libavcodec/utils.c
===================================================================
--- libavcodec/utils.c(Revision 15958)
+++ libavcodec/utils.c(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -644,6 +644,7 &lt; at &gt;&lt; at &gt;
 {"context", "context model", OFFSET(context_model), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E},
 {"slice_flags", NULL, OFFSET(slice_flags), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"xvmc_acceleration", NULL, OFFSET(xvmc_acceleration), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
+{"vdpau_acceleration", NULL, OFFSET(vdpau_acceleration), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"mbd", "macroblock decision algorithm (high quality mode)", OFFSET(mb_decision), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, V|E, "mbd"},
 {"simple", "use mbcmp (default)", 0, FF_OPT_TYPE_CONST, FF_MB_DECISION_SIMPLE, INT_MIN, INT_MAX, V|E, "mbd"},
 {"bits", "use fewest bits", 0, FF_OPT_TYPE_CONST, FF_MB_DECISION_BITS, INT_MIN, INT_MAX, V|E, "mbd"},
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c(Revision 15958)
+++ libavcodec/h264.c(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -72,6 +72,9 &lt; at &gt;&lt; at &gt;
 static VLC_TYPE run7_vlc_table[96][2];
 static const int run7_vlc_table_size = 96;
 
+extern int ff_VDPAU_h264_add_data_chunk(H264Context *h, const uint8_t *buf, int buf_size);
+extern int ff_VDPAU_h264_picture_complete(H264Context *h);
+
 static void svq3_luma_dc_dequant_idct_c(DCTELEM *block, int qp);
 static void svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp, int dc);
 static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize);
&lt; at &gt;&lt; at &gt; -101,6 +104,16 &lt; at &gt;&lt; at &gt;
     {0,2,0,2,7,10,7,10}
 };
 
+static const enum PixelFormat pixfmt_vdpau_h264_baseline_420[] = {
+                                           PIX_FMT_VDPAU_H264_BASELINE,
+                                           PIX_FMT_NONE};
+static const enum PixelFormat pixfmt_vdpau_h264_main_420[] = {
+                                           PIX_FMT_VDPAU_H264_MAIN,
+                                           PIX_FMT_NONE};
+static const enum PixelFormat pixfmt_vdpau_h264_high_420[] = {
+                                           PIX_FMT_VDPAU_H264_HIGH,
+                                           PIX_FMT_NONE};
+
 static void fill_caches(H264Context *h, int mb_type, int for_deblock){
     MpegEncContext * const s = &amp;h-&gt;s;
     const int mb_xy= h-&gt;mb_xy;
&lt; at &gt;&lt; at &gt; -2142,10 +2155,8 &lt; at &gt;&lt; at &gt;
     s-&gt;quarter_sample = 1;
     s-&gt;low_delay= 1;
 
-    if(avctx-&gt;codec_id == CODEC_ID_SVQ3)
-        avctx-&gt;pix_fmt= PIX_FMT_YUVJ420P;
-    else
-        avctx-&gt;pix_fmt= PIX_FMT_YUV420P;
+    // Set in decode_postinit() once initial parsing is complete
+    avctx-&gt;pix_fmt = PIX_FMT_NONE;
 
     decode_init_vlc();
 
&lt; at &gt;&lt; at &gt; -2163,6 +2174,35 &lt; at &gt;&lt; at &gt;
     return 0;
 }
 
+static int decode_postinit(H264Context *h, SPS *sps){
+    AVCodecContext * const avctx= h-&gt;s.avctx;
+
+    if (avctx-&gt;pix_fmt != PIX_FMT_NONE){
+        return 0;
+    }
+
+    if (avctx-&gt;vdpau_acceleration) {
+        if(h-&gt;s.chroma_format &gt;= 2) {
+            return -2;
+        }
+        if (sps-&gt;profile_idc == 66) {
+            avctx-&gt;pix_fmt = avctx-&gt;get_format(avctx, pixfmt_vdpau_h264_baseline_420);
+        } else if (sps-&gt;profile_idc == 77) {
+            avctx-&gt;pix_fmt = avctx-&gt;get_format(avctx, pixfmt_vdpau_h264_main_420);
+        } else if (sps-&gt;profile_idc == 100) {
+            avctx-&gt;pix_fmt = avctx-&gt;get_format(avctx, pixfmt_vdpau_h264_high_420);
+        } else {
+            return -2;
+        }
+    } else if (avctx-&gt;codec_id == CODEC_ID_SVQ3) {
+        avctx-&gt;pix_fmt= PIX_FMT_YUVJ420P;
+    } else {
+        avctx-&gt;pix_fmt= PIX_FMT_YUV420P;
+    }
+
+    return 0;
+}
+
 static int frame_start(H264Context *h){
     MpegEncContext * const s = &amp;h-&gt;s;
     int i;
&lt; at &gt;&lt; at &gt; -7125,6 +7165,10 &lt; at &gt;&lt; at &gt;
                ((const char*[]){"Gray","420","422","444"})[sps-&gt;chroma_format_idc]
                );
     }
+
+    if (decode_postinit(h, sps) &lt; 0)
+        return -1;
+
     return 0;
 }
 
&lt; at &gt;&lt; at &gt; -7257,6 +7301,9 &lt; at &gt;&lt; at &gt;
     H264Context *hx;
     int i;
 
+    if(avctx-&gt;vdpau_acceleration) {
+        return;
+    } else
     if(context_count == 1) {
         decode_slice(avctx, &amp;h);
     } else {
&lt; at &gt;&lt; at &gt; -7384,8 +7431,26 &lt; at &gt;&lt; at &gt;
                &amp;&amp; (avctx-&gt;skip_frame &lt; AVDISCARD_NONREF || hx-&gt;nal_ref_idc)
                &amp;&amp; (avctx-&gt;skip_frame &lt; AVDISCARD_BIDIR  || hx-&gt;slice_type_nos!=FF_B_TYPE)
                &amp;&amp; (avctx-&gt;skip_frame &lt; AVDISCARD_NONKEY || hx-&gt;slice_type_nos==FF_I_TYPE)
-               &amp;&amp; avctx-&gt;skip_frame &lt; AVDISCARD_ALL)
+               &amp;&amp; avctx-&gt;skip_frame &lt; AVDISCARD_ALL) {
+#ifdef CONFIG_VDPAU
+                if (avctx-&gt;vdpau_acceleration) {
+                    if(h-&gt;is_avc) {
+                        static const uint8_t start_code[] = {0x00, 0x00, 0x01};
+                        ff_VDPAU_h264_add_data_chunk(h, start_code, sizeof(start_code));
+                        ff_VDPAU_h264_add_data_chunk(h, &amp;buf[buf_index - consumed], consumed );
+                    }
+                    else
+                    {
+                        // +/-3: Add back 00 00 01 to start of data
+                        ff_VDPAU_h264_add_data_chunk(h, &amp;buf[buf_index - consumed - 3], consumed + 3);
+                    }
+                }
+                else
+#endif
+                {
                 context_count++;
+                }
+            }
             break;
         case NAL_DPA:
             init_get_bits(&amp;hx-&gt;s.gb, ptr, bit_length);
&lt; at &gt;&lt; at &gt; -7588,6 +7653,12 &lt; at &gt;&lt; at &gt;
         h-&gt;prev_frame_num_offset= h-&gt;frame_num_offset;
         h-&gt;prev_frame_num= h-&gt;frame_num;
 
+#ifdef CONFIG_VDPAU
+        if (avctx-&gt;vdpau_acceleration) {
+            ff_VDPAU_h264_picture_complete(h);
+        }
+#endif
+
         /*
          * FIXME: Error handling code does not seem to support interlaced
          * when slices span multiple rows
&lt; at &gt;&lt; at &gt; -7600,6 +7671,9 &lt; at &gt;&lt; at &gt;
          * past end by one (callers fault) and resync_mb_y != 0
          * causes problems for the first MB line, too.
          */
+#ifdef CONFIG_VDPAU
+        if (!avctx-&gt;vdpau_acceleration)
+#endif
         if (!FIELD_PICTURE)
             ff_er_frame_end(s);
 
&lt; at &gt;&lt; at &gt; -7973,4 +8047,35 &lt; at &gt;&lt; at &gt;
     .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"),
 };
 
+#ifdef CONFIG_VDPAU
+static av_cold int h264_vdpau_decode_init(AVCodecContext *avctx){
+    if( avctx-&gt;thread_count &gt; 1)
+        return -1;
+    if( !(avctx-&gt;slice_flags &amp; SLICE_FLAG_CODED_ORDER) )
+        return -1;
+    if( !(avctx-&gt;slice_flags &amp; SLICE_FLAG_ALLOW_FIELD) ){
+        dprintf(avctx, "h264.c: VDPAU decoder does not set SLICE_FLAG_ALLOW_FIELD\n");
+    }
+    decode_init(avctx);
+
+    avctx-&gt;vdpau_acceleration = 1;
+
+    return 0;
+}
+
+AVCodec h264_vdpau_decoder = {
+    "h264_vdpau",
+    CODEC_TYPE_VIDEO,
+    CODEC_ID_H264_VDPAU,
+    sizeof(H264Context),
+    h264_vdpau_decode_init,
+    NULL,
+    decode_end,
+    decode_frame,
+    CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
+    .flush= flush_dpb,
+    .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"),
+};
+#endif
+
 #include "svq3.c"
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile(Revision 15958)
+++ libavcodec/Makefile(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -388,6 +388,7 &lt; at &gt;&lt; at &gt;
 OBJS-$(HAVE_W32THREADS)                += w32thread.o
 
 OBJS-$(HAVE_XVMC)                      += xvmcvideo.o
+OBJS-$(CONFIG_VDPAU)                   += vdpauvideo.o
 
 # processor-specific code
 MMX-OBJS-$(CONFIG_CAVS_DECODER)        += i386/cavsdsp_mmx.o
Index: libavcodec/vdpauvideo.c
===================================================================
--- libavcodec/vdpauvideo.c(Revision 0)
+++ libavcodec/vdpauvideo.c(Revision 0)
&lt; at &gt;&lt; at &gt; -0,0 +1,212 &lt; at &gt;&lt; at &gt;
+/*
+ * Video Decode and Presentation API for UNIX (VDPAU) is used for
+ * HW decode acceleration for H.264.
+ *
+ * Copyright (c) 2008 NVIDIA.
+ *
+ * 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
+ */ 
+
+#include "h264.h"
+
+#undef NDEBUG
+#include &lt;assert.h&gt;
+
+#include "vdpau_render.h"
+
+static void VDPAU_ensure_has_buffers(vdpau_render_state_t * render, int need_entries)
+{
+    int new_alloced;
+
+    if (render-&gt;bitstreamBuffersAlloced &gt;= need_entries) {
+        return;
+    }
+
+    if (!render-&gt;bitstreamBuffersAlloced || !render-&gt;bitstreamBuffers) {
+        new_alloced = 4;
+    }
+    else {
+        new_alloced = render-&gt;bitstreamBuffersAlloced * 2;
+    }
+
+    render-&gt;bitstreamBuffers = av_realloc(
+        render-&gt;bitstreamBuffers,
+        new_alloced * sizeof(render-&gt;bitstreamBuffers[0])
+    );
+    render-&gt;bitstreamBuffersAlloced = new_alloced;
+}
+
+static int VDPAU_h264_set_reference_frames(H264Context *h)
+{
+    MpegEncContext * s = &amp;h-&gt;s;
+    vdpau_render_state_t * render, * render_ref;
+    VdpReferenceFrameH264 * rf, * rf2;
+    Picture * pic;
+    int i, list;
+
+    render = (vdpau_render_state_t*)s-&gt;current_picture_ptr-&gt;data[2];
+    assert(render != NULL);
+    assert(render-&gt;magic == MP_VDPAU_RENDER_MAGIC);
+    if ((render == NULL) || (render-&gt;magic != MP_VDPAU_RENDER_MAGIC))
+        return -1; // make sure that this is render packet
+
+    rf = &amp;render-&gt;info.h264.referenceFrames[0];
+#define H264_RF_COUNT FF_ARRAY_ELEMS(render-&gt;info.h264.referenceFrames)
+
+    for (list = 0; list &lt; 2; ++list) {
+        Picture **lp = list ? h-&gt;long_ref : h-&gt;short_ref;
+        int ls = list ? h-&gt;long_ref_count : h-&gt;short_ref_count;
+
+        for (i = 0; i &lt; ls; ++i) {
+            pic = lp[i];
+            if (!pic || !pic-&gt;reference) {
+                continue;
+            }
+
+            render_ref = (vdpau_render_state_t*)pic-&gt;data[2];
+            assert(render_ref != NULL);
+            if (render_ref == NULL)
+                return -1; // make sure that this is render packet
+
+            rf2 = &amp;render-&gt;info.h264.referenceFrames[0];
+            while (rf2 != rf) {
+                if (
+                    (rf2-&gt;surface == render_ref-&gt;surface)
+                    &amp;&amp; (rf2-&gt;is_long_term == pic-&gt;long_ref)
+                    &amp;&amp; (rf2-&gt;frame_idx == pic-&gt;frame_num)
+                ) {
+                    break;
+                }
+                ++rf2;
+            }
+            if (rf2 != rf) {
+                rf2-&gt;top_is_reference    |= (pic-&gt;reference &amp; PICT_TOP_FIELD)    ? VDP_TRUE : VDP_FALSE;
+                rf2-&gt;bottom_is_reference |= (pic-&gt;reference &amp; PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
+                continue;
+            }
+
+            if (rf &gt;= &amp;render-&gt;info.h264.referenceFrames[H264_RF_COUNT]) {
+                continue;
+            }
+
+            rf-&gt;surface             = render_ref-&gt;surface;
+            rf-&gt;is_long_term        = pic-&gt;long_ref;
+            rf-&gt;top_is_reference    = (pic-&gt;reference &amp; PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE;
+            rf-&gt;bottom_is_reference = (pic-&gt;reference &amp; PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
+            rf-&gt;field_order_cnt[0]  = pic-&gt;field_poc[0];
+            rf-&gt;field_order_cnt[1]  = pic-&gt;field_poc[1];
+            rf-&gt;frame_idx           = pic-&gt;frame_num;
+
+            ++rf;
+        }
+    }
+
+    for (; rf &lt; &amp;render-&gt;info.h264.referenceFrames[H264_RF_COUNT]; ++rf) {
+        rf-&gt;surface             = VDP_INVALID_HANDLE;
+        rf-&gt;is_long_term        = 0;
+        rf-&gt;top_is_reference    = 0;
+        rf-&gt;bottom_is_reference = 0;
+        rf-&gt;field_order_cnt[0]  = 0;
+        rf-&gt;field_order_cnt[1]  = 0;
+        rf-&gt;frame_idx           = 0;
+    }
+
+    return 0;
+}
+
+int ff_VDPAU_h264_add_data_chunk(H264Context *h, const uint8_t *buf, int buf_size)
+{
+    MpegEncContext * s = &amp;h-&gt;s;
+    vdpau_render_state_t * render;
+
+    render = (vdpau_render_state_t*)s-&gt;current_picture_ptr-&gt;data[2];
+    assert(render != NULL);
+    assert(render-&gt;magic == MP_VDPAU_RENDER_MAGIC);
+    if ((render == NULL) || (render-&gt;magic != MP_VDPAU_RENDER_MAGIC))
+        return -1; // make sure that this is render packet
+
+    if (!render-&gt;bitstreamBuffersUsed) {
+        VDPAU_h264_set_reference_frames(h);
+    }
+
+    VDPAU_ensure_has_buffers(render, render-&gt;bitstreamBuffersUsed + 1);
+
+    render-&gt;bitstreamBuffers[render-&gt;bitstreamBuffersUsed].struct_version  = VDP_BITSTREAM_BUFFER_VERSION;
+    render-&gt;bitstreamBuffers[render-&gt;bitstreamBuffersUsed].bitstream       = buf;
+    render-&gt;bitstreamBuffers[render-&gt;bitstreamBuffersUsed].bitstream_bytes = buf_size;
+    render-&gt;bitstreamBuffersUsed++;
+
+    return 0;
+}
+
+int ff_VDPAU_h264_picture_complete(H264Context *h)
+{
+    MpegEncContext * s = &amp;h-&gt;s;
+    vdpau_render_state_t * render;
+
+    render = (vdpau_render_state_t*)s-&gt;current_picture_ptr-&gt;data[2];
+    assert(render != NULL);
+    assert(render-&gt;magic == MP_VDPAU_RENDER_MAGIC);
+    if ((render == NULL) || (render-&gt;magic != MP_VDPAU_RENDER_MAGIC))
+        return -1; // make sure that this is render packet
+
+    render-&gt;info.h264.slice_count = h-&gt;slice_num;
+    if (render-&gt;info.h264.slice_count &lt; 1)
+        return 0;
+
+    for (int i = 0; i &lt; 2; ++i) {
+        int foc = s-&gt;current_picture_ptr-&gt;field_poc[i];
+        if (foc == INT_MAX) {
+            foc = 0;
+        }
+        render-&gt;info.h264.field_order_cnt[i] = foc;
+    }
+
+    render-&gt;info.h264.is_reference                           = s-&gt;current_picture_ptr-&gt;reference ? VDP_TRUE : VDP_FALSE;
+    render-&gt;info.h264.frame_num                              = h-&gt;frame_num;
+    render-&gt;info.h264.field_pic_flag                         = (s-&gt;picture_structure != PICT_FRAME) ? 1 : 0;
+    render-&gt;info.h264.bottom_field_flag                      = (s-&gt;picture_structure == PICT_BOTTOM_FIELD) ? 1 : 0;
+    render-&gt;info.h264.num_ref_frames                         = h-&gt;sps.ref_frame_count;
+    render-&gt;info.h264.mb_adaptive_frame_field_flag           = h-&gt;sps.mb_aff;
+    render-&gt;info.h264.constrained_intra_pred_flag            = h-&gt;pps.constrained_intra_pred;
+    render-&gt;info.h264.weighted_pred_flag                     = h-&gt;pps.weighted_pred;
+    render-&gt;info.h264.weighted_bipred_idc                    = h-&gt;pps.weighted_bipred_idc;
+    render-&gt;info.h264.frame_mbs_only_flag                    = h-&gt;sps.frame_mbs_only_flag;
+    render-&gt;info.h264.transform_8x8_mode_flag                = h-&gt;pps.transform_8x8_mode;
+    render-&gt;info.h264.chroma_qp_index_offset                 = h-&gt;pps.chroma_qp_index_offset[0];
+    render-&gt;info.h264.second_chroma_qp_index_offset          = h-&gt;pps.chroma_qp_index_offset[1];
+    render-&gt;info.h264.pic_init_qp_minus26                    = h-&gt;pps.init_qp - 26;
+    render-&gt;info.h264.num_ref_idx_l0_active_minus1           = h-&gt;pps.ref_count[0] - 1;
+    render-&gt;info.h264.num_ref_idx_l1_active_minus1           = h-&gt;pps.ref_count[1] - 1;
+    render-&gt;info.h264.log2_max_frame_num_minus4              = h-&gt;sps.log2_max_frame_num - 4;
+    render-&gt;info.h264.pic_order_cnt_type                     = h-&gt;sps.poc_type;
+    render-&gt;info.h264.log2_max_pic_order_cnt_lsb_minus4      = h-&gt;sps.log2_max_poc_lsb - 4;
+    render-&gt;info.h264.delta_pic_order_always_zero_flag       = h-&gt;sps.delta_pic_order_always_zero_flag;
+    render-&gt;info.h264.direct_8x8_inference_flag              = h-&gt;sps.direct_8x8_inference_flag;
+    render-&gt;info.h264.entropy_coding_mode_flag               = h-&gt;pps.cabac;
+    render-&gt;info.h264.pic_order_present_flag                 = h-&gt;pps.pic_order_present;
+    render-&gt;info.h264.deblocking_filter_control_present_flag = h-&gt;pps.deblocking_filter_parameters_present;
+    render-&gt;info.h264.redundant_pic_cnt_present_flag         = h-&gt;pps.redundant_pic_cnt_present;
+    memcpy(render-&gt;info.h264.scaling_lists_4x4, h-&gt;pps.scaling_matrix4, sizeof(render-&gt;info.h264.scaling_lists_4x4));
+    memcpy(render-&gt;info.h264.scaling_lists_8x8, h-&gt;pps.scaling_matrix8, sizeof(render-&gt;info.h264.scaling_lists_8x8));
+
+    ff_draw_horiz_band(s, 0, s-&gt;avctx-&gt;height);
+    render-&gt;bitstreamBuffersUsed = 0;
+
+    return 0;
+}
+
Index: libavcodec/mpegvideo.c
===================================================================
--- libavcodec/mpegvideo.c(Revision 15958)
+++ libavcodec/mpegvideo.c(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -954,6 +954,9 &lt; at &gt;&lt; at &gt;
         XVMC_field_end(s);
     }else
 #endif
+#ifdef CONFIG_VDPAU
+    if(!s-&gt;avctx-&gt;vdpau_acceleration)
+#endif
     if(s-&gt;unrestricted_mv &amp;&amp; s-&gt;current_picture.reference &amp;&amp; !s-&gt;intra_only &amp;&amp; !(s-&gt;flags&amp;CODEC_FLAG_EMU_EDGE)) {
             s-&gt;dsp.draw_edges(s-&gt;current_picture.data[0], s-&gt;linesize  , s-&gt;h_edge_pos   , s-&gt;v_edge_pos   , EDGE_WIDTH  );
             s-&gt;dsp.draw_edges(s-&gt;current_picture.data[1], s-&gt;uvlinesize, s-&gt;h_edge_pos&gt;&gt;1, s-&gt;v_edge_pos&gt;&gt;1, EDGE_WIDTH/2);
Index: libavcodec/allcodecs.c
===================================================================
--- libavcodec/allcodecs.c(Revision 15958)
+++ libavcodec/allcodecs.c(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -98,6 +98,7 &lt; at &gt;&lt; at &gt;
     REGISTER_DECODER (H263I, h263i);
     REGISTER_ENCODER (H263P, h263p);
     REGISTER_DECODER (H264, h264);
+    REGISTER_DECODER (H264_VDPAU, h264_vdpau);
     REGISTER_ENCDEC  (HUFFYUV, huffyuv);
     REGISTER_DECODER (IDCIN, idcin);
     REGISTER_DECODER (INDEO2, indeo2);
Index: libavcodec/vdpau_render.h
===================================================================
--- libavcodec/vdpau_render.h(Revision 0)
+++ libavcodec/vdpau_render.h(Revision 0)
&lt; at &gt;&lt; at &gt; -0,0 +1,61 &lt; at &gt;&lt; at &gt;
+/*
+ * Video Decode and Presentation API for UNIX (VDPAU) is used for
+ * HW decode acceleration for MPEG-1/2, H.264 and VC-1.
+ *
+ * Copyright (C) 2008 NVIDIA.
+ *
+ * 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
+ */
+
+#ifndef FFMPEG_VDPAU_RENDER_H
+#define FFMPEG_VDPAU_RENDER_H
+
+#include "vdpau/vdpau.h"
+#include "vdpau/vdpau_x11.h"
+
+/**
+ * \brief The videoSurface is used for render.
+ */
+#define MP_VDPAU_STATE_USED_FOR_RENDER 1
+
+/**
+ * \brief The videoSurface is needed for reference/prediction,
+ * codec manipulates this.
+ */
+#define MP_VDPAU_STATE_USED_FOR_REFERENCE 2
+
+#define MP_VDPAU_RENDER_MAGIC 0x1DC8E14B
+
+typedef struct {
+    int  magic;
+
+    VdpVideoSurface surface; //used as rendered surface, never changed.
+
+    int state; // Holds MP_VDPAU_STATE_* values
+
+    union _VdpPictureInfo {
+        VdpPictureInfoMPEG1Or2 mpeg;
+        VdpPictureInfoH264     h264;
+        VdpPictureInfoVC1       vc1;
+    } info;
+
+    int bitstreamBuffersAlloced;
+    int bitstreamBuffersUsed;
+    VdpBitstreamBuffer *bitstreamBuffers;
+} vdpau_render_state_t;
+
+#endif /* FFMPEG_VDPAU_RENDER_H */
Index: libavcodec/avcodec.h
===================================================================
--- libavcodec/avcodec.h(Revision 15958)
+++ libavcodec/avcodec.h(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -191,6 +191,9 &lt; at &gt;&lt; at &gt;
     CODEC_ID_TGV,
     CODEC_ID_TGQ,
 
+    /* "codecs" for HW decoding with VDPAU */
+    CODEC_ID_H264_VDPAU= 0x9000,
+
     /* various PCM "codecs" */
     CODEC_ID_PCM_S16LE= 0x10000,
     CODEC_ID_PCM_S16BE,
&lt; at &gt;&lt; at &gt; -526,6 +529,8 &lt; at &gt;&lt; at &gt;
  * This can be used to prevent truncation of the last audio samples.
  */
 #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
+/* Codec can export data for HW decoding (VDPAU). */
+#define CODEC_CAP_HWACCEL_VDPAU    0x0080
 
 //The following defines may change, don't expect compatibility if you use them.
 #define MB_TYPE_INTRA4x4   0x0001
&lt; at &gt;&lt; at &gt; -2297,6 +2302,13 &lt; at &gt;&lt; at &gt;
      * - decoding: unused.
      */
     float rc_min_vbv_overflow_use;
+
+    /**
+     * VDPAU Acceleration
+     * - encoding: forbidden
+     * - decoding: set by decoder
+     */
+    int vdpau_acceleration;
 } AVCodecContext;
 
 /**
Index: libavcodec/imgconvert.c
===================================================================
--- libavcodec/imgconvert.c(Revision 15958)
+++ libavcodec/imgconvert.c(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -266,6 +266,15 &lt; at &gt;&lt; at &gt;
     [PIX_FMT_XVMC_MPEG2_IDCT] = {
         .name = "xvmcidct",
     },
+    [PIX_FMT_VDPAU_H264_BASELINE] = {
+        .name = "vdpau_h264_baseline",
+    },
+    [PIX_FMT_VDPAU_H264_MAIN] = {
+        .name = "vdpau_h264_main",
+    },
+    [PIX_FMT_VDPAU_H264_HIGH] = {
+        .name = "vdpau_h264_high",
+    },
     [PIX_FMT_UYYVYY411] = {
         .name = "uyyvyy411",
         .nb_channels = 1,
Index: libavutil/avutil.h
===================================================================
--- libavutil/avutil.h(Revision 15958)
+++ libavutil/avutil.h(Arbeitskopie)
&lt; at &gt;&lt; at &gt; -121,6 +121,9 &lt; at &gt;&lt; at &gt;
     PIX_FMT_YUV440P,   ///&lt; Planar YUV 4:4:0 (1 Cr &amp; Cb sample per 1x2 Y samples)
     PIX_FMT_YUVJ440P,  ///&lt; Planar YUV 4:4:0 full scale (jpeg)
     PIX_FMT_YUVA420P,  ///&lt; Planar YUV 4:2:0, 20bpp, (1 Cr &amp; Cb sample per 2x2 Y &amp; A samples)
+    PIX_FMT_VDPAU_H264_BASELINE,///&lt; H264 HW decoding with VDPAU (base profile)
+    PIX_FMT_VDPAU_H264_MAIN,    ///&lt; H264 HW decoding with VDPAU (main profile)
+    PIX_FMT_VDPAU_H264_HIGH,    ///&lt; H264 HW decoding with VDPAU (high profile)
     PIX_FMT_NB,        ///&lt; number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
 };
 
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Carl Eugen Hoyos</dc:creator>
    <dc:date>2008-11-30T21:03:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77816">
    <title>[PATCH] RV40 Decoder - 3/3 - RV30/40 enabling patch</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77816</link>
    <description>After we find the way to perform rv40_luma_mc33, RV40 decoder
can be enabled. RV30 is not as good but we can enable it too
or leave disabled until I perfect it.
Index: Changelog
===================================================================
--- Changelog(revision 15958)
+++ Changelog(working copy)
&lt; at &gt;&lt; at &gt; -140,6 +140,7 &lt; at &gt;&lt; at &gt;
 - liba52 wrapper removed
 - Speex decoding via libspeex
 - Electronic Arts TGQ decoder
+- RV30 and RV40 decoder
 
 version 0.4.9-pre1:
 
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile(revision 15951)
+++ libavcodec/Makefile(working copy)
&lt; at &gt;&lt; at &gt; -177,6 +177,8 &lt; at &gt;&lt; at &gt;
 OBJS-$(CONFIG_RV10_ENCODER)            += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
 OBJS-$(CONFIG_RV20_DECODER)            += rv10.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
 OBJS-$(CONFIG_RV20_ENCODER)            += rv10.o mpegvideo_enc.o motion_est.o ratecontrol.o h263.o mpeg12data.o mpegvideo.o error_resilience.o
+OBJS-$(CONFIG_RV30_DECODER)            += rv30.o rv34.o h264pred.o rv30dsp.o
+OBJS-$(CONFIG_RV40_DECODER)            += rv40.o rv34.o h264pred.o rv40dsp.o
 OBJS-$(CONFIG_SGI_DECODER)             += sgidec.o
 OBJS-$(CONFIG_SGI_ENCODER)             += sgienc.o rle.o
 OBJS-$(CONFIG_SHORTEN_DECODER)         += shorten.o
Index: libavcodec/dsputil.c
===================================================================
--- libavcodec/dsputil.c(revision 15951)
+++ libavcodec/dsputil.c(working copy)
&lt; at &gt;&lt; at &gt; -2743,6 +2743,9 &lt; at &gt;&lt; at &gt;
 /* H264 specific */
 void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
 
+void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
+void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
+
 static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
     int i;
&lt; at &gt;&lt; at &gt; -4411,6 +4414,12 &lt; at &gt;&lt; at &gt;
 #if defined(CONFIG_H264_ENCODER)
     ff_h264dspenc_init(c,avctx);
 #endif
+#if defined(CONFIG_RV30_DECODER)
+    ff_rv30dsp_init(c,avctx);
+#endif
+#if defined(CONFIG_RV40_DECODER)
+    ff_rv40dsp_init(c,avctx);
+#endif
 
     c-&gt;put_mspel_pixels_tab[0]= put_mspel8_mc00_c;
     c-&gt;put_mspel_pixels_tab[1]= put_mspel8_mc10_c;
Index: libavcodec/dsputil.h
===================================================================
--- libavcodec/dsputil.h(revision 15951)
+++ libavcodec/dsputil.h(working copy)
&lt; at &gt;&lt; at &gt; -484,6 +484,15 &lt; at &gt;&lt; at &gt;
      * &lt; at &gt;param shift number of bits to discard from product
      */
     int32_t (*scalarproduct_int16)(int16_t *v1, int16_t *v2/*align 16*/, int len, int shift);
+
+    /* rv30 functions */
+    qpel_mc_func put_rv30_tpel_pixels_tab[4][16];
+    qpel_mc_func avg_rv30_tpel_pixels_tab[4][16];
+    /* rv40 functions */
+    qpel_mc_func put_rv40_qpel_pixels_tab[4][16];
+    qpel_mc_func avg_rv40_qpel_pixels_tab[4][16];
+    h264_chroma_mc_func put_rv40_chroma_pixels_tab[3];
+    h264_chroma_mc_func avg_rv40_chroma_pixels_tab[3];
 } DSPContext;
 
 void dsputil_static_init(void);
Index: libavcodec/allcodecs.c
===================================================================
--- libavcodec/allcodecs.c(revision 15951)
+++ libavcodec/allcodecs.c(working copy)
&lt; at &gt;&lt; at &gt; -142,6 +142,8 &lt; at &gt;&lt; at &gt;
     REGISTER_DECODER (RPZA, rpza);
     REGISTER_ENCDEC  (RV10, rv10);
     REGISTER_ENCDEC  (RV20, rv20);
+    REGISTER_DECODER (RV30, rv30);
+    REGISTER_DECODER (RV40, rv40);
     REGISTER_ENCDEC  (SGI, sgi);
     REGISTER_DECODER (SMACKER, smacker);
     REGISTER_DECODER (SMC, smc);
Index: doc/general.texi
===================================================================
--- doc/general.texi(revision 15951)
+++ doc/general.texi(working copy)
&lt; at &gt;&lt; at &gt; -288,6 +288,9 &lt; at &gt;&lt; at &gt;
     &lt; at &gt;tab fourccs: QPEG, Q1.0, Q1.1
 &lt; at &gt;item RealVideo 1.0          &lt; at &gt;tab  X  &lt; at &gt;tab  X
 &lt; at &gt;item RealVideo 2.0          &lt; at &gt;tab  X  &lt; at &gt;tab  X
+&lt; at &gt;item RealVideo 3.0          &lt; at &gt;tab     &lt; at &gt;tab  X
+    &lt; at &gt;tab not completely working
+&lt; at &gt;item RealVideo 4.0          &lt; at &gt;tab     &lt; at &gt;tab  X
 &lt; at &gt;item Renderware TXD         &lt; at &gt;tab     &lt; at &gt;tab  X
     &lt; at &gt;tab Texture dictionaries used by the Renderware Engine.
 &lt; at &gt;item RTjpeg                 &lt; at &gt;tab     &lt; at &gt;tab  X
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Kostya</dc:creator>
    <dc:date>2008-11-30T12:29:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77813">
    <title>How to access to the MPlayer samples archive</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77813</link>
    <description>Hi all,

I need to download some VP6 sample since I lost the mines. Could
someone tell me (eventually in private) the necessary steps to access
the MPlayer samples archive ?

Thanks, regards.
</description>
    <dc:creator>Stefano Sabatini</dc:creator>
    <dc:date>2008-11-30T12:03:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77808">
    <title>[Patch] Topfield 58XXPVR and 68XXPVR file support</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77808</link>
    <description>Topfield make a variety of personal video recorders that allow for the
transfer of recorded programmes via an onboard USB port. The ".rec"
files they produce are MPEG2 transport streams with a 3760 byte header
containing archive information for the PVR. The attached patch checks
for the presence of "TFrc" in the first four bytes of a file and
identifies it as an mpeg transport stream if present. It subsequently
skips this header when the services are probed. With the patch in
place these files are then fully supported by ffmpeg.

Cheers,
James
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>James Marsh</dc:creator>
    <dc:date>2008-11-30T03:24:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77806">
    <title>[PATCH] Improve documentation and error reportingfor the -passoption</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77806</link>
    <description>Hi, as in subject.

Regards.
</description>
    <dc:creator>Stefano Sabatini</dc:creator>
    <dc:date>2008-11-30T00:44:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77800">
    <title>[PATCH] libavfilter-soc: remove diffs/README</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77800</link>
    <description>Hi,

the file in question is not updated and likely useless, since now the
diff is not anymore splitted.

Decrease the wonder of the occasional user which by chance reads the
file.

Regards.
</description>
    <dc:creator>Stefano Sabatini</dc:creator>
    <dc:date>2008-11-29T20:20:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77798">
    <title>[PATCH] QCELP decoder</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77798</link>
    <description>Hi all,

sorry for the delay. I was waiting to resolve the parsing/decoding of
the bitrate/packet type issue.
Reynaldo and I agreed on IRC to live the parsing/decoding as it is for now.

So here is round 13 of the qcelp decoder.
- QCELPContext was split so that it can be moved into qcelpdec.c and
only keep the unpacked data structure (QCELPFrame) in qcelpdata.h
- add doxy comments on QCELPFrame field
- simplify decode_gain_and_index for RATE_OCTAVE and IFQ
- rename qcelp_bits_per_rate into qcelp_unpacking_bitmaps_lengths
- use double in qcelp_lsp.c

have a great day

Kenan
Index: libavcodec/qcelp.h
===================================================================
--- libavcodec/qcelp.h(revision 0)
+++ libavcodec/qcelp.h(revision 0)
&lt; at &gt;&lt; at &gt; -0,0 +1,48 &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
+ */
+
+#ifndef AVCODEC_QCELP_H
+#define AVCODEC_QCELP_H
+
+/**
+ * &lt; at &gt;file qcelp.h
+ * QCELP decoder
+ * &lt; at &gt;author Reynaldo H. Verdejo Pinochet
+ */
+
+typedef enum
+{
+    I_F_Q = -1,           /*!&lt; insufficient frame quality */
+    SILENCE,
+    RATE_OCTAVE,
+    RATE_QUARTER,
+    RATE_HALF,
+    RATE_FULL
+} qcelp_packet_rate;
+
+/**
+ * Reconstructs LPC coefficients from the line spectral pair frequencies.
+ *
+ * TIA/EIA/IS-733 2.4.3.3.5
+ */
+void qcelp_lspf2lpc(const float *lspf, float *lpc);
+
+#endif /* AVCODEC_QCELP_H */
Index: libavcodec/qcelpdata.h
===================================================================
--- libavcodec/qcelpdata.h(revision 15955)
+++ libavcodec/qcelpdata.h(working copy)
&lt; at &gt;&lt; at &gt; -34,6 +34,37 &lt; at &gt;&lt; at &gt;
 #include "libavutil/common.h"
 
 /**
+ * QCELP unpacked data frame
+ */
+typedef struct {
+/// &lt; at &gt;defgroup qcelp_codebook_parameters QCELP excitation codebook parameters
+/// &lt; at &gt;{
+    uint8_t cbsign[16]; ///!&lt; sign of the codebook gain for each codebook subframe
+    uint8_t cbgain[16]; ///!&lt; unsigned codebook gain for each codebook subframe
+    uint8_t cindex[16]; ///!&lt; codebook index for each codebook subframe
+/// &lt; at &gt;}
+
+/// &lt; at &gt;defgroup qcelp_pitch_parameters QCELP pitch prediction parameters
+/// &lt; at &gt;{
+    uint8_t plag[4];    ///!&lt; pitch lag for each pitch subframe
+    uint8_t pfrac[4];   ///!&lt; fractional pitch lag for each pitch subframe
+    uint8_t pgain[4];   ///!&lt; pitch gain for each pitch subframe
+/// &lt; at &gt;}
+
+    /**
+     * line spectral pair frequencies (LSP) for RATE_OCTAVE,
+     * line spectral pair frequencies grouped into five vectors
+     * of dimension two (LSPV) for other rates
+     */
+    uint8_t lspv[10];
+
+    /**
+     * reserved bits on all bitrate but bitrate 1/2 packets
+     */
+    uint8_t reserved;
+} QCELPFrame;
+
+/**
  * pre-calculated table for hammsinc function
  * Only half of the table is needed because of symmetry.
  *
&lt; at &gt;&lt; at &gt; -47,10 +78,8 &lt; at &gt;&lt; at &gt;
     uint8_t bitlen; /*!&lt; number of bits to read */
 } QCELPBitmap;
 
-#define QCELP_OF(variable, bit, len) {offsetof(QCELPContext, variable), bit, len}
+#define QCELP_OF(variable, bit, len) {offsetof(QCELPFrame, variable), bit, len}
 
-/* Disable the below code for now to allow 'make checkheaders' to pass. */
-#if 0
 /**
  * bitmap unpacking tables for RATE_FULL
  *
&lt; at &gt;&lt; at &gt; -243,14 +272,13 &lt; at &gt;&lt; at &gt;
     qcelp_rate_full_bitmap,
 };
 
-static const uint16_t qcelp_bits_per_rate[5] = {
+static const uint16_t qcelp_unpacking_bitmaps_lengths[5] = {
     0, ///!&lt; for SILENCE rate
     FF_ARRAY_ELEMS(qcelp_rate_octave_bitmap),
     FF_ARRAY_ELEMS(qcelp_rate_quarter_bitmap),
     FF_ARRAY_ELEMS(qcelp_rate_half_bitmap),
     FF_ARRAY_ELEMS(qcelp_rate_full_bitmap),
 };
-#endif
 
 typedef uint16_t qcelp_vector[2];
 
Index: libavcodec/qcelpdec.c
===================================================================
--- libavcodec/qcelpdec.c(revision 15955)
+++ libavcodec/qcelpdec.c(working copy)
&lt; at &gt;&lt; at &gt; -40,6 +40,27 &lt; at &gt;&lt; at &gt;
 #undef NDEBUG
 #include &lt;assert.h&gt;
 
+typedef struct {
+    GetBitContext     gb;
+    qcelp_packet_rate bitrate;
+    QCELPFrame        frame;                  /*!&lt; unpacked data frame */
+    uint8_t           erasure_count;
+    uint8_t           octave_count;           /*!&lt; count the consecutive RATE_OCTAVE frames */
+    float             prev_lspf[10];
+    float             predictor_lspf[10];     /*!&lt; LSP predictor,
+                                                  only use for RATE_OCTAVE and I_F_Q */
+    float             pitch_synthesis_filter_mem[303];
+    float             pitch_pre_filter_mem[303];
+    float             rnd_fir_filter_mem[180];
+    float             formant_mem[170];
+    float             last_codebook_gain;
+    int               prev_g1[2];
+    int               prev_bitrate;
+    float             prev_pitch_gain[4];
+    uint8_t           prev_pitch_lag[4];
+    uint16_t          first16bits;
+} QCELPContext;
+
 static void weighted_vector_sumf(float *out, const float *in_a,
                                  const float *in_b, float weight_coeff_a,
                                  float weight_coeff_b, int length)
&lt; at &gt;&lt; at &gt; -99,8 +120,8 &lt; at &gt;&lt; at &gt;
             for(i=0; i&lt;10; i++)
             {
                 q-&gt;predictor_lspf[i] =
-                             lspf[i] = (q-&gt;lspv[i] ?  QCELP_LSP_SPREAD_FACTOR
-                                                   : -QCELP_LSP_SPREAD_FACTOR)
+                             lspf[i] = (q-&gt;frame.lspv[i] ?  QCELP_LSP_SPREAD_FACTOR
+                                                         : -QCELP_LSP_SPREAD_FACTOR)
                                      + predictors[i] * QCELP_LSP_OCTAVE_PREDICTOR
                                      + (i + 1) * ((1 - QCELP_LSP_OCTAVE_PREDICTOR)/11);
             }
&lt; at &gt;&lt; at &gt; -141,8 +162,8 &lt; at &gt;&lt; at &gt;
         tmp_lspf = 0.;
         for(i=0; i&lt;5 ; i++)
         {
-            lspf[2*i+0] = tmp_lspf += qcelp_lspvq[i][q-&gt;lspv[i]][0] * 0.0001;
-            lspf[2*i+1] = tmp_lspf += qcelp_lspvq[i][q-&gt;lspv[i]][1] * 0.0001;
+            lspf[2*i+0] = tmp_lspf += qcelp_lspvq[i][q-&gt;frame.lspv[i]][0] * 0.0001;
+            lspf[2*i+1] = tmp_lspf += qcelp_lspvq[i][q-&gt;frame.lspv[i]][1] * 0.0001;
         }
 
         // Check for badly received packets.
&lt; at &gt;&lt; at &gt; -166,6 +187,83 &lt; at &gt;&lt; at &gt;
 }
 
 /**
+ * Converts codebook transmission codes to GAIN and INDEX.
+ *
+ * &lt; at &gt;param q the context
+ * &lt; at &gt;param gain array holding the decoded gain
+ *
+ * TIA/EIA/IS-733 2.4.6.2
+ */
+static void decode_gain_and_index(QCELPContext  *q,
+                                  float *gain) {
+    int   i, subframes_count, g1[16];
+    float slope;
+
+    if (q-&gt;bitrate &gt;= RATE_QUARTER) {
+        switch (q-&gt;bitrate) {
+            case RATE_FULL: subframes_count = 16; break;
+            case RATE_HALF: subframes_count = 4;  break;
+            default:        subframes_count = 5;
+        }
+        for (i = 0; i &lt; subframes_count; i++) {
+            g1[i] = 4 * q-&gt;frame.cbgain[i];
+            if (q-&gt;bitrate == RATE_FULL &amp;&amp; !((i+1) &amp; 3)) {
+                g1[i] += av_clip((g1[i-1] + g1[i-2] + g1[i-3]) / 3 - 6, 0, 32);
+            }
+
+            gain[i] = qcelp_g12ga[g1[i]];
+
+            if (q-&gt;frame.cbsign[i]) {
+                gain[i] = -gain[i];
+                q-&gt;frame.cindex[i] = (q-&gt;frame.cindex[i]-89) &amp; 127;
+            }
+        }
+
+        q-&gt;prev_g1[0] = g1[i-2];
+        q-&gt;prev_g1[1] = g1[i-1];
+        q-&gt;last_codebook_gain = qcelp_g12ga[g1[i-1]];
+
+        if (q-&gt;bitrate == RATE_QUARTER) {
+            // Provide smoothing of the unvoiced excitation energy.
+            gain[7] =     gain[4];
+            gain[6] = 0.4*gain[3] + 0.6*gain[4];
+            gain[5] =     gain[3];
+            gain[4] = 0.8*gain[2] + 0.2*gain[3];
+            gain[3] = 0.2*gain[1] + 0.8*gain[2];
+            gain[2] =     gain[1];
+            gain[1] = 0.6*gain[0] + 0.4*gain[1];
+        }
+    } else {
+        if (q-&gt;bitrate == RATE_OCTAVE) {
+            g1[0] = 2 * q-&gt;frame.cbgain[0]
+                  + av_clip((q-&gt;prev_g1[0] + q-&gt;prev_g1[1]) / 2 - 5, 0, 54);
+            subframes_count = 8;
+        } else {
+            assert(q-&gt;bitrate == I_F_Q);
+
+            g1[0] = q-&gt;prev_g1[1];
+            switch (q-&gt;erasure_count) {
+            case 1 : break;
+            case 2 : g1[0] -= 1; break;
+            case 3 : g1[0] -= 2; break;
+            default: g1[0] -= 6;
+            }
+            if (g1[0] &lt; 0)
+                g1[0] = 0;
+            subframes_count = 4;
+        }
+        // This interpolation is done to produce smoother background noise.
+        slope = 0.5*(qcelp_g12ga[g1[0]] - q-&gt;last_codebook_gain) / subframes_count;
+        for (i = 1; i &lt;= subframes_count; i++)
+            gain[i-1] = q-&gt;last_codebook_gain + slope * i;
+        q-&gt;last_codebook_gain = gain[i-2];
+
+        q-&gt;prev_g1[0] = q-&gt;prev_g1[1];
+        q-&gt;prev_g1[1] = g1[0];
+    }
+}
+
+/**
  * If the received packet is Rate 1/4 a further sanity check is made of the
  * codebook gain.
  *
&lt; at &gt;&lt; at &gt; -224,7 +322,7 &lt; at &gt;&lt; at &gt;
             for(i=0; i&lt;16; i++)
             {
                 tmp_gain = gain[i] * QCELP_RATE_FULL_CODEBOOK_RATIO;
-                cindex = -q-&gt;cindex[i];
+                cindex = -q-&gt;frame.cindex[i];
                 for(j=0; j&lt;10; j++)
                     *cdn_vector++ = tmp_gain * qcelp_rate_full_codebook[cindex++ &amp; 127];
             }
&lt; at &gt;&lt; at &gt; -233,17 +331,17 &lt; at &gt;&lt; at &gt;
             for(i=0; i&lt;4; i++)
             {
                 tmp_gain = gain[i] * QCELP_RATE_HALF_CODEBOOK_RATIO;
-                cindex = -q-&gt;cindex[i];
+                cindex = -q-&gt;frame.cindex[i];
                 for (j = 0; j &lt; 40; j++)
                 *cdn_vector++ = tmp_gain * qcelp_rate_half_codebook[cindex++ &amp; 127];
             }
         break;
         case RATE_QUARTER:
-            cbseed = (0x0003 &amp; q-&gt;lspv[4])&lt;&lt;14 |
-                     (0x003F &amp; q-&gt;lspv[3])&lt;&lt; 8 |
-                     (0x0060 &amp; q-&gt;lspv[2])&lt;&lt; 1 |
-                     (0x0007 &amp; q-&gt;lspv[1])&lt;&lt; 3 |
-                     (0x0038 &amp; q-&gt;lspv[0])&gt;&gt; 3 ;
+            cbseed = (0x0003 &amp; q-&gt;frame.lspv[4])&lt;&lt;14 |
+                     (0x003F &amp; q-&gt;frame.lspv[3])&lt;&lt; 8 |
+                     (0x0060 &amp; q-&gt;frame.lspv[2])&lt;&lt; 1 |
+                     (0x0007 &amp; q-&gt;frame.lspv[1])&lt;&lt; 3 |
+                     (0x0038 &amp; q-&gt;frame.lspv[0])&gt;&gt; 3 ;
             rnd = q-&gt;rnd_fir_filter_mem + 20;
             for(i=0; i&lt;8; i++)
             {
&lt; at &gt;&lt; at &gt; -381,6 +479,64 &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;
+    float       gain[4];
+    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++) {
+                gain[i] = q-&gt;frame.plag[i] ? (q-&gt;frame.pgain[i] + 1) * 0.25 : 0.0;
+
+                q-&gt;frame.plag[i] += 16;
+            }
+            memcpy(q-&gt;prev_pitch_lag, q-&gt;frame.plag, sizeof(q-&gt;frame.plag));
+        } else {
+            gain[3] = q-&gt;erasure_count &lt; 3 ? 0.9 - 0.3 * (q-&gt;erasure_count - 1)
+                                           : 0.0;
+            for (i = 0; i &lt; 4; i++)
+                gain[i] = FFMIN(q-&gt;prev_pitch_gain[i], gain[3]);
+
+            memset(q-&gt;frame.pfrac, 0, sizeof(q-&gt;frame.pfrac));
+            memcpy(q-&gt;frame.plag, q-&gt;prev_pitch_lag, sizeof(q-&gt;frame.plag));
+        }
+
+        // pitch synthesis filter
+        v_synthesis_filtered = do_pitchfilter(q-&gt;pitch_synthesis_filter_mem, cdn_vector,
+                                              gain, q-&gt;frame.plag, q-&gt;frame.pfrac);
+
+        // pitch prefilter update
+        for (i = 0; i &lt; 4; i++)
+            gain[i] = 0.5 * FFMIN(gain[i], 1.0);
+
+        v_pre_filtered = do_pitchfilter(q-&gt;pitch_pre_filter_mem, v_synthesis_filtered,
+                                        gain, q-&gt;frame.plag, q-&gt;frame.pfrac);
+
+        apply_gain_ctrl(cdn_vector, v_synthesis_filtered, v_pre_filtered);
+
+        memcpy(q-&gt;prev_pitch_gain, gain, sizeof(q-&gt;prev_pitch_gain));
+
+    } 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;prev_pitch_gain, 0, sizeof(q-&gt;prev_pitch_gain));
+        memset(q-&gt;prev_pitch_lag,  0, sizeof(q-&gt;prev_pitch_lag));
+    }
+}
+
+/**
  * Interpolates LSP frequencies and computes LPC coefficients
  * for a given bitrate &amp; pitch subframe.
  *
&lt; at &gt;&lt; at &gt; -432,6 +588,46 &lt; at &gt;&lt; at &gt;
     return -1;
 }
 
+/*
+ * Determine the bitrate from the frame size and/or the first byte of the frame.
+ *
+ * &lt; at &gt;param avctx the AV codec context
+ * &lt; at &gt;param buf_size length of the buffer
+ * &lt; at &gt;param buf the bufffer
+ *
+ * &lt; at &gt;return the bitrate on success,
+ *         I_F_Q  if the bitrate cannot be satisfactorily determined
+ *
+ * TIA/EIA/IS-733 2.4.8.7.1
+ */
+static int determine_bitrate(AVCodecContext *avctx,
+                               const int buf_size,
+                               uint8_t **buf) {
+    qcelp_packet_rate bitrate;
+
+    if ((bitrate = buf_size2bitrate(buf_size)) &gt;= 0) {
+        if (bitrate &gt; **buf) {
+            av_log(avctx, AV_LOG_WARNING, "Claimed bitrate and buffer size mismatch.\n");
+            bitrate = **buf;
+        } else if (bitrate &lt; **buf) {
+            av_log(avctx, AV_LOG_WARNING, "Buffer is too small for the claimed bitrate.\n");
+            return I_F_Q;
+        }
+        (*buf)++;
+    } else if ((bitrate = buf_size2bitrate(buf_size + 1)) &gt;= 0) {
+        av_log(avctx, AV_LOG_WARNING,
+               "Bitrate byte is missing, guessing the bitrate from packet size.\n");
+    } else
+        return I_F_Q;
+
+    if (bitrate == SILENCE) {
+        // FIXME: the decoder should not handle SILENCE frames as I_F_Q frames
+        av_log_missing_feature(avctx, "Blank frame", 1);
+        bitrate = I_F_Q;
+    }
+    return bitrate;
+}
+
 static void warn_insufficient_frame_quality(AVCodecContext *avctx,
                                             const char *message)
 {
&lt; at &gt;&lt; at &gt; -439,6 +635,107 &lt; at &gt;&lt; at &gt;
            message);
 }
 
+static int qcelp_decode_frame(AVCodecContext *avctx,
+                              void *data,
+                              int *data_size,
+                              uint8_t *buf,
+                              const int buf_size) {
+    QCELPContext      *q = avctx-&gt;priv_data;
+    float             *outbuffer = data;
+    int               i;
+    float             quantized_lspf[10], lpc[10];
+    float             gain[16];
+    float             *formant_mem;
+
+    if ((q-&gt;bitrate = determine_bitrate(avctx, buf_size, &amp;buf)) == I_F_Q) {
+        warn_insufficient_frame_quality(avctx, "bitrate cannot be determined.");
+        goto erasure;
+    }
+
+    if (q-&gt;bitrate == RATE_OCTAVE &amp;&amp;
+       (q-&gt;first16bits = AV_RB16(buf)) == 0xFFFF) {
+        warn_insufficient_frame_quality(avctx, "Bitrate is 1/8 and first 16 bits are on.");
+        goto erasure;
+    }
+
+    if (q-&gt;bitrate &gt; SILENCE) {
+        const QCELPBitmap *bitmaps     = qcelp_unpacking_bitmaps_per_rate[q-&gt;bitrate];
+        const QCELPBitmap *bitmaps_end = qcelp_unpacking_bitmaps_per_rate[q-&gt;bitrate]
+                                       + qcelp_unpacking_bitmaps_lengths[q-&gt;bitrate];
+        uint8_t           *unpacked_data = (uint8_t *)&amp;q-&gt;frame;
+
+        init_get_bits(&amp;q-&gt;gb, buf, 8*buf_size);
+
+        memset(&amp;q-&gt;frame, 0, sizeof(QCELPFrame));
+
+        for (; bitmaps &lt; bitmaps_end; bitmaps++)
+            unpacked_data[bitmaps-&gt;index] |= get_bits(&amp;q-&gt;gb, bitmaps-&gt;bitlen) &lt;&lt; bitmaps-&gt;bitpos;
+
+        // Check for erasures/blanks on rates 1, 1/4 and 1/8.
+        if (q-&gt;frame.reserved) {
+            warn_insufficient_frame_quality(avctx, "Wrong data in reserved frame area.");
+            goto erasure;
+        }
+        if (q-&gt;bitrate == RATE_QUARTER &amp;&amp; codebook_sanity_check_for_rate_quarter(q-&gt;frame.cbgain)) {
+            warn_insufficient_frame_quality(avctx, "Codebook gain sanity check failed.");
+            goto erasure;
+        }
+
+        if (q-&gt;bitrate &gt;= RATE_HALF) {
+            for (i = 0; i &lt; 4; i++) {
+                if (q-&gt;frame.pfrac[i] &amp;&amp; q-&gt;frame.plag[i] &gt;= 124) {
+                    warn_insufficient_frame_quality(avctx, "Cannot initialize pitch filter.");
+                    goto erasure;
+                }
+            }
+        }
+    }
+
+    decode_gain_and_index(q, gain);
+    compute_svector(q, gain, outbuffer);
+
+    if (decode_lspf(q, quantized_lspf) &lt; 0) {
+        warn_insufficient_frame_quality(avctx, "Badly received packets in frame.");
+        goto erasure;
+    }
+
+
+    apply_pitch_filters(q, outbuffer);
+
+    if (q-&gt;bitrate == I_F_Q) {
+erasure:
+        q-&gt;bitrate = I_F_Q;
+        q-&gt;erasure_count++;
+        decode_gain_and_index(q, gain);
+        compute_svector(q, gain, outbuffer);
+        decode_lspf(q, quantized_lspf);
+        apply_pitch_filters(q, outbuffer);
+    } else
+        q-&gt;erasure_count = 0;
+
+    formant_mem = q-&gt;formant_mem + 10;
+    for (i = 0; i &lt; 4; i++) {
+        interpolate_lpc(q, quantized_lspf, lpc, i);
+        ff_celp_lp_synthesis_filterf(formant_mem, lpc, outbuffer + i * 40, 40, 10);
+        formant_mem += 40;
+    }
+    memcpy(q-&gt;formant_mem, q-&gt;formant_mem + 160, 10 * sizeof(float));
+
+    // FIXME: postfilter and final gain control should be here.
+    // TIA/EIA/IS-733 2.4.8.6
+
+    formant_mem = q-&gt;formant_mem + 10;
+    for (i = 0; i &lt; 160; i++)
+        *outbuffer++ = av_clipf(*formant_mem++, QCELP_CLIP_LOWER_BOUND, QCELP_CLIP_UPPER_BOUND);
+
+    memcpy(q-&gt;prev_lspf, quantized_lspf, sizeof(q-&gt;prev_lspf));
+    q-&gt;prev_bitrate = q-&gt;bitrate;
+
+    *data_size = 160 * sizeof(*outbuffer);
+
+    return *data_size;
+}
+
 AVCodec qcelp_decoder =
 {
     .name   = "qcelp",
Index: Changelog
===================================================================
--- Changelog(revision 15955)
+++ Changelog(working copy)
&lt; at &gt;&lt; at &gt; -140,6 +140,7 &lt; at &gt;&lt; at &gt;
 - liba52 wrapper removed
 - Speex decoding via libspeex
 - Electronic Arts TGQ decoder
+- QCELP / PureVoice decoder
 
 version 0.4.9-pre1:
 
Index: libavcodec/Makefile
===================================================================
--- libavcodec/Makefile(revision 15955)
+++ 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 15955)
+++ libavcodec/allcodecs.c(working copy)
&lt; at &gt;&lt; at &gt; -203,6 +203,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 15955)
+++ 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  4
+#define LIBAVCODEC_VERSION_MINOR  5
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
Index: doc/general.texi
===================================================================
--- doc/general.texi(revision 15955)
+++ doc/general.texi(working copy)
&lt; at &gt;&lt; at &gt; -396,6 +396,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 15955)
+++ libavformat/mov.c(working copy)
&lt; at &gt;&lt; at &gt; -988,6 +988,10 &lt; at &gt;&lt; at &gt;
 #endif
     /* no ifdef since parameters are always those */
     case CODEC_ID_QCELP:
+        st-&gt;need_parsing = AVSTREAM_PARSE_FULL;
+        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,99 &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 &lt;math.h&gt;
+#include &lt;string.h&gt;
+
+/**
+ * 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] + 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 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-11-29T18:39:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77789">
    <title>[PATCH] Fix MLP decoder CRC 2D initialization</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77789</link>
    <description> Hi,

 This patch initializes the CRC 2D table for the MLP decoder.
Without it, the decoder is usable only if the MLP parser is initialized.

</description>
    <dc:creator>Laurent Aimar</dc:creator>
    <dc:date>2008-11-29T09:41:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77774">
    <title>[PATCH] Fix compilation on OS/2</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77774</link>
    <description>Hi, compilation on OS/2 currently dies here,

gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. 
-I"/usr/src/FFmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 
-fomit-frame-pointer -march=athlon-tbird -g 
-Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization 
-Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual 
-Wwrite-strings -Wtype-limits -O3 -fno-math-errno -fno-signed-zeros 
    -c -o libavformat/udp.o libavformat/udp.c
libavformat/udp.c: In function 'udp_read':
libavformat/udp.c:459: error: storage size of 'tv' isn't known
libavformat/udp.c:459: warning: unused variable 'tv'
make: *** [libavformat/udp.o] Error 1

Which is fixed by attached patch
Dave
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Dave Yeo</dc:creator>
    <dc:date>2008-11-29T03:41:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77770">
    <title>[PATCH] H.264 predictive lossless: again</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77770</link>
    <description>I'm getting rather annoyed at having to tell people to install payware
(CoreAVC) or recompile their ffmpeg with an unsupported patch in order
to play back output from x264.  So, here's the patch again, with a few
changes to make it a bit more palatable.  In particular,
transform_bypass is now counted as a "complex" block in order to
eliminate the speed impact of the changes on ordinary decoding of
non-lossless material.

Patch attached.  Another test vector can be found here
http://mirror05.x264.nl/Dark/force.php?file=./saextra_predictive_lossless.h264

Dark Shikari
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Jason Garrett-Glaser</dc:creator>
    <dc:date>2008-11-29T00:04:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77769">
    <title>[PATCH] use check_lib2 for bzip2 check in configure</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77769</link>
    <description>Hello,

bzip2 exports symbols as WINAPI in win32, so it must be checked with
check_lib2 instead of check_lib in our configure.

Patch attached (and then another commit to align the line above it).

Ramiro Polla
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel&lt; at &gt;mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</description>
    <dc:creator>Ramiro Polla</dc:creator>
    <dc:date>2008-11-28T23:36:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77758">
    <title>[RFC] H.264/SQV3 separation: h264data.h</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77758</link>
    <description>Next up on the list is moving the tables in h264data.h to a .c file that
can be compiled and shared by the H.264 and SVQ3 decoder.  This requires
adding an ff_ prefix to the names of the tables, removing the static
keyword and then moving h264data.h to h264data.c while replacing the
contents of h264data.h with appropriate extern declarations.

I have done this in my local tree, but the patch is 174kB big (and
terribly boring), so I'm not sending it here.  OK to proceed (in
several steps)?  Will this need to be benchmarked at some point?

Diego
</description>
    <dc:creator>Diego Biurrun</dc:creator>
    <dc:date>2008-11-28T16:48:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77752">
    <title>patch for correctly tagging mp3 audio track in mpeg4container</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77752</link>
    <description>Hi,

Flash player can play MPEG4 videos with H.264 video track and either MP3 or AAC audio track.
For that AAC audio track must be tagged as "mp4a", and MP3 audio track must be tagged as ".mp3"
(see [1], [2]).  However, ffmpeg always seems to tag MP3s within MPEG4 as "mp4a".

The attached patch for libavformat/movenc.c makes ffmpeg tag MP3 audio track in MPEG4 as ".mp3",
not "mp4a".

[1] http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html
[2] http://osflash.org/flv

</description>
    <dc:creator>Sergei Vavinov</dc:creator>
    <dc:date>2008-11-28T15:30:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77704">
    <title>Is it a bug or not done yet?</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77704</link>
    <description>Ffmpeg behaviour depends on arguments order.

I can suggest processing arguments in definite order, taking into account dependencies between them. In some time I'll supply a patch.

Here are some examples:

When I place -ss after -i, it works much longer.

This:

ffmpeg -i file.avi -ss 01:10:00 -f mjpeg -vformats 1 result.jpg

takes significant time (with any video i tried), when

ffmpeg -ss 01:10:00 -i file.avi -f mjpeg -vformats 1 result.jpg

works instantly.

Variable start_time in the case when -ss follows -i is used in void opt_input_file with value 0, though, should be used with the value provided after -ss.

When we change the order of -i and -f, we face the following difficulties:

This:
./ffmpeg -i video.avi -f mjpeg -ss 00:00:01 -vframes 1 result.jpg
works fine, 
while 
$ ./ffmpeg -f mjpeg -i video.avi -ss 00:00:01 -vframes 1 result.jpg
FFmpeg version SVN-r15943, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: 
  libavutil     49.12. 0 / 49.12. 0
  libavcodec    52. 3. 0 / 52. 3. 0
  libavformat   52.23. 1 / 52.23. 1
  libavdevice   52. 1. 0 / 52. 1. 0
  built on Nov 27 2008 17:32:07, gcc: 4.3.2
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c8)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (39799x62446)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (58652x11297)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c8)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (13119x51334)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (21778)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 239
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (36979x55443)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (30383x36891)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 175
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (56530x26753)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (38762)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (24472x54042)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c8)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 31
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 185
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (23048)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (13764x41997)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (33586x45074)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (24434x34071)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 41
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 139
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (64383)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (43034)
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (56072)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 16
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (39769)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (22423x48155)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (48326x42418)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 140
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 202
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c9)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 145
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (57111x31618)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c8)
[mjpeg &lt; at &gt; 0x8cf8440]huffman table decode error
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (62870x28359)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (34255)
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 192
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (22205x37922)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cb)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ce)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (18732x58316)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]picture size invalid (50520x38174)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]dqt: 16bit precision
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c5)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c7)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cd)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (cf)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c1)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]decode_sos: invalid len (10348)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c8)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (ca)
[mjpeg &lt; at &gt; 0x8cf8440]mjpeg: unsupported coding type (c6)
[mjpeg &lt; at &gt; 0x8cf8440]only 8 bits/component accepted
[mjpeg &lt; at &gt; 0x8cf8440]invalid id 203
Input #0, mjpeg, from 'video.avi':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: mjpeg, 25.00 tb(r)
picture size invalid (0x0)
Cannot allocate temp picture, check pix fmt
</description>
    <dc:creator>Vlasov Andrey</dc:creator>
    <dc:date>2008-11-27T14:47:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77700">
    <title>[PATCH] raw audio read block size align</title>
    <link>http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/77700</link>
    <description>Hi!

Originally similar patch was introduced in:

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-October/055484.html
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-November/055683.html

and recently mentioned on looking for solution on recovering truncated 
PCM packet.

Newer version of patch attached.

It fix "6 channel raw audio input" issue, but cause regression test fail 
for some files.

Some notes about *a-g726.wav* regression test DID NOT pass:

We perform test transcode by next command:

ffmpeg -ab 128k -ac 2 -f s16le -i 
/usr/local/src/ffmpeg-r15943/tests/asynth1.sw -ab 32k -ac 1 -ar 8000 
-acodec g726 -y g726.wav

Without patch resulting file has size *24279* bytes. After applying 
patch it size become *24082* bytes.

If we just (without applying patch) modify libavformat/raw.c:
[...]
-#define RAW_PACKET_SIZE 1024
+#define RAW_PACKET_SIZE 4096
[...]
g726.wav will have *24082* bytes length

If we just (without applying patch) modify libavformat/raw.c:
[...]
-#define RAW_PACKET_SIZE 1024
+#define RAW_PACKET_SIZE 512
[...]
g726.wav will have *24858* bytes length

My conclusion: regression test do/did not pass for g726 after applying 
this patch or patch from original thread, because of buffer/packet 
length/size dependencies in g726.c

Other files that did not passed regression test also depends (IMHO) on 
*RAW_PACKET_SIZE* from libavformat/raw.c. Here results:

-rw-r--r-- 1 root root   24279 2008-11-27 13:37 a-g726.wav.1024
-rw-r--r-- 1 root root   24279 2008-11-27 13:39 a-g726.wav.2048
-rw-r--r-- 1 root root   24082 2008-11-27 13:47 a-g726.wav.4096
-rw-r--r-- 1 root root   24858 2008-11-27 13:38 a-g726.wav.512

-rw-r--r-- 1 root root 1066168 2008-11-27 13:37 a-pcm_s16be.mkv.1024
-rw-r--r-- 1 root root 1062549 2008-11-27 13:39 a-pcm_s16be.mkv.2048
-rw-r--r-- 1 root root 1060743 2008-11-27 13:47 a-pcm_s16be.mkv.4096
-rw-r--r-- 1 root root 1073405 2008-11-27 13:38 a-pcm_s16be.mkv.512

-rw-r--r-- 1 root root 1063137 2008-11-27 13:37 a-pcm_s16be.mov.1024
-rw-r--r-- 1 root root 1061069 2008-11-27 13:39 a-pcm_s16be.mov.2048
-rw-r--r-- 1 root root 1060037 2008-11-27 13:47 a-pcm_s16be.mov.4096
-rw-r--r-- 1 root root 1067273 2008-11-27 13:38 a-pcm_s16be.mov.512

-rw-r--r-- 1 root root 1066168 2008-11-27 13:37 a-pcm_s16le.mkv.1024
-rw-r--r-- 1 root root 1062549 2008-11-27 13:39 a-pcm_s16le.mkv.2048
-rw-r--r-- 1 root root 1060743 2008-11-27 13:47 a-pcm_s16le.mkv.4096
-rw-r--r-- 1 root root 1073405 2008-11-27 13:38 a-pcm_s16le.mkv.512

-rw-r--r-- 1 root root 1592337 2008-11-27 13:37 a-pcm_s24be.mov.1024
-rw-r--r-- 1 root root 1590269 2008-11-27 13:39 a-pcm_s24be.mov.2048
-rw-r--r-- 1 root root 1589237 2008-11-27 13:47 a-pcm_s24be.mov.4096
-rw-r--r-- 1 root root 1596473 2008-11-27 13:38 a-pcm_s24be.mov.512

-rw-r--r-- 1 root root 2121537 2008-11-27 13:37 a-pcm_s32be.mov.1024
-rw-r--r-- 1 root root 2119469 2008-11-27 13:39 a-pcm_s32be.mov.2048
-rw-r--r-- 1 root root 2118437 2008-11-27 13:47 a-pcm_s32be.mov.4096
-rw-r--r-- 1 root root 2125673 2008-11-27 13:38 a-pcm_s32be.mov.512

-rw-r--r-- 1 root root  533937 2008-11-27 13:37 a-pcm_s8.mov.1024
-rw-r--r-- 1 root root  531869 2008-11-27 13:39 a-pcm_s8.mov.2048
-rw-r--r-- 1 root root  530837 2008-11-27 13:47 a-pcm_s8.mov.4096
-rw-r--r-- 1 root root  538073 2008-11-27 13:38 a-pcm_s8.mov.512

So, the problem (IMHO) not in patch, i think it just discover other 
problems....

Any suggestion about patch?

</description>
    <dc:creator>Maksym Veremeyenko</dc:creator>
    <dc:date>2008-11-27T13:05:21</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>
