[FFmpeg-soc] [soc]AMR-WB decoder branch, master, updated.

Marcelo Póvoa marspeoplester at gmail.com
Fri Jun 18 17:18:00 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "AMR-WB decoder".

The branch, master has been updated
       via  16c2032735c2e55fb9fa7e05cb07ca9d6e0328a1 (commit)
       via  0079e92838741498d8da7d84368a46e76461f4e7 (commit)
       via  f315877d0421432edb36cd79672a7a00906e5db9 (commit)
       via  497360e375aa2d986a8007bdd736610b2916c506 (commit)
       via  9efe75861d952664834aea52ef9dcd6e89dc7f71 (commit)
       via  8f724c921dfe0a4caab03f1b791827c957dd6dde (commit)
       via  d4f413cb78eee1bcf7754bc1be08ddddbb8edb42 (commit)
       via  723ee2b5cd06425cb75858e8b94dc7864df0f68f (commit)
       via  bb34c669ac1ac5d25c3977fcbb927de9b89d9bb0 (commit)
       via  75c639fd9c5c7ad8d93fd5dae8c3897d8172166c (commit)
       via  5b63633df73dda53fa5eb792455ce77bfc372095 (commit)
       via  7b5420ce5e1738bc394e89d8eb065f71d46f40dc (commit)
       via  00f78043ab906b85ab4d3d6db8ae300e0d8cca94 (commit)
       via  47389eb404ad0afd575c08c6157e391e6714cd6a (commit)
       via  0594cfcdc79925e58337a96174df11cca93acf35 (commit)
       via  2fb30a18d3e917303c42c6cd2aa030b63a61a293 (commit)
       via  29d187222e77617a93b46780c50c7f318324e3f1 (commit)
       via  29a4c928408ea9ec5698d688b68eb0422549a66b (commit)
       via  40b6319e9a2cfbdd687f2454dc99a57a4c08945d (commit)
       via  641ec5edf539ddd0b640b14405958063227bb170 (commit)
       via  9cd115509f3a2ef1b757a60465e7c80737f7574c (commit)
       via  60e5cc31c7a2e62480b361ccc43e1b0ea6dc964a (commit)
       via  d949c53484dc1fc9eed2db96ebc3f26908e10f4a (commit)
       via  11711871ef5ae74a4cc4ed315353fd51fd845640 (commit)
       via  7aa57da06029047432509f9a5ef097e917ed0e38 (commit)
       via  ec32fcae405ccb32067124beb748a1fd422c2bb6 (commit)
       via  574ec8caf8233a77b91e73876b400844693aa92d (commit)
       via  3eb776965cd0dc69de0ca7cc2d2f4617a8d76866 (commit)
       via  55da8ddcb4a95b2400770f2269a4b67e25962828 (commit)
       via  591f4c038c71198f35b970bdbcfeb44b9d3784ba (commit)
       via  b5bfc9b798d22b36cb1e0234f7f4dfd37c8fbec8 (commit)
       via  c3a5b00cbb5403bd00fbd44587bf4d53b0af841f (commit)
       via  1274d19ce7c9639df80c6fcfa1738faef5e7124b (commit)
       via  7a221e4fa1c82868bd74b2ab221e275dbe6634df (commit)
       via  e53c45906db346f19d5f56590456c6a90d0ce2c5 (commit)
       via  ae502da148224da37436102cab13db356ad7f9d1 (commit)
       via  8a3f077cd909dbc54d7b344de9db955fdb6baf77 (commit)
       via  7ab1972d3218be24090783e44c1ec3f60e7b9be8 (commit)
       via  db8d20dfc31cf18221a15e949da3f281636fb0f5 (commit)
       via  b8a84f11e7d8b4582e0cdd19eb90ab49fdb6423b (commit)
       via  5942bd0c30876df657df9d95d230c83700103b3a (commit)
       via  583923e104c7f51e4dd2a4b0509fbf240ea7b891 (commit)
       via  13856d5d6c1f66c3370190d061cb32d326830939 (commit)
       via  08c0efd4b31a2f76fd68d54c7cbe12106e6410b5 (commit)
       via  4079f1d24a77f68cad34092a7cde2d31fd5eac49 (commit)
       via  7f00882d58388a07e2ddbaa7e082baf74fc892a0 (commit)
       via  c4c747d25026f701f2876a948a997f638f0ec6ea (commit)
       via  a0d6062bfd62dce15776caa88ee23df72e6ceb4f (commit)
      from  9b41a124e681ac5c18a84d933aaf890dd25d27a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 16c2032735c2e55fb9fa7e05cb07ca9d6e0328a1
Author: Marcelo Povoa <marspeoplester at gmail.com>
Date:   Fri Jun 18 12:15:49 2010 -0300

    Generate LP coefficients for subframes

diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index b2682ed..d2a264f 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -21,6 +21,7 @@
 
 #include "avcodec.h"
 #include "get_bits.h"
+#include "lsp.h"
 
 #include "amrwbdata.h"
 
@@ -35,6 +36,8 @@ typedef struct {
     float               isf_q_past[LP_ORDER];       ///< quantized ISF vector of the previous frame
     double              isp[4][LP_ORDER];           ///< ISP vectors from current frame
     double              isp_sub4_past[LP_ORDER];    ///< ISP vector for the 4th subframe of the previous frame
+    
+    float               lp_coef[4][LP_ORDER];          ///< Linear Prediction Coefficients from ISP vector
 
 } AMRWBContext;
 
@@ -250,6 +253,38 @@ static void interpolate_isp(double isp_q[4][LP_ORDER], double *isp4_past)
         isp_q[2][i] = 0.04 * isp4_past[i] + 0.96 * isp_q[3][i];
 }
 
+/**
+ * Convert a ISP vector to LP coefficient domain {a_k}
+ * Equations from TS 26.190 section 5.2.4
+ *
+ * @param isp                 [in] ISP vector for a subframe
+ * @param lp                  [out] LP coefficients
+ * @param lp_half_order       [in] Half the number of LPs to construct
+ */
+static void isp2lp(double isp[LP_ORDER], float *lp, int lp_half_order) {
+    double pa[MAX_LP_HALF_ORDER+1], qa[MAX_LP_HALF_ORDER+1];
+    float *lp2 = lp + (lp_half_order << 1);
+    double last_isp = isp[2 * lp_half_order - 1];
+    double qa_old = 0; /* qa[i-2] assuming qa[-1] = 0, not mentioned in document */ 
+    int i;
+    
+    ff_lsp2polyf(isp,     pa, lp_half_order);
+    ff_lsp2polyf(isp + 1, qa, lp_half_order);
+    
+    for (i=1; i<lp_half_order; i++) {
+        double paf = (1 + last_isp) * pa[i];
+        double qaf = (1 - last_isp) * (qa[i] - qa_old);
+        
+        qa_old = qa[i-1];
+        
+        lp[i]  = 0.5 * (paf + qaf);
+        lp2[i] = 0.5 * (paf - qaf);
+    }
+    
+    lp2[0] = 0.5 * (1 + last_isp) * pa[lp_half_order] * lp_half_order;
+    lp2[lp_half_order] = last_isp;
+}
+
 static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
                               AVPacket *avpkt)
 {
@@ -257,6 +292,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     AMRWBFrame   *cf   = &ctx->frame;  
     const uint8_t *buf = avpkt->data;
     int buf_size       = avpkt->size;
+    int i;
     
     ctx->fr_cur_mode = unpack_bitstream(ctx, buf, buf_size);
     
@@ -283,6 +319,9 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     /* Generate a ISP vector for each subframe */
     interpolate_isp(ctx->isp, ctx->isp_sub4_past);
     
+    for (i=0; i<4; i++)
+        isp2lp(ctx->isp[i], ctx->lp_coef[i], LP_ORDER/2);
+    
     //update state for next frame
     memcpy(ctx->isp_sub4_past, ctx->isp[3], LP_ORDER * sizeof(ctx->isp[3][0])); 
     

commit 0079e92838741498d8da7d84368a46e76461f4e7
Merge: 75c639f f315877
Author: Marcelo Povoa <marspeoplester at gmail.com>
Date:   Fri Jun 18 10:42:23 2010 -0300

    Merge branch 'master' of git://git.ffmpeg.org/ffmpeg


commit f315877d0421432edb36cd79672a7a00906e5db9
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Fri Jun 18 12:02:51 2010 +0000

    RTMP: Return from rtmp_read as soon as some data is available
    
    Earlier, the function only returned when the enough data to fill the
    requested buffer was available. This lead to high latency when receiving
    low-bandwidth streams.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23642 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 1f57232..f76cf0f 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -915,6 +915,7 @@ static int rtmp_read(URLContext *s, uint8_t *buf, int size)
             buf  += data_left;
             size -= data_left;
             rt->flv_off = rt->flv_size;
+            return data_left;
         }
         if ((ret = get_packet(s, 0)) < 0)
            return ret;

commit 497360e375aa2d986a8007bdd736610b2916c506
Author: cehoyos <cehoyos at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Fri Jun 18 07:54:45 2010 +0000

    Add IEC958 data_types for Atrac* and WMA Pro.
    Data-burst is described in IEC 61937-7 (Atrac) and IEC 61937-8 (WMA Pro).
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23641 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/spdif.c b/libavformat/spdif.c
index 1c53f73..cb2756f 100644
--- a/libavformat/spdif.c
+++ b/libavformat/spdif.c
@@ -61,6 +61,10 @@ enum IEC958DataType {
     IEC958_DTS1               = 0x0B,          ///< DTS type I   (512 samples)
     IEC958_DTS2               = 0x0C,          ///< DTS type II  (1024 samples)
     IEC958_DTS3               = 0x0D,          ///< DTS type III (2048 samples)
+    IEC958_ATRAC              = 0x0E,          ///< Atrac data
+    IEC958_ATRAC3             = 0x0F,          ///< Atrac 3 data
+    IEC958_ATRACX             = 0x10,          ///< Atrac 3 plus data
+    IEC958_WMAPRO             = 0x12,          ///< WMA 9 Professional data
     IEC958_MPEG2_AAC_LSF_2048 = 0x13,          ///< MPEG-2 AAC ADTS half-rate low sampling frequency
     IEC958_MPEG2_AAC_LSF_4096 = 0x13 | 0x20,   ///< MPEG-2 AAC ADTS quarter-rate low sampling frequency
 };

commit 9efe75861d952664834aea52ef9dcd6e89dc7f71
Author: cehoyos <cehoyos at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Thu Jun 17 22:33:42 2010 +0000

    Use enum PixelFormat to silence one icc warning:
    
    warning #188: enumerated type mixed with another type
          enum PixelFormat pix_fmts[] = { c->pix_fmt, PIX_FMT_NONE };
                                          ^
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23640 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index 17e56ee..98f2e37 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -26,7 +26,8 @@ typedef struct {
     int64_t           pts;
     AVFrame           frame;
     int               has_frame;
-    int               h, w, pix_fmt;
+    int               h, w;
+    enum PixelFormat  pix_fmt;
     AVRational        pixel_aspect;
 } BufferSourceContext;
 

commit 8f724c921dfe0a4caab03f1b791827c957dd6dde
Author: maxim <maxim at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Thu Jun 17 10:59:49 2010 +0000

    Add metadata support. Patch by Michael Karcher.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23639 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/Makefile b/libavformat/Makefile
index 4b8103f..156cd14 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -158,7 +158,7 @@ OBJS-$(CONFIG_OGG_DEMUXER)               += oggdec.o         \
                                             vorbiscomment.o
 OBJS-$(CONFIG_OGG_MUXER)                 += oggenc.o \
                                             vorbiscomment.o
-OBJS-$(CONFIG_OMA_DEMUXER)               += oma.o raw.o
+OBJS-$(CONFIG_OMA_DEMUXER)               += oma.o raw.o id3v2.o
 OBJS-$(CONFIG_PCM_ALAW_DEMUXER)          += raw.o
 OBJS-$(CONFIG_PCM_ALAW_MUXER)            += raw.o
 OBJS-$(CONFIG_PCM_F32BE_DEMUXER)         += raw.o
diff --git a/libavformat/oma.c b/libavformat/oma.c
index c12365e..a47fde0 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -27,7 +27,8 @@
  *
  * Known file extensions: ".oma", "aa3"
  * The format of such files consists of three parts:
- * - "ea3" header carrying overall info and metadata.
+ * - "ea3" header carrying overall info and metadata. Except for starting with
+ *   "ea" instead of "ID", it's an ID3v2 header.
  * - "EA3" header is a Sony-specific header containing information about
  *   the OpenMG file: codec type (usually ATRAC, can also be MP3 or WMA),
  *   codec specific info (packet size, sample rate, channels and so on)
@@ -46,6 +47,7 @@
 #include "libavutil/intreadwrite.h"
 #include "raw.h"
 #include "riff.h"
+#include "id3v2.h"
 
 #define EA3_HEADER_SIZE 96
 
@@ -63,36 +65,21 @@ static const AVCodecTag codec_oma_tags[] = {
     { CODEC_ID_MP3,     OMA_CODECID_MP3 },
 };
 
+#define ID3v2_EA3_MAGIC "ea3"
+
 static int oma_read_header(AVFormatContext *s,
                            AVFormatParameters *ap)
 {
     static const uint16_t srate_tab[6] = {320,441,480,882,960,0};
-    int     ret, ea3_taglen, EA3_pos, framesize, jsflag, samplerate;
+    int     ret, framesize, jsflag, samplerate;
     uint32_t codec_params;
     int16_t eid;
     uint8_t buf[EA3_HEADER_SIZE];
     uint8_t *edata;
     AVStream *st;
 
-    ret = get_buffer(s->pb, buf, 10);
-    if (ret != 10)
-        return -1;
-
-    if(!memcmp(buf, "ea3", 3)) {
-        ea3_taglen = ((buf[6] & 0x7f) << 21) | ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f);
-
-        EA3_pos = ea3_taglen + 10;
-        if (buf[5] & 0x10)
-            EA3_pos += 10;
-
-        url_fseek(s->pb, EA3_pos, SEEK_SET);
-        ret = get_buffer(s->pb, buf, EA3_HEADER_SIZE);
-        if (ret != EA3_HEADER_SIZE)
-            return -1;
-    } else {
-        ret = get_buffer(s->pb, buf + 10, EA3_HEADER_SIZE - 10);
-        EA3_pos = 0;
-    }
+    ff_id3v2_read(s, ID3v2_EA3_MAGIC);
+    ret = get_buffer(s->pb, buf, EA3_HEADER_SIZE);
 
     if (memcmp(buf, ((const uint8_t[]){'E', 'A', '3'}),3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
         av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n");
@@ -163,7 +150,6 @@ static int oma_read_header(AVFormatContext *s,
     }
 
     st->codec->block_align = framesize;
-    url_fseek(s->pb, EA3_pos + EA3_HEADER_SIZE, SEEK_SET);
 
     return 0;
 }
@@ -182,9 +168,21 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
 
 static int oma_read_probe(AVProbeData *p)
 {
-    if (!memcmp(p->buf, ((const uint8_t[]){'e', 'a', '3', 3, 0}), 5) ||
-        (!memcmp(p->buf, "EA3", 3) &&
-         !p->buf[4] && p->buf[5] == EA3_HEADER_SIZE))
+    const uint8_t *buf;
+    unsigned tag_len = 0;
+
+    buf = p->buf;
+    /* version must be 3 and flags byte zero */
+    if (ff_id3v2_match(buf, ID3v2_EA3_MAGIC) && buf[3] == 3 && !buf[4])
+        tag_len = ff_id3v2_tag_len(buf);
+
+    // This check cannot overflow as tag_len has at most 28 bits
+    if (p->buf_size < tag_len + 5)
+        return 0;
+
+    buf += tag_len;
+
+    if (!memcmp(buf, "EA3", 3) && !buf[4] && buf[5] == EA3_HEADER_SIZE)
         return AVPROBE_SCORE_MAX;
     else
         return 0;
@@ -203,5 +201,6 @@ AVInputFormat oma_demuxer = {
     .flags= AVFMT_GENERIC_INDEX,
     .extensions = "oma,aa3",
     .codec_tag= (const AVCodecTag* const []){codec_oma_tags, 0},
+    .metadata_conv = ff_id3v2_metadata_conv,
 };
 

commit d4f413cb78eee1bcf7754bc1be08ddddbb8edb42
Author: lucabe <lucabe at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Thu Jun 17 10:30:52 2010 +0000

    Simplify (no need to check for st->codec->extradata) and correct
    (extradata_size must be at least 5 bytes) the H.264 MP4 syntax check
    in rtpenc.c
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23638 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 5abd490..3a541dd 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -133,8 +133,7 @@ static int rtp_write_header(AVFormatContext *s1)
         break;
     case CODEC_ID_H264:
         /* check for H.264 MP4 syntax */
-        if (st->codec->extradata_size > 0 && st->codec->extradata &&
-            st->codec->extradata[0] == 1) {
+        if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
             s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
         }
         break;

commit 723ee2b5cd06425cb75858e8b94dc7864df0f68f
Author: michael <michael at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Thu Jun 17 10:13:11 2010 +0000

    add #include so make checkheaders passes
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23637 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavfilter/vsrc_buffer.h b/libavfilter/vsrc_buffer.h
index 071403c..fa20443 100644
--- a/libavfilter/vsrc_buffer.h
+++ b/libavfilter/vsrc_buffer.h
@@ -19,6 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "avfilter.h"
+
 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame,
                              int64_t pts, AVRational pixel_aspect);
 

commit bb34c669ac1ac5d25c3977fcbb927de9b89d9bb0
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Thu Jun 17 09:39:42 2010 +0000

    Add the necessary includes, add an extra empty line for cosmetics
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23636 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/http.h b/libavformat/http.h
index 5cd1629..fe5539a 100644
--- a/libavformat/http.h
+++ b/libavformat/http.h
@@ -18,9 +18,12 @@
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
 #ifndef AVFORMAT_HTTP_H
 #define AVFORMAT_HTTP_H
 
+#include "avio.h"
+
 /**
  * Sets custom HTTP headers.
  * A trailing CRLF ("\r\n") is required for custom headers.

commit 75c639fd9c5c7ad8d93fd5dae8c3897d8172166c
Merge: 9b41a12 5b63633
Author: Marcelo Póvoa <marspeople at MacBook61.local>
Date:   Wed Jun 16 21:48:41 2010 -0300

    Merge branch 'master' of git://git.ffmpeg.org/ffmpeg


commit 5b63633df73dda53fa5eb792455ce77bfc372095
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 22:36:52 2010 +0000

    Add more tests to eval, help detecting some of the more apparent
    errors, far from being a complete test system.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23635 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 065625c..6e03498 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -532,6 +532,44 @@ int main(void)
 {
     int i;
     double d;
+    const char **expr, *exprs[] = {
+        "",
+        "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
+        "80G/80Gi"
+        "1k",
+        "1Gi",
+        "1gi",
+        "1GiFoo",
+        "1k+1k",
+        "1Gi*3foo",
+        "foo",
+        "foo(",
+        "foo()",
+        "foo)",
+        "sin",
+        "sin(",
+        "sin()",
+        "sin)",
+        "sin 10",
+        "sin(1,2,3)",
+        "sin(1 )",
+        "1",
+        "1foo",
+        "bar + PI + E + 100f*2 + foo",
+        "13k + 12f - foo(1, 2)",
+        "1gi",
+        "1Gi",
+        NULL
+    };
+
+    for (expr = exprs; *expr; expr++) {
+        printf("Evaluating '%s'\n", *expr);
+        av_parse_and_eval_expr(&d, *expr,
+                               const_names, const_values,
+                               NULL, NULL, NULL, NULL, NULL, 0, NULL);
+        printf("'%s' -> %f\n\n", *expr, d);
+    }
+
     av_parse_and_eval_expr(&d, "1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
                            const_names, const_values,
                            NULL, NULL, NULL, NULL, NULL, 0, NULL);

commit 7b5420ce5e1738bc394e89d8eb065f71d46f40dc
Author: michael <michael at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 19:31:05 2010 +0000

    Marking what should be removed in relation to MAX_STREAMS.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23634 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 57a6bce..520750b 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -569,8 +569,6 @@ typedef struct AVChapter {
 
 #if LIBAVFORMAT_VERSION_MAJOR < 53
 #define MAX_STREAMS 20
-#else
-#define MAX_STREAMS 100
 #endif
 
 /**

commit 00f78043ab906b85ab4d3d6db8ae300e0d8cca94
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 19:16:23 2010 +0000

    Document terminal coloring in the -loglevel option.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23633 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 992008c..618441e 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -82,4 +82,8 @@ Set the logging level used by the library.
 @item debug
 @end table
 
+By default the program logs to stderr, if coloring is supported by the
+terminal, colors are used to mark errors and warnings. Log coloring
+can be disabled setting the environment variable @env{NO_COLOR}.
+
 @end table

commit 47389eb404ad0afd575c08c6157e391e6714cd6a
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 19:16:20 2010 +0000

    Document how to set boolean options.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23632 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index b011e73..992008c 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -6,6 +6,11 @@ powers of 10. The 'B' postfix multiplies the value for 8, and can be
 appended after another postfix or used alone. This allows using for
 example 'KB', 'MiB', 'G' and 'B' as postfix.
 
+Options which do not take arguments are boolean options, and set the
+corresponding value to true. They can be set to false by prefixing
+with "no" the option name, for example using "-nofoo" in the
+commandline will set to false the boolean option with name "foo".
+
 @section Generic options
 
 These options are shared amongst the ff* tools.

commit 0594cfcdc79925e58337a96174df11cca93acf35
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 19:03:54 2010 +0000

    libvorbis: Use memmove instead of memcpy for shifting data
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23631 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index f9a1b32..a7044a2 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -192,7 +192,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext,
 
         memcpy(packets, op2->packet, l);
         context->buffer_index -= l + sizeof(ogg_packet);
-        memcpy(context->buffer, context->buffer + l + sizeof(ogg_packet), context->buffer_index);
+        memmove(context->buffer, context->buffer + l + sizeof(ogg_packet), context->buffer_index);
 //        av_log(avccontext, AV_LOG_DEBUG, "E%d\n", l);
     }
 

commit 2fb30a18d3e917303c42c6cd2aa030b63a61a293
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 18:41:26 2010 +0000

    Name the default configure log filename as "config.log" rather than
    "config.err". The former name was misleading, as the file contains
    useful information not necessarily related to errors.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23630 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/configure b/configure
index 70ad8a5..4f6bb0a 100755
--- a/configure
+++ b/configure
@@ -61,7 +61,7 @@ Options: [defaults in brackets after descriptions]
 
 Standard options:
   --help                   print this message
-  --logfile=FILE           log tests and output to FILE [config.err]
+  --logfile=FILE           log tests and output to FILE [config.log]
   --disable-logging        do not log configure debug information
   --prefix=PREFIX          install in PREFIX [$prefix]
   --bindir=DIR             install binaries in DIR [PREFIX/bin]
@@ -1440,7 +1440,7 @@ doc_deps="texi2html"
 
 # default parameters
 
-logfile="config.err"
+logfile="config.log"
 
 # installation paths
 prefix_default="/usr/local"

commit 29d187222e77617a93b46780c50c7f318324e3f1
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 18:27:55 2010 +0000

    Make av_parse_expr() fail if there are trailing chars at the end of
    the provided expression.
    
    Allow detection of mistyped expressions.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23629 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 530e79a..065625c 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -448,6 +448,7 @@ int av_parse_expr(AVExpr **expr, const char *s,
     AVExpr *e = NULL;
     char *w = av_malloc(strlen(s) + 1);
     char *wp = w;
+    const char *s0 = s;
     int ret = 0;
 
     if (!w)
@@ -470,6 +471,11 @@ int av_parse_expr(AVExpr **expr, const char *s,
 
     if ((ret = parse_expr(&e, &p)) < 0)
         goto end;
+    if (*p.s) {
+        av_log(&p, AV_LOG_ERROR, "Invalid chars '%s' at the end of expression '%s'\n", p.s, s0);
+        ret = AVERROR(EINVAL);
+        goto end;
+    }
     if (!verify_expr(e)) {
         av_free_expr(e);
         ret = AVERROR(EINVAL);

commit 29a4c928408ea9ec5698d688b68eb0422549a66b
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 18:27:52 2010 +0000

    Remove the "b" from "Mb" in -b values for the dnxhd tests.
    
    They are just ignored, and tend to confuse both machines and humans.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23628 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh
index faa066b..ea49155 100755
--- a/tests/codec-regression.sh
+++ b/tests/codec-regression.sh
@@ -219,17 +219,17 @@ fi
 
 if [ -n "$do_dnxhd_1080i" ] ; then
 # FIXME: interlaced raw DNxHD decoding is broken
-do_video_encoding dnxhd-1080i.mov "" "-vcodec dnxhd -flags +ildct -s hd1080 -b 120Mb -pix_fmt yuv422p -vframes 5 -an"
+do_video_encoding dnxhd-1080i.mov "" "-vcodec dnxhd -flags +ildct -s hd1080 -b 120M -pix_fmt yuv422p -vframes 5 -an"
 do_video_decoding "-r 25" "-s cif -pix_fmt yuv420p"
 fi
 
 if [ -n "$do_dnxhd_720p" ] ; then
-do_video_encoding dnxhd-720p.dnxhd "" "-s hd720 -b 90Mb -pix_fmt yuv422p -vframes 5 -an"
+do_video_encoding dnxhd-720p.dnxhd "" "-s hd720 -b 90M -pix_fmt yuv422p -vframes 5 -an"
 do_video_decoding "-r 25" "-s cif -pix_fmt yuv420p"
 fi
 
 if [ -n "$do_dnxhd_720p_rd" ] ; then
-do_video_encoding dnxhd-720p-rd.dnxhd "" "-threads 4 -mbd rd -s hd720 -b 90Mb -pix_fmt yuv422p -vframes 5 -an"
+do_video_encoding dnxhd-720p-rd.dnxhd "" "-threads 4 -mbd rd -s hd720 -b 90M -pix_fmt yuv422p -vframes 5 -an"
 do_video_decoding "-r 25" "-s cif -pix_fmt yuv420p"
 fi
 

commit 40b6319e9a2cfbdd687f2454dc99a57a4c08945d
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 18:27:46 2010 +0000

    Improve av_parse_eval() error reporting.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23627 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/eval.c b/libavutil/eval.c
index 59ebd94..530e79a 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -182,7 +182,7 @@ void av_free_expr(AVExpr *e)
 static int parse_primary(AVExpr **e, Parser *p)
 {
     AVExpr *d = av_mallocz(sizeof(AVExpr));
-    char *next= p->s;
+    char *next = p->s, *s0 = p->s;
     int ret, i;
 
     if (!d)
@@ -211,7 +211,7 @@ static int parse_primary(AVExpr **e, Parser *p)
 
     p->s= strchr(p->s, '(');
     if (p->s==NULL) {
-        av_log(p, AV_LOG_ERROR, "undefined constant or missing (\n");
+        av_log(p, AV_LOG_ERROR, "Undefined constant or missing '(' in '%s'\n", s0);
         p->s= next;
         av_free_expr(d);
         return AVERROR(EINVAL);
@@ -222,7 +222,7 @@ static int parse_primary(AVExpr **e, Parser *p)
         if ((ret = parse_expr(&d, p)) < 0)
             return ret;
         if (p->s[0] != ')') {
-            av_log(p, AV_LOG_ERROR, "missing )\n");
+            av_log(p, AV_LOG_ERROR, "Missing ')' in '%s'\n", s0);
             av_free_expr(d);
             return AVERROR(EINVAL);
         }
@@ -239,7 +239,7 @@ static int parse_primary(AVExpr **e, Parser *p)
         parse_expr(&d->param[1], p);
     }
     if (p->s[0] != ')') {
-        av_log(p, AV_LOG_ERROR, "missing )\n");
+        av_log(p, AV_LOG_ERROR, "Missing ')' or too many args in '%s'\n", s0);
         av_free_expr(d);
         return AVERROR(EINVAL);
     }
@@ -290,7 +290,7 @@ static int parse_primary(AVExpr **e, Parser *p)
             }
         }
 
-        av_log(p, AV_LOG_ERROR, "unknown function\n");
+        av_log(p, AV_LOG_ERROR, "Unknown function in '%s'\n", s0);
         av_free_expr(d);
         return AVERROR(EINVAL);
     }

commit 641ec5edf539ddd0b640b14405958063227bb170
Author: janne <janne at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 13:07:12 2010 +0000

    dvbsub: parse display definition segment
    
    The display definition segment is used to properly display SD DVB subtitles in
    HD video streams.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23626 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 54c74b5..a815056 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -22,6 +22,7 @@
 #include "dsputil.h"
 #include "get_bits.h"
 #include "colorspace.h"
+#include "bytestream.h"
 
 //#define DEBUG
 //#define DEBUG_PACKET_CONTENTS
@@ -31,6 +32,7 @@
 #define DVBSUB_REGION_SEGMENT   0x11
 #define DVBSUB_CLUT_SEGMENT     0x12
 #define DVBSUB_OBJECT_SEGMENT   0x13
+#define DVBSUB_DISPLAYDEFINITION_SEGMENT 0x14
 #define DVBSUB_DISPLAY_SEGMENT  0x80
 
 #define cm (ff_cropTbl + MAX_NEG_CROP)
@@ -216,6 +218,15 @@ typedef struct DVBSubRegion {
     struct DVBSubRegion *next;
 } DVBSubRegion;
 
+typedef struct DVBSubDisplayDefinition {
+    int version;
+
+    int x;
+    int y;
+    int width;
+    int height;
+} DVBSubDisplayDefinition;
+
 typedef struct DVBSubContext {
     int composition_id;
     int ancillary_id;
@@ -227,6 +238,7 @@ typedef struct DVBSubContext {
 
     int display_list_size;
     DVBSubRegionDisplay *display_list;
+    DVBSubDisplayDefinition *display_definition;
 } DVBSubContext;
 
 
@@ -334,6 +346,8 @@ static void delete_state(DVBSubContext *ctx)
         av_free(clut);
     }
 
+    av_freep(&ctx->display_definition);
+
     /* Should already be null */
     if (ctx->object_list)
         av_log(0, AV_LOG_ERROR, "Memory deallocation error!\n");
@@ -1254,10 +1268,51 @@ static void save_display_set(DVBSubContext *ctx)
 }
 #endif
 
+static void dvbsub_parse_display_definition_segment(AVCodecContext *avctx,
+                                                    const uint8_t *buf,
+                                                    int buf_size)
+{
+    DVBSubContext *ctx = avctx->priv_data;
+    DVBSubDisplayDefinition *display_def = ctx->display_definition;
+    int dds_version, info_byte;
+
+    if (buf_size < 5)
+        return;
+
+    info_byte   = bytestream_get_byte(&buf);
+    dds_version = info_byte >> 4;
+    if (display_def && display_def->version == dds_version)
+        return; // already have this display definition version
+
+    if (!display_def) {
+        display_def             = av_mallocz(sizeof(*display_def));
+        ctx->display_definition = display_def;
+    }
+    if (!display_def)
+        return;
+
+    display_def->version = dds_version;
+    display_def->x       = 0;
+    display_def->y       = 0;
+    display_def->width   = bytestream_get_be16(&buf) + 1;
+    display_def->height  = bytestream_get_be16(&buf) + 1;
+
+    if (buf_size < 13)
+        return;
+
+    if (info_byte & 1<<3) { // display_window_flag
+        display_def->x = bytestream_get_be16(&buf);
+        display_def->y = bytestream_get_be16(&buf);
+        display_def->width  = bytestream_get_be16(&buf) - display_def->x + 1;
+        display_def->height = bytestream_get_be16(&buf) - display_def->y + 1;
+    }
+}
+
 static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
                                         int buf_size, AVSubtitle *sub)
 {
     DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+    DVBSubDisplayDefinition *display_def = ctx->display_definition;
 
     DVBSubRegion *region;
     DVBSubRegionDisplay *display;
@@ -1265,12 +1320,18 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
     DVBSubCLUT *clut;
     uint32_t *clut_table;
     int i;
+    int offset_x=0, offset_y=0;
 
     sub->rects = NULL;
     sub->start_display_time = 0;
     sub->end_display_time = ctx->time_out * 1000;
     sub->format = 0;
 
+    if (display_def) {
+        offset_x = display_def->x;
+        offset_y = display_def->y;
+    }
+
     sub->num_rects = ctx->display_list_size;
 
     if (sub->num_rects > 0){
@@ -1288,8 +1349,8 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
         if (!region)
             continue;
 
-        rect->x = display->x_pos;
-        rect->y = display->y_pos;
+        rect->x = display->x_pos + offset_x;
+        rect->y = display->y_pos + offset_y;
         rect->w = region->width;
         rect->h = region->height;
         rect->nb_colors = 16;
@@ -1389,6 +1450,8 @@ static int dvbsub_decode(AVCodecContext *avctx,
             case DVBSUB_OBJECT_SEGMENT:
                 dvbsub_parse_object_segment(avctx, p, segment_length);
                 break;
+            case DVBSUB_DISPLAYDEFINITION_SEGMENT:
+                dvbsub_parse_display_definition_segment(avctx, p, segment_length);
             case DVBSUB_DISPLAY_SEGMENT:
                 *data_size = dvbsub_display_end_segment(avctx, p, segment_length, sub);
                 break;

commit 9cd115509f3a2ef1b757a60465e7c80737f7574c
Author: lucabe <lucabe at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 12:59:47 2010 +0000

    If the video stream is H.264 with MP4 syntax, store the NAL lenght size in
    the RTP muxer context (it will be used later for splitting frames in NALs)
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23625 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 3111c2b..5abd490 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -131,6 +131,13 @@ static int rtp_write_header(AVFormatContext *s1)
         s->max_payload_size = n * TS_PACKET_SIZE;
         s->buf_ptr = s->buf;
         break;
+    case CODEC_ID_H264:
+        /* check for H.264 MP4 syntax */
+        if (st->codec->extradata_size > 0 && st->codec->extradata &&
+            st->codec->extradata[0] == 1) {
+            s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
+        }
+        break;
     case CODEC_ID_AMR_NB:
     case CODEC_ID_AMR_WB:
         if (!s->max_frames_per_packet)
diff --git a/libavformat/rtpenc.h b/libavformat/rtpenc.h
index 5710160..95e70c1 100644
--- a/libavformat/rtpenc.h
+++ b/libavformat/rtpenc.h
@@ -50,6 +50,12 @@ struct RTPMuxContext {
     uint8_t *buf_ptr;
 
     int max_frames_per_packet;
+
+    /**
+     * Number of bytes used for H.264 NAL length, if the MP4 syntax is used
+     * (1, 2 or 4)
+     */
+    int nal_length_size;
 };
 
 typedef struct RTPMuxContext RTPMuxContext;

commit 60e5cc31c7a2e62480b361ccc43e1b0ea6dc964a
Author: cehoyos <cehoyos at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 10:35:56 2010 +0000

    icc 12 finally fixed attribute(used) so gcc's DECLARE_ASM_CONST can be used.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23624 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/mem.h b/libavutil/mem.h
index 1488792..561def5 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -28,7 +28,7 @@
 
 #include "attributes.h"
 
-#if defined(__ICC) || defined(__SUNPRO_C)
+#if defined(__ICC) && _ICC < 1200 || defined(__SUNPRO_C)
     #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
     #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
 #elif defined(__TI_COMPILER_VERSION__)

commit d949c53484dc1fc9eed2db96ebc3f26908e10f4a
Author: michael <michael at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 04:53:09 2010 +0000

    Document FF_SYMVER and attribute_used
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23622 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/internal.h b/libavutil/internal.h
index b361f72..08a34a6 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -46,6 +46,12 @@
 #endif
 #endif
 
+
+/**
+ * Marks a variable as used and prevents the compiler from optimizing it away.
+ * This is usefull for asm that accesses varibles in ways that the compiler doesnt
+ * understand
+ */
 #ifndef attribute_used
 #if AV_GCC_VERSION_AT_LEAST(3,1)
 #    define attribute_used __attribute__((used))
@@ -196,6 +202,15 @@
 #   define NULL_IF_CONFIG_SMALL(x) x
 #endif
 
+
+/**
+ * Create a non default alias for a function with specified version.
+ * This is needed when symbols are moved from a lib to a dependancy of the lib
+ * because the gnu linker as of 2010 is buggy and fails to dynamicaly link if a symbol
+ * is not found in the lib in which it was during link time with enabled versioning
+ * even if a correctly versioned and matching symbol exists in another lib and
+ * even if it did find that would it not contain an explicit check to fail
+ */
 #if HAVE_SYMVER_ASM_LABEL
 #   define FF_SYMVER(type, name, args, ver)                     \
     type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver);  \

commit 11711871ef5ae74a4cc4ed315353fd51fd845640
Author: hyc <hyc at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Wed Jun 16 01:12:26 2010 +0000

    When reading a stream, should retry on EAGAIN instead of just failing. Also,
    when reading a live feed, should retry regardless of whether any client has
    opened the stream.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23621 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/ffserver.c b/ffserver.c
index 77340af..31d0268 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2306,12 +2306,16 @@ static int http_prepare_data(HTTPContext *c)
         else {
             AVPacket pkt;
         redo:
-            if (av_read_frame(c->fmt_in, &pkt) < 0) {
-                if (c->stream->feed && c->stream->feed->feed_opened) {
+            ret = av_read_frame(c->fmt_in, &pkt);
+            if (ret < 0) {
+                if (c->stream->feed) {
                     /* if coming from feed, it means we reached the end of the
                        ffm file, so must wait for more data */
                     c->state = HTTPSTATE_WAIT_FEED;
                     return 1; /* state changed */
+                } else if (ret == AVERROR(EAGAIN)) {
+                    /* input not ready, come back later */
+                    return 0;
                 } else {
                     if (c->stream->loop) {
                         av_close_input_file(c->fmt_in);

commit 7aa57da06029047432509f9a5ef097e917ed0e38
Author: bcoudurier <bcoudurier at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 22:38:16 2010 +0000

    Fix svq3 watermark log uncompress on 64bit, probably fixes issue 1263
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23620 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index bf7659a..df2acd8 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -886,7 +886,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
                 int u2 = get_bits(&gb, 8);
                 int u3 = get_bits(&gb, 2);
                 int u4 = svq3_get_ue_golomb(&gb);
-                unsigned buf_len = watermark_width*watermark_height*4;
+                unsigned long buf_len = watermark_width*watermark_height*4;
                 int offset = (get_bits_count(&gb)+7)>>3;
                 uint8_t *buf;
 
@@ -896,7 +896,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
                 buf = av_malloc(buf_len);
                 av_log(avctx, AV_LOG_DEBUG, "watermark size: %dx%d\n", watermark_width, watermark_height);
                 av_log(avctx, AV_LOG_DEBUG, "u1: %x u2: %x u3: %x compressed data size: %d offset: %d\n", u1, u2, u3, u4, offset);
-                if (uncompress(buf, (uLong*)&buf_len, extradata + 8 + offset, size - offset) != Z_OK) {
+                if (uncompress(buf, &buf_len, extradata + 8 + offset, size - offset) != Z_OK) {
                     av_log(avctx, AV_LOG_ERROR, "could not uncompress watermark logo\n");
                     av_free(buf);
                     return -1;

commit ec32fcae405ccb32067124beb748a1fd422c2bb6
Author: aurel <aurel at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 19:53:15 2010 +0000

    matroskadec : propagate AVERROR to the caller
    based on a patch by Jai Menon
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23619 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 7995ce5..69c81b0 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1158,7 +1158,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
     uint64_t max_start = 0;
     Ebml ebml = { 0 };
     AVStream *st;
-    int i, j;
+    int i, j, res;
 
     matroska->ctx = s;
 
@@ -1182,8 +1182,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
     ebml_free(ebml_syntax, &ebml);
 
     /* The next thing is a segment. */
-    if (ebml_parse(matroska, matroska_segments, matroska) < 0)
-        return -1;
+    if ((res = ebml_parse(matroska, matroska_segments, matroska)) < 0)
+        return res;
     matroska_execute_seekhead(matroska);
 
     if (!matroska->time_scale)

commit 574ec8caf8233a77b91e73876b400844693aa92d
Author: mru <mru at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 18:06:28 2010 +0000

    configure: fix symver detection with icc 10
    
    Apparently the compiler sometimes bypasses the normal assembler, in
    which case the asm label variant works.  If the file contains any
    inline asm, this bypassing is not done, and the assembler chokes on
    invalid syntax.  Inserting a dummy asm() statement in the test when
    the compiler supports it makes sure no shortcuts are taken and the
    test fails as it should.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23616 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/configure b/configure
index 7016e5b..70ad8a5 100755
--- a/configure
+++ b/configure
@@ -252,6 +252,8 @@ EOF
   exit 0
 }
 
+quotes='""'
+
 log(){
     echo "$@" >> $logfile
 }
@@ -2723,7 +2725,7 @@ if test_ldflags -Wl,--version-script,$TMPV; then
     append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
     check_cc <<EOF && enable symver_asm_label
 void ff_foo(void) __asm__ ("av_foo at VERSION");
-void ff_foo(void) {}
+void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
 EOF
     check_cc <<EOF && enable symver_gnu_asm
 __asm__(".symver ff_foo,av_foo at VERSION");

commit 3eb776965cd0dc69de0ca7cc2d2f4617a8d76866
Author: mru <mru at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 15:24:28 2010 +0000

    Fix symbol version compat wrappers on systems with export prefixes
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23615 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/internal.h b/libavutil/internal.h
index 2d744df..b361f72 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -197,13 +197,13 @@
 #endif
 
 #if HAVE_SYMVER_ASM_LABEL
-#   define FF_SYMVER(type, name, args, ver)             \
-    type ff_##name args __asm__ (#name "@" ver);        \
+#   define FF_SYMVER(type, name, args, ver)                     \
+    type ff_##name args __asm__ (EXTERN_PREFIX #name "@" ver);  \
     type ff_##name args
 #elif HAVE_SYMVER_GNU_ASM
-#   define FF_SYMVER(type, name, args, ver)             \
-    __asm__ (".symver ff_" #name "," #name "@" ver);    \
-    type ff_##name args;                                \
+#   define FF_SYMVER(type, name, args, ver)                             \
+    __asm__ (".symver ff_" #name "," EXTERN_PREFIX #name "@" ver);      \
+    type ff_##name args;                                                \
     type ff_##name args
 #endif
 

commit 55da8ddcb4a95b2400770f2269a4b67e25962828
Author: rbultje <rbultje at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 14:24:19 2010 +0000

    Fix missing logging context in a series of dprintf()s. Partially based on
    patch by Zhentan Feng <spyfeng gmail com>.
    
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23614 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/mmst.c b/libavformat/mmst.c
index 9b2e497..c19a68f 100644
--- a/libavformat/mmst.c
+++ b/libavformat/mmst.c
@@ -258,7 +258,7 @@ static MMSSCPacketType get_tcp_server_response(MMSContext *mms)
                     // read the rest of the packet.
                     if (length_remaining < 0
                         || length_remaining > sizeof(mms->in_buffer) - 12) {
-                        dprintf("Incoming message len %d exceeds buffer len %d\n",
+                        dprintf(NULL, "Incoming message len %d exceeds buffer len %d\n",
                             length_remaining, sizeof(mms->in_buffer) - 12);
                         return -1;
                     }
@@ -291,7 +291,7 @@ static MMSSCPacketType get_tcp_server_response(MMSContext *mms)
 
                 if (length_remaining < 0
                         || length_remaining > sizeof(mms->in_buffer) - 8) {
-                    dprintf("Incoming data len %d exceeds buffer len %d\n",
+                    dprintf(NULL, "Incoming data len %d exceeds buffer len %d\n",
                             length_remaining, sizeof(mms->in_buffer));
                     return -1;
                 }
@@ -431,7 +431,7 @@ static int asf_header_parser(MMSContext *mms)
     while(end - p >= sizeof(ff_asf_guid) + 8) {
         uint64_t chunksize = AV_RL64(p + sizeof(ff_asf_guid));
         if (!chunksize || chunksize > end - p) {
-            dprintf("chunksize is exceptional value:%d!\n", chunksize);
+            dprintf(NULL, "chunksize is exceptional value:%d!\n", chunksize);
             return -1;
         }
         if (!memcmp(p, ff_asf_file_header, sizeof(ff_asf_guid))) {
@@ -455,7 +455,7 @@ static int asf_header_parser(MMSContext *mms)
                 mms->streams[mms->stream_num].id = stream_id;
                 mms->stream_num++;
             } else {
-                dprintf("Too many streams.\n");
+                dprintf(NULL, "Too many streams.\n");
                 return -1;
             }
         }

commit 591f4c038c71198f35b970bdbcfeb44b9d3784ba
Author: mru <mru at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 13:26:52 2010 +0000

    Add compatibility wrappers for functions moved from lavf to lavc
    
    When symbol versioning is enabled, moving symbols from one library to
    another breaks binary compatibility.  This adds wrappers with the old
    version tag for the av_*packet functions recently moved to lavc.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23611 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/configure b/configure
index 2083217..7016e5b 100755
--- a/configure
+++ b/configure
@@ -1084,6 +1084,9 @@ HAVE_LIST="
     struct_sockaddr_in6
     struct_sockaddr_sa_len
     struct_sockaddr_storage
+    symver
+    symver_gnu_asm
+    symver_asm_label
     sys_mman_h
     sys_resource_h
     sys_select_h
@@ -1198,6 +1201,8 @@ fast_unaligned_if_any="armv6 ppc x86"
 need_memalign="altivec neon sse"
 inline_asm_deps="!tms470"
 
+symver_if_any="symver_asm_label symver_gnu_asm"
+
 # subsystems
 mdct_select="fft"
 rdft_select="fft"
@@ -2714,8 +2719,17 @@ check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUI
 check_ldflags -Wl,-Bsymbolic
 
 echo "X{};" > $TMPV
-test_ldflags -Wl,--version-script,$TMPV &&
+if test_ldflags -Wl,--version-script,$TMPV; then
     append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
+    check_cc <<EOF && enable symver_asm_label
+void ff_foo(void) __asm__ ("av_foo at VERSION");
+void ff_foo(void) {}
+EOF
+    check_cc <<EOF && enable symver_gnu_asm
+__asm__(".symver ff_foo,av_foo at VERSION");
+void ff_foo(void) {}
+EOF
+fi
 
 if enabled small; then
     add_cflags $size_cflags
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6365f3e..9faa566 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -283,8 +283,38 @@ AVInputFormat *av_find_input_format(const char *short_name)
     return NULL;
 }
 
-/* memory handling */
+#if LIBAVFORMAT_VERSION_MAJOR < 53 && CONFIG_SHARED && HAVE_SYMVER
+FF_SYMVER(void, av_destruct_packet_nofree, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+    av_destruct_packet_nofree(pkt);
+}
+
+FF_SYMVER(void, av_destruct_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+    av_destruct_packet(pkt);
+}
+
+FF_SYMVER(int, av_new_packet, (AVPacket *pkt, int size), "LIBAVFORMAT_52")
+{
+    return av_new_packet(pkt, size);
+}
+
+FF_SYMVER(int, av_dup_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+    return av_dup_packet(pkt);
+}
+
+FF_SYMVER(void, av_free_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+    av_free_packet(pkt);
+}
 
+FF_SYMVER(void, av_init_packet, (AVPacket *pkt), "LIBAVFORMAT_52")
+{
+    av_log(NULL, AV_LOG_WARNING, "Diverting av_*_packet function calls to libavcodec. Recompile to improve performance\n");
+    av_init_packet(pkt);
+}
+#endif
 
 int av_get_packet(ByteIOContext *s, AVPacket *pkt, int size)
 {
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 2faafc9..2d744df 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -196,4 +196,15 @@
 #   define NULL_IF_CONFIG_SMALL(x) x
 #endif
 
+#if HAVE_SYMVER_ASM_LABEL
+#   define FF_SYMVER(type, name, args, ver)             \
+    type ff_##name args __asm__ (#name "@" ver);        \
+    type ff_##name args
+#elif HAVE_SYMVER_GNU_ASM
+#   define FF_SYMVER(type, name, args, ver)             \
+    __asm__ (".symver ff_" #name "," #name "@" ver);    \
+    type ff_##name args;                                \
+    type ff_##name args
+#endif
+
 #endif /* AVUTIL_INTERNAL_H */

commit b5bfc9b798d22b36cb1e0234f7f4dfd37c8fbec8
Author: mru <mru at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 10:14:19 2010 +0000

    FATE: update vc1 reference output
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23609 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/tests/ref/fate/vc1 b/tests/ref/fate/vc1
index 737dad0..d8b8f93 100644
--- a/tests/ref/fate/vc1
+++ b/tests/ref/fate/vc1
@@ -1,2 +1,15 @@
 0, 0, 38016, 0xf1b25db5
-0, 0, 38016, 0xf1b25db5
+0, 3600, 38016, 0xf1b25db5
+0, 7200, 38016, 0xf1b25db5
+0, 10800, 38016, 0x9ed7f0de
+0, 14400, 38016, 0x5a0b2cf6
+0, 18000, 38016, 0x5e3ed87b
+0, 21600, 38016, 0xe2e3432d
+0, 25200, 38016, 0xe2e3432d
+0, 28800, 38016, 0x76854773
+0, 32400, 38016, 0x76854773
+0, 36000, 38016, 0xefbb2133
+0, 39600, 38016, 0xefbb2133
+0, 43200, 38016, 0xefbb2133
+0, 46800, 38016, 0xefbb2133
+0, 50400, 38016, 0xefbb2133

commit c3a5b00cbb5403bd00fbd44587bf4d53b0af841f
Author: bcoudurier <bcoudurier at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Tue Jun 15 09:14:00 2010 +0000

    Support gray16be and rgb48be in mov
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23608 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index 41f5c90..1fbf4d2 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -127,6 +127,8 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
     { PIX_FMT_BGRA,    MKTAG('B', 'G', 'R', 'A') },
     { PIX_FMT_RGBA,    MKTAG('R', 'G', 'B', 'A') },
     { PIX_FMT_ABGR,    MKTAG('A', 'B', 'G', 'R') },
+    { PIX_FMT_GRAY16BE,MKTAG('b', '1', '6', 'g') },
+    { PIX_FMT_RGB48BE, MKTAG('b', '4', '8', 'r') },
 
     /* special */
     { PIX_FMT_RGB565LE,MKTAG( 3 ,  0 ,  0 ,  0 ) }, /* flipped RGB565LE */
diff --git a/libavformat/isom.c b/libavformat/isom.c
index fd0d456..bf2d3b1 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -74,6 +74,8 @@ const AVCodecTag codec_movvideo_tags[] = {
     { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
     { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
     { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
+    { CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') },
+    { CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') },
 
     { CODEC_ID_R210,   MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
     { CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 3495eb0..c401862 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -626,12 +626,14 @@ static const struct {
     { PIX_FMT_RGB555LE,MKTAG('L','5','5','5'), 16 },
     { PIX_FMT_RGB565LE,MKTAG('L','5','6','5'), 16 },
     { PIX_FMT_RGB565BE,MKTAG('B','5','6','5'), 16 },
+    { PIX_FMT_GRAY16BE,MKTAG('b','1','6','g'), 16 },
     { PIX_FMT_RGB24,   MKTAG('r','a','w',' '), 24 },
     { PIX_FMT_BGR24,   MKTAG('2','4','B','G'), 24 },
     { PIX_FMT_ARGB,    MKTAG('r','a','w',' '), 32 },
     { PIX_FMT_BGRA,    MKTAG('B','G','R','A'), 32 },
     { PIX_FMT_RGBA,    MKTAG('R','G','B','A'), 32 },
     { PIX_FMT_ABGR,    MKTAG('A','B','G','R'), 32 },
+    { PIX_FMT_RGB48BE, MKTAG('b','4','8','r'), 48 },
 };
 
 static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track)

commit 1274d19ce7c9639df80c6fcfa1738faef5e7124b
Author: michael <michael at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 17:35:46 2010 +0000

    Deprecate -crop* arguments, they currently are buggy (issue1957) and probably
    will be fixed by removing them.
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23607 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/ffmpeg.c b/ffmpeg.c
index 96f1780..b8dbe36 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2770,6 +2770,7 @@ static void opt_frame_crop_top(const char *arg)
         fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
     }
+    fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n");
     frame_height -= frame_topBand;
 }
 
@@ -2784,6 +2785,7 @@ static void opt_frame_crop_bottom(const char *arg)
         fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
     }
+    fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n");
     frame_height -= frame_bottomBand;
 }
 
@@ -2798,6 +2800,7 @@ static void opt_frame_crop_left(const char *arg)
         fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
     }
+    fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n");
     frame_width -= frame_leftBand;
 }
 
@@ -2812,6 +2815,7 @@ static void opt_frame_crop_right(const char *arg)
         fprintf(stderr, "Horizontal crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
         av_exit(1);
     }
+    fprintf(stderr, "-crop* is deprecated in favor of the crop avfilter\n");
     frame_width -= frame_rightBand;
 }
 
@@ -4198,10 +4202,10 @@ static const OptionDef options[] = {
     { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },
     { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
     { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)opt_frame_pix_fmt}, "set pixel format, 'list' as argument shows all the pixel formats supported", "format" },
-    { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_top}, "set top crop band size (in pixels)", "size" },
-    { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_bottom}, "set bottom crop band size (in pixels)", "size" },
-    { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_left}, "set left crop band size (in pixels)", "size" },
-    { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_right}, "set right crop band size (in pixels)", "size" },
+    { "croptop", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_top}, "Deprecated, please use the crop avfilter", "size" },
+    { "cropbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_bottom}, "Deprecated, please use the crop avfilter", "size" },
+    { "cropleft", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_left}, "Deprecated, please use the crop avfilter", "size" },
+    { "cropright", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_crop_right}, "Deprecated, please use the crop avfilter", "size" },
     { "padtop", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set top pad band size (in pixels)", "size" },
     { "padbottom", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set bottom pad band size (in pixels)", "size" },
     { "padleft", HAS_ARG | OPT_VIDEO, {(void*)opt_pad}, "set left pad band size (in pixels)", "size" },

commit 7a221e4fa1c82868bd74b2ab221e275dbe6634df
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 14:09:00 2010 +0000

    nellymoserdec: Increase the log level of messages when failing to decode data
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23606 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 7b973c0..8976467 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -167,7 +167,7 @@ static int decode_tag(AVCodecContext * avctx,
         return buf_size;
 
     if (buf_size % 64) {
-        av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
+        av_log(avctx, AV_LOG_ERROR, "Tag size %d.\n", buf_size);
         return buf_size;
     }
     blocks = buf_size / 64;

commit e53c45906db346f19d5f56590456c6a90d0ce2c5
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 14:07:22 2010 +0000

    Reindent
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23605 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index b51be86..7b973c0 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -166,11 +166,11 @@ static int decode_tag(AVCodecContext * avctx,
     if (buf_size < avctx->block_align)
         return buf_size;
 
-            if (buf_size % 64) {
-                av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
-                return buf_size;
-            }
-            blocks = buf_size / 64;
+    if (buf_size % 64) {
+        av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
+        return buf_size;
+    }
+    blocks = buf_size / 64;
     /* Normal numbers of blocks for sample rates:
      *  8000 Hz - 1
      * 11025 Hz - 2

commit ae502da148224da37436102cab13db356ad7f9d1
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 14:06:38 2010 +0000

    nellymoserdec: Simplify calculation of numbers of blocks
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23604 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 2ada6fd..b51be86 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -166,25 +166,18 @@ static int decode_tag(AVCodecContext * avctx,
     if (buf_size < avctx->block_align)
         return buf_size;
 
-    switch (buf_size) {
-        case 64:    // 8000Hz
-            blocks = 1; break;
-        case 128:   // 11025Hz
-            blocks = 2; break;
-        case 192:   // 16000Hz
-            blocks = 3; break;
-        case 256:   // 22050Hz
-            blocks = 4; break;
-        case 512:   // 44100Hz
-            blocks = 8; break;
-        default:
             if (buf_size % 64) {
                 av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
                 return buf_size;
             }
             blocks = buf_size / 64;
-            break;
-    }
+    /* Normal numbers of blocks for sample rates:
+     *  8000 Hz - 1
+     * 11025 Hz - 2
+     * 16000 Hz - 3
+     * 22050 Hz - 4
+     * 44100 Hz - 8
+     */
 
     for (i=0 ; i<blocks ; i++) {
         nelly_decode_block(s, &buf[i*NELLY_BLOCK_LEN], s->float_buf);

commit 8a3f077cd909dbc54d7b344de9db955fdb6baf77
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 12:35:28 2010 +0000

    Reindent
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23603 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index cda8d11..2ada6fd 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -179,8 +179,8 @@ static int decode_tag(AVCodecContext * avctx,
             blocks = 8; break;
         default:
             if (buf_size % 64) {
-            av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
-            return buf_size;
+                av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
+                return buf_size;
             }
             blocks = buf_size / 64;
             break;

commit 7ab1972d3218be24090783e44c1ec3f60e7b9be8
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 12:34:55 2010 +0000

    nellymoserdec: Allow using unusual input block sizes
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23602 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 82a3f07..cda8d11 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -178,8 +178,12 @@ static int decode_tag(AVCodecContext * avctx,
         case 512:   // 44100Hz
             blocks = 8; break;
         default:
+            if (buf_size % 64) {
             av_log(avctx, AV_LOG_DEBUG, "Tag size %d.\n", buf_size);
             return buf_size;
+            }
+            blocks = buf_size / 64;
+            break;
     }
 
     for (i=0 ; i<blocks ; i++) {

commit db8d20dfc31cf18221a15e949da3f281636fb0f5
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 09:09:59 2010 +0000

    Cosmetics: Change connexion to connection in code comments
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23601 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index f1bd870..e762f61 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1617,7 +1617,7 @@ redirect:
         ff_http_set_chunked_transfer_encoding(rtsp_hd_out, 0);
 
     } else {
-        /* open the tcp connexion */
+        /* open the tcp connection */
         ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL);
         if (url_open(&rtsp_hd, tcpname, URL_RDWR) < 0) {
             err = AVERROR(EIO);
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index d646045..61b688d 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -190,7 +190,7 @@ enum RTSPServerType {
  * @todo Use ByteIOContext instead of URLContext
  */
 typedef struct RTSPState {
-    URLContext *rtsp_hd; /* RTSP TCP connexion handle */
+    URLContext *rtsp_hd; /* RTSP TCP connection handle */
 
     /** number of items in the 'rtsp_streams' variable */
     int nb_rtsp_streams;
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 0ec24cd..fd6b5c1 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -279,7 +279,7 @@ int udp_set_remote_url(URLContext *h, const char *uri)
 }
 
 /**
- * Return the local port used by the UDP connexion
+ * Return the local port used by the UDP connection
  * @param s1 media file context
  * @return the local port number
  */

commit b8a84f11e7d8b4582e0cdd19eb90ab49fdb6423b
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 08:51:46 2010 +0000

    Fix compilation on windows CE
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23600 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/log.c b/libavutil/log.c
index 9e09a10..5f7034b 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -34,7 +34,7 @@ static
 #endif
 int av_log_level = AV_LOG_INFO;
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32CE__)
 #include <windows.h>
 static const uint8_t color[] = {12,12,12,14,7,7,7};
 static int16_t background, attr_orig;
@@ -51,7 +51,7 @@ static int use_color=-1;
 #undef fprintf
 static void colored_fputs(int level, const char *str){
     if(use_color<0){
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32CE__)
         CONSOLE_SCREEN_BUFFER_INFO con_info;
         con = GetStdHandle(STD_ERROR_HANDLE);
         use_color = (con != INVALID_HANDLE_VALUE) && !getenv("NO_COLOR");

commit 5942bd0c30876df657df9d95d230c83700103b3a
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 08:23:59 2010 +0000

    RTSP: Shrink SDP fmtp parsing buffer size
    
    Since the parsing of Vorbis/Theora fmtp headers is handled by the
    parse_sdp_a_line function pointer now, the buffer in sdp_parse_fmtp
    doesn't need to be this large any longer.
    
    Patch by Josh Allmann, joshua dot allmann at gmail
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23599 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index fc422aa..f1bd870 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -273,9 +273,7 @@ int ff_rtsp_next_attr_and_value(const char **p, char *attr, int attr_size,
 static void sdp_parse_fmtp(AVStream *st, const char *p)
 {
     char attr[256];
-    /* Vorbis setup headers can be up to 12KB and are sent base64
-     * encoded, giving a 12KB * (4/3) = 16KB FMTP line. */
-    char value[16384];
+    char value[4096];
     int i;
     RTSPStream *rtsp_st = st->priv_data;
     AVCodecContext *codec = st->codec;
@@ -541,7 +539,8 @@ static int sdp_parse(AVFormatContext *s, const char *content)
      * "rulebooks" describing their properties. Therefore, the SDP line
      * buffer is large.
      *
-     * The Vorbis FMTP line can be up to 16KB - see sdp_parse_fmtp. */
+     * The Vorbis FMTP line can be up to 16KB - see xiph_parse_sdp_line
+     * in rtpdec_xiph.c. */
     char buf[16384], *q;
     SDPParseState sdp_parse_state, *s1 = &sdp_parse_state;
 

commit 583923e104c7f51e4dd2a4b0509fbf240ea7b891
Author: mstorsjo <mstorsjo at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 08:12:40 2010 +0000

    Reindent
    
    Patch by Josh Allmann, joshua dot allmann at gmail
    
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23598 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index aa8f31b..fc422aa 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1618,13 +1618,13 @@ redirect:
         ff_http_set_chunked_transfer_encoding(rtsp_hd_out, 0);
 
     } else {
-    /* open the tcp connexion */
-    ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL);
-    if (url_open(&rtsp_hd, tcpname, URL_RDWR) < 0) {
-        err = AVERROR(EIO);
-        goto fail;
-    }
-    rtsp_hd_out = rtsp_hd;
+        /* open the tcp connexion */
+        ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, host, port, NULL);
+        if (url_open(&rtsp_hd, tcpname, URL_RDWR) < 0) {
+            err = AVERROR(EIO);
+            goto fail;
+        }
+        rtsp_hd_out = rtsp_hd;
     }
     rt->rtsp_hd = rtsp_hd;
     rt->rtsp_hd_out = rtsp_hd_out;

commit 13856d5d6c1f66c3370190d061cb32d326830939
Author: ramiro <ramiro at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Mon Jun 14 07:05:59 2010 +0000

    output-example: Set sample_fmt to SAMPLE_FMT_S16.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23597 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavformat/output-example.c b/libavformat/output-example.c
index dd61cfe..15e2d9a 100644
--- a/libavformat/output-example.c
+++ b/libavformat/output-example.c
@@ -68,6 +68,7 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
     c->codec_type = AVMEDIA_TYPE_AUDIO;
 
     /* put sample parameters */
+    c->sample_fmt = SAMPLE_FMT_S16;
     c->bit_rate = 64000;
     c->sample_rate = 44100;
     c->channels = 2;

commit 08c0efd4b31a2f76fd68d54c7cbe12106e6410b5
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Sun Jun 13 09:32:03 2010 +0000

    Document what av_get_token() returns in case of allocation failure.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23596 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavfilter/parseutils.h b/libavfilter/parseutils.h
index 7b78d89..8ad7b8b 100644
--- a/libavfilter/parseutils.h
+++ b/libavfilter/parseutils.h
@@ -38,7 +38,7 @@
  * terminating char
  * @param term a 0-terminated list of terminating chars
  * @return the malloced unescaped string, which must be av_freed by
- * the user
+ * the user, NULL in case of allocation failure
  */
 char *av_get_token(const char **buf, const char *term);
 

commit 4079f1d24a77f68cad34092a7cde2d31fd5eac49
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Sun Jun 13 09:32:01 2010 +0000

    Resort @param in av_get_token() doxy to reflect the same order they
    have in the function.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23595 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavfilter/parseutils.h b/libavfilter/parseutils.h
index b5b494e..7b78d89 100644
--- a/libavfilter/parseutils.h
+++ b/libavfilter/parseutils.h
@@ -34,9 +34,9 @@
  * The normal \ and ' escaping is supported. Leading and trailing
  * whitespaces are removed.
  *
- * @param term a 0-terminated list of terminating chars
  * @param buf the buffer to parse, buf will be updated to point to the
  * terminating char
+ * @param term a 0-terminated list of terminating chars
  * @return the malloced unescaped string, which must be av_freed by
  * the user
  */

commit 7f00882d58388a07e2ddbaa7e082baf74fc892a0
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Sun Jun 13 09:27:09 2010 +0000

     Add missing check to av_get_token().
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23594 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavfilter/parseutils.c b/libavfilter/parseutils.c
index 9ac61d8..53f03dc 100644
--- a/libavfilter/parseutils.c
+++ b/libavfilter/parseutils.c
@@ -34,6 +34,7 @@ char *av_get_token(const char **buf, const char *term)
     char *out = av_malloc(strlen(*buf) + 1);
     char *ret= out, *end= out;
     const char *p = *buf;
+    if (!out) return NULL;
     p += strspn(p, WHITESPACES);
 
     while(*p && !strspn(p, term)) {

commit c4c747d25026f701f2876a948a997f638f0ec6ea
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Sun Jun 13 09:06:50 2010 +0000

    Fix av_compare_mod() doxy.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23593 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h
index 889ce95..eb78890 100644
--- a/libavutil/mathematics.h
+++ b/libavutil/mathematics.h
@@ -95,12 +95,14 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const;
 int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
 
 /**
- * Compare 2 integers modulo mod.
- * That is we compare integers a and b for which only the least significant log2(mod) bits are known
+ * Compares 2 integers modulo mod.
+ * That is we compare integers a and b for which only the least
+ * significant log2(mod) bits are known.
+ *
  * @param mod must be a power of 2
- * @returns a negative value if a is smaller than b
- *          a positiv  value if a is greater than b
- *          0                if a equals          b
+ * @return a negative value if a is smaller than b
+ *         a positive value if a is greater than b
+ *         0                if a equals          b
  */
 int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
 

commit a0d6062bfd62dce15776caa88ee23df72e6ceb4f
Author: stefano <stefano at 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Date:   Sun Jun 13 09:04:36 2010 +0000

    Add APIchanges entry and bump minor after av_compare_mod() addition.
    
    git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23592 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

diff --git a/doc/APIchanges b/doc/APIchanges
index 2337f33..518331b 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -12,6 +12,9 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2010-06-09 - r23551 - lavu 50.19.0 - av_compare_mod()
+  Add av_compare_mod() to libavutil/mathematics.h.
+
 2010-06-05 - r23485 - lavu 50.18.0 - eval API
   Make the eval API public.
 
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index 663b386..5deaf06 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -40,7 +40,7 @@
 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
 
 #define LIBAVUTIL_VERSION_MAJOR 50
-#define LIBAVUTIL_VERSION_MINOR 18
+#define LIBAVUTIL_VERSION_MINOR 19
 #define LIBAVUTIL_VERSION_MICRO  0
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

-----------------------------------------------------------------------

Summary of changes:
 configure                    |   22 ++++++++++++--
 doc/APIchanges               |    3 ++
 doc/fftools-common-opts.texi |    9 +++++
 ffmpeg.c                     |   12 +++++--
 ffserver.c                   |    8 ++++-
 libavcodec/amrwbdec.c        |   39 ++++++++++++++++++++++++
 libavcodec/dvbsubdec.c       |   67 ++++++++++++++++++++++++++++++++++++++++-
 libavcodec/libvorbis.c       |    2 +-
 libavcodec/nellymoserdec.c   |   25 +++++++---------
 libavcodec/raw.c             |    2 +
 libavcodec/svq3.c            |    4 +-
 libavfilter/parseutils.c     |    1 +
 libavfilter/parseutils.h     |    4 +-
 libavfilter/vsrc_buffer.c    |    3 +-
 libavfilter/vsrc_buffer.h    |    2 +
 libavformat/Makefile         |    2 +-
 libavformat/avformat.h       |    2 -
 libavformat/http.h           |    3 ++
 libavformat/isom.c           |    2 +
 libavformat/matroskadec.c    |    6 ++--
 libavformat/mmst.c           |    8 ++--
 libavformat/movenc.c         |    2 +
 libavformat/oma.c            |   49 +++++++++++++++---------------
 libavformat/output-example.c |    1 +
 libavformat/rtmpproto.c      |    1 +
 libavformat/rtpenc.c         |    6 ++++
 libavformat/rtpenc.h         |    6 ++++
 libavformat/rtsp.c           |   21 ++++++-------
 libavformat/rtsp.h           |    2 +-
 libavformat/spdif.c          |    4 ++
 libavformat/udp.c            |    2 +-
 libavformat/utils.c          |   32 +++++++++++++++++++-
 libavutil/avutil.h           |    2 +-
 libavutil/eval.c             |   54 ++++++++++++++++++++++++++++++---
 libavutil/internal.h         |   26 ++++++++++++++++
 libavutil/log.c              |    4 +-
 libavutil/mathematics.h      |   12 ++++---
 libavutil/mem.h              |    2 +-
 tests/codec-regression.sh    |    6 ++--
 tests/ref/fate/vc1           |   15 +++++++++-
 40 files changed, 375 insertions(+), 98 deletions(-)


hooks/post-receive
-- 
AMR-WB decoder


More information about the FFmpeg-soc mailing list