<?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 rdf:about="http://blog.gmane.org/gmane.comp.video.libav.devel">
    <title>gmane.comp.video.libav.devel</title>
    <link>http://blog.gmane.org/gmane.comp.video.libav.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.libav.devel/46244"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46242"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46239"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46237"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46226"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46224"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46222"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46219"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46209"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46208"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46202"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46201"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46194"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46177"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46167"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46160"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46159"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46157"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46144"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.libav.devel/46139"/>
      </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.libav.devel/46244">
    <title>[PATCH] fate.sh: add support for build-only FATEinstances</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46244</link>
    <description>&lt;pre&gt;From: Diego Biurrun &amp;lt;diego-NvuzD6AdJSiELgA04lAiVw&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

If the "build_only" variable is set in the configuration file, the
FATE client will skip running tests and just compile all targets.
---
 doc/fate.texi |    1 +
 tests/fate.sh |    1 +
 2 files changed, 2 insertions(+)

diff --git a/doc/fate.texi b/doc/fate.texi
index bc6ab3e..f076acd 100644
--- a/doc/fate.texi
+++ b/doc/fate.texi
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -120,6 +120,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; samples=/path/to/fate/samples
 workdir=                                # directory in which to do all the work
 fate_recv="ssh -T fate&amp;lt; at &amp;gt;&amp;lt; at &amp;gt;fate.libav.org"  # command to submit report
 comment=                                # optional description
+build_only=     # set to "yes" for a compile-only instance that skips tests
 
 # the following are optional and map to configure options
 arch=
diff --git a/tests/fate.sh b/tests/fate.sh
index 86e4178..d2bc178 100755
--- a/tests/fate.sh
+++ b/tests/fate.sh
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -66,6 +66,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; compile()(
 )
 
 fate()(
+    test "$build_only" = "yes" &amp;amp;&amp;amp; return
     cd ${build} || return
     ${make} ${makeopts} -k fate
 )
&lt;/pre&gt;</description>
    <dc:creator>Martin Storsjö</dc:creator>
    <dc:date>2013-05-20T08:36:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46242">
    <title>[PATCH 1/2] fate: Don't use files from SRC_PATH inthe actual tests</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46242</link>
    <description>&lt;pre&gt;If building out of tree, make sure the filter scripts are copied
into the build tree before running tests. This makes sure that
SRC_PATH doesn't need to exist on the remote system (or doesn't
need to exist at the same path).
---
 tests/Makefile              |   10 ++++++++--
 tests/fate/filter-audio.mak |    3 ++-
 tests/fate/filter-video.mak |    6 ++++--
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 7525243..539526f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,7 +1,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 VREF = tests/vsynth1/00.pgm
 AREF = tests/data/asynth1.sw
 
-OBJDIRS += tests/data tests/vsynth1
+OBJDIRS += tests/data tests/vsynth1 tests/filtergraphs
 
 $(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1
 $(M)./$&amp;lt; 'tests/vsynth1/'
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,6 +20,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data
 
 tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN
 
+ifneq ($(SRC_PATH), .)
+tests/filtergraphs/%: TAG = COPY
+tests/filtergraphs/%: $(SRC_PATH)/tests/filtergraphs/% | tests/filtergraphs
+$(M) cp $&amp;lt; $&amp;lt; at &amp;gt;
+endif
+
 CHKCFG  = $(if $($(1))$(!$(1)),$($(1)), $(if $(ALLOW_MISSING_CONFIG), , $(error No such config: $(1))))
 
 ALLYES  = $(strip $(call XYES, $(1)))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -145,7 +151,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; lcov-reset:
 clean:: testclean
 
 testclean:
-$(RM) -r tests/vsynth1 tests/data
+$(RM) -r tests/vsynth1 tests/data tests/filtergraphs
 $(RM) $(CLEANSUFFIXES:%=tests/%)
 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
 
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index ac025c4..6e486a1 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,9 +42,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; $(FATE_ATRIM): SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
 FATE_FILTER-$(call FILTERDEMDECENCMUX, ATRIM, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_ATRIM)
 
 FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-channelmap
+fate-filter-channelmap: tests/filtergraphs/channelmap
 fate-filter-channelmap: SRC = $(TARGET_PATH)/tests/data/asynth-44100-6.wav
 fate-filter-channelmap: tests/data/asynth-44100-6.wav
-fate-filter-channelmap: CMD = md5 -i $(SRC) -filter_complex_script $(SRC_PATH)/tests/filtergraphs/channelmap -f wav -flags +bitexact
+fate-filter-channelmap: CMD = md5 -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/filtergraphs/channelmap -f wav -flags +bitexact
 fate-filter-channelmap: CMP = oneline
 fate-filter-channelmap: REF = 21f1977c4f9705e2057083f84764e685
 
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index f4e813c..54e8b89 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,10 +34,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; FATE_FILTER_VSYNTH-$(CONFIG_NEGATE_FILTER) += fate-filter-negate
 fate-filter-negate: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf negate
 
 FATE_FILTER_VSYNTH-$(CONFIG_OVERLAY_FILTER) += fate-filter-overlay
-fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) -filter_complex_script $(SRC_PATH)/tests/filtergraphs/overlay
+fate-filter-overlay: tests/filtergraphs/overlay
+fate-filter-overlay: CMD = framecrc -c:v pgmyuv -i $(SRC) -c:v pgmyuv -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/filtergraphs/overlay
 
 FATE_FILTER_VSYNTH-$(call ALLYES, SETPTS_FILTER  SETTB_FILTER) += fate-filter-setpts
-fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(SRC_PATH)/tests/filtergraphs/setpts
+fate-filter-setpts: tests/filtergraphs/setpts
+fate-filter-setpts: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_script $(TARGET_PATH)/tests/filtergraphs/setpts
 
 FATE_FILTER_VSYNTH-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-transpose
 fate-filter-transpose: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf transpose
&lt;/pre&gt;</description>
    <dc:creator>Martin Storsjö</dc:creator>
    <dc:date>2013-05-20T08:33:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46239">
    <title>Using AVFormatContext to decode a file - memory leakwhen using avcodec_copy_context</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46239</link>
    <description>&lt;pre&gt;Hi,

Last couple of days I've been working on a video player using libav. And
because there is no
clean example of how to use AVFormatContext to demux a video file and
process the
frames I've based my code on talks in #libav-devel, the api-example.c and
code I found
when googling.

After being advised to copy the AVCodecContext from the video stream found
in AVFormatContext.streams,
I got a memory leak when closing/free-ing the AVCodecContext. I'm copying
the codec context like this:
https://gist.github.com/roxlu/ed76cd1465bc1cdb16b1#file-avdecoder-cpp-L107-L118

After diving into the source code of libav, I saw that avcodec_copy_context
copies the extradata, but
only frees it when it's an encoder. See the related code here:
https://gist.github.com/roxlu/5f0bbed4da1a52c971c4#file-utils-c-L1464-L1465

The documentation of avcodec_close says:
*"Close a given AVCodecContext and free all the data associated with it
(but not the AVCodecContext itself)."*
*
*
&amp;lt; at &amp;gt;nevcairiel told me that the source code tells otherwise and that you need
to free the extradata manually:
"** - decoding: Set/allocated/freed by user."*.

Therefore I changed my code and freed the extradata manually. Sadly this
didn't fix the memory leak.

I did found a workaround by manually allocating an AVCodecContext and
copying/freeing the extradata
myself.  I'm not having a memory leak anymore, but I'm still curious if
it's a bug in libav or my code.

Thanks,
roxlu
&lt;/pre&gt;</description>
    <dc:creator>Diederick Huijbers ☾</dc:creator>
    <dc:date>2013-05-19T13:15:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46237">
    <title>[PATCH] make: Allow ignoring missing config variables</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46237</link>
    <description>&lt;pre&gt;If upgrading an older build config, where newly added e.g.
decoders aren't present, to a newer git version where fate tests
exist that have dependencies declared on this codec, all make
invocations error out with "No such config: CONFIG_NEW_DECODER".
This is an intended feature to make sure that fate test
dependencies actually refer to existing config items.

In cases where upgrading an old build (and reconfiguring with
"make config"), this is an inconvenience. With this patch in
place, the caller can ignore these missing dependencies
by setting ALLOW_MISSING_CONFIG=1 during that call.
---
 tests/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 939490b..7525243 100644
--- a/tests/Makefile
+++ b/tests/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,7 +20,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data
 
 tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN
 
-CHKCFG  = $(if $($(1))$(!$(1)),$($(1)), $(error No such config: $(1)))
+CHKCFG  = $(if $($(1))$(!$(1)),$($(1)), $(if $(ALLOW_MISSING_CONFIG), , $(error No such config: $(1))))
 
 ALLYES  = $(strip $(call XYES, $(1)))
 XYES    = $(if $(strip $(1)),                                           \
&lt;/pre&gt;</description>
    <dc:creator>Martin Storsjö</dc:creator>
    <dc:date>2013-05-19T20:38:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46226">
    <title>Small vorbis cleanup</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46226</link>
    <description>&lt;pre&gt;A small set to get rid of the assert.

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-19T17:41:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46224">
    <title>[PATCH 1/1] mpegvideo: unref old current_picturebefore allocating a new one</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46224</link>
    <description>&lt;pre&gt;Allows decoding with only three frame buffers with frame reference
counting. Fixes VAAPI based decoding in vlc which uses only three
frame buffers for the mpegvideo-based codecs.
---
 libavcodec/mpegvideo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b5f1587..b175d32 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1495,6 +1495,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
         }
     }
 
+    ff_mpeg_unref_picture(s, &amp;amp;s-&amp;gt;current_picture);
+
     if (!s-&amp;gt;encoding) {
         ff_release_unused_pictures(s, 1);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1542,7 +1544,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
     //     s-&amp;gt;current_picture_ptr-&amp;gt;quality = s-&amp;gt;new_picture_ptr-&amp;gt;quality;
     s-&amp;gt;current_picture_ptr-&amp;gt;f.key_frame = s-&amp;gt;pict_type == AV_PICTURE_TYPE_I;
 
-    ff_mpeg_unref_picture(s, &amp;amp;s-&amp;gt;current_picture);
     if ((ret = ff_mpeg_ref_picture(s, &amp;amp;s-&amp;gt;current_picture,
                                    s-&amp;gt;current_picture_ptr)) &amp;lt; 0)
         return ret;
&lt;/pre&gt;</description>
    <dc:creator>Janne Grunau</dc:creator>
    <dc:date>2013-05-19T13:34:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46222">
    <title>Invitation to connect on LinkedIn</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46222</link>
    <description>&lt;pre&gt;LinkedIn
------------



I'd like to add you to my professional network on LinkedIn.

- Stas

Stas Oskin
CTO at eyecam
Israel

Confirm that you know Stas Oskin:
https://www.linkedin.com/e/-yb2raf-hgvy7mzc-3g/isd/13394342437/xQzhK2aL/?hs=false&amp;amp;tok=1IeN9i3otJ95M1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-yb2raf-hgvy7mzc-3g/qxBs_HW79xfhyWpS4lsvpOW79xfh3Ctvi6/goo/libav-devel%40libav%2Eorg/20061/I4437374796_1/?hs=false&amp;amp;tok=2VIIHII4hJ95M1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.


  
&lt;/pre&gt;</description>
    <dc:creator>Stas Oskin</dc:creator>
    <dc:date>2013-05-19T08:13:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46219">
    <title>[PATCH 1/2] configure: Add basic valgrind-massifsupport</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46219</link>
    <description>&lt;pre&gt;With the parameter --valgrind-massif, the configure script sets
reasonable defaults that can be overridden as explained in
the documentation.
---
 configure          | 4 ++++
 doc/developer.texi | 7 ++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 94804bd..f39a860 100755
--- a/configure
+++ b/configure
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2211,6 +2211,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; case "$toolchain" in
         add_cflags  -fsanitize=thread -pie
         add_ldflags -fsanitize=thread -pie
     ;;
+    valgrind-massif)
+        target_exec_default="valgrind"
+        target_exec_args="--alloc-fn=av_malloc --alloc-fn=av_mallocz"
+    ;;
     valgrind-memcheck)
         target_exec_default="valgrind"
         target_exec_args="--track-origins=yes --leak-check=full"
diff --git a/doc/developer.texi b/doc/developer.texi
index c3d0f20..58635f8 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -578,9 +578,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; new test.
 
 The configure script provides a shortcut for using valgrind to spot bugs
 related to memory handling. Just add the option
-&amp;lt; at &amp;gt;code{--toolchain=valgrind-memcheck} to your configure line, and
-reasonable defaults will be set for running FATE under the supervision
-of the &amp;lt; at &amp;gt;strong{memcheck} tool of the valgrind suite.
+&amp;lt; at &amp;gt;code{--toolchain=valgrind-memcheck} or &amp;lt; at &amp;gt;code{--toolchain=valgrind-massif}
+to your configure line, and reasonable defaults will be set for running
+FATE under the supervision of either the &amp;lt; at &amp;gt;strong{memcheck} or the
+&amp;lt; at &amp;gt;strong{massif} tool of the valgrind suite.
 
 In case you need finer control over how valgrind is invoked, use the
 &amp;lt; at &amp;gt;code{--target-exec='valgrind &amp;lt;your_custom_valgrind_options&amp;gt;} option in
&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-18T18:44:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46209">
    <title>[PATCH 1/3] wavpack: K&amp;R formatting cosmetics</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46209</link>
    <description>&lt;pre&gt;---

Leftover from the previous set.

 libavcodec/wavpack.c | 45 ++++++++++++++++++++++++++++++---------------
 1 file changed, 30 insertions(+), 15 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 37e8768..c74901d 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -406,7 +406,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc,
     if (s-&amp;gt;extra_bits){
         S &amp;lt;&amp;lt;= s-&amp;gt;extra_bits;

-        if (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp; get_bits_left(&amp;amp;s-&amp;gt;gb_extra_bits) &amp;gt;= s-&amp;gt;extra_bits) {
+        if (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp;
+            get_bits_left(&amp;amp;s-&amp;gt;gb_extra_bits) &amp;gt;= s-&amp;gt;extra_bits) {
             S |= get_bits(&amp;amp;s-&amp;gt;gb_extra_bits, s-&amp;gt;extra_bits);
             *crc = *crc * 9 + (S &amp;amp; 0xffff) * 3 + ((unsigned)S &amp;gt;&amp;gt; 16);
         }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -460,7 +461,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
             if (shift) {
                 S &amp;lt;&amp;lt;= shift;
                 if ((s-&amp;gt;float_flag &amp;amp; WV_FLT_SHIFT_ONES) ||
-                    (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp; (s-&amp;gt;float_flag &amp;amp; WV_FLT_SHIFT_SAME) &amp;amp;&amp;amp;
+                    (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp;
+                     (s-&amp;gt;float_flag &amp;amp; WV_FLT_SHIFT_SAME) &amp;amp;&amp;amp;
                      get_bits1(&amp;amp;s-&amp;gt;gb_extra_bits))) {
                     S |= (1 &amp;lt;&amp;lt; shift) - 1;
                 } else if (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -780,7 +782,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,

     s = wc-&amp;gt;fdec[block_no];
     if (!s) {
-        av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n", block_no);
+        av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n",
+               block_no);
         return -1;
     }

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -831,11 +834,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
         if (id &amp;amp; WP_IDF_ODD)
             size--;
         if (size &amp;lt; 0) {
-            av_log(avctx, AV_LOG_ERROR, "Got incorrect block %02X with size %i\n", id, size);
+            av_log(avctx, AV_LOG_ERROR,
+                   "Got incorrect block %02X with size %i\n",
+                   id, size);
             break;
         }
         if (buf + ssize &amp;gt; buf_end) {
-            av_log(avctx, AV_LOG_ERROR, "Block size %i is out of bounds\n", size);
+            av_log(avctx, AV_LOG_ERROR,
+                   "Block size %i is out of bounds\n",
+                   size);
             break;
         }
         if (id &amp;amp; WP_IDF_IGNORE) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -919,8 +926,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             break;
         case WP_ID_ENTROPY:
             if (size != 6 * (s-&amp;gt;stereo_in + 1)) {
-                av_log(avctx, AV_LOG_ERROR, "Entropy vars size should be %i, "
-                       "got %i", 6 * (s-&amp;gt;stereo_in + 1), size);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Entropy vars size should be %i, got %i",
+                       6 * (s-&amp;gt;stereo_in + 1), size);
                 buf += ssize;
                 continue;
             }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -958,7 +966,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             break;
         case WP_ID_INT32INFO:
             if (size != 4) {
-                av_log(avctx, AV_LOG_ERROR, "Invalid INT32INFO, size = %i, sent_bits = %i\n", size, *buf);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Invalid INT32INFO, size = %i, sent_bits = %i\n",
+                       size, *buf);
                 buf += ssize;
                 continue;
             }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -986,7 +996,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             break;
         case WP_ID_FLOATINFO:
             if (size != 4) {
-                av_log(avctx, AV_LOG_ERROR, "Invalid FLOATINFO, size = %i\n", size);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Invalid FLOATINFO, size = %i\n",
+                       size);
                 buf += ssize;
                 continue;
             }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1020,7 +1032,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             break;
         case WP_ID_CHANINFO:
             if (size &amp;lt;= 1) {
-                av_log(avctx, AV_LOG_ERROR, "Insufficient channel information\n");
+                av_log(avctx, AV_LOG_ERROR,
+                       "Insufficient channel information\n");
                 return -1;
             }
             chan = *buf++;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1040,9 +1053,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
                 chmask = avctx-&amp;gt;channel_layout;
             }
             if (chan != avctx-&amp;gt;channels) {
-                av_log(avctx, AV_LOG_ERROR, "Block reports total %d channels, "
-                       "decoder believes it's %d channels\n", chan,
-                       avctx-&amp;gt;channels);
+                av_log(avctx, AV_LOG_ERROR,
+                       "Block reports total %d channels, "
+                       "decoder believes it's %d channels\n",
+                       chan, avctx-&amp;gt;channels);
                 return -1;
             }
             if (!avctx-&amp;gt;channel_layout)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1223,8 +1237,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
             }
         }
         if (frame_size &amp;lt; 0 || frame_size &amp;gt; buf_size) {
-            av_log(avctx, AV_LOG_ERROR, "Block %d has invalid size (size %d "
-                   "vs. %d bytes left)\n", s-&amp;gt;block, frame_size, buf_size);
+            av_log(avctx, AV_LOG_ERROR,
+                   "Block %d has invalid size (size %d vs. %d bytes left)\n",
+                   s-&amp;gt;block, frame_size, buf_size);
             wavpack_decode_flush(avctx);
             return -1;
         }
--
1.8.2.1

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-18T14:02:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46208">
    <title>[RFC] vorbis: drop a (dis)optimization and relativeassert</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46208</link>
    <description>&lt;pre&gt;On recent hardware and compiler using a plain division is faster.
---

Some numbers using gcc-4.8 in -Og mode.

avconv
1399640 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1385903 decicycles in vorbis, 2048 runs, 0 skips
avconv
1422062 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1393888 decicycles in vorbis, 2048 runs, 0 skips
avconv
1420744 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1389816 decicycles in vorbis, 2048 runs, 0 skips
avconv
1398754 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1384642 decicycles in vorbis, 2048 runs, 0 skips
avconv
1408228 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1402553 decicycles in vorbis, 2048 runs, 0 skips
avconv
1404719 decicycles in vorbis, 2048 runs, 0 skips
avconv-div
1400232 decicycles in vorbis, 2048 runs, 0 skips


 libavcodec/vorbisdec.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 03c80b4..35e2242 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,9 +42,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define V_MAX_VLCS (1 &amp;lt;&amp;lt; 16)
 #define V_MAX_PARTITIONS (1 &amp;lt;&amp;lt; 20)

-#undef NDEBUG
-#include &amp;lt;assert.h&amp;gt;
-
 typedef struct {
     uint8_t      dimensions;
     uint8_t      lookup_type;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1345,7 +1342,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,
         voffset = vr-&amp;gt;begin;
         for (partition_count = 0; partition_count &amp;lt; ptns_to_read;) {  // SPEC        error
             if (!pass) {
-                unsigned inverse_class = ff_inverse[vr-&amp;gt;classifications];
                 for (j_times_ptns_to_read = 0, j = 0; j &amp;lt; ch_used; ++j) {
                     if (!do_not_decode[j]) {
                         unsigned temp = get_vlc2(gb, vc-&amp;gt;codebooks[vr-&amp;gt;classbook].vlc.table,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1353,11 +1349,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static av_always_inline int vorbis_residue_decode_internal(vorbis_context *vc,

                         av_dlog(NULL, "Classword: %u\n", temp);

-                        assert(vr-&amp;gt;classifications &amp;gt; 1 &amp;amp;&amp;amp; temp &amp;lt;= 65536); //needed for inverse[]
                         for (i = 0; i &amp;lt; c_p_c; ++i) {
-                            unsigned temp2;
+                            unsigned temp2 = temp / vr-&amp;gt;classifications;

-                            temp2 = (((uint64_t)temp) * inverse_class) &amp;gt;&amp;gt; 32;
                             if (partition_count + c_p_c - 1 - i &amp;lt; ptns_to_read)
                                 classifs[j_times_ptns_to_read + partition_count + c_p_c - 1 - i] = temp - temp2 * vr-&amp;gt;classifications;
                             temp = temp2;
--
1.8.2.1

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-18T13:40:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46202">
    <title>[PATCH 2/2] prores: update FATE test to account for alpha plane present in the test sample</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46202</link>
    <description>&lt;pre&gt;---
 tests/fate/prores.mak       |    2 +-
 tests/ref/fate/prores-alpha |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/fate/prores.mak b/tests/fate/prores.mak
index 9c1a1b1..ccc71af 100644
--- a/tests/fate/prores.mak
+++ b/tests/fate/prores.mak
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -11,4 +11,4 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fate-prores-422:       CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProR
 fate-prores-422_hq:    CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_HQ.mov -pix_fmt yuv422p10le
 fate-prores-422_lt:    CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov -pix_fmt yuv422p10le
 fate-prores-422_proxy: CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov -pix_fmt yuv422p10le
-fate-prores-alpha:     CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuv444p10le
+fate-prores-alpha:     CMD = framecrc -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuva444p10le
diff --git a/tests/ref/fate/prores-alpha b/tests/ref/fate/prores-alpha
index 80442fe..97be6cf 100644
--- a/tests/ref/fate/prores-alpha
+++ b/tests/ref/fate/prores-alpha
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1,3 +1,3 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #tb 0: 1/2997
-0,          0,          0,        0, 12441600, 0x254d8f95
-0,        100,        100,        0, 12441600, 0x254d8f95
+0,          0,          0,        0, 16588800, 0x8dcdb600
+0,        100,        100,        0, 16588800, 0x8dcdb600
&lt;/pre&gt;</description>
    <dc:creator>Kostya Shishkov</dc:creator>
    <dc:date>2013-05-18T05:16:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46201">
    <title>[PATCH 1/2] proresdec: simplify slice componentoffsets handling</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46201</link>
    <description>&lt;pre&gt;---
I promised that after all...
---
 libavcodec/proresdec.c |   50 ++++++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index 0d1eb7a..8da2db6 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -559,6 +559,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
     int slice_data_size, hdr_size;
     int y_data_size, u_data_size, v_data_size, a_data_size;
     int y_linesize, u_linesize, v_linesize, a_linesize;
+    int coff[4];
 
     buf             = ctx-&amp;gt;slice_data[slice_num].index;
     slice_data_size = ctx-&amp;gt;slice_data[slice_num + 1].index - buf;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -586,6 +587,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
         v_linesize &amp;lt;&amp;lt;= 1;
         a_linesize &amp;lt;&amp;lt;= 1;
     }
+    y_data += (mb_y_pos &amp;lt;&amp;lt; 4) * y_linesize + (mb_x_pos &amp;lt;&amp;lt; 5);
+    u_data += (mb_y_pos &amp;lt;&amp;lt; 4) * u_linesize + (mb_x_pos &amp;lt;&amp;lt; ctx-&amp;gt;mb_chroma_factor);
+    v_data += (mb_y_pos &amp;lt;&amp;lt; 4) * v_linesize + (mb_x_pos &amp;lt;&amp;lt; ctx-&amp;gt;mb_chroma_factor);
+    a_data += (mb_y_pos &amp;lt;&amp;lt; 4) * a_linesize + (mb_x_pos &amp;lt;&amp;lt; 5);
 
     if (slice_data_size &amp;lt; 6) {
         av_log(avctx, AV_LOG_ERROR, "slice data too small\n");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -594,15 +599,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
 
     /* parse slice header */
     hdr_size    = buf[0] &amp;gt;&amp;gt; 3;
+    coff[0]     = hdr_size;
     y_data_size = AV_RB16(buf + 2);
+    coff[1]     = coff[0] + y_data_size;
     u_data_size = AV_RB16(buf + 4);
-    v_data_size = hdr_size &amp;gt; 7 ? AV_RB16(buf + 6) :
-        slice_data_size - y_data_size - u_data_size - hdr_size;
-    a_data_size = slice_data_size - y_data_size - u_data_size -
-                  v_data_size - hdr_size;
-
-    if (hdr_size + y_data_size + u_data_size + v_data_size &amp;gt; slice_data_size ||
-        v_data_size &amp;lt; 0 || hdr_size &amp;lt; 6) {
+    coff[2]     = coff[1] + u_data_size;
+    v_data_size = hdr_size &amp;gt; 7 ? AV_RB16(buf + 6) : slice_data_size - coff[2];
+    coff[3]     = coff[2] + v_data_size;
+    a_data_size = slice_data_size - coff[3];
+
+    /* if V or alpha component size is negative that means that previous
+       component sizes are too large */
+    if (v_data_size &amp;lt; 0 || a_data_size &amp;lt; 0 || hdr_size &amp;lt; 6) {
         av_log(avctx, AV_LOG_ERROR, "invalid data size\n");
         return AVERROR_INVALIDDATA;
     }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -621,37 +629,29 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
     }
 
     /* decode luma plane */
-    decode_slice_plane(ctx, td, buf + hdr_size, y_data_size,
-                       (uint16_t*) (y_data + (mb_y_pos &amp;lt;&amp;lt; 4) * y_linesize +
-                                    (mb_x_pos &amp;lt;&amp;lt; 5)), y_linesize,
+    decode_slice_plane(ctx, td, buf + coff[0], y_data_size,
+                       (uint16_t*) y_data, y_linesize,
                        mbs_per_slice, 4, slice_width_factor + 2,
                        td-&amp;gt;qmat_luma_scaled, 0);
 
     /* decode U chroma plane */
-    decode_slice_plane(ctx, td, buf + hdr_size + y_data_size, u_data_size,
-                       (uint16_t*) (u_data + (mb_y_pos &amp;lt;&amp;lt; 4) * u_linesize +
-                                    (mb_x_pos &amp;lt;&amp;lt; ctx-&amp;gt;mb_chroma_factor)),
-                       u_linesize, mbs_per_slice, ctx-&amp;gt;num_chroma_blocks,
+    decode_slice_plane(ctx, td, buf + coff[1], u_data_size,
+                       (uint16_t*) u_data, u_linesize,
+                       mbs_per_slice, ctx-&amp;gt;num_chroma_blocks,
                        slice_width_factor + ctx-&amp;gt;chroma_factor - 1,
                        td-&amp;gt;qmat_chroma_scaled, 1);
 
     /* decode V chroma plane */
-    decode_slice_plane(ctx, td, buf + hdr_size + y_data_size + u_data_size,
-                       v_data_size,
-                       (uint16_t*) (v_data + (mb_y_pos &amp;lt;&amp;lt; 4) * v_linesize +
-                                    (mb_x_pos &amp;lt;&amp;lt; ctx-&amp;gt;mb_chroma_factor)),
-                       v_linesize, mbs_per_slice, ctx-&amp;gt;num_chroma_blocks,
+    decode_slice_plane(ctx, td, buf + coff[2], v_data_size,
+                       (uint16_t*) v_data, v_linesize,
+                       mbs_per_slice, ctx-&amp;gt;num_chroma_blocks,
                        slice_width_factor + ctx-&amp;gt;chroma_factor - 1,
                        td-&amp;gt;qmat_chroma_scaled, 1);
 
     /* decode alpha plane if available */
     if (a_data &amp;amp;&amp;amp; a_data_size)
-        decode_alpha_plane(ctx, td,
-                           buf + hdr_size + y_data_size +
-                               u_data_size + v_data_size,
-                           a_data_size,
-                           (uint16_t*) (a_data + (mb_y_pos &amp;lt;&amp;lt; 4) * a_linesize +
-                                        (mb_x_pos &amp;lt;&amp;lt; 5)), a_linesize,
+        decode_alpha_plane(ctx, td, buf + coff[3], a_data_size,
+                           (uint16_t*) a_data, a_linesize,
                            mbs_per_slice);
 
     return 0;
&lt;/pre&gt;</description>
    <dc:creator>Kostya Shishkov</dc:creator>
    <dc:date>2013-05-18T05:16:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46194">
    <title>[PATCH 1/3] wavpack: return meaningful errors</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46194</link>
    <description>&lt;pre&gt;And forward those that were already meaningful.
---
 libavcodec/wavpack.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index c74901d..999e532 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -777,14 +777,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,

     if (block_no &amp;gt;= wc-&amp;gt;fdec_num &amp;amp;&amp;amp; wv_alloc_frame_context(wc) &amp;lt; 0) {
         av_log(avctx, AV_LOG_ERROR, "Error creating frame decode context\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }

     s = wc-&amp;gt;fdec[block_no];
     if (!s) {
         av_log(avctx, AV_LOG_ERROR, "Context for block %d is not present\n",
                block_no);
-        return -1;
+        return AVERROR_INVALIDDATA;
     }

     memset(s-&amp;gt;decorr, 0, MAX_TERMS * sizeof(Decorr));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1034,7 +1034,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             if (size &amp;lt;= 1) {
                 av_log(avctx, AV_LOG_ERROR,
                        "Insufficient channel information\n");
-                return -1;
+                return AVERROR_INVALIDDATA;
             }
             chan = *buf++;
             switch (size - 2) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1057,7 +1057,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
                        "Block reports total %d channels, "
                        "decoder believes it's %d channels\n",
                        chan, avctx-&amp;gt;channels);
-                return -1;
+                return AVERROR_INVALIDDATA;
             }
             if (!avctx-&amp;gt;channel_layout)
                 avctx-&amp;gt;channel_layout = chmask;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1072,31 +1072,31 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,

     if (!got_terms) {
         av_log(avctx, AV_LOG_ERROR, "No block with decorrelation terms\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (!got_weights) {
         av_log(avctx, AV_LOG_ERROR, "No block with decorrelation weights\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (!got_samples) {
         av_log(avctx, AV_LOG_ERROR, "No block with decorrelation samples\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (!got_entropy) {
         av_log(avctx, AV_LOG_ERROR, "No block with entropy info\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (s-&amp;gt;hybrid &amp;amp;&amp;amp; !got_hybrid) {
         av_log(avctx, AV_LOG_ERROR, "Hybrid config not found\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (!got_bs) {
         av_log(avctx, AV_LOG_ERROR, "Packed samples not found\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (!got_float &amp;amp;&amp;amp; avctx-&amp;gt;sample_fmt == AV_SAMPLE_FMT_FLT) {
         av_log(avctx, AV_LOG_ERROR, "Float information not found\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
     if (s-&amp;gt;got_extra_bits &amp;amp;&amp;amp; avctx-&amp;gt;sample_fmt != AV_SAMPLE_FMT_FLT) {
         const int size   = get_bits_left(&amp;amp;s-&amp;gt;gb_extra_bits);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1116,7 +1116,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             samplecount = wv_unpack_stereo(s, &amp;amp;s-&amp;gt;gb, samples, AV_SAMPLE_FMT_FLT);

         if (samplecount &amp;lt; 0)
-            return -1;
+            return samplecount;

         samplecount &amp;gt;&amp;gt;= 1;
     } else {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1130,7 +1130,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
             samplecount = wv_unpack_mono(s, &amp;amp;s-&amp;gt;gb, samples, AV_SAMPLE_FMT_FLT);

         if (samplecount &amp;lt; 0)
-            return -1;
+            return samplecount;

         if (s-&amp;gt;stereo &amp;amp;&amp;amp; avctx-&amp;gt;sample_fmt == AV_SAMPLE_FMT_S16) {
             int16_t *dst = (int16_t*)samples + 1;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1205,7 +1205,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
     if (s-&amp;gt;samples &amp;lt;= 0) {
         av_log(avctx, AV_LOG_ERROR, "Invalid number of samples: %d\n",
                s-&amp;gt;samples);
-        return AVERROR(EINVAL);
+        return AVERROR_INVALIDDATA;
     }

     if (frame_flags &amp;amp; 0x80) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1241,13 +1241,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
                    "Block %d has invalid size (size %d vs. %d bytes left)\n",
                    s-&amp;gt;block, frame_size, buf_size);
             wavpack_decode_flush(avctx);
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         if ((samplecount = wavpack_decode_block(avctx, s-&amp;gt;block,
                                                 frame-&amp;gt;data[0], got_frame_ptr,
                                                 buf, frame_size)) &amp;lt; 0) {
             wavpack_decode_flush(avctx);
-            return -1;
+            return samplecount;
         }
         s-&amp;gt;block++;
         buf += frame_size; buf_size -= frame_size;
--
1.8.2.1

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T21:15:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46177">
    <title>[PATCH] prores: decode alpha plane when it's present</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46177</link>
    <description>&lt;pre&gt;---
Maybe I'll work on encoder support as well.
---
 libavcodec/proresdec.c |  112 ++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 103 insertions(+), 9 deletions(-)

diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c
index c42e444..0d1eb7a 100644
--- a/libavcodec/proresdec.c
+++ b/libavcodec/proresdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -134,12 +134,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     ctx-&amp;gt;chroma_factor     = (buf[12] &amp;gt;&amp;gt; 6) &amp;amp; 3;
     ctx-&amp;gt;mb_chroma_factor  = ctx-&amp;gt;chroma_factor + 2;
     ctx-&amp;gt;num_chroma_blocks = (1 &amp;lt;&amp;lt; ctx-&amp;gt;chroma_factor) &amp;gt;&amp;gt; 1;
+    ctx-&amp;gt;alpha_info        = buf[17] &amp;amp; 0xf;
+
+    if (ctx-&amp;gt;alpha_info &amp;gt; 2) {
+        av_log(avctx, AV_LOG_ERROR, "Invalid alpha mode %d\n", ctx-&amp;gt;alpha_info);
+        return AVERROR_INVALIDDATA;
+    }
+
     switch (ctx-&amp;gt;chroma_factor) {
     case 2:
-        avctx-&amp;gt;pix_fmt = AV_PIX_FMT_YUV422P10;
+        avctx-&amp;gt;pix_fmt = ctx-&amp;gt;alpha_info ? AV_PIX_FMT_YUVA422P10
+                                         : AV_PIX_FMT_YUV422P10;
         break;
     case 3:
-        avctx-&amp;gt;pix_fmt = AV_PIX_FMT_YUV444P10;
+        avctx-&amp;gt;pix_fmt = ctx-&amp;gt;alpha_info ? AV_PIX_FMT_YUVA444P10
+                                         : AV_PIX_FMT_YUV444P10;
         break;
     default:
         av_log(avctx, AV_LOG_ERROR,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -168,10 +177,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_frame_header(ProresContext *ctx, const uint8_t *buf,
     avctx-&amp;gt;color_trc       = buf[15];
     avctx-&amp;gt;colorspace      = buf[16];
 
-    ctx-&amp;gt;alpha_info = buf[17] &amp;amp; 0xf;
-    if (ctx-&amp;gt;alpha_info)
-        avpriv_report_missing_feature(avctx, "Alpha channel");
-
     ctx-&amp;gt;qmat_changed = 0;
     ptr   = buf + 20;
     flags = buf[19];
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -466,6 +471,78 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void decode_slice_plane(ProresContext *ctx, ProresThreadData *td,
 }
 
 
+static void unpack_alpha(GetBitContext *gb, uint16_t *dst, int num_coeffs,
+                         const int num_bits)
+{
+    const int mask = (1 &amp;lt;&amp;lt; num_bits) - 1;
+    int i, idx, val, alpha_val;
+
+    idx       = 0;
+    alpha_val = mask;
+    do {
+        do {
+            if (get_bits1(gb))
+                val = get_bits(gb, num_bits);
+            else {
+                int sign;
+                val  = get_bits(gb, num_bits == 16 ? 7 : 4);
+                sign = val &amp;amp; 1;
+                val  = (val + 2) &amp;gt;&amp;gt; 1;
+                if (sign)
+                    val = -val;
+            }
+            alpha_val = (alpha_val + val) &amp;amp; mask;
+            if (num_bits == 16)
+                dst[idx++] = alpha_val &amp;gt;&amp;gt; 6;
+            else
+                dst[idx++] = (alpha_val &amp;lt;&amp;lt; 2) | (alpha_val &amp;gt;&amp;gt; 6);
+            if (idx == num_coeffs - 1)
+                break;
+        } while (get_bits1(gb));
+        val = get_bits(gb, 4);
+        if (!val)
+            val = get_bits(gb, 11);
+        if (idx + val &amp;gt; num_coeffs)
+            val = num_coeffs - idx;
+        if (num_bits == 16)
+            for (i = 0; i &amp;lt; val; i++)
+                dst[idx++] = alpha_val &amp;gt;&amp;gt; 6;
+        else
+            for (i = 0; i &amp;lt; val; i++)
+                dst[idx++] = (alpha_val &amp;lt;&amp;lt; 2) | (alpha_val &amp;gt;&amp;gt; 6);
+    } while (idx &amp;lt; num_coeffs);
+}
+
+/**
+ * Decode alpha slice plane.
+ */
+static void decode_alpha_plane(ProresContext *ctx, ProresThreadData *td,
+                               const uint8_t *buf, int data_size,
+                               uint16_t *out_ptr, int linesize,
+                               int mbs_per_slice)
+{
+    GetBitContext gb;
+    int i;
+    uint16_t *block_ptr;
+
+    memset(td-&amp;gt;blocks, 0, 8 * 4 * 64 * sizeof(*td-&amp;gt;blocks));
+
+    init_get_bits(&amp;amp;gb, buf, data_size &amp;lt;&amp;lt; 3);
+
+    if (ctx-&amp;gt;alpha_info == 2)
+        unpack_alpha(&amp;amp;gb, td-&amp;gt;blocks, mbs_per_slice * 4 * 64, 16);
+    else
+        unpack_alpha(&amp;amp;gb, td-&amp;gt;blocks, mbs_per_slice * 4 * 64, 8);
+
+    block_ptr = td-&amp;gt;blocks;
+
+    for (i = 0; i &amp;lt; 16; i++) {
+        memcpy(out_ptr, block_ptr, 16 * mbs_per_slice * sizeof(*out_ptr));
+        out_ptr   += linesize &amp;gt;&amp;gt; 1;
+        block_ptr += 16 * mbs_per_slice;
+    }
+}
+
 static int decode_slice(AVCodecContext *avctx, void *tdata)
 {
     ProresThreadData *td = tdata;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -476,11 +553,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
     int slice_num = td-&amp;gt;slice_num;
     int mbs_per_slice = td-&amp;gt;slice_width;
     const uint8_t *buf;
-    uint8_t *y_data, *u_data, *v_data;
+    uint8_t *y_data, *u_data, *v_data, *a_data;
     AVFrame *pic = ctx-&amp;gt;frame;
     int i, sf, slice_width_factor;
-    int slice_data_size, hdr_size, y_data_size, u_data_size, v_data_size;
-    int y_linesize, u_linesize, v_linesize;
+    int slice_data_size, hdr_size;
+    int y_data_size, u_data_size, v_data_size, a_data_size;
+    int y_linesize, u_linesize, v_linesize, a_linesize;
 
     buf             = ctx-&amp;gt;slice_data[slice_num].index;
     slice_data_size = ctx-&amp;gt;slice_data[slice_num + 1].index - buf;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -490,19 +568,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
     y_data     = pic-&amp;gt;data[0];
     u_data     = pic-&amp;gt;data[1];
     v_data     = pic-&amp;gt;data[2];
+    a_data     = pic-&amp;gt;data[3];
     y_linesize = pic-&amp;gt;linesize[0];
     u_linesize = pic-&amp;gt;linesize[1];
     v_linesize = pic-&amp;gt;linesize[2];
+    a_linesize = pic-&amp;gt;linesize[3];
 
     if (pic-&amp;gt;interlaced_frame) {
         if (!(pic_num ^ pic-&amp;gt;top_field_first)) {
             y_data += y_linesize;
             u_data += u_linesize;
             v_data += v_linesize;
+            a_data += a_linesize;
         }
         y_linesize &amp;lt;&amp;lt;= 1;
         u_linesize &amp;lt;&amp;lt;= 1;
         v_linesize &amp;lt;&amp;lt;= 1;
+        a_linesize &amp;lt;&amp;lt;= 1;
     }
 
     if (slice_data_size &amp;lt; 6) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -516,6 +598,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
     u_data_size = AV_RB16(buf + 4);
     v_data_size = hdr_size &amp;gt; 7 ? AV_RB16(buf + 6) :
         slice_data_size - y_data_size - u_data_size - hdr_size;
+    a_data_size = slice_data_size - y_data_size - u_data_size -
+                  v_data_size - hdr_size;
 
     if (hdr_size + y_data_size + u_data_size + v_data_size &amp;gt; slice_data_size ||
         v_data_size &amp;lt; 0 || hdr_size &amp;lt; 6) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -560,6 +644,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int decode_slice(AVCodecContext *avctx, void *tdata)
                        slice_width_factor + ctx-&amp;gt;chroma_factor - 1,
                        td-&amp;gt;qmat_chroma_scaled, 1);
 
+    /* decode alpha plane if available */
+    if (a_data &amp;amp;&amp;amp; a_data_size)
+        decode_alpha_plane(ctx, td,
+                           buf + hdr_size + y_data_size +
+                               u_data_size + v_data_size,
+                           a_data_size,
+                           (uint16_t*) (a_data + (mb_y_pos &amp;lt;&amp;lt; 4) * a_linesize +
+                                        (mb_x_pos &amp;lt;&amp;lt; 5)), a_linesize,
+                           mbs_per_slice);
+
     return 0;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Kostya Shishkov</dc:creator>
    <dc:date>2013-05-17T17:43:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46167">
    <title>[PATCH 1/3] mjpeg: Validate sampling factors</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46167</link>
    <description>&lt;pre&gt;They must be non-zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable-LOOeJiBropLYtjvyW6yDsg&amp;lt; at &amp;gt;public.gmane.org
---
 libavcodec/mjpegdec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ef46c5f..83b40d9 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -265,6 +265,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         s-&amp;gt;quant_index[i] = get_bits(&amp;amp;s-&amp;gt;gb, 8);
         if (s-&amp;gt;quant_index[i] &amp;gt;= 4)
             return AVERROR_INVALIDDATA;
+        if (!s-&amp;gt;h_count[i] || !s-&amp;gt;v_count[i]) {
+            av_log(s-&amp;gt;avctx, AV_LOG_ERROR,
+                   "Invalid sampling factor in component %d %d:%d\n",
+                   i, s-&amp;gt;h_count[i], s-&amp;gt;v_count[i]);
+            return AVERROR_INVALIDDATA;
+        }
+
         av_log(s-&amp;gt;avctx, AV_LOG_DEBUG, "component %d %d:%d id: %d quant:%d\n",
                i, s-&amp;gt;h_count[i], s-&amp;gt;v_count[i],
                s-&amp;gt;component_id[i], s-&amp;gt;quant_index[i]);
&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T15:35:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46160">
    <title>[PATCH] configure: msvc: Set the target windowsversion to XP if no target is set</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46160</link>
    <description>&lt;pre&gt;MSVC 2010 (or more precisely, Windows SDK 7.0 which comes with MSVC
2010) sets _WIN32_WINNT to the constant for Windows 7 if nothing is
set. This could lead to the libav configure script detecting and
using functions only present in Windows 7 or newer, which in most
cases isn't desired. If the caller explicitly wants this, the caller
can add the _WIN32_WINNT define via --extra-cflags, setting the desired
version.
---
 configure |    1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 94804bd..79b0a92 100755
--- a/configure
+++ b/configure
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3197,6 +3197,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; elif check_func_headers stdlib.h _get_doserrno; then
     add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf   \
                                  _snprintf=avpriv_snprintf  \
                                  vsnprintf=avpriv_vsnprintf
+    check_cpp_condition stdlib.h "defined(_WIN32_WINNT)" || add_cppflags -D_WIN32_WINNT=0x0502
 elif check_cpp_condition stddef.h "defined __KLIBC__"; then
     libc_type=klibc
 fi
&lt;/pre&gt;</description>
    <dc:creator>Martin Storsjö</dc:creator>
    <dc:date>2013-05-17T14:20:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46159">
    <title>[PATCH] jpegls: check the scan offset</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46159</link>
    <description>&lt;pre&gt;Prevent an out of array bound write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable-LOOeJiBropLYtjvyW6yDsg&amp;lt; at &amp;gt;public.gmane.org
---
 libavcodec/jpeglsdec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 3616063..df72ca3 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -306,6 +306,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
     av_dlog(s-&amp;gt;avctx, "JPEG params: ILV=%i Pt=%i BPP=%i, scan = %i\n",
             ilv, point_transform, s-&amp;gt;bits, s-&amp;gt;cur_scan);
     if (ilv == 0) { /* separate planes */
+        if (s-&amp;gt;cur_scan &amp;gt; s-&amp;gt;nb_components) {
+            ret = AVERROR_INVALIDDATA;
+            goto end;
+        }
         off    = s-&amp;gt;cur_scan - 1;
         stride = (s-&amp;gt;nb_components &amp;gt; 1) ? 3 : 1;
         width  = s-&amp;gt;width * stride;
&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T14:20:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46157">
    <title>[PATCH] build: do not leave asserts enabled</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46157</link>
    <description>&lt;pre&gt;A library should not crash on purpose.
---

I find dangerous leaving them around, the performance loss is negligible
probably, but leaving them around on release build feels wrong nonetheless.

 libavcodec/dvdsubenc.c          | 2 +-
 libavcodec/libschroedingerdec.c | 2 +-
 libavcodec/libschroedingerenc.c | 2 +-
 libavcodec/libvorbis.c          | 2 +-
 libavcodec/libxvid_rc.c         | 2 +-
 libavcodec/motion_est.c         | 2 +-
 libavcodec/mpegvideo_xvmc.c     | 2 +-
 libavcodec/qcelpdec.c           | 2 +-
 libavcodec/qdm2.c               | 2 +-
 libavcodec/ratecontrol.c        | 2 +-
 libavcodec/svq1dec.c            | 2 +-
 libavcodec/svq1enc.c            | 2 +-
 libavcodec/vc1.c                | 2 +-
 libavcodec/vc1dec.c             | 2 +-
 libavcodec/vdpau.c              | 2 +-
 libavcodec/vorbisdec.c          | 2 +-
 libavcodec/vorbisenc.c          | 2 +-
 libavcodec/wma.c                | 2 +-
 libavcodec/wmadec.c             | 2 +-
 libavcodec/wmaenc.c             | 2 +-
 libavfilter/vf_yadif.c          | 2 +-
 libavformat/asfdec.c            | 2 +-
 libavformat/asfenc.c            | 2 +-
 libavformat/avidec.c            | 2 +-
 libavformat/flvenc.c            | 2 +-
 libavformat/mov.c               | 2 +-
 libavformat/movenc.c            | 2 +-
 libavformat/mpeg.c              | 2 +-
 libavformat/mpegenc.c           | 2 +-
 libavformat/mux.c               | 2 +-
 libavformat/nutdec.c            | 2 +-
 libavformat/swf.h               | 2 +-
 libavformat/utils.c             | 2 +-
 33 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c
index 5e362b7..c8fb521 100644
--- a/libavcodec/dvdsubenc.c
+++ b/libavcodec/dvdsubenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -21,7 +21,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "avcodec.h"
 #include "bytestream.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 // ncnt is the nibble counter
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index 7fedc63..ee9abf7 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,7 +37,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "libschroedinger.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;


diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 210dd34..fe6f7b4 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,7 +27,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 * (http://dirac.sourceforge.net/specification.html).
 */

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #include &amp;lt;schroedinger/schro.h&amp;gt;
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index 8e02057..aa40d40 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,7 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "vorbis.h"
 #include "vorbis_parser.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /* Number of samples the user should send in each call.
diff --git a/libavcodec/libxvid_rc.c b/libavcodec/libxvid_rc.c
index 9084d33..dc9ca32 100644
--- a/libavcodec/libxvid_rc.c
+++ b/libavcodec/libxvid_rc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -32,7 +32,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "libxvid.h"
 #include "mpegvideo.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /* Wrapper to work around the lack of mkstemp() on mingw.
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 04ae49e..b5a60f0 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,7 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "mathops.h"
 #include "mpegvideo.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define P_LEFT P[1]
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index e95c91f..15ae072 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -25,7 +25,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "avcodec.h"
 #include "mpegvideo.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #include "xvmc.h"
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index ead7d90..f81f13b 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,7 +40,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "acelp_vectors.h"
 #include "lsp.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef enum {
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 1e0811c..f3ccfaa 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,7 +47,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "qdm2data.h"
 #include "qdm2_tablegen.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;


diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 5aaf151..f2d96de 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,7 +31,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "mpegvideo.h"
 #include "libavutil/eval.h"

-#undef NDEBUG // Always check asserts, the speed effect is far too small to disable them.
+//#undef NDEBUG // Always check asserts, the speed effect is far too small to disable them.
 #include &amp;lt;assert.h&amp;gt;

 #ifndef M_E
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 4b8b656..b826a5d 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -39,7 +39,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "mathops.h"
 #include "svq1.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 extern const uint8_t ff_mvtab[33][2];
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 70d1ee5..fe15b2d 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,7 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "svq1.h"
 #include "svq1enc_cb.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct SVQ1Context {
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 23012cd..c0f014c 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,7 +37,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "unary.h"
 #include "simple_idct.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /***********************************************************************/
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index a1c9890..83c54c1 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,7 +40,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "mathops.h"
 #include "vdpau_internal.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define MB_INTRA_VLC_BITS 9
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index bf1f81e..821baa9 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "h264.h"
 #include "vc1.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #include "vdpau.h"
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 03c80b4..b55c498 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,7 +42,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define V_MAX_VLCS (1 &amp;lt;&amp;lt; 16)
 #define V_MAX_PARTITIONS (1 &amp;lt;&amp;lt; 20)

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct {
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index db0394a..5658b64 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,7 +34,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define BITSTREAM_WRITER_LE
 #include "put_bits.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct {
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index db27646..5a06d9f 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "wma_common.h"
 #include "wmadata.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /* XXX: use same run/length optimization as mpeg decoders */
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index b9b176e..30667cb 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,7 +38,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "wma.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define EXPVLCBITS 8
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index f5bdb67..279a3e6 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,7 +24,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "wma.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;


diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 2b89048..837b655 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "video.h"
 #include "yadif.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define CHECK(j)\
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a7fdc9e..c445944 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,7 +91,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const AVClass asf_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define ASF_MAX_STREAMS 127
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index a523b3a..c8e048b 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,7 +26,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "riff.h"
 #include "asf.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;


diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index cf24e8c..9deb475 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,7 +30,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "dv.h"
 #include "riff.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct AVIStream {
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 37f3777..379f9ce 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -27,7 +27,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "metadata.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 static const AVCodecTag flv_video_codec_ids[] = {
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2d87a08..1257d03 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,7 +51,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "qtpalette.h"


-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /* those functions parse an atom */
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 4ed99b7..8e9ecf8 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,7 +40,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "rtpenc.h"
 #include "mov_chan.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 static const AVOption options[] = {
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 8a4c6d7..d57e423 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,7 +23,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "mpeg.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /*********************************************/
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 85a12d6..ccbe76b 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,7 +31,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;

 #define MAX_PAYLOAD_SIZE 4096

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct PacketDesc {
diff --git a/libavformat/mux.c b/libavformat/mux.c
index b51f906..14d74db 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,7 +42,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "network.h"
 #endif

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /**
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index cc5869e..ad9970b 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -29,7 +29,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "nut.h"
 #include "riff.h"

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 #define NUT_MAX_STREAMS 256    /* arbitrary sanity check value */
diff --git a/libavformat/swf.h b/libavformat/swf.h
index 79c3c1d..419ca87 100644
--- a/libavformat/swf.h
+++ b/libavformat/swf.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -61,7 +61,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define VIDEO_ID 0
 #define SHAPE_ID  1

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 typedef struct SWFContext {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index eb01886..34e42a7 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,7 +42,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "network.h"
 #endif

-#undef NDEBUG
+//#undef NDEBUG
 #include &amp;lt;assert.h&amp;gt;

 /**
--
1.8.2.1

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T13:26:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46144">
    <title>jpegls fixes</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46144</link>
    <description>&lt;pre&gt;Here the full set with Kostya comments hopefully addressed.

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T11:26:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46139">
    <title>[PATCH] jpegls: factorize return paths</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46139</link>
    <description>&lt;pre&gt;---

Needed by following patches adding more failure paths.

 libavcodec/jpeglsdec.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index ca85def..707295b 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -274,7 +274,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
     int i, t = 0;
     uint8_t *zero, *last, *cur;
     JLSState *state;
-    int off = 0, stride = 1, width, shift;
+    int off = 0, stride = 1, width, shift, ret = 0;

     zero = av_mallocz(s-&amp;gt;picture_ptr-&amp;gt;linesize[0]);
     last = zero;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -348,9 +348,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
     } else if (ilv == 2) { /* sample interleaving */
         av_log(s-&amp;gt;avctx, AV_LOG_ERROR,
                "Sample interleaved images are not supported.\n");
-        av_free(state);
-        av_free(zero);
-        return AVERROR(ENOSYS);
+        ret = AVERROR(ENOSYS);
+        goto out;
     }

     if (shift) { /* we need to do point transform or normalize samples */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -376,10 +375,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
             }
         }
     }
+
+out:
     av_free(state);
     av_free(zero);

-    return 0;
+    return ret;
 }

 AVCodec ff_jpegls_decoder = {
--
1.8.2.1

&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T10:39:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.libav.devel/46135">
    <title>[PATCH 1/2] jpegls: do not use magic numbers</title>
    <link>http://comments.gmane.org/gmane.comp.video.libav.devel/46135</link>
    <description>&lt;pre&gt;3 is not exactly descriptive.
---
 libavcodec/jpegls.h    | 4 +++-
 libavcodec/jpeglsdec.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/jpegls.h b/libavcodec/jpegls.h
index 4bf9562..1ab15ee 100644
--- a/libavcodec/jpegls.h
+++ b/libavcodec/jpegls.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,12 +36,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct JpeglsContext {
     AVFrame picture;
 } JpeglsContext;
 
+#define COMPONENTS 3
+
 typedef struct JLSState {
     int T1, T2, T3;
     int A[367], B[367], C[365], N[367];
     int limit, reset, bpp, qbpp, maxval, range;
     int near, twonear;
-    int run_index[3];
+    int run_index[COMPONENTS];
 } JLSState;
 
 extern const uint8_t ff_log2_run[32];
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 6d884a4..d4ecf3d 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -332,7 +332,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
         memset(cur, 0, s-&amp;gt;picture_ptr-&amp;gt;linesize[0]);
         width = s-&amp;gt;width * 3;
         for (i = 0; i &amp;lt; s-&amp;gt;height; i++) {
-            for (j = 0; j &amp;lt; 3; j++) {
+            for (j = 0; j &amp;lt; COMPONENTS; j++) {
                 ls_decode_line(state, s, last + j, cur + j,
                                Rc[j], width, 3, j, 8);
                 Rc[j] = last[j];
&lt;/pre&gt;</description>
    <dc:creator>Luca Barbato</dc:creator>
    <dc:date>2013-05-17T10:36:29</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.video.libav.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.libav.devel</link>
  </textinput>
</rdf:RDF>
