[SCM] libav/experimental: drop post beta2 patches

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Fri Dec 21 15:09:48 UTC 2012


The following commit has been merged in the experimental branch:
commit e2ee5ff14605ec75c1ece0b5c3cbd70f2f2d39ab
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Fri Dec 21 15:38:17 2012 +0100

    drop post beta2 patches

diff --git a/debian/patches/post-9beta2/0001-lzo-Use-AV_COPY-U-macros-where-appropriate.patch b/debian/patches/post-9beta2/0001-lzo-Use-AV_COPY-U-macros-where-appropriate.patch
deleted file mode 100644
index c4ee7e7..0000000
--- a/debian/patches/post-9beta2/0001-lzo-Use-AV_COPY-U-macros-where-appropriate.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From ceb754d041f5f6327fd9195a5f43575af9516daa Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 22 Oct 2012 19:02:20 +0200
-Subject: [PATCH 001/278] lzo: Use AV_COPY*U macros where appropriate
-
----
- libavutil/lzo.c |   28 ++++++++--------------------
- 1 file changed, 8 insertions(+), 20 deletions(-)
-
-diff --git a/libavutil/lzo.c b/libavutil/lzo.c
-index 0d1ec55..101d4f4 100644
---- a/libavutil/lzo.c
-+++ b/libavutil/lzo.c
-@@ -23,6 +23,7 @@
- 
- #include "avutil.h"
- #include "common.h"
-+#include "intreadwrite.h"
- #include "lzo.h"
- 
- /// Define if we may write up to 12 bytes beyond the output buffer.
-@@ -71,19 +72,6 @@ static inline int get_len(LZOContext *c, int x, int mask)
-     return cnt;
- }
- 
--//#define UNALIGNED_LOADSTORE
--#define BUILTIN_MEMCPY
--#ifdef UNALIGNED_LOADSTORE
--#define COPY2(d, s) *(uint16_t *)(d) = *(uint16_t *)(s);
--#define COPY4(d, s) *(uint32_t *)(d) = *(uint32_t *)(s);
--#elif defined(BUILTIN_MEMCPY)
--#define COPY2(d, s) memcpy(d, s, 2);
--#define COPY4(d, s) memcpy(d, s, 4);
--#else
--#define COPY2(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1];
--#define COPY4(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; (d)[2] = (s)[2]; (d)[3] = (s)[3];
--#endif
--
- /**
-  * @brief Copies bytes from input to output buffer with checking.
-  * @param cnt number of bytes to copy, must be >= 0
-@@ -101,7 +89,7 @@ static inline void copy(LZOContext *c, int cnt)
-         c->error |= AV_LZO_OUTPUT_FULL;
-     }
- #if defined(INBUF_PADDED) && defined(OUTBUF_PADDED)
--    COPY4(dst, src);
-+    AV_COPY32U(dst, src);
-     src += 4;
-     dst += 4;
-     cnt -= 4;
-@@ -145,16 +133,16 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
-         memset(dst, *src, cnt);
-     } else {
- #ifdef OUTBUF_PADDED
--        COPY2(dst, src);
--        COPY2(dst + 2, src + 2);
-+        AV_COPY16U(dst,     src);
-+        AV_COPY16U(dst + 2, src + 2);
-         src += 4;
-         dst += 4;
-         cnt -= 4;
-         if (cnt > 0) {
--            COPY2(dst, src);
--            COPY2(dst + 2, src + 2);
--            COPY2(dst + 4, src + 4);
--            COPY2(dst + 6, src + 6);
-+            AV_COPY16U(dst,     src);
-+            AV_COPY16U(dst + 2, src + 2);
-+            AV_COPY16U(dst + 4, src + 4);
-+            AV_COPY16U(dst + 6, src + 6);
-             src += 8;
-             dst += 8;
-             cnt -= 8;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0002-Remove-need-for-padding-in-av_memcpy_backptr.patch b/debian/patches/post-9beta2/0002-Remove-need-for-padding-in-av_memcpy_backptr.patch
deleted file mode 100644
index f1db900..0000000
--- a/debian/patches/post-9beta2/0002-Remove-need-for-padding-in-av_memcpy_backptr.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From d82f188504410fdfa446c5682c128c31bb5851a4 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 23 Oct 2012 18:05:45 +0100
-Subject: [PATCH 002/278] Remove need for padding in av_memcpy_backptr()
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavutil/lzo.c |   16 ++++++++--------
- libavutil/lzo.h |    2 +-
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/libavutil/lzo.c b/libavutil/lzo.c
-index 101d4f4..c17d32f 100644
---- a/libavutil/lzo.c
-+++ b/libavutil/lzo.c
-@@ -132,13 +132,14 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
-     if (back == 1) {
-         memset(dst, *src, cnt);
-     } else {
--#ifdef OUTBUF_PADDED
--        AV_COPY16U(dst,     src);
--        AV_COPY16U(dst + 2, src + 2);
--        src += 4;
--        dst += 4;
--        cnt -= 4;
--        if (cnt > 0) {
-+        if (cnt >= 4) {
-+            AV_COPY16U(dst,     src);
-+            AV_COPY16U(dst + 2, src + 2);
-+            src += 4;
-+            dst += 4;
-+            cnt -= 4;
-+        }
-+        if (cnt >= 8) {
-             AV_COPY16U(dst,     src);
-             AV_COPY16U(dst + 2, src + 2);
-             AV_COPY16U(dst + 4, src + 4);
-@@ -147,7 +148,6 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
-             dst += 8;
-             cnt -= 8;
-         }
--#endif
-         if (cnt > 0) {
-             int blocklen = back;
-             while (cnt > blocklen) {
-diff --git a/libavutil/lzo.h b/libavutil/lzo.h
-index e3c6c01..a84b9bd 100644
---- a/libavutil/lzo.h
-+++ b/libavutil/lzo.h
-@@ -61,7 +61,7 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
- 
- /**
-  * @brief deliberately overlapping memcpy implementation
-- * @param dst destination buffer; must be padded with 12 additional bytes
-+ * @param dst destination buffer
-  * @param back how many bytes back we start (the initial size of the overlapping window)
-  * @param cnt number of bytes to copy, must be >= 0
-  *
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0003-av_memcpy_backptr-Drop-no-longer-necessary-malloc-pa.patch b/debian/patches/post-9beta2/0003-av_memcpy_backptr-Drop-no-longer-necessary-malloc-pa.patch
deleted file mode 100644
index 4fdd602..0000000
--- a/debian/patches/post-9beta2/0003-av_memcpy_backptr-Drop-no-longer-necessary-malloc-pa.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From e831b3b852a23cd24f2941e68bd65299ce306880 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 23 Oct 2012 19:22:52 +0200
-Subject: [PATCH 003/278] av_memcpy_backptr: Drop no longer necessary malloc
- padding
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/dfa.c    |    2 +-
- libavcodec/eatgv.c  |    3 +--
- libavcodec/lcldec.c |    3 ++-
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
-index 39f0f64..46051e0 100644
---- a/libavcodec/dfa.c
-+++ b/libavcodec/dfa.c
-@@ -43,7 +43,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
-     if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
-         return ret;
- 
--    s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING);
-+    s->frame_buf = av_mallocz(avctx->width * avctx->height);
-     if (!s->frame_buf)
-         return AVERROR(ENOMEM);
- 
-diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
-index b29c994..404238b 100644
---- a/libavcodec/eatgv.c
-+++ b/libavcodec/eatgv.c
-@@ -294,8 +294,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
-         s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
-         s->frame.linesize[0] = s->width;
- 
--        /* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */
--        s->frame.data[0] = av_malloc(s->width*s->height + 12);
-+        s->frame.data[0] = av_malloc(s->width * s->height);
-         if (!s->frame.data[0])
-             return AVERROR(ENOMEM);
-         s->frame.data[1] = av_malloc(AVPALETTE_SIZE);
-diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
-index 0de7410..6b101ae 100644
---- a/libavcodec/lcldec.c
-+++ b/libavcodec/lcldec.c
-@@ -476,7 +476,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
- {
-     LclDecContext * const c = avctx->priv_data;
-     unsigned int basesize = avctx->width * avctx->height;
--    unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING;
-+    unsigned int max_basesize = FFALIGN(avctx->width,  4) *
-+                                FFALIGN(avctx->height, 4);
-     unsigned int max_decomp_size;
- 
-     if (avctx->extradata_size < 8) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0004-dfa-use-av_memcpy_backptr-where-previously-impossibl.patch b/debian/patches/post-9beta2/0004-dfa-use-av_memcpy_backptr-where-previously-impossibl.patch
deleted file mode 100644
index 829f278..0000000
--- a/debian/patches/post-9beta2/0004-dfa-use-av_memcpy_backptr-where-previously-impossibl.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a153e45b953dee5b065939300d3a591772f43b19 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 23 Oct 2012 18:17:46 +0100
-Subject: [PATCH 004/278] dfa: use av_memcpy_backptr() where previously
- impossible
-
-Since the requirement for output padding has been lifted, we can
-use av_memcpy_backptr() here as well.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/dfa.c |    4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
-index 46051e0..ae184d7 100644
---- a/libavcodec/dfa.c
-+++ b/libavcodec/dfa.c
-@@ -122,9 +122,7 @@ static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height
-             count = ((v >> 13) + 2) << 1;
-             if (frame - frame_start < offset || frame_end - frame < count)
-                 return AVERROR_INVALIDDATA;
--            // can't use av_memcpy_backptr() since it can overwrite following pixels
--            for (v = 0; v < count; v++)
--                frame[v] = frame[v - offset];
-+            av_memcpy_backptr(frame, offset, count);
-             frame += count;
-         } else if (bitbuf & (mask << 1)) {
-             frame += bytestream2_get_le16(gb);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0005-doxygen-Build-Doxygen-documentation-in-the-doc-subdi.patch b/debian/patches/post-9beta2/0005-doxygen-Build-Doxygen-documentation-in-the-doc-subdi.patch
deleted file mode 100644
index f082b0b..0000000
--- a/debian/patches/post-9beta2/0005-doxygen-Build-Doxygen-documentation-in-the-doc-subdi.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From d7a39b33407927005f65755b8a3a608394aaeccd Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 22 Oct 2012 16:01:18 +0200
-Subject: [PATCH 005/278] doxygen: Build Doxygen documentation in the doc/
- subdirectory
-
----
- .gitignore |    2 +-
- Doxyfile   |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/.gitignore b/.gitignore
-index 8589127..3ed55b3 100644
---- a/.gitignore
-+++ b/.gitignore
-@@ -28,8 +28,8 @@
- /doc/*.pod
- /doc/avoptions_codec.texi
- /doc/avoptions_format.texi
-+/doc/doxy/html/
- /doc/print_options
--/doxy/
- /libavcodec/*_tablegen
- /libavcodec/*_tables.c
- /libavcodec/*_tables.h
-diff --git a/Doxyfile b/Doxyfile
-index 8e0dcf3..1b4e7d5 100644
---- a/Doxyfile
-+++ b/Doxyfile
-@@ -44,7 +44,7 @@ PROJECT_LOGO           =
- # If a relative path is entered, it will be relative to the location
- # where doxygen was started. If left blank the current directory will be used.
- 
--OUTPUT_DIRECTORY       = doxy
-+OUTPUT_DIRECTORY       = doc/doxy
- 
- # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
- # 4096 sub-directories (in 2 levels) under the output directory of each output
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0006-Move-Doxyfile-into-the-doc-subdirectory.patch b/debian/patches/post-9beta2/0006-Move-Doxyfile-into-the-doc-subdirectory.patch
deleted file mode 100644
index 768ebba..0000000
--- a/debian/patches/post-9beta2/0006-Move-Doxyfile-into-the-doc-subdirectory.patch
+++ /dev/null
@@ -1,3321 +0,0 @@
-From 5e28e974339e90c2cee866bedbd913fe42917b15 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 22 Oct 2012 16:03:39 +0200
-Subject: [PATCH 006/278] Move Doxyfile into the doc/ subdirectory
-
----
- Doxyfile     | 1647 ----------------------------------------------------------
- doc/Doxyfile | 1647 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 1647 insertions(+), 1647 deletions(-)
- delete mode 100644 Doxyfile
- create mode 100644 doc/Doxyfile
-
-diff --git a/Doxyfile b/Doxyfile
-deleted file mode 100644
-index 1b4e7d5..0000000
---- a/Doxyfile
-+++ /dev/null
-@@ -1,1647 +0,0 @@
--# Doxyfile 1.7.1
--
--# This file describes the settings to be used by the documentation system
--# doxygen (www.doxygen.org) for a project
--#
--# All text after a hash (#) is considered a comment and will be ignored
--# The format is:
--#       TAG = value [value, ...]
--# For lists items can also be appended using:
--#       TAG += value [value, ...]
--# Values that contain spaces should be placed between quotes (" ")
--
--#---------------------------------------------------------------------------
--# Project related configuration options
--#---------------------------------------------------------------------------
--
--# This tag specifies the encoding used for all characters in the config file
--# that follow. The default is UTF-8 which is also the encoding used for all
--# text before the first occurrence of this tag. Doxygen uses libiconv (or the
--# iconv built into libc) for the transcoding. See
--# http://www.gnu.org/software/libiconv for the list of possible encodings.
--
--DOXYFILE_ENCODING      = UTF-8
--
--# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
--# by quotes) that should identify the project.
--
--PROJECT_NAME           = Libav
--
--# The PROJECT_NUMBER tag can be used to enter a project or revision number.
--# This could be handy for archiving the generated documentation or
--# if some version control system is used.
--
--PROJECT_NUMBER         =
--
--# With the PROJECT_LOGO tag one can specify an logo or icon that is included
--# in the documentation. The maximum height of the logo should not exceed 55
--# pixels and the maximum width should not exceed 200 pixels. Doxygen will
--# copy the logo to the output directory.
--PROJECT_LOGO           =
--
--# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
--# base path where the generated documentation will be put.
--# If a relative path is entered, it will be relative to the location
--# where doxygen was started. If left blank the current directory will be used.
--
--OUTPUT_DIRECTORY       = doc/doxy
--
--# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
--# 4096 sub-directories (in 2 levels) under the output directory of each output
--# format and will distribute the generated files over these directories.
--# Enabling this option can be useful when feeding doxygen a huge amount of
--# source files, where putting all generated files in the same directory would
--# otherwise cause performance problems for the file system.
--
--CREATE_SUBDIRS         = NO
--
--# The OUTPUT_LANGUAGE tag is used to specify the language in which all
--# documentation generated by doxygen is written. Doxygen will use this
--# information to generate all constant output in the proper language.
--# The default language is English, other supported languages are:
--# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
--# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
--# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
--# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
--# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
--# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
--
--OUTPUT_LANGUAGE        = English
--
--# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
--# include brief member descriptions after the members that are listed in
--# the file and class documentation (similar to JavaDoc).
--# Set to NO to disable this.
--
--BRIEF_MEMBER_DESC      = YES
--
--# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
--# the brief description of a member or function before the detailed description.
--# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
--# brief descriptions will be completely suppressed.
--
--REPEAT_BRIEF           = YES
--
--# This tag implements a quasi-intelligent brief description abbreviator
--# that is used to form the text in various listings. Each string
--# in this list, if found as the leading text of the brief description, will be
--# stripped from the text and the result after processing the whole list, is
--# used as the annotated text. Otherwise, the brief description is used as-is.
--# If left blank, the following values are used ("$name" is automatically
--# replaced with the name of the entity): "The $name class" "The $name widget"
--# "The $name file" "is" "provides" "specifies" "contains"
--# "represents" "a" "an" "the"
--
--ABBREVIATE_BRIEF       =
--
--# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
--# Doxygen will generate a detailed section even if there is only a brief
--# description.
--
--ALWAYS_DETAILED_SEC    = NO
--
--# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
--# inherited members of a class in the documentation of that class as if those
--# members were ordinary class members. Constructors, destructors and assignment
--# operators of the base classes will not be shown.
--
--INLINE_INHERITED_MEMB  = NO
--
--# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
--# path before files name in the file list and in the header files. If set
--# to NO the shortest path that makes the file name unique will be used.
--
--FULL_PATH_NAMES        = YES
--
--# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
--# can be used to strip a user-defined part of the path. Stripping is
--# only done if one of the specified strings matches the left-hand part of
--# the path. The tag can be used to show relative paths in the file list.
--# If left blank the directory from which doxygen is run is used as the
--# path to strip.
--
--STRIP_FROM_PATH        = .
--
--# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
--# the path mentioned in the documentation of a class, which tells
--# the reader which header file to include in order to use a class.
--# If left blank only the name of the header file containing the class
--# definition is used. Otherwise one should specify the include paths that
--# are normally passed to the compiler using the -I flag.
--
--STRIP_FROM_INC_PATH    =
--
--# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
--# (but less readable) file names. This can be useful is your file systems
--# doesn't support long names like on DOS, Mac, or CD-ROM.
--
--SHORT_NAMES            = NO
--
--# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
--# will interpret the first line (until the first dot) of a JavaDoc-style
--# comment as the brief description. If set to NO, the JavaDoc
--# comments will behave just like regular Qt-style comments
--# (thus requiring an explicit @brief command for a brief description.)
--
--JAVADOC_AUTOBRIEF      = YES
--
--# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
--# interpret the first line (until the first dot) of a Qt-style
--# comment as the brief description. If set to NO, the comments
--# will behave just like regular Qt-style comments (thus requiring
--# an explicit \brief command for a brief description.)
--
--QT_AUTOBRIEF           = NO
--
--# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
--# treat a multi-line C++ special comment block (i.e. a block of //! or ///
--# comments) as a brief description. This used to be the default behaviour.
--# The new default is to treat a multi-line C++ comment block as a detailed
--# description. Set this tag to YES if you prefer the old behaviour instead.
--
--MULTILINE_CPP_IS_BRIEF = NO
--
--# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
--# member inherits the documentation from any documented member that it
--# re-implements.
--
--INHERIT_DOCS           = YES
--
--# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
--# a new page for each member. If set to NO, the documentation of a member will
--# be part of the file/class/namespace that contains it.
--
--SEPARATE_MEMBER_PAGES  = NO
--
--# The TAB_SIZE tag can be used to set the number of spaces in a tab.
--# Doxygen uses this value to replace tabs by spaces in code fragments.
--
--TAB_SIZE               = 8
--
--# This tag can be used to specify a number of aliases that acts
--# as commands in the documentation. An alias has the form "name=value".
--# For example adding "sideeffect=\par Side Effects:\n" will allow you to
--# put the command \sideeffect (or @sideeffect) in the documentation, which
--# will result in a user-defined paragraph with heading "Side Effects:".
--# You can put \n's in the value part of an alias to insert newlines.
--
--ALIASES                =
--
--# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
--# sources only. Doxygen will then generate output that is more tailored for C.
--# For instance, some of the names that are used will be different. The list
--# of all members will be omitted, etc.
--
--OPTIMIZE_OUTPUT_FOR_C  = YES
--
--# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
--# sources only. Doxygen will then generate output that is more tailored for
--# Java. For instance, namespaces will be presented as packages, qualified
--# scopes will look different, etc.
--
--OPTIMIZE_OUTPUT_JAVA   = NO
--
--# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
--# sources only. Doxygen will then generate output that is more tailored for
--# Fortran.
--
--OPTIMIZE_FOR_FORTRAN   = NO
--
--# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
--# sources. Doxygen will then generate output that is tailored for
--# VHDL.
--
--OPTIMIZE_OUTPUT_VHDL   = NO
--
--# Doxygen selects the parser to use depending on the extension of the files it
--# parses. With this tag you can assign which parser to use for a given extension.
--# Doxygen has a built-in mapping, but you can override or extend it using this
--# tag. The format is ext=language, where ext is a file extension, and language
--# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
--# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
--# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
--# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
--# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
--
--EXTENSION_MAPPING      =
--
--# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
--# to include (a tag file for) the STL sources as input, then you should
--# set this tag to YES in order to let doxygen match functions declarations and
--# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
--# func(std::string) {}). This also make the inheritance and collaboration
--# diagrams that involve STL classes more complete and accurate.
--
--BUILTIN_STL_SUPPORT    = NO
--
--# If you use Microsoft's C++/CLI language, you should set this option to YES to
--# enable parsing support.
--
--CPP_CLI_SUPPORT        = NO
--
--# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
--# Doxygen will parse them like normal C++ but will assume all classes use public
--# instead of private inheritance when no explicit protection keyword is present.
--
--SIP_SUPPORT            = NO
--
--# For Microsoft's IDL there are propget and propput attributes to indicate getter
--# and setter methods for a property. Setting this option to YES (the default)
--# will make doxygen to replace the get and set methods by a property in the
--# documentation. This will only work if the methods are indeed getting or
--# setting a simple type. If this is not the case, or you want to show the
--# methods anyway, you should set this option to NO.
--
--IDL_PROPERTY_SUPPORT   = YES
--
--# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
--# tag is set to YES, then doxygen will reuse the documentation of the first
--# member in the group (if any) for the other members of the group. By default
--# all members of a group must be documented explicitly.
--
--DISTRIBUTE_GROUP_DOC   = NO
--
--# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
--# the same type (for instance a group of public functions) to be put as a
--# subgroup of that type (e.g. under the Public Functions section). Set it to
--# NO to prevent subgrouping. Alternatively, this can be done per class using
--# the \nosubgrouping command.
--
--SUBGROUPING            = YES
--
--# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
--# is documented as struct, union, or enum with the name of the typedef. So
--# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
--# with name TypeT. When disabled the typedef will appear as a member of a file,
--# namespace, or class. And the struct will be named TypeS. This can typically
--# be useful for C code in case the coding convention dictates that all compound
--# types are typedef'ed and only the typedef is referenced, never the tag name.
--
--TYPEDEF_HIDES_STRUCT   = NO
--
--# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
--# determine which symbols to keep in memory and which to flush to disk.
--# When the cache is full, less often used symbols will be written to disk.
--# For small to medium size projects (<1000 input files) the default value is
--# probably good enough. For larger projects a too small cache size can cause
--# doxygen to be busy swapping symbols to and from disk most of the time
--# causing a significant performance penality.
--# If the system has enough physical memory increasing the cache will improve the
--# performance by keeping more symbols in memory. Note that the value works on
--# a logarithmic scale so increasing the size by one will rougly double the
--# memory usage. The cache size is given by this formula:
--# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
--# corresponding to a cache size of 2^16 = 65536 symbols
--
--SYMBOL_CACHE_SIZE      = 0
--
--#---------------------------------------------------------------------------
--# Build related configuration options
--#---------------------------------------------------------------------------
--
--# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
--# documentation are documented, even if no documentation was available.
--# Private class members and static file members will be hidden unless
--# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
--
--EXTRACT_ALL            = YES
--
--# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
--# will be included in the documentation.
--
--EXTRACT_PRIVATE        = YES
--
--# If the EXTRACT_STATIC tag is set to YES all static members of a file
--# will be included in the documentation.
--
--EXTRACT_STATIC         = YES
--
--# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
--# defined locally in source files will be included in the documentation.
--# If set to NO only classes defined in header files are included.
--
--EXTRACT_LOCAL_CLASSES  = YES
--
--# This flag is only useful for Objective-C code. When set to YES local
--# methods, which are defined in the implementation section but not in
--# the interface are included in the documentation.
--# If set to NO (the default) only methods in the interface are included.
--
--EXTRACT_LOCAL_METHODS  = NO
--
--# If this flag is set to YES, the members of anonymous namespaces will be
--# extracted and appear in the documentation as a namespace called
--# 'anonymous_namespace{file}', where file will be replaced with the base
--# name of the file that contains the anonymous namespace. By default
--# anonymous namespace are hidden.
--
--EXTRACT_ANON_NSPACES   = NO
--
--# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
--# undocumented members of documented classes, files or namespaces.
--# If set to NO (the default) these members will be included in the
--# various overviews, but no documentation section is generated.
--# This option has no effect if EXTRACT_ALL is enabled.
--
--HIDE_UNDOC_MEMBERS     = NO
--
--# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
--# undocumented classes that are normally visible in the class hierarchy.
--# If set to NO (the default) these classes will be included in the various
--# overviews. This option has no effect if EXTRACT_ALL is enabled.
--
--HIDE_UNDOC_CLASSES     = NO
--
--# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
--# friend (class|struct|union) declarations.
--# If set to NO (the default) these declarations will be included in the
--# documentation.
--
--HIDE_FRIEND_COMPOUNDS  = NO
--
--# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
--# documentation blocks found inside the body of a function.
--# If set to NO (the default) these blocks will be appended to the
--# function's detailed documentation block.
--
--HIDE_IN_BODY_DOCS      = NO
--
--# The INTERNAL_DOCS tag determines if documentation
--# that is typed after a \internal command is included. If the tag is set
--# to NO (the default) then the documentation will be excluded.
--# Set it to YES to include the internal documentation.
--
--INTERNAL_DOCS          = NO
--
--# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
--# file names in lower-case letters. If set to YES upper-case letters are also
--# allowed. This is useful if you have classes or files whose names only differ
--# in case and if your file system supports case sensitive file names. Windows
--# and Mac users are advised to set this option to NO.
--
--CASE_SENSE_NAMES       = YES
--
--# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
--# will show members with their full class and namespace scopes in the
--# documentation. If set to YES the scope will be hidden.
--
--HIDE_SCOPE_NAMES       = NO
--
--# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
--# will put a list of the files that are included by a file in the documentation
--# of that file.
--
--SHOW_INCLUDE_FILES     = YES
--
--# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
--# will list include files with double quotes in the documentation
--# rather than with sharp brackets.
--
--FORCE_LOCAL_INCLUDES   = NO
--
--# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
--# is inserted in the documentation for inline members.
--
--INLINE_INFO            = YES
--
--# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
--# will sort the (detailed) documentation of file and class members
--# alphabetically by member name. If set to NO the members will appear in
--# declaration order.
--
--SORT_MEMBER_DOCS       = YES
--
--# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
--# brief documentation of file, namespace and class members alphabetically
--# by member name. If set to NO (the default) the members will appear in
--# declaration order.
--
--SORT_BRIEF_DOCS        = NO
--
--# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
--# will sort the (brief and detailed) documentation of class members so that
--# constructors and destructors are listed first. If set to NO (the default)
--# the constructors will appear in the respective orders defined by
--# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
--# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
--# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
--
--SORT_MEMBERS_CTORS_1ST = NO
--
--# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
--# hierarchy of group names into alphabetical order. If set to NO (the default)
--# the group names will appear in their defined order.
--
--SORT_GROUP_NAMES       = NO
--
--# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
--# sorted by fully-qualified names, including namespaces. If set to
--# NO (the default), the class list will be sorted only by class name,
--# not including the namespace part.
--# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
--# Note: This option applies only to the class list, not to the
--# alphabetical list.
--
--SORT_BY_SCOPE_NAME     = NO
--
--# The GENERATE_TODOLIST tag can be used to enable (YES) or
--# disable (NO) the todo list. This list is created by putting \todo
--# commands in the documentation.
--
--GENERATE_TODOLIST      = YES
--
--# The GENERATE_TESTLIST tag can be used to enable (YES) or
--# disable (NO) the test list. This list is created by putting \test
--# commands in the documentation.
--
--GENERATE_TESTLIST      = YES
--
--# The GENERATE_BUGLIST tag can be used to enable (YES) or
--# disable (NO) the bug list. This list is created by putting \bug
--# commands in the documentation.
--
--GENERATE_BUGLIST       = YES
--
--# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
--# disable (NO) the deprecated list. This list is created by putting
--# \deprecated commands in the documentation.
--
--GENERATE_DEPRECATEDLIST= YES
--
--# The ENABLED_SECTIONS tag can be used to enable conditional
--# documentation sections, marked by \if sectionname ... \endif.
--
--ENABLED_SECTIONS       =
--
--# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
--# the initial value of a variable or define consists of for it to appear in
--# the documentation. If the initializer consists of more lines than specified
--# here it will be hidden. Use a value of 0 to hide initializers completely.
--# The appearance of the initializer of individual variables and defines in the
--# documentation can be controlled using \showinitializer or \hideinitializer
--# command in the documentation regardless of this setting.
--
--MAX_INITIALIZER_LINES  = 30
--
--# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
--# at the bottom of the documentation of classes and structs. If set to YES the
--# list will mention the files that were used to generate the documentation.
--
--SHOW_USED_FILES        = YES
--
--# If the sources in your project are distributed over multiple directories
--# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
--# in the documentation. The default is NO.
--
--SHOW_DIRECTORIES       = NO
--
--# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
--# This will remove the Files entry from the Quick Index and from the
--# Folder Tree View (if specified). The default is YES.
--
--SHOW_FILES             = YES
--
--# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
--# Namespaces page.
--# This will remove the Namespaces entry from the Quick Index
--# and from the Folder Tree View (if specified). The default is YES.
--
--SHOW_NAMESPACES        = YES
--
--# The FILE_VERSION_FILTER tag can be used to specify a program or script that
--# doxygen should invoke to get the current version for each file (typically from
--# the version control system). Doxygen will invoke the program by executing (via
--# popen()) the command <command> <input-file>, where <command> is the value of
--# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
--# provided by doxygen. Whatever the program writes to standard output
--# is used as the file version. See the manual for examples.
--
--FILE_VERSION_FILTER    =
--
--# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
--# by doxygen. The layout file controls the global structure of the generated
--# output files in an output format independent way. The create the layout file
--# that represents doxygen's defaults, run doxygen with the -l option.
--# You can optionally specify a file name after the option, if omitted
--# DoxygenLayout.xml will be used as the name of the layout file.
--
--LAYOUT_FILE            =
--
--#---------------------------------------------------------------------------
--# configuration options related to warning and progress messages
--#---------------------------------------------------------------------------
--
--# The QUIET tag can be used to turn on/off the messages that are generated
--# by doxygen. Possible values are YES and NO. If left blank NO is used.
--
--QUIET                  = YES
--
--# The WARNINGS tag can be used to turn on/off the warning messages that are
--# generated by doxygen. Possible values are YES and NO. If left blank
--# NO is used.
--
--WARNINGS               = YES
--
--# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
--# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
--# automatically be disabled.
--
--WARN_IF_UNDOCUMENTED   = YES
--
--# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
--# potential errors in the documentation, such as not documenting some
--# parameters in a documented function, or documenting parameters that
--# don't exist or using markup commands wrongly.
--
--WARN_IF_DOC_ERROR      = YES
--
--# This WARN_NO_PARAMDOC option can be abled to get warnings for
--# functions that are documented, but have no documentation for their parameters
--# or return value. If set to NO (the default) doxygen will only warn about
--# wrong or incomplete parameter documentation, but not about the absence of
--# documentation.
--
--WARN_NO_PARAMDOC       = NO
--
--# The WARN_FORMAT tag determines the format of the warning messages that
--# doxygen can produce. The string should contain the $file, $line, and $text
--# tags, which will be replaced by the file and line number from which the
--# warning originated and the warning text. Optionally the format may contain
--# $version, which will be replaced by the version of the file (if it could
--# be obtained via FILE_VERSION_FILTER)
--
--WARN_FORMAT            = "$file:$line: $text"
--
--# The WARN_LOGFILE tag can be used to specify a file to which warning
--# and error messages should be written. If left blank the output is written
--# to stderr.
--
--WARN_LOGFILE           =
--
--#---------------------------------------------------------------------------
--# configuration options related to the input files
--#---------------------------------------------------------------------------
--
--# The INPUT tag can be used to specify the files and/or directories that contain
--# documented source files. You may enter file names like "myfile.cpp" or
--# directories like "/usr/src/myproject". Separate the files or directories
--# with spaces.
--
--INPUT                  =
--
--# This tag can be used to specify the character encoding of the source files
--# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
--# also the default input encoding. Doxygen uses libiconv (or the iconv built
--# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
--# the list of possible encodings.
--
--INPUT_ENCODING         = UTF-8
--
--# If the value of the INPUT tag contains directories, you can use the
--# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
--# and *.h) to filter out the source-files in the directories. If left
--# blank the following patterns are tested:
--# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
--# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
--
--FILE_PATTERNS          =
--
--# The RECURSIVE tag can be used to turn specify whether or not subdirectories
--# should be searched for input files as well. Possible values are YES and NO.
--# If left blank NO is used.
--
--RECURSIVE              = YES
--
--# The EXCLUDE tag can be used to specify files and/or directories that should
--# excluded from the INPUT source files. This way you can easily exclude a
--# subdirectory from a directory tree whose root is specified with the INPUT tag.
--
--EXCLUDE                =
--
--# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
--# directories that are symbolic links (a Unix filesystem feature) are excluded
--# from the input.
--
--EXCLUDE_SYMLINKS       = NO
--
--# If the value of the INPUT tag contains directories, you can use the
--# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
--# certain files from those directories. Note that the wildcards are matched
--# against the file with absolute path, so to exclude all test directories
--# for example use the pattern */test/*
--
--EXCLUDE_PATTERNS       = *.git \
--                         *.d
--
--# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
--# (namespaces, classes, functions, etc.) that should be excluded from the
--# output. The symbol name can be a fully qualified name, a word, or if the
--# wildcard * is used, a substring. Examples: ANamespace, AClass,
--# AClass::ANamespace, ANamespace::*Test
--
--EXCLUDE_SYMBOLS        =
--
--# The EXAMPLE_PATH tag can be used to specify one or more files or
--# directories that contain example code fragments that are included (see
--# the \include command).
--
--EXAMPLE_PATH           = libavcodec/ \
--                         libavformat/
--
--# If the value of the EXAMPLE_PATH tag contains directories, you can use the
--# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
--# and *.h) to filter out the source-files in the directories. If left
--# blank all files are included.
--
--EXAMPLE_PATTERNS       = *-example.c
--
--# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
--# searched for input files to be used with the \include or \dontinclude
--# commands irrespective of the value of the RECURSIVE tag.
--# Possible values are YES and NO. If left blank NO is used.
--
--EXAMPLE_RECURSIVE      = NO
--
--# The IMAGE_PATH tag can be used to specify one or more files or
--# directories that contain image that are included in the documentation (see
--# the \image command).
--
--IMAGE_PATH             =
--
--# The INPUT_FILTER tag can be used to specify a program that doxygen should
--# invoke to filter for each input file. Doxygen will invoke the filter program
--# by executing (via popen()) the command <filter> <input-file>, where <filter>
--# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
--# input file. Doxygen will then use the output that the filter program writes
--# to standard output.
--# If FILTER_PATTERNS is specified, this tag will be
--# ignored.
--
--INPUT_FILTER           =
--
--# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
--# basis.
--# Doxygen will compare the file name with each pattern and apply the
--# filter if there is a match.
--# The filters are a list of the form:
--# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
--# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
--# is applied to all files.
--
--FILTER_PATTERNS        =
--
--# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
--# INPUT_FILTER) will be used to filter the input files when producing source
--# files to browse (i.e. when SOURCE_BROWSER is set to YES).
--
--FILTER_SOURCE_FILES    = NO
--
--#---------------------------------------------------------------------------
--# configuration options related to source browsing
--#---------------------------------------------------------------------------
--
--# If the SOURCE_BROWSER tag is set to YES then a list of source files will
--# be generated. Documented entities will be cross-referenced with these sources.
--# Note: To get rid of all source code in the generated output, make sure also
--# VERBATIM_HEADERS is set to NO.
--
--SOURCE_BROWSER         = YES
--
--# Setting the INLINE_SOURCES tag to YES will include the body
--# of functions and classes directly in the documentation.
--
--INLINE_SOURCES         = NO
--
--# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
--# doxygen to hide any special comment blocks from generated source code
--# fragments. Normal C and C++ comments will always remain visible.
--
--STRIP_CODE_COMMENTS    = YES
--
--# If the REFERENCED_BY_RELATION tag is set to YES
--# then for each documented function all documented
--# functions referencing it will be listed.
--
--REFERENCED_BY_RELATION = YES
--
--# If the REFERENCES_RELATION tag is set to YES
--# then for each documented function all documented entities
--# called/used by that function will be listed.
--
--REFERENCES_RELATION    = NO
--
--# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
--# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
--# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
--# link to the source code.
--# Otherwise they will link to the documentation.
--
--REFERENCES_LINK_SOURCE = YES
--
--# If the USE_HTAGS tag is set to YES then the references to source code
--# will point to the HTML generated by the htags(1) tool instead of doxygen
--# built-in source browser. The htags tool is part of GNU's global source
--# tagging system (see http://www.gnu.org/software/global/global.html). You
--# will need version 4.8.6 or higher.
--
--USE_HTAGS              = NO
--
--# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
--# will generate a verbatim copy of the header file for each class for
--# which an include is specified. Set to NO to disable this.
--
--VERBATIM_HEADERS       = YES
--
--#---------------------------------------------------------------------------
--# configuration options related to the alphabetical class index
--#---------------------------------------------------------------------------
--
--# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
--# of all compounds will be generated. Enable this if the project
--# contains a lot of classes, structs, unions or interfaces.
--
--ALPHABETICAL_INDEX     = YES
--
--# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
--# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
--# in which this list will be split (can be a number in the range [1..20])
--
--COLS_IN_ALPHA_INDEX    = 2
--
--# In case all classes in a project start with a common prefix, all
--# classes will be put under the same header in the alphabetical index.
--# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
--# should be ignored while generating the index headers.
--
--IGNORE_PREFIX          =
--
--#---------------------------------------------------------------------------
--# configuration options related to the HTML output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
--# generate HTML output.
--
--GENERATE_HTML          = YES
--
--# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
--# If a relative path is entered the value of OUTPUT_DIRECTORY will be
--# put in front of it. If left blank `html' will be used as the default path.
--
--HTML_OUTPUT            = html
--
--# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
--# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
--# doxygen will generate files with .html extension.
--
--HTML_FILE_EXTENSION    = .html
--
--# The HTML_HEADER tag can be used to specify a personal HTML header for
--# each generated HTML page. If it is left blank doxygen will generate a
--# standard header.
--
--HTML_HEADER            = doc/doxy/header.html
--
--# The HTML_FOOTER tag can be used to specify a personal HTML footer for
--# each generated HTML page. If it is left blank doxygen will generate a
--# standard footer.
--
--HTML_FOOTER            = doc/doxy/footer.html
--
--# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
--# style sheet that is used by each HTML page. It can be used to
--# fine-tune the look of the HTML output. If the tag is left blank doxygen
--# will generate a default style sheet. Note that doxygen will try to copy
--# the style sheet file to the HTML output directory, so don't put your own
--# stylesheet in the HTML output directory as well, or it will be erased!
--
--HTML_STYLESHEET        = doc/doxy/doxy_stylesheet.css
--
--# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
--# Doxygen will adjust the colors in the stylesheet and background images
--# according to this color. Hue is specified as an angle on a colorwheel,
--# see http://en.wikipedia.org/wiki/Hue for more information.
--# For instance the value 0 represents red, 60 is yellow, 120 is green,
--# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
--# The allowed range is 0 to 359.
--
--HTML_COLORSTYLE_HUE    = 120
--
--# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
--# the colors in the HTML output. For a value of 0 the output will use
--# grayscales only. A value of 255 will produce the most vivid colors.
--
--HTML_COLORSTYLE_SAT    = 100
--
--# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
--# the luminance component of the colors in the HTML output. Values below
--# 100 gradually make the output lighter, whereas values above 100 make
--# the output darker. The value divided by 100 is the actual gamma applied,
--# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
--# and 100 does not change the gamma.
--
--HTML_COLORSTYLE_GAMMA  = 80
--
--# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
--# page will contain the date and time when the page was generated. Setting
--# this to NO can help when comparing the output of multiple runs.
--
--HTML_TIMESTAMP         = YES
--
--# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
--# files or namespaces will be aligned in HTML using tables. If set to
--# NO a bullet list will be used.
--
--HTML_ALIGN_MEMBERS     = YES
--
--# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
--# documentation will contain sections that can be hidden and shown after the
--# page has loaded. For this to work a browser that supports
--# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
--# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
--
--HTML_DYNAMIC_SECTIONS  = NO
--
--# If the GENERATE_DOCSET tag is set to YES, additional index files
--# will be generated that can be used as input for Apple's Xcode 3
--# integrated development environment, introduced with OS X 10.5 (Leopard).
--# To create a documentation set, doxygen will generate a Makefile in the
--# HTML output directory. Running make will produce the docset in that
--# directory and running "make install" will install the docset in
--# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
--# it at startup.
--# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
--# for more information.
--
--GENERATE_DOCSET        = NO
--
--# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
--# feed. A documentation feed provides an umbrella under which multiple
--# documentation sets from a single provider (such as a company or product suite)
--# can be grouped.
--
--DOCSET_FEEDNAME        = "Doxygen generated docs"
--
--# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
--# should uniquely identify the documentation set bundle. This should be a
--# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
--# will append .docset to the name.
--
--DOCSET_BUNDLE_ID       = org.doxygen.Project
--
--# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
--# the documentation publisher. This should be a reverse domain-name style
--# string, e.g. com.mycompany.MyDocSet.documentation.
--
--DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
--
--# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
--
--DOCSET_PUBLISHER_NAME  = Publisher
--
--# If the GENERATE_HTMLHELP tag is set to YES, additional index files
--# will be generated that can be used as input for tools like the
--# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
--# of the generated HTML documentation.
--
--GENERATE_HTMLHELP      = NO
--
--# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
--# be used to specify the file name of the resulting .chm file. You
--# can add a path in front of the file if the result should not be
--# written to the html output directory.
--
--CHM_FILE               =
--
--# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
--# be used to specify the location (absolute path including file name) of
--# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
--# the HTML help compiler on the generated index.hhp.
--
--HHC_LOCATION           =
--
--# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
--# controls if a separate .chi index file is generated (YES) or that
--# it should be included in the master .chm file (NO).
--
--GENERATE_CHI           = NO
--
--# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
--# is used to encode HtmlHelp index (hhk), content (hhc) and project file
--# content.
--
--CHM_INDEX_ENCODING     =
--
--# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
--# controls whether a binary table of contents is generated (YES) or a
--# normal table of contents (NO) in the .chm file.
--
--BINARY_TOC             = NO
--
--# The TOC_EXPAND flag can be set to YES to add extra items for group members
--# to the contents of the HTML help documentation and to the tree view.
--
--TOC_EXPAND             = NO
--
--# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
--# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
--# that can be used as input for Qt's qhelpgenerator to generate a
--# Qt Compressed Help (.qch) of the generated HTML documentation.
--
--GENERATE_QHP           = NO
--
--# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
--# be used to specify the file name of the resulting .qch file.
--# The path specified is relative to the HTML output folder.
--
--QCH_FILE               =
--
--# The QHP_NAMESPACE tag specifies the namespace to use when generating
--# Qt Help Project output. For more information please see
--# http://doc.trolltech.com/qthelpproject.html#namespace
--
--QHP_NAMESPACE          = org.doxygen.Project
--
--# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
--# Qt Help Project output. For more information please see
--# http://doc.trolltech.com/qthelpproject.html#virtual-folders
--
--QHP_VIRTUAL_FOLDER     = doc
--
--# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
--# add. For more information please see
--# http://doc.trolltech.com/qthelpproject.html#custom-filters
--
--QHP_CUST_FILTER_NAME   =
--
--# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
--# custom filter to add. For more information please see
--# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
--# Qt Help Project / Custom Filters</a>.
--
--QHP_CUST_FILTER_ATTRS  =
--
--# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
--# project's
--# filter section matches.
--# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
--# Qt Help Project / Filter Attributes</a>.
--
--QHP_SECT_FILTER_ATTRS  =
--
--# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
--# be used to specify the location of Qt's qhelpgenerator.
--# If non-empty doxygen will try to run qhelpgenerator on the generated
--# .qhp file.
--
--QHG_LOCATION           =
--
--# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
--#  will be generated, which together with the HTML files, form an Eclipse help
--# plugin. To install this plugin and make it available under the help contents
--# menu in Eclipse, the contents of the directory containing the HTML and XML
--# files needs to be copied into the plugins directory of eclipse. The name of
--# the directory within the plugins directory should be the same as
--# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
--# the help appears.
--
--GENERATE_ECLIPSEHELP   = NO
--
--# A unique identifier for the eclipse help plugin. When installing the plugin
--# the directory name containing the HTML and XML files should also have
--# this name.
--
--ECLIPSE_DOC_ID         = org.doxygen.Project
--
--# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
--# top of each HTML page. The value NO (the default) enables the index and
--# the value YES disables it.
--
--DISABLE_INDEX          = NO
--
--# This tag can be used to set the number of enum values (range [1..20])
--# that doxygen will group on one line in the generated HTML documentation.
--
--ENUM_VALUES_PER_LINE   = 4
--
--# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
--# structure should be generated to display hierarchical information.
--# If the tag value is set to YES, a side panel will be generated
--# containing a tree-like index structure (just like the one that
--# is generated for HTML Help). For this to work a browser that supports
--# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
--# Windows users are probably better off using the HTML help feature.
--
--GENERATE_TREEVIEW      = NO
--
--# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
--# and Class Hierarchy pages using a tree view instead of an ordered list.
--
--USE_INLINE_TREES       = NO
--
--# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
--# used to set the initial width (in pixels) of the frame in which the tree
--# is shown.
--
--TREEVIEW_WIDTH         = 250
--
--# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
--# links to external symbols imported via tag files in a separate window.
--
--EXT_LINKS_IN_WINDOW    = NO
--
--# Use this tag to change the font size of Latex formulas included
--# as images in the HTML documentation. The default is 10. Note that
--# when you change the font size after a successful doxygen run you need
--# to manually remove any form_*.png images from the HTML output directory
--# to force them to be regenerated.
--
--FORMULA_FONTSIZE       = 10
--
--# Use the FORMULA_TRANPARENT tag to determine whether or not the images
--# generated for formulas are transparent PNGs. Transparent PNGs are
--# not supported properly for IE 6.0, but are supported on all modern browsers.
--# Note that when changing this option you need to delete any form_*.png files
--# in the HTML output before the changes have effect.
--
--FORMULA_TRANSPARENT    = YES
--
--# When the SEARCHENGINE tag is enabled doxygen will generate a search box
--# for the HTML output. The underlying search engine uses javascript
--# and DHTML and should work on any modern browser. Note that when using
--# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
--# (GENERATE_DOCSET) there is already a search function so this one should
--# typically be disabled. For large projects the javascript based search engine
--# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
--
--SEARCHENGINE           = NO
--
--# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
--# implemented using a PHP enabled web server instead of at the web client
--# using Javascript. Doxygen will generate the search PHP script and index
--# file to put on the web server. The advantage of the server
--# based approach is that it scales better to large projects and allows
--# full text search. The disadvances is that it is more difficult to setup
--# and does not have live searching capabilities.
--
--SERVER_BASED_SEARCH    = NO
--
--#---------------------------------------------------------------------------
--# configuration options related to the LaTeX output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
--# generate Latex output.
--
--GENERATE_LATEX         = NO
--
--# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
--# If a relative path is entered the value of OUTPUT_DIRECTORY will be
--# put in front of it. If left blank `latex' will be used as the default path.
--
--LATEX_OUTPUT           = latex
--
--# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
--# invoked. If left blank `latex' will be used as the default command name.
--# Note that when enabling USE_PDFLATEX this option is only used for
--# generating bitmaps for formulas in the HTML output, but not in the
--# Makefile that is written to the output directory.
--
--LATEX_CMD_NAME         = latex
--
--# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
--# generate index for LaTeX. If left blank `makeindex' will be used as the
--# default command name.
--
--MAKEINDEX_CMD_NAME     = makeindex
--
--# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
--# LaTeX documents. This may be useful for small projects and may help to
--# save some trees in general.
--
--COMPACT_LATEX          = NO
--
--# The PAPER_TYPE tag can be used to set the paper type that is used
--# by the printer. Possible values are: a4, a4wide, letter, legal and
--# executive. If left blank a4wide will be used.
--
--PAPER_TYPE             = a4wide
--
--# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
--# packages that should be included in the LaTeX output.
--
--EXTRA_PACKAGES         =
--
--# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
--# the generated latex document. The header should contain everything until
--# the first chapter. If it is left blank doxygen will generate a
--# standard header. Notice: only use this tag if you know what you are doing!
--
--LATEX_HEADER           =
--
--# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
--# is prepared for conversion to pdf (using ps2pdf). The pdf file will
--# contain links (just like the HTML output) instead of page references
--# This makes the output suitable for online browsing using a pdf viewer.
--
--PDF_HYPERLINKS         = NO
--
--# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
--# plain latex in the generated Makefile. Set this option to YES to get a
--# higher quality PDF documentation.
--
--USE_PDFLATEX           = NO
--
--# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
--# command to the generated LaTeX files. This will instruct LaTeX to keep
--# running if errors occur, instead of asking the user for help.
--# This option is also used when generating formulas in HTML.
--
--LATEX_BATCHMODE        = NO
--
--# If LATEX_HIDE_INDICES is set to YES then doxygen will not
--# include the index chapters (such as File Index, Compound Index, etc.)
--# in the output.
--
--LATEX_HIDE_INDICES     = NO
--
--# If LATEX_SOURCE_CODE is set to YES then doxygen will include
--# source code with syntax highlighting in the LaTeX output.
--# Note that which sources are shown also depends on other settings
--# such as SOURCE_BROWSER.
--
--LATEX_SOURCE_CODE      = NO
--
--#---------------------------------------------------------------------------
--# configuration options related to the RTF output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
--# The RTF output is optimized for Word 97 and may not look very pretty with
--# other RTF readers or editors.
--
--GENERATE_RTF           = NO
--
--# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
--# If a relative path is entered the value of OUTPUT_DIRECTORY will be
--# put in front of it. If left blank `rtf' will be used as the default path.
--
--RTF_OUTPUT             = rtf
--
--# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
--# RTF documents. This may be useful for small projects and may help to
--# save some trees in general.
--
--COMPACT_RTF            = NO
--
--# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
--# will contain hyperlink fields. The RTF file will
--# contain links (just like the HTML output) instead of page references.
--# This makes the output suitable for online browsing using WORD or other
--# programs which support those fields.
--# Note: wordpad (write) and others do not support links.
--
--RTF_HYPERLINKS         = NO
--
--# Load stylesheet definitions from file. Syntax is similar to doxygen's
--# config file, i.e. a series of assignments. You only have to provide
--# replacements, missing definitions are set to their default value.
--
--RTF_STYLESHEET_FILE    =
--
--# Set optional variables used in the generation of an rtf document.
--# Syntax is similar to doxygen's config file.
--
--RTF_EXTENSIONS_FILE    =
--
--#---------------------------------------------------------------------------
--# configuration options related to the man page output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
--# generate man pages
--
--GENERATE_MAN           = NO
--
--# The MAN_OUTPUT tag is used to specify where the man pages will be put.
--# If a relative path is entered the value of OUTPUT_DIRECTORY will be
--# put in front of it. If left blank `man' will be used as the default path.
--
--MAN_OUTPUT             = man
--
--# The MAN_EXTENSION tag determines the extension that is added to
--# the generated man pages (default is the subroutine's section .3)
--
--MAN_EXTENSION          = .3
--
--# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
--# then it will generate one additional man file for each entity
--# documented in the real man page(s). These additional files
--# only source the real man page, but without them the man command
--# would be unable to find the correct page. The default is NO.
--
--MAN_LINKS              = NO
--
--#---------------------------------------------------------------------------
--# configuration options related to the XML output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_XML tag is set to YES Doxygen will
--# generate an XML file that captures the structure of
--# the code including all documentation.
--
--GENERATE_XML           = NO
--
--# The XML_OUTPUT tag is used to specify where the XML pages will be put.
--# If a relative path is entered the value of OUTPUT_DIRECTORY will be
--# put in front of it. If left blank `xml' will be used as the default path.
--
--XML_OUTPUT             = xml
--
--# The XML_SCHEMA tag can be used to specify an XML schema,
--# which can be used by a validating XML parser to check the
--# syntax of the XML files.
--
--XML_SCHEMA             =
--
--# The XML_DTD tag can be used to specify an XML DTD,
--# which can be used by a validating XML parser to check the
--# syntax of the XML files.
--
--XML_DTD                =
--
--# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
--# dump the program listings (including syntax highlighting
--# and cross-referencing information) to the XML output. Note that
--# enabling this will significantly increase the size of the XML output.
--
--XML_PROGRAMLISTING     = YES
--
--#---------------------------------------------------------------------------
--# configuration options for the AutoGen Definitions output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
--# generate an AutoGen Definitions (see autogen.sf.net) file
--# that captures the structure of the code including all
--# documentation. Note that this feature is still experimental
--# and incomplete at the moment.
--
--GENERATE_AUTOGEN_DEF   = NO
--
--#---------------------------------------------------------------------------
--# configuration options related to the Perl module output
--#---------------------------------------------------------------------------
--
--# If the GENERATE_PERLMOD tag is set to YES Doxygen will
--# generate a Perl module file that captures the structure of
--# the code including all documentation. Note that this
--# feature is still experimental and incomplete at the
--# moment.
--
--GENERATE_PERLMOD       = NO
--
--# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
--# the necessary Makefile rules, Perl scripts and LaTeX code to be able
--# to generate PDF and DVI output from the Perl module output.
--
--PERLMOD_LATEX          = NO
--
--# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
--# nicely formatted so it can be parsed by a human reader.
--# This is useful
--# if you want to understand what is going on.
--# On the other hand, if this
--# tag is set to NO the size of the Perl module output will be much smaller
--# and Perl will parse it just the same.
--
--PERLMOD_PRETTY         = YES
--
--# The names of the make variables in the generated doxyrules.make file
--# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
--# This is useful so different doxyrules.make files included by the same
--# Makefile don't overwrite each other's variables.
--
--PERLMOD_MAKEVAR_PREFIX =
--
--#---------------------------------------------------------------------------
--# Configuration options related to the preprocessor
--#---------------------------------------------------------------------------
--
--# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
--# evaluate all C-preprocessor directives found in the sources and include
--# files.
--
--ENABLE_PREPROCESSING   = YES
--
--# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
--# names in the source code. If set to NO (the default) only conditional
--# compilation will be performed. Macro expansion can be done in a controlled
--# way by setting EXPAND_ONLY_PREDEF to YES.
--
--MACRO_EXPANSION        = YES
--
--# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
--# then the macro expansion is limited to the macros specified with the
--# PREDEFINED and EXPAND_AS_DEFINED tags.
--
--EXPAND_ONLY_PREDEF     = YES
--
--# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
--# in the INCLUDE_PATH (see below) will be search if a #include is found.
--
--SEARCH_INCLUDES        = YES
--
--# The INCLUDE_PATH tag can be used to specify one or more directories that
--# contain include files that are not input files but should be processed by
--# the preprocessor.
--
--INCLUDE_PATH           =
--
--# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
--# patterns (like *.h and *.hpp) to filter out the header-files in the
--# directories. If left blank, the patterns specified with FILE_PATTERNS will
--# be used.
--
--INCLUDE_FILE_PATTERNS  =
--
--# The PREDEFINED tag can be used to specify one or more macro names that
--# are defined before the preprocessor is started (similar to the -D option of
--# gcc). The argument of the tag is a list of macros of the form: name
--# or name=definition (no spaces). If the definition and the = are
--# omitted =1 is assumed. To prevent a macro definition from being
--# undefined via #undef or recursively expanded use the := operator
--# instead of the = operator.
--
--PREDEFINED             = "__attribute__(x)=" \
--                         "RENAME(x)=x ## _TMPL" \
--                         "DEF(x)=x ## _TMPL" \
--                         HAVE_AV_CONFIG_H \
--                         HAVE_MMX \
--                         HAVE_MMXEXT \
--                         HAVE_AMD3DNOW \
--                         "DECLARE_ALIGNED(a,t,n)=t n" \
--                         "offsetof(x,y)=0x42"
--
--# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
--# this tag can be used to specify a list of macro names that should be expanded.
--# The macro definition that is found in the sources will be used.
--# Use the PREDEFINED tag if you want to use a different macro definition.
--
--EXPAND_AS_DEFINED      = declare_idct  \
--                         READ_PAR_DATA \
--
--# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
--# doxygen's preprocessor will remove all function-like macros that are alone
--# on a line, have an all uppercase name, and do not end with a semicolon. Such
--# function macros are typically used for boiler-plate code, and will confuse
--# the parser if not removed.
--
--SKIP_FUNCTION_MACROS   = YES
--
--#---------------------------------------------------------------------------
--# Configuration::additions related to external references
--#---------------------------------------------------------------------------
--
--# The TAGFILES option can be used to specify one or more tagfiles.
--# Optionally an initial location of the external documentation
--# can be added for each tagfile. The format of a tag file without
--# this location is as follows:
--#
--# TAGFILES = file1 file2 ...
--# Adding location for the tag files is done as follows:
--#
--# TAGFILES = file1=loc1 "file2 = loc2" ...
--# where "loc1" and "loc2" can be relative or absolute paths or
--# URLs. If a location is present for each tag, the installdox tool
--# does not have to be run to correct the links.
--# Note that each tag file must have a unique name
--# (where the name does NOT include the path)
--# If a tag file is not located in the directory in which doxygen
--# is run, you must also specify the path to the tagfile here.
--
--TAGFILES               =
--
--# When a file name is specified after GENERATE_TAGFILE, doxygen will create
--# a tag file that is based on the input files it reads.
--
--GENERATE_TAGFILE       =
--
--# If the ALLEXTERNALS tag is set to YES all external classes will be listed
--# in the class index. If set to NO only the inherited external classes
--# will be listed.
--
--ALLEXTERNALS           = NO
--
--# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
--# in the modules index. If set to NO, only the current project's groups will
--# be listed.
--
--EXTERNAL_GROUPS        = YES
--
--# The PERL_PATH should be the absolute path and name of the perl script
--# interpreter (i.e. the result of `which perl').
--
--PERL_PATH              = /usr/bin/perl
--
--#---------------------------------------------------------------------------
--# Configuration options related to the dot tool
--#---------------------------------------------------------------------------
--
--# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
--# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
--# or super classes. Setting the tag to NO turns the diagrams off. Note that
--# this option is superseded by the HAVE_DOT option below. This is only a
--# fallback. It is recommended to install and use dot, since it yields more
--# powerful graphs.
--
--CLASS_DIAGRAMS         = YES
--
--# You can define message sequence charts within doxygen comments using the \msc
--# command. Doxygen will then run the mscgen tool (see
--# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
--# documentation. The MSCGEN_PATH tag allows you to specify the directory where
--# the mscgen tool resides. If left empty the tool is assumed to be found in the
--# default search path.
--
--MSCGEN_PATH            =
--
--# If set to YES, the inheritance and collaboration graphs will hide
--# inheritance and usage relations if the target is undocumented
--# or is not a class.
--
--HIDE_UNDOC_RELATIONS   = YES
--
--# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
--# available from the path. This tool is part of Graphviz, a graph visualization
--# toolkit from AT&T and Lucent Bell Labs. The other options in this section
--# have no effect if this option is set to NO (the default)
--
--HAVE_DOT               = NO
--
--# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
--# allowed to run in parallel. When set to 0 (the default) doxygen will
--# base this on the number of processors available in the system. You can set it
--# explicitly to a value larger than 0 to get control over the balance
--# between CPU load and processing speed.
--
--DOT_NUM_THREADS        = 0
--
--# By default doxygen will write a font called FreeSans.ttf to the output
--# directory and reference it in all dot files that doxygen generates. This
--# font does not include all possible unicode characters however, so when you need
--# these (or just want a differently looking font) you can specify the font name
--# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
--# which can be done by putting it in a standard location or by setting the
--# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
--# containing the font.
--
--DOT_FONTNAME           = FreeSans
--
--# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
--# The default size is 10pt.
--
--DOT_FONTSIZE           = 10
--
--# By default doxygen will tell dot to use the output directory to look for the
--# FreeSans.ttf font (which doxygen will put there itself). If you specify a
--# different font using DOT_FONTNAME you can set the path where dot
--# can find it using this tag.
--
--DOT_FONTPATH           =
--
--# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
--# will generate a graph for each documented class showing the direct and
--# indirect inheritance relations. Setting this tag to YES will force the
--# the CLASS_DIAGRAMS tag to NO.
--
--CLASS_GRAPH            = YES
--
--# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
--# will generate a graph for each documented class showing the direct and
--# indirect implementation dependencies (inheritance, containment, and
--# class references variables) of the class with other documented classes.
--
--COLLABORATION_GRAPH    = YES
--
--# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
--# will generate a graph for groups, showing the direct groups dependencies
--
--GROUP_GRAPHS           = YES
--
--# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
--# collaboration diagrams in a style similar to the OMG's Unified Modeling
--# Language.
--
--UML_LOOK               = NO
--
--# If set to YES, the inheritance and collaboration graphs will show the
--# relations between templates and their instances.
--
--TEMPLATE_RELATIONS     = YES
--
--# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
--# tags are set to YES then doxygen will generate a graph for each documented
--# file showing the direct and indirect include dependencies of the file with
--# other documented files.
--
--INCLUDE_GRAPH          = YES
--
--# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
--# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
--# documented header file showing the documented files that directly or
--# indirectly include this file.
--
--INCLUDED_BY_GRAPH      = YES
--
--# If the CALL_GRAPH and HAVE_DOT options are set to YES then
--# doxygen will generate a call dependency graph for every global function
--# or class method. Note that enabling this option will significantly increase
--# the time of a run. So in most cases it will be better to enable call graphs
--# for selected functions only using the \callgraph command.
--
--CALL_GRAPH             = NO
--
--# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
--# doxygen will generate a caller dependency graph for every global function
--# or class method. Note that enabling this option will significantly increase
--# the time of a run. So in most cases it will be better to enable caller
--# graphs for selected functions only using the \callergraph command.
--
--CALLER_GRAPH           = NO
--
--# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
--# will graphical hierarchy of all classes instead of a textual one.
--
--GRAPHICAL_HIERARCHY    = YES
--
--# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
--# then doxygen will show the dependencies a directory has on other directories
--# in a graphical way. The dependency relations are determined by the #include
--# relations between the files in the directories.
--
--DIRECTORY_GRAPH        = YES
--
--# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
--# generated by dot. Possible values are png, jpg, or gif
--# If left blank png will be used.
--
--DOT_IMAGE_FORMAT       = png
--
--# The tag DOT_PATH can be used to specify the path where the dot tool can be
--# found. If left blank, it is assumed the dot tool can be found in the path.
--
--DOT_PATH               =
--
--# The DOTFILE_DIRS tag can be used to specify one or more directories that
--# contain dot files that are included in the documentation (see the
--# \dotfile command).
--
--DOTFILE_DIRS           =
--
--# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
--# nodes that will be shown in the graph. If the number of nodes in a graph
--# becomes larger than this value, doxygen will truncate the graph, which is
--# visualized by representing a node as a red box. Note that doxygen if the
--# number of direct children of the root node in a graph is already larger than
--# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
--# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
--
--DOT_GRAPH_MAX_NODES    = 50
--
--# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
--# graphs generated by dot. A depth value of 3 means that only nodes reachable
--# from the root by following a path via at most 3 edges will be shown. Nodes
--# that lay further from the root node will be omitted. Note that setting this
--# option to 1 or 2 may greatly reduce the computation time needed for large
--# code bases. Also note that the size of a graph can be further restricted by
--# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
--
--MAX_DOT_GRAPH_DEPTH    = 0
--
--# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
--# background. This is disabled by default, because dot on Windows does not
--# seem to support this out of the box. Warning: Depending on the platform used,
--# enabling this option may lead to badly anti-aliased labels on the edges of
--# a graph (i.e. they become hard to read).
--
--DOT_TRANSPARENT        = YES
--
--# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
--# files in one run (i.e. multiple -o and -T options on the command line). This
--# makes dot run faster, but since only newer versions of dot (>1.8.10)
--# support this, this feature is disabled by default.
--
--DOT_MULTI_TARGETS      = NO
--
--# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
--# generate a legend page explaining the meaning of the various boxes and
--# arrows in the dot generated graphs.
--
--GENERATE_LEGEND        = YES
--
--# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
--# remove the intermediate dot files that are used to generate
--# the various graphs.
--
--DOT_CLEANUP            = YES
-diff --git a/doc/Doxyfile b/doc/Doxyfile
-new file mode 100644
-index 0000000..1b4e7d5
---- /dev/null
-+++ b/doc/Doxyfile
-@@ -0,0 +1,1647 @@
-+# Doxyfile 1.7.1
-+
-+# This file describes the settings to be used by the documentation system
-+# doxygen (www.doxygen.org) for a project
-+#
-+# All text after a hash (#) is considered a comment and will be ignored
-+# The format is:
-+#       TAG = value [value, ...]
-+# For lists items can also be appended using:
-+#       TAG += value [value, ...]
-+# Values that contain spaces should be placed between quotes (" ")
-+
-+#---------------------------------------------------------------------------
-+# Project related configuration options
-+#---------------------------------------------------------------------------
-+
-+# This tag specifies the encoding used for all characters in the config file
-+# that follow. The default is UTF-8 which is also the encoding used for all
-+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-+# iconv built into libc) for the transcoding. See
-+# http://www.gnu.org/software/libiconv for the list of possible encodings.
-+
-+DOXYFILE_ENCODING      = UTF-8
-+
-+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-+# by quotes) that should identify the project.
-+
-+PROJECT_NAME           = Libav
-+
-+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-+# This could be handy for archiving the generated documentation or
-+# if some version control system is used.
-+
-+PROJECT_NUMBER         =
-+
-+# With the PROJECT_LOGO tag one can specify an logo or icon that is included
-+# in the documentation. The maximum height of the logo should not exceed 55
-+# pixels and the maximum width should not exceed 200 pixels. Doxygen will
-+# copy the logo to the output directory.
-+PROJECT_LOGO           =
-+
-+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-+# base path where the generated documentation will be put.
-+# If a relative path is entered, it will be relative to the location
-+# where doxygen was started. If left blank the current directory will be used.
-+
-+OUTPUT_DIRECTORY       = doc/doxy
-+
-+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-+# 4096 sub-directories (in 2 levels) under the output directory of each output
-+# format and will distribute the generated files over these directories.
-+# Enabling this option can be useful when feeding doxygen a huge amount of
-+# source files, where putting all generated files in the same directory would
-+# otherwise cause performance problems for the file system.
-+
-+CREATE_SUBDIRS         = NO
-+
-+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-+# documentation generated by doxygen is written. Doxygen will use this
-+# information to generate all constant output in the proper language.
-+# The default language is English, other supported languages are:
-+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-+
-+OUTPUT_LANGUAGE        = English
-+
-+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-+# include brief member descriptions after the members that are listed in
-+# the file and class documentation (similar to JavaDoc).
-+# Set to NO to disable this.
-+
-+BRIEF_MEMBER_DESC      = YES
-+
-+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-+# the brief description of a member or function before the detailed description.
-+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-+# brief descriptions will be completely suppressed.
-+
-+REPEAT_BRIEF           = YES
-+
-+# This tag implements a quasi-intelligent brief description abbreviator
-+# that is used to form the text in various listings. Each string
-+# in this list, if found as the leading text of the brief description, will be
-+# stripped from the text and the result after processing the whole list, is
-+# used as the annotated text. Otherwise, the brief description is used as-is.
-+# If left blank, the following values are used ("$name" is automatically
-+# replaced with the name of the entity): "The $name class" "The $name widget"
-+# "The $name file" "is" "provides" "specifies" "contains"
-+# "represents" "a" "an" "the"
-+
-+ABBREVIATE_BRIEF       =
-+
-+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-+# Doxygen will generate a detailed section even if there is only a brief
-+# description.
-+
-+ALWAYS_DETAILED_SEC    = NO
-+
-+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-+# inherited members of a class in the documentation of that class as if those
-+# members were ordinary class members. Constructors, destructors and assignment
-+# operators of the base classes will not be shown.
-+
-+INLINE_INHERITED_MEMB  = NO
-+
-+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-+# path before files name in the file list and in the header files. If set
-+# to NO the shortest path that makes the file name unique will be used.
-+
-+FULL_PATH_NAMES        = YES
-+
-+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-+# can be used to strip a user-defined part of the path. Stripping is
-+# only done if one of the specified strings matches the left-hand part of
-+# the path. The tag can be used to show relative paths in the file list.
-+# If left blank the directory from which doxygen is run is used as the
-+# path to strip.
-+
-+STRIP_FROM_PATH        = .
-+
-+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-+# the path mentioned in the documentation of a class, which tells
-+# the reader which header file to include in order to use a class.
-+# If left blank only the name of the header file containing the class
-+# definition is used. Otherwise one should specify the include paths that
-+# are normally passed to the compiler using the -I flag.
-+
-+STRIP_FROM_INC_PATH    =
-+
-+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-+# (but less readable) file names. This can be useful is your file systems
-+# doesn't support long names like on DOS, Mac, or CD-ROM.
-+
-+SHORT_NAMES            = NO
-+
-+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-+# will interpret the first line (until the first dot) of a JavaDoc-style
-+# comment as the brief description. If set to NO, the JavaDoc
-+# comments will behave just like regular Qt-style comments
-+# (thus requiring an explicit @brief command for a brief description.)
-+
-+JAVADOC_AUTOBRIEF      = YES
-+
-+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-+# interpret the first line (until the first dot) of a Qt-style
-+# comment as the brief description. If set to NO, the comments
-+# will behave just like regular Qt-style comments (thus requiring
-+# an explicit \brief command for a brief description.)
-+
-+QT_AUTOBRIEF           = NO
-+
-+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-+# comments) as a brief description. This used to be the default behaviour.
-+# The new default is to treat a multi-line C++ comment block as a detailed
-+# description. Set this tag to YES if you prefer the old behaviour instead.
-+
-+MULTILINE_CPP_IS_BRIEF = NO
-+
-+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-+# member inherits the documentation from any documented member that it
-+# re-implements.
-+
-+INHERIT_DOCS           = YES
-+
-+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-+# a new page for each member. If set to NO, the documentation of a member will
-+# be part of the file/class/namespace that contains it.
-+
-+SEPARATE_MEMBER_PAGES  = NO
-+
-+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-+# Doxygen uses this value to replace tabs by spaces in code fragments.
-+
-+TAB_SIZE               = 8
-+
-+# This tag can be used to specify a number of aliases that acts
-+# as commands in the documentation. An alias has the form "name=value".
-+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-+# put the command \sideeffect (or @sideeffect) in the documentation, which
-+# will result in a user-defined paragraph with heading "Side Effects:".
-+# You can put \n's in the value part of an alias to insert newlines.
-+
-+ALIASES                =
-+
-+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-+# sources only. Doxygen will then generate output that is more tailored for C.
-+# For instance, some of the names that are used will be different. The list
-+# of all members will be omitted, etc.
-+
-+OPTIMIZE_OUTPUT_FOR_C  = YES
-+
-+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-+# sources only. Doxygen will then generate output that is more tailored for
-+# Java. For instance, namespaces will be presented as packages, qualified
-+# scopes will look different, etc.
-+
-+OPTIMIZE_OUTPUT_JAVA   = NO
-+
-+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-+# sources only. Doxygen will then generate output that is more tailored for
-+# Fortran.
-+
-+OPTIMIZE_FOR_FORTRAN   = NO
-+
-+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-+# sources. Doxygen will then generate output that is tailored for
-+# VHDL.
-+
-+OPTIMIZE_OUTPUT_VHDL   = NO
-+
-+# Doxygen selects the parser to use depending on the extension of the files it
-+# parses. With this tag you can assign which parser to use for a given extension.
-+# Doxygen has a built-in mapping, but you can override or extend it using this
-+# tag. The format is ext=language, where ext is a file extension, and language
-+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
-+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
-+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
-+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-+
-+EXTENSION_MAPPING      =
-+
-+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-+# to include (a tag file for) the STL sources as input, then you should
-+# set this tag to YES in order to let doxygen match functions declarations and
-+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-+# func(std::string) {}). This also make the inheritance and collaboration
-+# diagrams that involve STL classes more complete and accurate.
-+
-+BUILTIN_STL_SUPPORT    = NO
-+
-+# If you use Microsoft's C++/CLI language, you should set this option to YES to
-+# enable parsing support.
-+
-+CPP_CLI_SUPPORT        = NO
-+
-+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-+# Doxygen will parse them like normal C++ but will assume all classes use public
-+# instead of private inheritance when no explicit protection keyword is present.
-+
-+SIP_SUPPORT            = NO
-+
-+# For Microsoft's IDL there are propget and propput attributes to indicate getter
-+# and setter methods for a property. Setting this option to YES (the default)
-+# will make doxygen to replace the get and set methods by a property in the
-+# documentation. This will only work if the methods are indeed getting or
-+# setting a simple type. If this is not the case, or you want to show the
-+# methods anyway, you should set this option to NO.
-+
-+IDL_PROPERTY_SUPPORT   = YES
-+
-+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-+# tag is set to YES, then doxygen will reuse the documentation of the first
-+# member in the group (if any) for the other members of the group. By default
-+# all members of a group must be documented explicitly.
-+
-+DISTRIBUTE_GROUP_DOC   = NO
-+
-+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-+# the same type (for instance a group of public functions) to be put as a
-+# subgroup of that type (e.g. under the Public Functions section). Set it to
-+# NO to prevent subgrouping. Alternatively, this can be done per class using
-+# the \nosubgrouping command.
-+
-+SUBGROUPING            = YES
-+
-+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-+# is documented as struct, union, or enum with the name of the typedef. So
-+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-+# with name TypeT. When disabled the typedef will appear as a member of a file,
-+# namespace, or class. And the struct will be named TypeS. This can typically
-+# be useful for C code in case the coding convention dictates that all compound
-+# types are typedef'ed and only the typedef is referenced, never the tag name.
-+
-+TYPEDEF_HIDES_STRUCT   = NO
-+
-+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-+# determine which symbols to keep in memory and which to flush to disk.
-+# When the cache is full, less often used symbols will be written to disk.
-+# For small to medium size projects (<1000 input files) the default value is
-+# probably good enough. For larger projects a too small cache size can cause
-+# doxygen to be busy swapping symbols to and from disk most of the time
-+# causing a significant performance penality.
-+# If the system has enough physical memory increasing the cache will improve the
-+# performance by keeping more symbols in memory. Note that the value works on
-+# a logarithmic scale so increasing the size by one will rougly double the
-+# memory usage. The cache size is given by this formula:
-+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-+# corresponding to a cache size of 2^16 = 65536 symbols
-+
-+SYMBOL_CACHE_SIZE      = 0
-+
-+#---------------------------------------------------------------------------
-+# Build related configuration options
-+#---------------------------------------------------------------------------
-+
-+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-+# documentation are documented, even if no documentation was available.
-+# Private class members and static file members will be hidden unless
-+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-+
-+EXTRACT_ALL            = YES
-+
-+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-+# will be included in the documentation.
-+
-+EXTRACT_PRIVATE        = YES
-+
-+# If the EXTRACT_STATIC tag is set to YES all static members of a file
-+# will be included in the documentation.
-+
-+EXTRACT_STATIC         = YES
-+
-+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-+# defined locally in source files will be included in the documentation.
-+# If set to NO only classes defined in header files are included.
-+
-+EXTRACT_LOCAL_CLASSES  = YES
-+
-+# This flag is only useful for Objective-C code. When set to YES local
-+# methods, which are defined in the implementation section but not in
-+# the interface are included in the documentation.
-+# If set to NO (the default) only methods in the interface are included.
-+
-+EXTRACT_LOCAL_METHODS  = NO
-+
-+# If this flag is set to YES, the members of anonymous namespaces will be
-+# extracted and appear in the documentation as a namespace called
-+# 'anonymous_namespace{file}', where file will be replaced with the base
-+# name of the file that contains the anonymous namespace. By default
-+# anonymous namespace are hidden.
-+
-+EXTRACT_ANON_NSPACES   = NO
-+
-+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-+# undocumented members of documented classes, files or namespaces.
-+# If set to NO (the default) these members will be included in the
-+# various overviews, but no documentation section is generated.
-+# This option has no effect if EXTRACT_ALL is enabled.
-+
-+HIDE_UNDOC_MEMBERS     = NO
-+
-+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-+# undocumented classes that are normally visible in the class hierarchy.
-+# If set to NO (the default) these classes will be included in the various
-+# overviews. This option has no effect if EXTRACT_ALL is enabled.
-+
-+HIDE_UNDOC_CLASSES     = NO
-+
-+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-+# friend (class|struct|union) declarations.
-+# If set to NO (the default) these declarations will be included in the
-+# documentation.
-+
-+HIDE_FRIEND_COMPOUNDS  = NO
-+
-+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-+# documentation blocks found inside the body of a function.
-+# If set to NO (the default) these blocks will be appended to the
-+# function's detailed documentation block.
-+
-+HIDE_IN_BODY_DOCS      = NO
-+
-+# The INTERNAL_DOCS tag determines if documentation
-+# that is typed after a \internal command is included. If the tag is set
-+# to NO (the default) then the documentation will be excluded.
-+# Set it to YES to include the internal documentation.
-+
-+INTERNAL_DOCS          = NO
-+
-+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-+# file names in lower-case letters. If set to YES upper-case letters are also
-+# allowed. This is useful if you have classes or files whose names only differ
-+# in case and if your file system supports case sensitive file names. Windows
-+# and Mac users are advised to set this option to NO.
-+
-+CASE_SENSE_NAMES       = YES
-+
-+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-+# will show members with their full class and namespace scopes in the
-+# documentation. If set to YES the scope will be hidden.
-+
-+HIDE_SCOPE_NAMES       = NO
-+
-+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-+# will put a list of the files that are included by a file in the documentation
-+# of that file.
-+
-+SHOW_INCLUDE_FILES     = YES
-+
-+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
-+# will list include files with double quotes in the documentation
-+# rather than with sharp brackets.
-+
-+FORCE_LOCAL_INCLUDES   = NO
-+
-+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-+# is inserted in the documentation for inline members.
-+
-+INLINE_INFO            = YES
-+
-+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-+# will sort the (detailed) documentation of file and class members
-+# alphabetically by member name. If set to NO the members will appear in
-+# declaration order.
-+
-+SORT_MEMBER_DOCS       = YES
-+
-+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-+# brief documentation of file, namespace and class members alphabetically
-+# by member name. If set to NO (the default) the members will appear in
-+# declaration order.
-+
-+SORT_BRIEF_DOCS        = NO
-+
-+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
-+# will sort the (brief and detailed) documentation of class members so that
-+# constructors and destructors are listed first. If set to NO (the default)
-+# the constructors will appear in the respective orders defined by
-+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
-+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
-+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-+
-+SORT_MEMBERS_CTORS_1ST = NO
-+
-+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-+# hierarchy of group names into alphabetical order. If set to NO (the default)
-+# the group names will appear in their defined order.
-+
-+SORT_GROUP_NAMES       = NO
-+
-+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-+# sorted by fully-qualified names, including namespaces. If set to
-+# NO (the default), the class list will be sorted only by class name,
-+# not including the namespace part.
-+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-+# Note: This option applies only to the class list, not to the
-+# alphabetical list.
-+
-+SORT_BY_SCOPE_NAME     = NO
-+
-+# The GENERATE_TODOLIST tag can be used to enable (YES) or
-+# disable (NO) the todo list. This list is created by putting \todo
-+# commands in the documentation.
-+
-+GENERATE_TODOLIST      = YES
-+
-+# The GENERATE_TESTLIST tag can be used to enable (YES) or
-+# disable (NO) the test list. This list is created by putting \test
-+# commands in the documentation.
-+
-+GENERATE_TESTLIST      = YES
-+
-+# The GENERATE_BUGLIST tag can be used to enable (YES) or
-+# disable (NO) the bug list. This list is created by putting \bug
-+# commands in the documentation.
-+
-+GENERATE_BUGLIST       = YES
-+
-+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-+# disable (NO) the deprecated list. This list is created by putting
-+# \deprecated commands in the documentation.
-+
-+GENERATE_DEPRECATEDLIST= YES
-+
-+# The ENABLED_SECTIONS tag can be used to enable conditional
-+# documentation sections, marked by \if sectionname ... \endif.
-+
-+ENABLED_SECTIONS       =
-+
-+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-+# the initial value of a variable or define consists of for it to appear in
-+# the documentation. If the initializer consists of more lines than specified
-+# here it will be hidden. Use a value of 0 to hide initializers completely.
-+# The appearance of the initializer of individual variables and defines in the
-+# documentation can be controlled using \showinitializer or \hideinitializer
-+# command in the documentation regardless of this setting.
-+
-+MAX_INITIALIZER_LINES  = 30
-+
-+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-+# at the bottom of the documentation of classes and structs. If set to YES the
-+# list will mention the files that were used to generate the documentation.
-+
-+SHOW_USED_FILES        = YES
-+
-+# If the sources in your project are distributed over multiple directories
-+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-+# in the documentation. The default is NO.
-+
-+SHOW_DIRECTORIES       = NO
-+
-+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-+# This will remove the Files entry from the Quick Index and from the
-+# Folder Tree View (if specified). The default is YES.
-+
-+SHOW_FILES             = YES
-+
-+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-+# Namespaces page.
-+# This will remove the Namespaces entry from the Quick Index
-+# and from the Folder Tree View (if specified). The default is YES.
-+
-+SHOW_NAMESPACES        = YES
-+
-+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-+# doxygen should invoke to get the current version for each file (typically from
-+# the version control system). Doxygen will invoke the program by executing (via
-+# popen()) the command <command> <input-file>, where <command> is the value of
-+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
-+# provided by doxygen. Whatever the program writes to standard output
-+# is used as the file version. See the manual for examples.
-+
-+FILE_VERSION_FILTER    =
-+
-+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-+# by doxygen. The layout file controls the global structure of the generated
-+# output files in an output format independent way. The create the layout file
-+# that represents doxygen's defaults, run doxygen with the -l option.
-+# You can optionally specify a file name after the option, if omitted
-+# DoxygenLayout.xml will be used as the name of the layout file.
-+
-+LAYOUT_FILE            =
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to warning and progress messages
-+#---------------------------------------------------------------------------
-+
-+# The QUIET tag can be used to turn on/off the messages that are generated
-+# by doxygen. Possible values are YES and NO. If left blank NO is used.
-+
-+QUIET                  = YES
-+
-+# The WARNINGS tag can be used to turn on/off the warning messages that are
-+# generated by doxygen. Possible values are YES and NO. If left blank
-+# NO is used.
-+
-+WARNINGS               = YES
-+
-+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-+# automatically be disabled.
-+
-+WARN_IF_UNDOCUMENTED   = YES
-+
-+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-+# potential errors in the documentation, such as not documenting some
-+# parameters in a documented function, or documenting parameters that
-+# don't exist or using markup commands wrongly.
-+
-+WARN_IF_DOC_ERROR      = YES
-+
-+# This WARN_NO_PARAMDOC option can be abled to get warnings for
-+# functions that are documented, but have no documentation for their parameters
-+# or return value. If set to NO (the default) doxygen will only warn about
-+# wrong or incomplete parameter documentation, but not about the absence of
-+# documentation.
-+
-+WARN_NO_PARAMDOC       = NO
-+
-+# The WARN_FORMAT tag determines the format of the warning messages that
-+# doxygen can produce. The string should contain the $file, $line, and $text
-+# tags, which will be replaced by the file and line number from which the
-+# warning originated and the warning text. Optionally the format may contain
-+# $version, which will be replaced by the version of the file (if it could
-+# be obtained via FILE_VERSION_FILTER)
-+
-+WARN_FORMAT            = "$file:$line: $text"
-+
-+# The WARN_LOGFILE tag can be used to specify a file to which warning
-+# and error messages should be written. If left blank the output is written
-+# to stderr.
-+
-+WARN_LOGFILE           =
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the input files
-+#---------------------------------------------------------------------------
-+
-+# The INPUT tag can be used to specify the files and/or directories that contain
-+# documented source files. You may enter file names like "myfile.cpp" or
-+# directories like "/usr/src/myproject". Separate the files or directories
-+# with spaces.
-+
-+INPUT                  =
-+
-+# This tag can be used to specify the character encoding of the source files
-+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-+# also the default input encoding. Doxygen uses libiconv (or the iconv built
-+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-+# the list of possible encodings.
-+
-+INPUT_ENCODING         = UTF-8
-+
-+# If the value of the INPUT tag contains directories, you can use the
-+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-+# and *.h) to filter out the source-files in the directories. If left
-+# blank the following patterns are tested:
-+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-+
-+FILE_PATTERNS          =
-+
-+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-+# should be searched for input files as well. Possible values are YES and NO.
-+# If left blank NO is used.
-+
-+RECURSIVE              = YES
-+
-+# The EXCLUDE tag can be used to specify files and/or directories that should
-+# excluded from the INPUT source files. This way you can easily exclude a
-+# subdirectory from a directory tree whose root is specified with the INPUT tag.
-+
-+EXCLUDE                =
-+
-+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-+# directories that are symbolic links (a Unix filesystem feature) are excluded
-+# from the input.
-+
-+EXCLUDE_SYMLINKS       = NO
-+
-+# If the value of the INPUT tag contains directories, you can use the
-+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-+# certain files from those directories. Note that the wildcards are matched
-+# against the file with absolute path, so to exclude all test directories
-+# for example use the pattern */test/*
-+
-+EXCLUDE_PATTERNS       = *.git \
-+                         *.d
-+
-+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-+# (namespaces, classes, functions, etc.) that should be excluded from the
-+# output. The symbol name can be a fully qualified name, a word, or if the
-+# wildcard * is used, a substring. Examples: ANamespace, AClass,
-+# AClass::ANamespace, ANamespace::*Test
-+
-+EXCLUDE_SYMBOLS        =
-+
-+# The EXAMPLE_PATH tag can be used to specify one or more files or
-+# directories that contain example code fragments that are included (see
-+# the \include command).
-+
-+EXAMPLE_PATH           = libavcodec/ \
-+                         libavformat/
-+
-+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-+# and *.h) to filter out the source-files in the directories. If left
-+# blank all files are included.
-+
-+EXAMPLE_PATTERNS       = *-example.c
-+
-+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-+# searched for input files to be used with the \include or \dontinclude
-+# commands irrespective of the value of the RECURSIVE tag.
-+# Possible values are YES and NO. If left blank NO is used.
-+
-+EXAMPLE_RECURSIVE      = NO
-+
-+# The IMAGE_PATH tag can be used to specify one or more files or
-+# directories that contain image that are included in the documentation (see
-+# the \image command).
-+
-+IMAGE_PATH             =
-+
-+# The INPUT_FILTER tag can be used to specify a program that doxygen should
-+# invoke to filter for each input file. Doxygen will invoke the filter program
-+# by executing (via popen()) the command <filter> <input-file>, where <filter>
-+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
-+# input file. Doxygen will then use the output that the filter program writes
-+# to standard output.
-+# If FILTER_PATTERNS is specified, this tag will be
-+# ignored.
-+
-+INPUT_FILTER           =
-+
-+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-+# basis.
-+# Doxygen will compare the file name with each pattern and apply the
-+# filter if there is a match.
-+# The filters are a list of the form:
-+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-+# is applied to all files.
-+
-+FILTER_PATTERNS        =
-+
-+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-+# INPUT_FILTER) will be used to filter the input files when producing source
-+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-+
-+FILTER_SOURCE_FILES    = NO
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to source browsing
-+#---------------------------------------------------------------------------
-+
-+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-+# be generated. Documented entities will be cross-referenced with these sources.
-+# Note: To get rid of all source code in the generated output, make sure also
-+# VERBATIM_HEADERS is set to NO.
-+
-+SOURCE_BROWSER         = YES
-+
-+# Setting the INLINE_SOURCES tag to YES will include the body
-+# of functions and classes directly in the documentation.
-+
-+INLINE_SOURCES         = NO
-+
-+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-+# doxygen to hide any special comment blocks from generated source code
-+# fragments. Normal C and C++ comments will always remain visible.
-+
-+STRIP_CODE_COMMENTS    = YES
-+
-+# If the REFERENCED_BY_RELATION tag is set to YES
-+# then for each documented function all documented
-+# functions referencing it will be listed.
-+
-+REFERENCED_BY_RELATION = YES
-+
-+# If the REFERENCES_RELATION tag is set to YES
-+# then for each documented function all documented entities
-+# called/used by that function will be listed.
-+
-+REFERENCES_RELATION    = NO
-+
-+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-+# link to the source code.
-+# Otherwise they will link to the documentation.
-+
-+REFERENCES_LINK_SOURCE = YES
-+
-+# If the USE_HTAGS tag is set to YES then the references to source code
-+# will point to the HTML generated by the htags(1) tool instead of doxygen
-+# built-in source browser. The htags tool is part of GNU's global source
-+# tagging system (see http://www.gnu.org/software/global/global.html). You
-+# will need version 4.8.6 or higher.
-+
-+USE_HTAGS              = NO
-+
-+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-+# will generate a verbatim copy of the header file for each class for
-+# which an include is specified. Set to NO to disable this.
-+
-+VERBATIM_HEADERS       = YES
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the alphabetical class index
-+#---------------------------------------------------------------------------
-+
-+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-+# of all compounds will be generated. Enable this if the project
-+# contains a lot of classes, structs, unions or interfaces.
-+
-+ALPHABETICAL_INDEX     = YES
-+
-+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-+# in which this list will be split (can be a number in the range [1..20])
-+
-+COLS_IN_ALPHA_INDEX    = 2
-+
-+# In case all classes in a project start with a common prefix, all
-+# classes will be put under the same header in the alphabetical index.
-+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-+# should be ignored while generating the index headers.
-+
-+IGNORE_PREFIX          =
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the HTML output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-+# generate HTML output.
-+
-+GENERATE_HTML          = YES
-+
-+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-+# put in front of it. If left blank `html' will be used as the default path.
-+
-+HTML_OUTPUT            = html
-+
-+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-+# doxygen will generate files with .html extension.
-+
-+HTML_FILE_EXTENSION    = .html
-+
-+# The HTML_HEADER tag can be used to specify a personal HTML header for
-+# each generated HTML page. If it is left blank doxygen will generate a
-+# standard header.
-+
-+HTML_HEADER            = doc/doxy/header.html
-+
-+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-+# each generated HTML page. If it is left blank doxygen will generate a
-+# standard footer.
-+
-+HTML_FOOTER            = doc/doxy/footer.html
-+
-+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-+# style sheet that is used by each HTML page. It can be used to
-+# fine-tune the look of the HTML output. If the tag is left blank doxygen
-+# will generate a default style sheet. Note that doxygen will try to copy
-+# the style sheet file to the HTML output directory, so don't put your own
-+# stylesheet in the HTML output directory as well, or it will be erased!
-+
-+HTML_STYLESHEET        = doc/doxy/doxy_stylesheet.css
-+
-+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
-+# Doxygen will adjust the colors in the stylesheet and background images
-+# according to this color. Hue is specified as an angle on a colorwheel,
-+# see http://en.wikipedia.org/wiki/Hue for more information.
-+# For instance the value 0 represents red, 60 is yellow, 120 is green,
-+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
-+# The allowed range is 0 to 359.
-+
-+HTML_COLORSTYLE_HUE    = 120
-+
-+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
-+# the colors in the HTML output. For a value of 0 the output will use
-+# grayscales only. A value of 255 will produce the most vivid colors.
-+
-+HTML_COLORSTYLE_SAT    = 100
-+
-+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
-+# the luminance component of the colors in the HTML output. Values below
-+# 100 gradually make the output lighter, whereas values above 100 make
-+# the output darker. The value divided by 100 is the actual gamma applied,
-+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
-+# and 100 does not change the gamma.
-+
-+HTML_COLORSTYLE_GAMMA  = 80
-+
-+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-+# page will contain the date and time when the page was generated. Setting
-+# this to NO can help when comparing the output of multiple runs.
-+
-+HTML_TIMESTAMP         = YES
-+
-+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-+# files or namespaces will be aligned in HTML using tables. If set to
-+# NO a bullet list will be used.
-+
-+HTML_ALIGN_MEMBERS     = YES
-+
-+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-+# documentation will contain sections that can be hidden and shown after the
-+# page has loaded. For this to work a browser that supports
-+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-+
-+HTML_DYNAMIC_SECTIONS  = NO
-+
-+# If the GENERATE_DOCSET tag is set to YES, additional index files
-+# will be generated that can be used as input for Apple's Xcode 3
-+# integrated development environment, introduced with OS X 10.5 (Leopard).
-+# To create a documentation set, doxygen will generate a Makefile in the
-+# HTML output directory. Running make will produce the docset in that
-+# directory and running "make install" will install the docset in
-+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-+# it at startup.
-+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-+# for more information.
-+
-+GENERATE_DOCSET        = NO
-+
-+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-+# feed. A documentation feed provides an umbrella under which multiple
-+# documentation sets from a single provider (such as a company or product suite)
-+# can be grouped.
-+
-+DOCSET_FEEDNAME        = "Doxygen generated docs"
-+
-+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-+# should uniquely identify the documentation set bundle. This should be a
-+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-+# will append .docset to the name.
-+
-+DOCSET_BUNDLE_ID       = org.doxygen.Project
-+
-+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
-+# the documentation publisher. This should be a reverse domain-name style
-+# string, e.g. com.mycompany.MyDocSet.documentation.
-+
-+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
-+
-+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
-+
-+DOCSET_PUBLISHER_NAME  = Publisher
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-+# will be generated that can be used as input for tools like the
-+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-+# of the generated HTML documentation.
-+
-+GENERATE_HTMLHELP      = NO
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-+# be used to specify the file name of the resulting .chm file. You
-+# can add a path in front of the file if the result should not be
-+# written to the html output directory.
-+
-+CHM_FILE               =
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-+# be used to specify the location (absolute path including file name) of
-+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-+# the HTML help compiler on the generated index.hhp.
-+
-+HHC_LOCATION           =
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-+# controls if a separate .chi index file is generated (YES) or that
-+# it should be included in the master .chm file (NO).
-+
-+GENERATE_CHI           = NO
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-+# content.
-+
-+CHM_INDEX_ENCODING     =
-+
-+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-+# controls whether a binary table of contents is generated (YES) or a
-+# normal table of contents (NO) in the .chm file.
-+
-+BINARY_TOC             = NO
-+
-+# The TOC_EXPAND flag can be set to YES to add extra items for group members
-+# to the contents of the HTML help documentation and to the tree view.
-+
-+TOC_EXPAND             = NO
-+
-+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
-+# that can be used as input for Qt's qhelpgenerator to generate a
-+# Qt Compressed Help (.qch) of the generated HTML documentation.
-+
-+GENERATE_QHP           = NO
-+
-+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-+# be used to specify the file name of the resulting .qch file.
-+# The path specified is relative to the HTML output folder.
-+
-+QCH_FILE               =
-+
-+# The QHP_NAMESPACE tag specifies the namespace to use when generating
-+# Qt Help Project output. For more information please see
-+# http://doc.trolltech.com/qthelpproject.html#namespace
-+
-+QHP_NAMESPACE          = org.doxygen.Project
-+
-+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-+# Qt Help Project output. For more information please see
-+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-+
-+QHP_VIRTUAL_FOLDER     = doc
-+
-+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
-+# add. For more information please see
-+# http://doc.trolltech.com/qthelpproject.html#custom-filters
-+
-+QHP_CUST_FILTER_NAME   =
-+
-+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
-+# custom filter to add. For more information please see
-+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
-+# Qt Help Project / Custom Filters</a>.
-+
-+QHP_CUST_FILTER_ATTRS  =
-+
-+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-+# project's
-+# filter section matches.
-+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
-+# Qt Help Project / Filter Attributes</a>.
-+
-+QHP_SECT_FILTER_ATTRS  =
-+
-+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-+# be used to specify the location of Qt's qhelpgenerator.
-+# If non-empty doxygen will try to run qhelpgenerator on the generated
-+# .qhp file.
-+
-+QHG_LOCATION           =
-+
-+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
-+#  will be generated, which together with the HTML files, form an Eclipse help
-+# plugin. To install this plugin and make it available under the help contents
-+# menu in Eclipse, the contents of the directory containing the HTML and XML
-+# files needs to be copied into the plugins directory of eclipse. The name of
-+# the directory within the plugins directory should be the same as
-+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
-+# the help appears.
-+
-+GENERATE_ECLIPSEHELP   = NO
-+
-+# A unique identifier for the eclipse help plugin. When installing the plugin
-+# the directory name containing the HTML and XML files should also have
-+# this name.
-+
-+ECLIPSE_DOC_ID         = org.doxygen.Project
-+
-+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-+# top of each HTML page. The value NO (the default) enables the index and
-+# the value YES disables it.
-+
-+DISABLE_INDEX          = NO
-+
-+# This tag can be used to set the number of enum values (range [1..20])
-+# that doxygen will group on one line in the generated HTML documentation.
-+
-+ENUM_VALUES_PER_LINE   = 4
-+
-+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-+# structure should be generated to display hierarchical information.
-+# If the tag value is set to YES, a side panel will be generated
-+# containing a tree-like index structure (just like the one that
-+# is generated for HTML Help). For this to work a browser that supports
-+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-+# Windows users are probably better off using the HTML help feature.
-+
-+GENERATE_TREEVIEW      = NO
-+
-+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-+# and Class Hierarchy pages using a tree view instead of an ordered list.
-+
-+USE_INLINE_TREES       = NO
-+
-+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-+# used to set the initial width (in pixels) of the frame in which the tree
-+# is shown.
-+
-+TREEVIEW_WIDTH         = 250
-+
-+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
-+# links to external symbols imported via tag files in a separate window.
-+
-+EXT_LINKS_IN_WINDOW    = NO
-+
-+# Use this tag to change the font size of Latex formulas included
-+# as images in the HTML documentation. The default is 10. Note that
-+# when you change the font size after a successful doxygen run you need
-+# to manually remove any form_*.png images from the HTML output directory
-+# to force them to be regenerated.
-+
-+FORMULA_FONTSIZE       = 10
-+
-+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-+# generated for formulas are transparent PNGs. Transparent PNGs are
-+# not supported properly for IE 6.0, but are supported on all modern browsers.
-+# Note that when changing this option you need to delete any form_*.png files
-+# in the HTML output before the changes have effect.
-+
-+FORMULA_TRANSPARENT    = YES
-+
-+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
-+# for the HTML output. The underlying search engine uses javascript
-+# and DHTML and should work on any modern browser. Note that when using
-+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
-+# (GENERATE_DOCSET) there is already a search function so this one should
-+# typically be disabled. For large projects the javascript based search engine
-+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-+
-+SEARCHENGINE           = NO
-+
-+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-+# implemented using a PHP enabled web server instead of at the web client
-+# using Javascript. Doxygen will generate the search PHP script and index
-+# file to put on the web server. The advantage of the server
-+# based approach is that it scales better to large projects and allows
-+# full text search. The disadvances is that it is more difficult to setup
-+# and does not have live searching capabilities.
-+
-+SERVER_BASED_SEARCH    = NO
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the LaTeX output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-+# generate Latex output.
-+
-+GENERATE_LATEX         = NO
-+
-+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-+# put in front of it. If left blank `latex' will be used as the default path.
-+
-+LATEX_OUTPUT           = latex
-+
-+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-+# invoked. If left blank `latex' will be used as the default command name.
-+# Note that when enabling USE_PDFLATEX this option is only used for
-+# generating bitmaps for formulas in the HTML output, but not in the
-+# Makefile that is written to the output directory.
-+
-+LATEX_CMD_NAME         = latex
-+
-+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-+# generate index for LaTeX. If left blank `makeindex' will be used as the
-+# default command name.
-+
-+MAKEINDEX_CMD_NAME     = makeindex
-+
-+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-+# LaTeX documents. This may be useful for small projects and may help to
-+# save some trees in general.
-+
-+COMPACT_LATEX          = NO
-+
-+# The PAPER_TYPE tag can be used to set the paper type that is used
-+# by the printer. Possible values are: a4, a4wide, letter, legal and
-+# executive. If left blank a4wide will be used.
-+
-+PAPER_TYPE             = a4wide
-+
-+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-+# packages that should be included in the LaTeX output.
-+
-+EXTRA_PACKAGES         =
-+
-+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-+# the generated latex document. The header should contain everything until
-+# the first chapter. If it is left blank doxygen will generate a
-+# standard header. Notice: only use this tag if you know what you are doing!
-+
-+LATEX_HEADER           =
-+
-+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-+# contain links (just like the HTML output) instead of page references
-+# This makes the output suitable for online browsing using a pdf viewer.
-+
-+PDF_HYPERLINKS         = NO
-+
-+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-+# plain latex in the generated Makefile. Set this option to YES to get a
-+# higher quality PDF documentation.
-+
-+USE_PDFLATEX           = NO
-+
-+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-+# command to the generated LaTeX files. This will instruct LaTeX to keep
-+# running if errors occur, instead of asking the user for help.
-+# This option is also used when generating formulas in HTML.
-+
-+LATEX_BATCHMODE        = NO
-+
-+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-+# include the index chapters (such as File Index, Compound Index, etc.)
-+# in the output.
-+
-+LATEX_HIDE_INDICES     = NO
-+
-+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
-+# source code with syntax highlighting in the LaTeX output.
-+# Note that which sources are shown also depends on other settings
-+# such as SOURCE_BROWSER.
-+
-+LATEX_SOURCE_CODE      = NO
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the RTF output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-+# The RTF output is optimized for Word 97 and may not look very pretty with
-+# other RTF readers or editors.
-+
-+GENERATE_RTF           = NO
-+
-+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-+# put in front of it. If left blank `rtf' will be used as the default path.
-+
-+RTF_OUTPUT             = rtf
-+
-+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-+# RTF documents. This may be useful for small projects and may help to
-+# save some trees in general.
-+
-+COMPACT_RTF            = NO
-+
-+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-+# will contain hyperlink fields. The RTF file will
-+# contain links (just like the HTML output) instead of page references.
-+# This makes the output suitable for online browsing using WORD or other
-+# programs which support those fields.
-+# Note: wordpad (write) and others do not support links.
-+
-+RTF_HYPERLINKS         = NO
-+
-+# Load stylesheet definitions from file. Syntax is similar to doxygen's
-+# config file, i.e. a series of assignments. You only have to provide
-+# replacements, missing definitions are set to their default value.
-+
-+RTF_STYLESHEET_FILE    =
-+
-+# Set optional variables used in the generation of an rtf document.
-+# Syntax is similar to doxygen's config file.
-+
-+RTF_EXTENSIONS_FILE    =
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the man page output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-+# generate man pages
-+
-+GENERATE_MAN           = NO
-+
-+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-+# put in front of it. If left blank `man' will be used as the default path.
-+
-+MAN_OUTPUT             = man
-+
-+# The MAN_EXTENSION tag determines the extension that is added to
-+# the generated man pages (default is the subroutine's section .3)
-+
-+MAN_EXTENSION          = .3
-+
-+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-+# then it will generate one additional man file for each entity
-+# documented in the real man page(s). These additional files
-+# only source the real man page, but without them the man command
-+# would be unable to find the correct page. The default is NO.
-+
-+MAN_LINKS              = NO
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the XML output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_XML tag is set to YES Doxygen will
-+# generate an XML file that captures the structure of
-+# the code including all documentation.
-+
-+GENERATE_XML           = NO
-+
-+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-+# put in front of it. If left blank `xml' will be used as the default path.
-+
-+XML_OUTPUT             = xml
-+
-+# The XML_SCHEMA tag can be used to specify an XML schema,
-+# which can be used by a validating XML parser to check the
-+# syntax of the XML files.
-+
-+XML_SCHEMA             =
-+
-+# The XML_DTD tag can be used to specify an XML DTD,
-+# which can be used by a validating XML parser to check the
-+# syntax of the XML files.
-+
-+XML_DTD                =
-+
-+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-+# dump the program listings (including syntax highlighting
-+# and cross-referencing information) to the XML output. Note that
-+# enabling this will significantly increase the size of the XML output.
-+
-+XML_PROGRAMLISTING     = YES
-+
-+#---------------------------------------------------------------------------
-+# configuration options for the AutoGen Definitions output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-+# generate an AutoGen Definitions (see autogen.sf.net) file
-+# that captures the structure of the code including all
-+# documentation. Note that this feature is still experimental
-+# and incomplete at the moment.
-+
-+GENERATE_AUTOGEN_DEF   = NO
-+
-+#---------------------------------------------------------------------------
-+# configuration options related to the Perl module output
-+#---------------------------------------------------------------------------
-+
-+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-+# generate a Perl module file that captures the structure of
-+# the code including all documentation. Note that this
-+# feature is still experimental and incomplete at the
-+# moment.
-+
-+GENERATE_PERLMOD       = NO
-+
-+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-+# to generate PDF and DVI output from the Perl module output.
-+
-+PERLMOD_LATEX          = NO
-+
-+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-+# nicely formatted so it can be parsed by a human reader.
-+# This is useful
-+# if you want to understand what is going on.
-+# On the other hand, if this
-+# tag is set to NO the size of the Perl module output will be much smaller
-+# and Perl will parse it just the same.
-+
-+PERLMOD_PRETTY         = YES
-+
-+# The names of the make variables in the generated doxyrules.make file
-+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-+# This is useful so different doxyrules.make files included by the same
-+# Makefile don't overwrite each other's variables.
-+
-+PERLMOD_MAKEVAR_PREFIX =
-+
-+#---------------------------------------------------------------------------
-+# Configuration options related to the preprocessor
-+#---------------------------------------------------------------------------
-+
-+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-+# evaluate all C-preprocessor directives found in the sources and include
-+# files.
-+
-+ENABLE_PREPROCESSING   = YES
-+
-+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-+# names in the source code. If set to NO (the default) only conditional
-+# compilation will be performed. Macro expansion can be done in a controlled
-+# way by setting EXPAND_ONLY_PREDEF to YES.
-+
-+MACRO_EXPANSION        = YES
-+
-+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-+# then the macro expansion is limited to the macros specified with the
-+# PREDEFINED and EXPAND_AS_DEFINED tags.
-+
-+EXPAND_ONLY_PREDEF     = YES
-+
-+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-+# in the INCLUDE_PATH (see below) will be search if a #include is found.
-+
-+SEARCH_INCLUDES        = YES
-+
-+# The INCLUDE_PATH tag can be used to specify one or more directories that
-+# contain include files that are not input files but should be processed by
-+# the preprocessor.
-+
-+INCLUDE_PATH           =
-+
-+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-+# patterns (like *.h and *.hpp) to filter out the header-files in the
-+# directories. If left blank, the patterns specified with FILE_PATTERNS will
-+# be used.
-+
-+INCLUDE_FILE_PATTERNS  =
-+
-+# The PREDEFINED tag can be used to specify one or more macro names that
-+# are defined before the preprocessor is started (similar to the -D option of
-+# gcc). The argument of the tag is a list of macros of the form: name
-+# or name=definition (no spaces). If the definition and the = are
-+# omitted =1 is assumed. To prevent a macro definition from being
-+# undefined via #undef or recursively expanded use the := operator
-+# instead of the = operator.
-+
-+PREDEFINED             = "__attribute__(x)=" \
-+                         "RENAME(x)=x ## _TMPL" \
-+                         "DEF(x)=x ## _TMPL" \
-+                         HAVE_AV_CONFIG_H \
-+                         HAVE_MMX \
-+                         HAVE_MMXEXT \
-+                         HAVE_AMD3DNOW \
-+                         "DECLARE_ALIGNED(a,t,n)=t n" \
-+                         "offsetof(x,y)=0x42"
-+
-+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-+# this tag can be used to specify a list of macro names that should be expanded.
-+# The macro definition that is found in the sources will be used.
-+# Use the PREDEFINED tag if you want to use a different macro definition.
-+
-+EXPAND_AS_DEFINED      = declare_idct  \
-+                         READ_PAR_DATA \
-+
-+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-+# doxygen's preprocessor will remove all function-like macros that are alone
-+# on a line, have an all uppercase name, and do not end with a semicolon. Such
-+# function macros are typically used for boiler-plate code, and will confuse
-+# the parser if not removed.
-+
-+SKIP_FUNCTION_MACROS   = YES
-+
-+#---------------------------------------------------------------------------
-+# Configuration::additions related to external references
-+#---------------------------------------------------------------------------
-+
-+# The TAGFILES option can be used to specify one or more tagfiles.
-+# Optionally an initial location of the external documentation
-+# can be added for each tagfile. The format of a tag file without
-+# this location is as follows:
-+#
-+# TAGFILES = file1 file2 ...
-+# Adding location for the tag files is done as follows:
-+#
-+# TAGFILES = file1=loc1 "file2 = loc2" ...
-+# where "loc1" and "loc2" can be relative or absolute paths or
-+# URLs. If a location is present for each tag, the installdox tool
-+# does not have to be run to correct the links.
-+# Note that each tag file must have a unique name
-+# (where the name does NOT include the path)
-+# If a tag file is not located in the directory in which doxygen
-+# is run, you must also specify the path to the tagfile here.
-+
-+TAGFILES               =
-+
-+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-+# a tag file that is based on the input files it reads.
-+
-+GENERATE_TAGFILE       =
-+
-+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-+# in the class index. If set to NO only the inherited external classes
-+# will be listed.
-+
-+ALLEXTERNALS           = NO
-+
-+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-+# in the modules index. If set to NO, only the current project's groups will
-+# be listed.
-+
-+EXTERNAL_GROUPS        = YES
-+
-+# The PERL_PATH should be the absolute path and name of the perl script
-+# interpreter (i.e. the result of `which perl').
-+
-+PERL_PATH              = /usr/bin/perl
-+
-+#---------------------------------------------------------------------------
-+# Configuration options related to the dot tool
-+#---------------------------------------------------------------------------
-+
-+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-+# or super classes. Setting the tag to NO turns the diagrams off. Note that
-+# this option is superseded by the HAVE_DOT option below. This is only a
-+# fallback. It is recommended to install and use dot, since it yields more
-+# powerful graphs.
-+
-+CLASS_DIAGRAMS         = YES
-+
-+# You can define message sequence charts within doxygen comments using the \msc
-+# command. Doxygen will then run the mscgen tool (see
-+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-+# the mscgen tool resides. If left empty the tool is assumed to be found in the
-+# default search path.
-+
-+MSCGEN_PATH            =
-+
-+# If set to YES, the inheritance and collaboration graphs will hide
-+# inheritance and usage relations if the target is undocumented
-+# or is not a class.
-+
-+HIDE_UNDOC_RELATIONS   = YES
-+
-+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-+# available from the path. This tool is part of Graphviz, a graph visualization
-+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-+# have no effect if this option is set to NO (the default)
-+
-+HAVE_DOT               = NO
-+
-+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
-+# allowed to run in parallel. When set to 0 (the default) doxygen will
-+# base this on the number of processors available in the system. You can set it
-+# explicitly to a value larger than 0 to get control over the balance
-+# between CPU load and processing speed.
-+
-+DOT_NUM_THREADS        = 0
-+
-+# By default doxygen will write a font called FreeSans.ttf to the output
-+# directory and reference it in all dot files that doxygen generates. This
-+# font does not include all possible unicode characters however, so when you need
-+# these (or just want a differently looking font) you can specify the font name
-+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-+# which can be done by putting it in a standard location or by setting the
-+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-+# containing the font.
-+
-+DOT_FONTNAME           = FreeSans
-+
-+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-+# The default size is 10pt.
-+
-+DOT_FONTSIZE           = 10
-+
-+# By default doxygen will tell dot to use the output directory to look for the
-+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-+# different font using DOT_FONTNAME you can set the path where dot
-+# can find it using this tag.
-+
-+DOT_FONTPATH           =
-+
-+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-+# will generate a graph for each documented class showing the direct and
-+# indirect inheritance relations. Setting this tag to YES will force the
-+# the CLASS_DIAGRAMS tag to NO.
-+
-+CLASS_GRAPH            = YES
-+
-+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-+# will generate a graph for each documented class showing the direct and
-+# indirect implementation dependencies (inheritance, containment, and
-+# class references variables) of the class with other documented classes.
-+
-+COLLABORATION_GRAPH    = YES
-+
-+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-+# will generate a graph for groups, showing the direct groups dependencies
-+
-+GROUP_GRAPHS           = YES
-+
-+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-+# collaboration diagrams in a style similar to the OMG's Unified Modeling
-+# Language.
-+
-+UML_LOOK               = NO
-+
-+# If set to YES, the inheritance and collaboration graphs will show the
-+# relations between templates and their instances.
-+
-+TEMPLATE_RELATIONS     = YES
-+
-+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-+# tags are set to YES then doxygen will generate a graph for each documented
-+# file showing the direct and indirect include dependencies of the file with
-+# other documented files.
-+
-+INCLUDE_GRAPH          = YES
-+
-+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-+# documented header file showing the documented files that directly or
-+# indirectly include this file.
-+
-+INCLUDED_BY_GRAPH      = YES
-+
-+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-+# doxygen will generate a call dependency graph for every global function
-+# or class method. Note that enabling this option will significantly increase
-+# the time of a run. So in most cases it will be better to enable call graphs
-+# for selected functions only using the \callgraph command.
-+
-+CALL_GRAPH             = NO
-+
-+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-+# doxygen will generate a caller dependency graph for every global function
-+# or class method. Note that enabling this option will significantly increase
-+# the time of a run. So in most cases it will be better to enable caller
-+# graphs for selected functions only using the \callergraph command.
-+
-+CALLER_GRAPH           = NO
-+
-+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-+# will graphical hierarchy of all classes instead of a textual one.
-+
-+GRAPHICAL_HIERARCHY    = YES
-+
-+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-+# then doxygen will show the dependencies a directory has on other directories
-+# in a graphical way. The dependency relations are determined by the #include
-+# relations between the files in the directories.
-+
-+DIRECTORY_GRAPH        = YES
-+
-+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-+# generated by dot. Possible values are png, jpg, or gif
-+# If left blank png will be used.
-+
-+DOT_IMAGE_FORMAT       = png
-+
-+# The tag DOT_PATH can be used to specify the path where the dot tool can be
-+# found. If left blank, it is assumed the dot tool can be found in the path.
-+
-+DOT_PATH               =
-+
-+# The DOTFILE_DIRS tag can be used to specify one or more directories that
-+# contain dot files that are included in the documentation (see the
-+# \dotfile command).
-+
-+DOTFILE_DIRS           =
-+
-+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-+# nodes that will be shown in the graph. If the number of nodes in a graph
-+# becomes larger than this value, doxygen will truncate the graph, which is
-+# visualized by representing a node as a red box. Note that doxygen if the
-+# number of direct children of the root node in a graph is already larger than
-+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-+
-+DOT_GRAPH_MAX_NODES    = 50
-+
-+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-+# graphs generated by dot. A depth value of 3 means that only nodes reachable
-+# from the root by following a path via at most 3 edges will be shown. Nodes
-+# that lay further from the root node will be omitted. Note that setting this
-+# option to 1 or 2 may greatly reduce the computation time needed for large
-+# code bases. Also note that the size of a graph can be further restricted by
-+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-+
-+MAX_DOT_GRAPH_DEPTH    = 0
-+
-+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-+# background. This is disabled by default, because dot on Windows does not
-+# seem to support this out of the box. Warning: Depending on the platform used,
-+# enabling this option may lead to badly anti-aliased labels on the edges of
-+# a graph (i.e. they become hard to read).
-+
-+DOT_TRANSPARENT        = YES
-+
-+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-+# files in one run (i.e. multiple -o and -T options on the command line). This
-+# makes dot run faster, but since only newer versions of dot (>1.8.10)
-+# support this, this feature is disabled by default.
-+
-+DOT_MULTI_TARGETS      = NO
-+
-+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-+# generate a legend page explaining the meaning of the various boxes and
-+# arrows in the dot generated graphs.
-+
-+GENERATE_LEGEND        = YES
-+
-+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-+# remove the intermediate dot files that are used to generate
-+# the various graphs.
-+
-+DOT_CLEANUP            = YES
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0007-lavc-use-the-correct-API-version-guard-macro-for-avc.patch b/debian/patches/post-9beta2/0007-lavc-use-the-correct-API-version-guard-macro-for-avc.patch
deleted file mode 100644
index 60d420e..0000000
--- a/debian/patches/post-9beta2/0007-lavc-use-the-correct-API-version-guard-macro-for-avc.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From a5ef830b1226273c35d4baa1c2e4e7e1c9de7c7d Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 13:25:53 -0400
-Subject: [PATCH 007/278] lavc: use the correct API version guard macro for
- avcodec_encode_audio()
-
----
- libavcodec/utils.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 5e22b9f..10230ca 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -1073,7 +1073,7 @@ end:
-     return ret;
- }
- 
--#if FF_API_OLD_DECODE_AUDIO
-+#if FF_API_OLD_ENCODE_AUDIO
- int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
-                                              uint8_t *buf, int buf_size,
-                                              const short *samples)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0008-atrac3-return-an-error-if-extradata_size-is-not-a-sp.patch b/debian/patches/post-9beta2/0008-atrac3-return-an-error-if-extradata_size-is-not-a-sp.patch
deleted file mode 100644
index 6333edd..0000000
--- a/debian/patches/post-9beta2/0008-atrac3-return-an-error-if-extradata_size-is-not-a-sp.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 44d854a518f97cb65090420b0b9f55611a0ea932 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 10:44:55 -0400
-Subject: [PATCH 008/278] atrac3: return an error if extradata_size is not a
- specific known size
-
-Also fixes 3 compiler warnings about using uninitialized variables.
----
- libavcodec/atrac3.c |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
-index 9cf9892..5bf992f 100644
---- a/libavcodec/atrac3.c
-+++ b/libavcodec/atrac3.c
-@@ -912,6 +912,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
-     } else {
-         av_log(NULL, AV_LOG_ERROR, "Unknown extradata size %d.\n",
-                avctx->extradata_size);
-+        return AVERROR(EINVAL);
-     }
- 
-     /* Check the extradata */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0009-lavc-fix-documentation-for-AVCodecContext.delay.patch b/debian/patches/post-9beta2/0009-lavc-fix-documentation-for-AVCodecContext.delay.patch
deleted file mode 100644
index 744ad1a..0000000
--- a/debian/patches/post-9beta2/0009-lavc-fix-documentation-for-AVCodecContext.delay.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c68317ebbe4915035df0b08c23eea7a0b80ab881 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 2 Oct 2012 11:38:34 -0400
-Subject: [PATCH 009/278] lavc: fix documentation for AVCodecContext.delay
-
----
- libavcodec/avcodec.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index 64d45db..c505a92 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -1442,7 +1442,7 @@ typedef struct AVCodecContext {
-     int ticks_per_frame;
- 
-     /**
--     * Encoder delay.
-+     * Codec delay.
-      *
-      * Video:
-      *   Number of frames the decoded output will be delayed relative to the
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0010-lavc-initialize-output-AVFrame-before-decoding.patch b/debian/patches/post-9beta2/0010-lavc-initialize-output-AVFrame-before-decoding.patch
deleted file mode 100644
index 6d0a424..0000000
--- a/debian/patches/post-9beta2/0010-lavc-initialize-output-AVFrame-before-decoding.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 1bc64c2814d409d3cc129c27c493ee915bebdc4a Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Tue, 23 Oct 2012 08:22:23 +0200
-Subject: [PATCH 010/278] lavc: initialize output AVFrame before decoding.
-
-Avoids memleaks with audio when extended_data is nontrivial and the user
-doesn't reset the frame.
-Shouldn't have any effect for video for now, but might be useful in the
-future.
----
- libavcodec/utils.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 10230ca..8daacbe 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -1305,6 +1305,8 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
-     avctx->pkt = avpkt;
-     apply_param_change(avctx, avpkt);
- 
-+    avcodec_get_frame_defaults(picture);
-+
-     if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type & FF_THREAD_FRAME)) {
-         if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
-             ret = ff_thread_decode_frame(avctx, picture, got_picture_ptr,
-@@ -1400,6 +1402,8 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
- 
-     apply_param_change(avctx, avpkt);
- 
-+    avcodec_get_frame_defaults(frame);
-+
-     if ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size) {
-         ret = avctx->codec->decode(avctx, frame, got_frame_ptr, avpkt);
-         if (ret >= 0 && *got_frame_ptr) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0011-avconv-remove-now-unneeded-calls-to-avcodec_get_fram.patch b/debian/patches/post-9beta2/0011-avconv-remove-now-unneeded-calls-to-avcodec_get_fram.patch
deleted file mode 100644
index 6839d52..0000000
--- a/debian/patches/post-9beta2/0011-avconv-remove-now-unneeded-calls-to-avcodec_get_fram.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8e84f2055c4170e502d36db3539b5e243a5b6cca Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Tue, 23 Oct 2012 08:32:56 +0200
-Subject: [PATCH 011/278] avconv: remove now unneeded calls to
- avcodec_get_frame_defaults().
-
----
- avconv.c |    4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/avconv.c b/avconv.c
-index 6f67711..bf1e2fa 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -1079,8 +1079,6 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
- 
-     if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
-         return AVERROR(ENOMEM);
--    else
--        avcodec_get_frame_defaults(ist->decoded_frame);
-     decoded_frame = ist->decoded_frame;
- 
-     ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt);
-@@ -1220,8 +1218,6 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
- 
-     if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame()))
-         return AVERROR(ENOMEM);
--    else
--        avcodec_get_frame_defaults(ist->decoded_frame);
-     decoded_frame = ist->decoded_frame;
- 
-     ret = avcodec_decode_video2(ist->st->codec,
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0012-g.723.1-add-missing-CODEC_CAP_DR1.patch b/debian/patches/post-9beta2/0012-g.723.1-add-missing-CODEC_CAP_DR1.patch
deleted file mode 100644
index c74cda5..0000000
--- a/debian/patches/post-9beta2/0012-g.723.1-add-missing-CODEC_CAP_DR1.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 5a9567631a909a4c76dc678ebd603ffc4d57262d Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 17 Oct 2012 12:16:00 +0200
-Subject: [PATCH 012/278] g.723.1: add missing CODEC_CAP_DR1
-
----
- libavcodec/g723_1.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
-index 3d4fa46..5c213da 100644
---- a/libavcodec/g723_1.c
-+++ b/libavcodec/g723_1.c
-@@ -1376,6 +1376,6 @@ AVCodec ff_g723_1_decoder = {
-     .init           = g723_1_decode_init,
-     .decode         = g723_1_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("G.723.1"),
--    .capabilities   = CODEC_CAP_SUBFRAMES,
-+    .capabilities   = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1,
-     .priv_class     = &g723_1dec_class,
- };
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0013-asfdec-cosmetics-reformat-ff_asf_parse_packet.patch b/debian/patches/post-9beta2/0013-asfdec-cosmetics-reformat-ff_asf_parse_packet.patch
deleted file mode 100644
index 294097f..0000000
--- a/debian/patches/post-9beta2/0013-asfdec-cosmetics-reformat-ff_asf_parse_packet.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From 292a08cbab3392a693b1c3b03a9cac6a1b65d304 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Sat, 20 Oct 2012 17:15:57 +0200
-Subject: [PATCH 013/278] asfdec: cosmetics, reformat ff_asf_parse_packet()
-
----
- libavformat/asfdec.c |  138 ++++++++++++++++++++++++++------------------------
- 1 file changed, 72 insertions(+), 66 deletions(-)
-
-diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
-index 5fe8e96..c6b322d 100644
---- a/libavformat/asfdec.c
-+++ b/libavformat/asfdec.c
-@@ -1002,13 +1002,15 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-     ASFStream *asf_st = 0;
-     for (;;) {
-         int ret;
--        if(pb->eof_reached)
-+
-+        if (pb->eof_reached)
-             return AVERROR_EOF;
--        if (asf->packet_size_left < FRAME_HEADER_SIZE
--            || asf->packet_segments < 1) {
--            //asf->packet_size_left <= asf->packet_padsize) {
-+
-+        if (asf->packet_size_left < FRAME_HEADER_SIZE ||
-+            asf->packet_segments < 1) {
-             int ret = asf->packet_size_left + asf->packet_padsize;
--            assert(ret>=0);
-+
-+            assert(ret >= 0);
-             /* fail safe */
-             avio_skip(pb, ret);
- 
-@@ -1019,19 +1021,19 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-             return 1;
-         }
-         if (asf->packet_time_start == 0) {
--            if(asf_read_frame_header(s, pb) < 0){
--                asf->packet_segments= 0;
-+            if (asf_read_frame_header(s, pb) < 0) {
-+                asf->packet_segments = 0;
-                 continue;
-             }
--            if (asf->stream_index < 0
--                || s->streams[asf->stream_index]->discard >= AVDISCARD_ALL
--                || (!asf->packet_key_frame && s->streams[asf->stream_index]->discard >= AVDISCARD_NONKEY)
--                ) {
-+            if (asf->stream_index < 0 ||
-+                s->streams[asf->stream_index]->discard >= AVDISCARD_ALL ||
-+                (!asf->packet_key_frame &&
-+                 s->streams[asf->stream_index]->discard >= AVDISCARD_NONKEY)) {
-                 asf->packet_time_start = 0;
-                 /* unhandled packet (should not happen) */
-                 avio_skip(pb, asf->packet_frag_size);
-                 asf->packet_size_left -= asf->packet_frag_size;
--                if(asf->stream_index < 0)
-+                if (asf->stream_index < 0)
-                     av_log(s, AV_LOG_ERROR, "ff asf skip %d (unknown stream)\n", asf->packet_frag_size);
-                 continue;
-             }
-@@ -1042,12 +1044,11 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-         if (asf->packet_replic_size == 1) {
-             // frag_offset is here used as the beginning timestamp
-             asf->packet_frag_timestamp = asf->packet_time_start;
--            asf->packet_time_start += asf->packet_time_delta;
--            asf->packet_obj_size = asf->packet_frag_size = avio_r8(pb);
-+            asf->packet_time_start    += asf->packet_time_delta;
-+            asf->packet_obj_size       = asf->packet_frag_size = avio_r8(pb);
-             asf->packet_size_left--;
-             asf->packet_multi_size--;
--            if (asf->packet_multi_size < asf->packet_obj_size)
--            {
-+            if (asf->packet_multi_size < asf->packet_obj_size) {
-                 asf->packet_time_start = 0;
-                 avio_skip(pb, asf->packet_multi_size);
-                 asf->packet_size_left -= asf->packet_multi_size;
-@@ -1055,29 +1056,30 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-             }
-             asf->packet_multi_size -= asf->packet_obj_size;
-         }
--        if(   /*asf->packet_frag_size == asf->packet_obj_size*/
--              asf_st->frag_offset + asf->packet_frag_size <= asf_st->pkt.size
--           && asf_st->frag_offset + asf->packet_frag_size > asf->packet_obj_size){
-+        if (asf_st->frag_offset + asf->packet_frag_size <= asf_st->pkt.size &&
-+            asf_st->frag_offset + asf->packet_frag_size > asf->packet_obj_size) {
-             av_log(s, AV_LOG_INFO, "ignoring invalid packet_obj_size (%d %d %d %d)\n",
--                asf_st->frag_offset, asf->packet_frag_size,
--                asf->packet_obj_size, asf_st->pkt.size);
--            asf->packet_obj_size= asf_st->pkt.size;
-+                   asf_st->frag_offset, asf->packet_frag_size,
-+                   asf->packet_obj_size, asf_st->pkt.size);
-+            asf->packet_obj_size = asf_st->pkt.size;
-         }
- 
--        if (   asf_st->pkt.size != asf->packet_obj_size
--            || asf_st->frag_offset + asf->packet_frag_size > asf_st->pkt.size) { //FIXME is this condition sufficient?
--            if(asf_st->pkt.data){
--                av_log(s, AV_LOG_INFO, "freeing incomplete packet size %d, new %d\n", asf_st->pkt.size, asf->packet_obj_size);
-+        if (asf_st->pkt.size != asf->packet_obj_size ||
-+            //FIXME is this condition sufficient?
-+            asf_st->frag_offset + asf->packet_frag_size > asf_st->pkt.size) {
-+            if (asf_st->pkt.data) {
-+                av_log(s, AV_LOG_INFO, "freeing incomplete packet size %d, "
-+                       "new %d\n", asf_st->pkt.size, asf->packet_obj_size);
-                 asf_st->frag_offset = 0;
-                 av_free_packet(&asf_st->pkt);
-             }
-             /* new packet */
-             av_new_packet(&asf_st->pkt, asf->packet_obj_size);
--            asf_st->seq = asf->packet_seq;
--            asf_st->pkt.dts = asf->packet_frag_timestamp - asf->hdr.preroll;
-+            asf_st->seq              = asf->packet_seq;
-+            asf_st->pkt.dts          = asf->packet_frag_timestamp - asf->hdr.preroll;
-             asf_st->pkt.stream_index = asf->stream_index;
--            asf_st->pkt.pos =
--            asf_st->packet_pos= asf->packet_pos;
-+            asf_st->pkt.pos          = asf_st->packet_pos = asf->packet_pos;
-+
-             if (asf_st->pkt.data && asf_st->palette_changed) {
-                 uint8_t *pal;
-                 pal = av_packet_new_side_data(&asf_st->pkt, AV_PKT_DATA_PALETTE,
-@@ -1108,18 +1110,19 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-         if (asf->packet_size_left < 0)
-             continue;
- 
--        if(   asf->packet_frag_offset >= asf_st->pkt.size
--           || asf->packet_frag_size > asf_st->pkt.size - asf->packet_frag_offset){
-+        if (asf->packet_frag_offset >= asf_st->pkt.size ||
-+            asf->packet_frag_size > asf_st->pkt.size - asf->packet_frag_offset) {
-             av_log(s, AV_LOG_ERROR, "packet fragment position invalid %u,%u not in %u\n",
--                asf->packet_frag_offset, asf->packet_frag_size, asf_st->pkt.size);
-+                   asf->packet_frag_offset, asf->packet_frag_size, asf_st->pkt.size);
-             continue;
-         }
- 
-         ret = avio_read(pb, asf_st->pkt.data + asf->packet_frag_offset,
--                         asf->packet_frag_size);
-+                        asf->packet_frag_size);
-         if (ret != asf->packet_frag_size) {
-             if (ret < 0 || asf->packet_frag_offset + ret == 0)
-                 return ret < 0 ? ret : AVERROR_EOF;
-+
-             if (asf_st->ds_span > 1) {
-                 // scrambling, we can either drop it completely or fill the remainder
-                 // TODO: should we fill the whole packet instead of just the current
-@@ -1127,9 +1130,10 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-                 memset(asf_st->pkt.data + asf->packet_frag_offset + ret, 0,
-                        asf->packet_frag_size - ret);
-                 ret = asf->packet_frag_size;
--            } else
-+            } else {
-                 // no scrambling, so we can return partial packets
-                 av_shrink_packet(&asf_st->pkt, asf->packet_frag_offset + ret);
-+            }
-         }
-         if (s->key && s->keylen == 20)
-             ff_asfcrypt_dec(s->key, asf_st->pkt.data + asf->packet_frag_offset,
-@@ -1138,11 +1142,11 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
-         /* test if whole packet is read */
-         if (asf_st->frag_offset == asf_st->pkt.size) {
-             //workaround for macroshit radio DVR-MS files
--            if(   s->streams[asf->stream_index]->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO
--               && asf_st->pkt.size > 100){
-+            if (s->streams[asf->stream_index]->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO &&
-+                asf_st->pkt.size > 100) {
-                 int i;
--                for(i=0; i<asf_st->pkt.size && !asf_st->pkt.data[i]; i++);
--                if(i == asf_st->pkt.size){
-+                for (i = 0; i < asf_st->pkt.size && !asf_st->pkt.data[i]; i++);
-+                if (i == asf_st->pkt.size) {
-                     av_log(s, AV_LOG_DEBUG, "discarding ms fart\n");
-                     asf_st->frag_offset = 0;
-                     av_free_packet(&asf_st->pkt);
-@@ -1152,37 +1156,39 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
- 
-             /* return packet */
-             if (asf_st->ds_span > 1) {
--              if(asf_st->pkt.size != asf_st->ds_packet_size * asf_st->ds_span){
--                    av_log(s, AV_LOG_ERROR, "pkt.size != ds_packet_size * ds_span (%d %d %d)\n", asf_st->pkt.size, asf_st->ds_packet_size, asf_st->ds_span);
--              }else{
--                /* packet descrambling */
--                uint8_t *newdata = av_malloc(asf_st->pkt.size + FF_INPUT_BUFFER_PADDING_SIZE);
--                if (newdata) {
--                    int offset = 0;
--                    memset(newdata + asf_st->pkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
--                    while (offset < asf_st->pkt.size) {
--                        int off = offset / asf_st->ds_chunk_size;
--                        int row = off / asf_st->ds_span;
--                        int col = off % asf_st->ds_span;
--                        int idx = row + col * asf_st->ds_packet_size / asf_st->ds_chunk_size;
--                        assert(offset + asf_st->ds_chunk_size <= asf_st->pkt.size);
--                        assert(idx+1 <= asf_st->pkt.size / asf_st->ds_chunk_size);
--                        memcpy(newdata + offset,
--                               asf_st->pkt.data + idx * asf_st->ds_chunk_size,
--                               asf_st->ds_chunk_size);
--                        offset += asf_st->ds_chunk_size;
-+                if(asf_st->pkt.size != asf_st->ds_packet_size * asf_st->ds_span) {
-+                    av_log(s, AV_LOG_ERROR, "pkt.size != ds_packet_size * "
-+                           "ds_span (%d %d %d)\n", asf_st->pkt.size,
-+                           asf_st->ds_packet_size, asf_st->ds_span);
-+                } else {
-+                    /* packet descrambling */
-+                    uint8_t *newdata = av_malloc(asf_st->pkt.size + FF_INPUT_BUFFER_PADDING_SIZE);
-+                    if (newdata) {
-+                        int offset = 0;
-+                        memset(newdata + asf_st->pkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+                        while (offset < asf_st->pkt.size) {
-+                            int off = offset / asf_st->ds_chunk_size;
-+                            int row = off / asf_st->ds_span;
-+                            int col = off % asf_st->ds_span;
-+                            int idx = row + col * asf_st->ds_packet_size / asf_st->ds_chunk_size;
-+                            assert(offset + asf_st->ds_chunk_size <= asf_st->pkt.size);
-+                            assert(idx+1 <= asf_st->pkt.size / asf_st->ds_chunk_size);
-+                            memcpy(newdata + offset,
-+                                   asf_st->pkt.data + idx * asf_st->ds_chunk_size,
-+                                   asf_st->ds_chunk_size);
-+                            offset += asf_st->ds_chunk_size;
-+                        }
-+                        av_free(asf_st->pkt.data);
-+                        asf_st->pkt.data = newdata;
-                     }
--                    av_free(asf_st->pkt.data);
--                    asf_st->pkt.data = newdata;
-                 }
--              }
-             }
--            asf_st->frag_offset = 0;
--            *pkt= asf_st->pkt;
--            asf_st->pkt.size = 0;
--            asf_st->pkt.data = 0;
-+            asf_st->frag_offset         = 0;
-+            *pkt                        = asf_st->pkt;
-+            asf_st->pkt.size            = 0;
-+            asf_st->pkt.data            = 0;
-             asf_st->pkt.side_data_elems = 0;
--            asf_st->pkt.side_data = NULL;
-+            asf_st->pkt.side_data       = NULL;
-             break; // packet completed
-         }
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0014-smoothstreamingenc-Don-t-assume-streams-start-from-t.patch b/debian/patches/post-9beta2/0014-smoothstreamingenc-Don-t-assume-streams-start-from-t.patch
deleted file mode 100644
index fad2451..0000000
--- a/debian/patches/post-9beta2/0014-smoothstreamingenc-Don-t-assume-streams-start-from-t.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c44cef978bd5c2692606a7a4ef4a7da393147ab0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Wed, 24 Oct 2012 01:05:12 +0300
-Subject: [PATCH 014/278] smoothstreamingenc: Don't assume streams start from
- timestamp 0
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Also use dts instead of pts for deciding where to split fragments.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/smoothstreamingenc.c |    9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
-index 69d555f..1ed675a 100644
---- a/libavformat/smoothstreamingenc.c
-+++ b/libavformat/smoothstreamingenc.c
-@@ -559,12 +559,15 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt)
-     SmoothStreamingContext *c = s->priv_data;
-     AVStream *st = s->streams[pkt->stream_index];
-     OutputStream *os = &c->streams[pkt->stream_index];
--    int64_t end_pts = (c->nb_fragments + 1) * c->min_frag_duration;
-+    int64_t end_dts = (c->nb_fragments + 1) * c->min_frag_duration;
-     int ret;
- 
-+    if (st->first_dts == AV_NOPTS_VALUE)
-+        st->first_dts = pkt->dts;
-+
-     if ((!c->has_video || st->codec->codec_type == AVMEDIA_TYPE_VIDEO) &&
--        av_compare_ts(pkt->pts, st->time_base,
--                      end_pts, AV_TIME_BASE_Q) >= 0 &&
-+        av_compare_ts(pkt->dts - st->first_dts, st->time_base,
-+                      end_dts, AV_TIME_BASE_Q) >= 0 &&
-         pkt->flags & AV_PKT_FLAG_KEY && os->packets_written) {
- 
-         if ((ret = ism_flush(s, 0)) < 0)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0015-configure-generalise-64-bit-test.patch b/debian/patches/post-9beta2/0015-configure-generalise-64-bit-test.patch
deleted file mode 100644
index dc16c0b..0000000
--- a/debian/patches/post-9beta2/0015-configure-generalise-64-bit-test.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d4c99513f41272b9753e59642724717b834710a0 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 23 Oct 2012 23:33:44 +0100
-Subject: [PATCH 015/278] configure: generalise 64-bit test
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 37cdf1e..b1c6d45 100755
---- a/configure
-+++ b/configure
-@@ -2668,13 +2668,20 @@ EOF
- check_host_cflags -std=c99
- check_host_cflags -Wall
- 
-+check_64bit(){
-+    arch32=$1
-+    arch64=$2
-+    expr=$3
-+    check_code cc "" "int test[2*($expr) - 1]" &&
-+        subarch=$arch64 || subarch=$arch32
-+}
-+
- case "$arch" in
-     alpha|ia64|mips|parisc|sparc)
-         spic=$shared
-     ;;
-     x86)
--        subarch="x86_32"
--        check_code cc "" "int test[(int)sizeof(char*) - 7]" && subarch="x86_64"
-+        check_64bit x86_32 x86_64 'sizeof(void *) > 4'
-         if test "$subarch" = "x86_64"; then
-             spic=$shared
-         fi
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0016-configure-detect-mips64-automatically.patch b/debian/patches/post-9beta2/0016-configure-detect-mips64-automatically.patch
deleted file mode 100644
index 51be561..0000000
--- a/debian/patches/post-9beta2/0016-configure-detect-mips64-automatically.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2acda282eb8efac556cb351e91c557e580406294 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 23 Oct 2012 23:34:35 +0100
-Subject: [PATCH 016/278] configure: detect mips64 automatically
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/configure b/configure
-index b1c6d45..9f6eda5 100755
---- a/configure
-+++ b/configure
-@@ -2453,13 +2453,9 @@ case "$arch" in
-     arm*)
-         arch="arm"
-     ;;
--    mips|mipsel|IP*)
-+    mips*|IP*)
-         arch="mips"
-     ;;
--    mips64*)
--        arch="mips"
--        subarch="mips64"
--    ;;
-     parisc|hppa)
-         arch="parisc"
-     ;;
-@@ -2677,7 +2673,11 @@ check_64bit(){
- }
- 
- case "$arch" in
--    alpha|ia64|mips|parisc|sparc)
-+    alpha|ia64|parisc|sparc)
-+        spic=$shared
-+    ;;
-+    mips)
-+        check_64bit mips mips64 '_MIPS_SIM > 1'
-         spic=$shared
-     ;;
-     x86)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0017-configure-detect-ppc64-automatically.patch b/debian/patches/post-9beta2/0017-configure-detect-ppc64-automatically.patch
deleted file mode 100644
index 3b44998..0000000
--- a/debian/patches/post-9beta2/0017-configure-detect-ppc64-automatically.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 56203596aea365387917c40964c03b5156b15e22 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 23 Oct 2012 23:39:40 +0100
-Subject: [PATCH 017/278] configure: detect ppc64 automatically
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/configure b/configure
-index 9f6eda5..1f48fbe 100755
---- a/configure
-+++ b/configure
-@@ -2463,13 +2463,9 @@ case "$arch" in
-         arch="parisc"
-         subarch="parisc64"
-     ;;
--    "Power Macintosh"|ppc|powerpc)
-+    "Power Macintosh"|ppc*|powerpc*)
-         arch="ppc"
-     ;;
--    ppc64|powerpc64)
--        arch="ppc"
--        subarch="ppc64"
--    ;;
-     s390|s390x)
-         arch="s390"
-     ;;
-@@ -2680,6 +2676,9 @@ case "$arch" in
-         check_64bit mips mips64 '_MIPS_SIM > 1'
-         spic=$shared
-     ;;
-+    ppc)
-+        check_64bit ppc ppc64 'sizeof(void *) > 4'
-+    ;;
-     x86)
-         check_64bit x86_32 x86_64 'sizeof(void *) > 4'
-         if test "$subarch" = "x86_64"; then
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0018-configure-detect-parisc64-automatically.patch b/debian/patches/post-9beta2/0018-configure-detect-parisc64-automatically.patch
deleted file mode 100644
index 837ed38..0000000
--- a/debian/patches/post-9beta2/0018-configure-detect-parisc64-automatically.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From a6e9d6497739b7b60e3284f03b27883514bbc94a Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Wed, 24 Oct 2012 00:21:15 +0100
-Subject: [PATCH 018/278] configure: detect parisc64 automatically
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/configure b/configure
-index 1f48fbe..079e6db 100755
---- a/configure
-+++ b/configure
-@@ -2456,13 +2456,9 @@ case "$arch" in
-     mips*|IP*)
-         arch="mips"
-     ;;
--    parisc|hppa)
-+    parisc*|hppa*)
-         arch="parisc"
-     ;;
--    parisc64|hppa64)
--        arch="parisc"
--        subarch="parisc64"
--    ;;
-     "Power Macintosh"|ppc*|powerpc*)
-         arch="ppc"
-     ;;
-@@ -2669,13 +2665,17 @@ check_64bit(){
- }
- 
- case "$arch" in
--    alpha|ia64|parisc|sparc)
-+    alpha|ia64|sparc)
-         spic=$shared
-     ;;
-     mips)
-         check_64bit mips mips64 '_MIPS_SIM > 1'
-         spic=$shared
-     ;;
-+    parisc)
-+        check_64bit parisc parisc64 'sizeof(void *) > 4'
-+        spic=$shared
-+    ;;
-     ppc)
-         check_64bit ppc ppc64 'sizeof(void *) > 4'
-     ;;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0019-avutil-Move-memcpy_backptr-to-mem.c.patch b/debian/patches/post-9beta2/0019-avutil-Move-memcpy_backptr-to-mem.c.patch
deleted file mode 100644
index 7f4ee90..0000000
--- a/debian/patches/post-9beta2/0019-avutil-Move-memcpy_backptr-to-mem.c.patch
+++ /dev/null
@@ -1,310 +0,0 @@
-From 5bac2d0c3020587a03cb14e8b6a664a0b92f26c2 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Thu, 18 Oct 2012 19:27:51 +0200
-Subject: [PATCH 019/278] avutil: Move memcpy_backptr() to mem.c
-
-The function is used elsewhere and does not belong with the LZO code.
----
- libavcodec/dfa.c      |    2 +-
- libavcodec/eatgv.c    |    2 +-
- libavcodec/g723_1.c   |    2 +-
- libavcodec/lcldec.c   |    2 +-
- libavcodec/wmavoice.c |    2 +-
- libavcodec/xan.c      |    3 +--
- libavcodec/xxan.c     |    3 +--
- libavutil/lzo.c       |   44 +-------------------------------------------
- libavutil/lzo.h       |   11 -----------
- libavutil/mem.c       |   37 +++++++++++++++++++++++++++++++++++++
- libavutil/mem.h       |   12 ++++++++++++
- 11 files changed, 57 insertions(+), 63 deletions(-)
-
-diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
-index ae184d7..1598f47 100644
---- a/libavcodec/dfa.c
-+++ b/libavcodec/dfa.c
-@@ -24,7 +24,7 @@
- #include "bytestream.h"
- 
- #include "libavutil/imgutils.h"
--#include "libavutil/lzo.h" // for av_memcpy_backptr
-+#include "libavutil/mem.h"
- 
- typedef struct DfaContext {
-     AVFrame pic;
-diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
-index 404238b..170eeb1 100644
---- a/libavcodec/eatgv.c
-+++ b/libavcodec/eatgv.c
-@@ -31,8 +31,8 @@
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
- #include "get_bits.h"
--#include "libavutil/lzo.h"
- #include "libavutil/imgutils.h"
-+#include "libavutil/mem.h"
- 
- #define EA_PREAMBLE_SIZE    8
- #define kVGT_TAG MKTAG('k', 'V', 'G', 'T')
-diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
-index 5c213da..342c634 100644
---- a/libavcodec/g723_1.c
-+++ b/libavcodec/g723_1.c
-@@ -27,7 +27,7 @@
- 
- #define BITSTREAM_READER_LE
- #include "libavutil/audioconvert.h"
--#include "libavutil/lzo.h"
-+#include "libavutil/mem.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
- #include "get_bits.h"
-diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
-index 6b101ae..c80d0fe 100644
---- a/libavcodec/lcldec.c
-+++ b/libavcodec/lcldec.c
-@@ -41,10 +41,10 @@
- #include <stdio.h>
- #include <stdlib.h>
- 
-+#include "libavutil/mem.h"
- #include "avcodec.h"
- #include "bytestream.h"
- #include "lcl.h"
--#include "libavutil/lzo.h"
- 
- #if CONFIG_ZLIB_DECODER
- #include <zlib.h>
-diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
-index 63caad2..466d1ec 100644
---- a/libavcodec/wmavoice.c
-+++ b/libavcodec/wmavoice.c
-@@ -29,6 +29,7 @@
- 
- #include <math.h>
- 
-+#include "libavutil/mem.h"
- #include "dsputil.h"
- #include "avcodec.h"
- #include "get_bits.h"
-@@ -38,7 +39,6 @@
- #include "acelp_vectors.h"
- #include "acelp_filters.h"
- #include "lsp.h"
--#include "libavutil/lzo.h"
- #include "dct.h"
- #include "rdft.h"
- #include "sinewin.h"
-diff --git a/libavcodec/xan.c b/libavcodec/xan.c
-index 586320b..e6bfc0d 100644
---- a/libavcodec/xan.c
-+++ b/libavcodec/xan.c
-@@ -33,12 +33,11 @@
- #include <string.h>
- 
- #include "libavutil/intreadwrite.h"
-+#include "libavutil/mem.h"
- #include "avcodec.h"
- #include "bytestream.h"
- #define BITSTREAM_READER_LE
- #include "get_bits.h"
--// for av_memcpy_backptr
--#include "libavutil/lzo.h"
- 
- #define RUNTIME_GAMMA 0
- 
-diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c
-index b06d314..2a5a8ca 100644
---- a/libavcodec/xxan.c
-+++ b/libavcodec/xxan.c
-@@ -22,11 +22,10 @@
- 
- #include "avcodec.h"
- #include "libavutil/intreadwrite.h"
-+#include "libavutil/mem.h"
- #include "bytestream.h"
- #define BITSTREAM_READER_LE
- #include "get_bits.h"
--// for av_memcpy_backptr
--#include "libavutil/lzo.h"
- 
- typedef struct XanContext {
-     AVCodecContext *avctx;
-diff --git a/libavutil/lzo.c b/libavutil/lzo.c
-index c17d32f..eff3cd2 100644
---- a/libavutil/lzo.c
-+++ b/libavutil/lzo.c
-@@ -100,8 +100,6 @@ static inline void copy(LZOContext *c, int cnt)
-     c->out = dst + cnt;
- }
- 
--static inline void memcpy_backptr(uint8_t *dst, int back, int cnt);
--
- /**
-  * @brief Copies previously decoded bytes to current position.
-  * @param back how many bytes back we start
-@@ -122,50 +120,10 @@ static inline void copy_backptr(LZOContext *c, int back, int cnt)
-         cnt       = FFMAX(c->out_end - dst, 0);
-         c->error |= AV_LZO_OUTPUT_FULL;
-     }
--    memcpy_backptr(dst, back, cnt);
-+    av_memcpy_backptr(dst, back, cnt);
-     c->out = dst + cnt;
- }
- 
--static inline void memcpy_backptr(uint8_t *dst, int back, int cnt)
--{
--    const uint8_t *src = &dst[-back];
--    if (back == 1) {
--        memset(dst, *src, cnt);
--    } else {
--        if (cnt >= 4) {
--            AV_COPY16U(dst,     src);
--            AV_COPY16U(dst + 2, src + 2);
--            src += 4;
--            dst += 4;
--            cnt -= 4;
--        }
--        if (cnt >= 8) {
--            AV_COPY16U(dst,     src);
--            AV_COPY16U(dst + 2, src + 2);
--            AV_COPY16U(dst + 4, src + 4);
--            AV_COPY16U(dst + 6, src + 6);
--            src += 8;
--            dst += 8;
--            cnt -= 8;
--        }
--        if (cnt > 0) {
--            int blocklen = back;
--            while (cnt > blocklen) {
--                memcpy(dst, src, blocklen);
--                dst       += blocklen;
--                cnt       -= blocklen;
--                blocklen <<= 1;
--            }
--            memcpy(dst, src, cnt);
--        }
--    }
--}
--
--void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
--{
--    memcpy_backptr(dst, back, cnt);
--}
--
- int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen)
- {
-     int state = 0;
-diff --git a/libavutil/lzo.h b/libavutil/lzo.h
-index a84b9bd..9d7e8f1 100644
---- a/libavutil/lzo.h
-+++ b/libavutil/lzo.h
-@@ -60,17 +60,6 @@
- int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen);
- 
- /**
-- * @brief deliberately overlapping memcpy implementation
-- * @param dst destination buffer
-- * @param back how many bytes back we start (the initial size of the overlapping window)
-- * @param cnt number of bytes to copy, must be >= 0
-- *
-- * cnt > back is valid, this will copy the bytes we just copied,
-- * thus creating a repeating pattern with a period length of back.
-- */
--void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
--
--/**
-  * @}
-  */
- 
-diff --git a/libavutil/mem.c b/libavutil/mem.c
-index 16c1adb..feba316 100644
---- a/libavutil/mem.c
-+++ b/libavutil/mem.c
-@@ -27,6 +27,7 @@
- #include "config.h"
- 
- #include <limits.h>
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- #if HAVE_MALLOC_H
-@@ -34,6 +35,7 @@
- #endif
- 
- #include "avutil.h"
-+#include "intreadwrite.h"
- #include "mem.h"
- 
- /* here we can use OS-dependent allocation functions */
-@@ -177,3 +179,38 @@ char *av_strdup(const char *s)
-     }
-     return ptr;
- }
-+
-+void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
-+{
-+    const uint8_t *src = &dst[-back];
-+    if (back == 1) {
-+        memset(dst, *src, cnt);
-+    } else {
-+        if (cnt >= 4) {
-+            AV_COPY16U(dst,     src);
-+            AV_COPY16U(dst + 2, src + 2);
-+            src += 4;
-+            dst += 4;
-+            cnt -= 4;
-+        }
-+        if (cnt >= 8) {
-+            AV_COPY16U(dst,     src);
-+            AV_COPY16U(dst + 2, src + 2);
-+            AV_COPY16U(dst + 4, src + 4);
-+            AV_COPY16U(dst + 6, src + 6);
-+            src += 8;
-+            dst += 8;
-+            cnt -= 8;
-+        }
-+        if (cnt > 0) {
-+            int blocklen = back;
-+            while (cnt > blocklen) {
-+                memcpy(dst, src, blocklen);
-+                dst       += blocklen;
-+                cnt       -= blocklen;
-+                blocklen <<= 1;
-+            }
-+            memcpy(dst, src, cnt);
-+        }
-+    }
-+}
-diff --git a/libavutil/mem.h b/libavutil/mem.h
-index 4f14f27..8f47224 100644
---- a/libavutil/mem.h
-+++ b/libavutil/mem.h
-@@ -27,6 +27,7 @@
- #define AVUTIL_MEM_H
- 
- #include <limits.h>
-+#include <stdint.h>
- 
- #include "attributes.h"
- #include "avutil.h"
-@@ -165,6 +166,17 @@ char *av_strdup(const char *s) av_malloc_attrib;
- void av_freep(void *ptr);
- 
- /**
-+ * @brief deliberately overlapping memcpy implementation
-+ * @param dst destination buffer
-+ * @param back how many bytes back we start (the initial size of the overlapping window)
-+ * @param cnt number of bytes to copy, must be >= 0
-+ *
-+ * cnt > back is valid, this will copy the bytes we just copied,
-+ * thus creating a repeating pattern with a period length of back.
-+ */
-+void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
-+
-+/**
-  * @}
-  */
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0020-avutil-Make-LZO-decoder-code-configure-time-selectab.patch b/debian/patches/post-9beta2/0020-avutil-Make-LZO-decoder-code-configure-time-selectab.patch
deleted file mode 100644
index 3fe5ec8..0000000
--- a/debian/patches/post-9beta2/0020-avutil-Make-LZO-decoder-code-configure-time-selectab.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 2a91ada8282f18d2807abee5188225bba1b19bda Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Thu, 18 Oct 2012 19:48:27 +0200
-Subject: [PATCH 020/278] avutil: Make LZO decoder code configure-time
- selectable
-
----
- configure                 |    6 +++++-
- libavformat/matroskadec.c |    9 +++++++--
- libavutil/Makefile        |    6 ++++--
- 3 files changed, 16 insertions(+), 5 deletions(-)
-
-diff --git a/configure b/configure
-index 079e6db..df07a6f 100755
---- a/configure
-+++ b/configure
-@@ -120,6 +120,7 @@ Component options:
-   --disable-dct            disable DCT code
-   --disable-dwt            disable DWT code
-   --disable-lsp            disable LSP code
-+  --disable-lzo            disable LZO decoder code
-   --disable-mdct           disable MDCT code
-   --disable-rdft           disable RDFT code
-   --disable-fft            disable FFT code
-@@ -1029,6 +1030,7 @@ CONFIG_LIST="
-     libxavs
-     libxvid
-     lsp
-+    lzo
-     mdct
-     memalign_hack
-     network
-@@ -1437,6 +1439,7 @@ binkaudio_dct_decoder_select="mdct rdft dct sinewin"
- binkaudio_rdft_decoder_select="mdct rdft sinewin"
- cavs_decoder_select="golomb mpegvideo"
- cook_decoder_select="mdct sinewin"
-+cscd_decoder_select="lzo"
- cscd_decoder_suggest="zlib"
- dca_decoder_select="mdct"
- dnxhd_encoder_select="aandcttables mpegvideoenc"
-@@ -1516,6 +1519,7 @@ msmpeg4v3_encoder_select="h263_encoder"
- mss2_decoder_select="vc1_decoder"
- nellymoser_decoder_select="mdct sinewin"
- nellymoser_encoder_select="mdct sinewin"
-+nuv_decoder_select="lzo"
- png_decoder_select="zlib"
- png_encoder_select="zlib"
- qcelp_decoder_select="lsp"
-@@ -1628,7 +1632,7 @@ eac3_demuxer_select="ac3_parser"
- flac_demuxer_select="flac_parser"
- ipod_muxer_select="mov_muxer"
- matroska_audio_muxer_select="matroska_muxer"
--matroska_demuxer_suggest="zlib bzlib"
-+matroska_demuxer_suggest="bzlib lzo zlib"
- mov_demuxer_suggest="zlib"
- mp3_demuxer_select="mpegaudio_parser"
- mp4_muxer_select="mov_muxer"
-diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
-index 68c936c..26f8707 100644
---- a/libavformat/matroskadec.c
-+++ b/libavformat/matroskadec.c
-@@ -1011,6 +1011,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
-         memcpy(pkt_data + header_size, data, isize);
-         break;
-     }
-+#if CONFIG_LZO
-     case MATROSKA_TRACK_ENCODING_COMP_LZO:
-         do {
-             olen = pkt_size *= 3;
-@@ -1028,6 +1029,7 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size,
-         }
-         pkt_size -= olen;
-         break;
-+#endif
- #if CONFIG_ZLIB
-     case MATROSKA_TRACK_ENCODING_COMP_ZLIB: {
-         z_stream zstream = {0};
-@@ -1436,14 +1438,17 @@ static int matroska_read_header(AVFormatContext *s)
-                    "Multiple combined encodings not supported");
-         } else if (encodings_list->nb_elem == 1) {
-             if (encodings[0].type ||
--                (encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP &&
-+                (
- #if CONFIG_ZLIB
-                  encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_ZLIB &&
- #endif
- #if CONFIG_BZLIB
-                  encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_BZLIB &&
- #endif
--                 encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO)) {
-+#if CONFIG_LZO
-+                 encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_LZO &&
-+#endif
-+                 encodings[0].compression.algo != MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP)) {
-                 encodings[0].scope = 0;
-                 av_log(matroska->ctx, AV_LOG_ERROR,
-                        "Unsupported encoding type");
-diff --git a/libavutil/Makefile b/libavutil/Makefile
-index 227a57e..45f8e90 100644
---- a/libavutil/Makefile
-+++ b/libavutil/Makefile
-@@ -24,7 +24,6 @@ HEADERS = adler32.h                                                     \
-           intreadwrite.h                                                \
-           lfg.h                                                         \
-           log.h                                                         \
--          lzo.h                                                         \
-           mathematics.h                                                 \
-           md5.h                                                         \
-           mem.h                                                         \
-@@ -42,6 +41,8 @@ HEADERS = adler32.h                                                     \
-           version.h                                                     \
-           xtea.h                                                        \
- 
-+HEADERS-$(CONFIG_LZO)                   += lzo.h
-+
- ARCH_HEADERS = bswap.h                                                  \
-                intmath.h                                                \
-                intreadwrite.h                                           \
-@@ -71,7 +72,6 @@ OBJS = adler32.o                                                        \
-        log.o                                                            \
-        log2.o                                                           \
-        log2_tab.o                                                       \
--       lzo.o                                                            \
-        mathematics.o                                                    \
-        md5.o                                                            \
-        mem.o                                                            \
-@@ -89,6 +89,8 @@ OBJS = adler32.o                                                        \
-        utils.o                                                          \
-        xtea.o                                                           \
- 
-+OBJS-$(CONFIG_LZO)                      += lzo.o
-+
- OBJS += $(COMPAT_OBJS:%=../compat/%)
- 
- SKIPHEADERS          = old_pix_fmts.h
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0021-rawvideo-use-a-specific-read_header.patch b/debian/patches/post-9beta2/0021-rawvideo-use-a-specific-read_header.patch
deleted file mode 100644
index bf8f05a..0000000
--- a/debian/patches/post-9beta2/0021-rawvideo-use-a-specific-read_header.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 42c26a4864f1cefa4175c6c171aa0e4bd88dd42d Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Wed, 24 Oct 2012 14:18:49 +0200
-Subject: [PATCH 021/278] rawvideo: use a specific read_header
-
-ff_raw_read_header is used only for this demuxer for video.
----
- libavformat/Makefile      |    2 +-
- libavformat/rawvideodec.c |   68 ++++++++++++++++++++++++++++++++++++++++-----
- 2 files changed, 62 insertions(+), 8 deletions(-)
-
-diff --git a/libavformat/Makefile b/libavformat/Makefile
-index 2d66a6d..a285af1 100644
---- a/libavformat/Makefile
-+++ b/libavformat/Makefile
-@@ -239,7 +239,7 @@ OBJS-$(CONFIG_PMP_DEMUXER)               += pmpdec.o
- OBJS-$(CONFIG_PVA_DEMUXER)               += pva.o
- OBJS-$(CONFIG_QCP_DEMUXER)               += qcp.o
- OBJS-$(CONFIG_R3D_DEMUXER)               += r3d.o
--OBJS-$(CONFIG_RAWVIDEO_DEMUXER)          += rawvideodec.o rawdec.o
-+OBJS-$(CONFIG_RAWVIDEO_DEMUXER)          += rawvideodec.o
- OBJS-$(CONFIG_RAWVIDEO_MUXER)            += rawenc.o
- OBJS-$(CONFIG_RL2_DEMUXER)               += rl2.o
- OBJS-$(CONFIG_RM_DEMUXER)                += rmdec.o rm.o rmsipr.o
-diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
-index f71ea0a..5f372c9 100644
---- a/libavformat/rawvideodec.c
-+++ b/libavformat/rawvideodec.c
-@@ -19,8 +19,63 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/parseutils.h"
-+#include "libavutil/pixdesc.h"
-+#include "libavutil/opt.h"
-+#include "internal.h"
- #include "avformat.h"
--#include "rawdec.h"
-+
-+typedef struct RawVideoDemuxerContext {
-+    const AVClass *class;     /**< Class for private options. */
-+    char *video_size;         /**< String describing video size, set by a private option. */
-+    char *pixel_format;       /**< Set by a private option. */
-+    char *framerate;          /**< String describing framerate, set by a private option. */
-+} RawVideoDemuxerContext;
-+
-+
-+static int rawvideo_read_header(AVFormatContext *ctx)
-+{
-+    RawVideoDemuxerContext *s = ctx->priv_data;
-+    int width = 0, height = 0, ret = 0;
-+    enum AVPixelFormat pix_fmt;
-+    AVRational framerate;
-+    AVStream *st;
-+
-+    st = avformat_new_stream(ctx, NULL);
-+    if (!st)
-+        return AVERROR(ENOMEM);
-+
-+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-+
-+    st->codec->codec_id = ctx->iformat->raw_codec_id;
-+
-+    if (s->video_size &&
-+        (ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {
-+        av_log(ctx, AV_LOG_ERROR, "Couldn't parse video size.\n");
-+        return ret;
-+    }
-+
-+    if ((pix_fmt = av_get_pix_fmt(s->pixel_format)) == AV_PIX_FMT_NONE) {
-+        av_log(ctx, AV_LOG_ERROR, "No such pixel format: %s.\n",
-+               s->pixel_format);
-+        return AVERROR(EINVAL);
-+    }
-+
-+    if ((ret = av_parse_video_rate(&framerate, s->framerate)) < 0) {
-+        av_log(ctx, AV_LOG_ERROR, "Could not parse framerate: %s.\n",
-+               s->framerate);
-+        return ret;
-+    }
-+
-+    avpriv_set_pts_info(st, 64, framerate.den, framerate.num);
-+
-+    st->codec->width  = width;
-+    st->codec->height = height;
-+    st->codec->pix_fmt = pix_fmt;
-+
-+    return 0;
-+}
-+
- 
- static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
- {
-@@ -34,9 +89,8 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
-     if (packet_size < 0)
-         return -1;
- 
--    ret= av_get_packet(s->pb, pkt, packet_size);
--    pkt->pts=
--    pkt->dts= pkt->pos / packet_size;
-+    ret = av_get_packet(s->pb, pkt, packet_size);
-+    pkt->pts = pkt->dts = pkt->pos / packet_size;
- 
-     pkt->stream_index = 0;
-     if (ret < 0)
-@@ -44,7 +98,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
-     return 0;
- }
- 
--#define OFFSET(x) offsetof(FFRawVideoDemuxerContext, x)
-+#define OFFSET(x) offsetof(RawVideoDemuxerContext, x)
- #define DEC AV_OPT_FLAG_DECODING_PARAM
- static const AVOption rawvideo_options[] = {
-     { "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
-@@ -63,8 +117,8 @@ static const AVClass rawvideo_demuxer_class = {
- AVInputFormat ff_rawvideo_demuxer = {
-     .name           = "rawvideo",
-     .long_name      = NULL_IF_CONFIG_SMALL("raw video"),
--    .priv_data_size = sizeof(FFRawVideoDemuxerContext),
--    .read_header    = ff_raw_read_header,
-+    .priv_data_size = sizeof(RawVideoDemuxerContext),
-+    .read_header    = rawvideo_read_header,
-     .read_packet    = rawvideo_read_packet,
-     .flags          = AVFMT_GENERIC_INDEX,
-     .extensions     = "yuv,cif,qcif,rgb",
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0022-g722-refactor-out-of-rawdec.c.patch b/debian/patches/post-9beta2/0022-g722-refactor-out-of-rawdec.c.patch
deleted file mode 100644
index a406d31..0000000
--- a/debian/patches/post-9beta2/0022-g722-refactor-out-of-rawdec.c.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 5f0e161dd61552ad70760bad35b869eaec7368ff Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Wed, 24 Oct 2012 18:18:18 +0200
-Subject: [PATCH 022/278] g722: refactor out of rawdec.c
-
----
- libavformat/Makefile |    2 +-
- libavformat/g722.c   |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++
- libavformat/rawdec.c |   12 -----------
- 3 files changed, 57 insertions(+), 13 deletions(-)
- create mode 100644 libavformat/g722.c
-
-diff --git a/libavformat/Makefile b/libavformat/Makefile
-index a285af1..832ea41 100644
---- a/libavformat/Makefile
-+++ b/libavformat/Makefile
-@@ -101,7 +101,7 @@ OBJS-$(CONFIG_GIF_MUXER)                 += gif.o
- OBJS-$(CONFIG_GSM_DEMUXER)               += gsmdec.o
- OBJS-$(CONFIG_GXF_DEMUXER)               += gxf.o
- OBJS-$(CONFIG_GXF_MUXER)                 += gxfenc.o audiointerleave.o
--OBJS-$(CONFIG_G722_DEMUXER)              += rawdec.o
-+OBJS-$(CONFIG_G722_DEMUXER)              += g722.o rawdec.o
- OBJS-$(CONFIG_G722_MUXER)                += rawenc.o
- OBJS-$(CONFIG_G723_1_DEMUXER)            += g723_1.o
- OBJS-$(CONFIG_H261_DEMUXER)              += h261dec.o rawdec.o
-diff --git a/libavformat/g722.c b/libavformat/g722.c
-new file mode 100644
-index 0000000..8052939
---- /dev/null
-+++ b/libavformat/g722.c
-@@ -0,0 +1,56 @@
-+/*
-+ * g722 raw demuxer
-+ * Copyright (c) 2010 Martin Storsjo
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include "avformat.h"
-+#include "internal.h"
-+#include "rawdec.h"
-+
-+static int g722_read_header(AVFormatContext *s)
-+{
-+    AVStream *st;
-+
-+    st = avformat_new_stream(s, NULL);
-+    if (!st)
-+        return AVERROR(ENOMEM);
-+
-+    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-+    st->codec->codec_id    = AV_CODEC_ID_ADPCM_G722;
-+    st->codec->sample_rate = 16000;
-+    st->codec->channels    = 1;
-+
-+    st->codec->bits_per_coded_sample =
-+        av_get_bits_per_sample(st->codec->codec_id);
-+
-+    assert(st->codec->bits_per_coded_sample > 0);
-+
-+    avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
-+    return 0;
-+}
-+
-+AVInputFormat ff_g722_demuxer = {
-+    .name           = "g722",
-+    .long_name      = NULL_IF_CONFIG_SMALL("raw G.722"),
-+    .read_header    = g722_read_header,
-+    .read_packet    = ff_raw_read_partial_packet,
-+    .flags          = AVFMT_GENERIC_INDEX,
-+    .extensions     = "g722,722",
-+    .raw_codec_id   = AV_CODEC_ID_ADPCM_G722,
-+};
-diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
-index 7ea3d2b..fd1e9b9 100644
---- a/libavformat/rawdec.c
-+++ b/libavformat/rawdec.c
-@@ -177,18 +177,6 @@ const AVOption ff_rawvideo_options[] = {
-     { NULL },
- };
- 
--#if CONFIG_G722_DEMUXER
--AVInputFormat ff_g722_demuxer = {
--    .name           = "g722",
--    .long_name      = NULL_IF_CONFIG_SMALL("raw G.722"),
--    .read_header    = ff_raw_read_header,
--    .read_packet    = ff_raw_read_partial_packet,
--    .flags          = AVFMT_GENERIC_INDEX,
--    .extensions     = "g722,722",
--    .raw_codec_id   = AV_CODEC_ID_ADPCM_G722,
--};
--#endif
--
- #if CONFIG_LATM_DEMUXER
- AVInputFormat ff_latm_demuxer = {
-     .name           = "latm",
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0023-pcmdec-remove-dependency-from-rawdec.patch b/debian/patches/post-9beta2/0023-pcmdec-remove-dependency-from-rawdec.patch
deleted file mode 100644
index 89fdf1c..0000000
--- a/debian/patches/post-9beta2/0023-pcmdec-remove-dependency-from-rawdec.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 2ef4d586d6352a69c0669d53ce1035eb7d8db0e8 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Wed, 24 Oct 2012 19:15:50 +0200
-Subject: [PATCH 023/278] pcmdec: remove dependency from rawdec
-
-The code shared is not actually shared with anything else.
----
- libavformat/Makefile |   40 ++++++++++++++++++++--------------------
- libavformat/pcmdec.c |   37 +++++++++++++++++++++++++++++++++++--
- 2 files changed, 55 insertions(+), 22 deletions(-)
-
-diff --git a/libavformat/Makefile b/libavformat/Makefile
-index 832ea41..acf0500 100644
---- a/libavformat/Makefile
-+++ b/libavformat/Makefile
-@@ -195,45 +195,45 @@ OBJS-$(CONFIG_OGG_MUXER)                 += oggenc.o \
-                                             vorbiscomment.o
- OBJS-$(CONFIG_OMA_DEMUXER)               += omadec.o pcm.o oma.o
- OBJS-$(CONFIG_OMA_MUXER)                 += omaenc.o rawenc.o oma.o id3v2enc.o
--OBJS-$(CONFIG_PCM_ALAW_DEMUXER)          += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_ALAW_DEMUXER)          += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_ALAW_MUXER)            += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_F32BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_F32BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_F32BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_F32LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_F32LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_F32LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_F64BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_F64BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_F64BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_F64LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_F64LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_F64LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_MULAW_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_MULAW_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_MULAW_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S16BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S16BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S16BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S16LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S16LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S16LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S24BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S24BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S24BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S24LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S24LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S24LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S32BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S32BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S32BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S32LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S32LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S32LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_S8_DEMUXER)            += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_S8_DEMUXER)            += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_S8_MUXER)              += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U16BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U16BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U16BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U16LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U16LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U16LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U24BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U24BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U24BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U24LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U24LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U24LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U32BE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U32BE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U32BE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U32LE_DEMUXER)         += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U32LE_DEMUXER)         += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U32LE_MUXER)           += pcmenc.o rawenc.o
--OBJS-$(CONFIG_PCM_U8_DEMUXER)            += pcmdec.o pcm.o rawdec.o
-+OBJS-$(CONFIG_PCM_U8_DEMUXER)            += pcmdec.o pcm.o
- OBJS-$(CONFIG_PCM_U8_MUXER)              += pcmenc.o rawenc.o
- OBJS-$(CONFIG_PMP_DEMUXER)               += pmpdec.o
- OBJS-$(CONFIG_PVA_DEMUXER)               += pva.o
-diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
-index ad47885..40446c2 100644
---- a/libavformat/pcmdec.c
-+++ b/libavformat/pcmdec.c
-@@ -20,13 +20,46 @@
-  */
- 
- #include "avformat.h"
--#include "rawdec.h"
-+#include "internal.h"
- #include "pcm.h"
- #include "libavutil/log.h"
- #include "libavutil/opt.h"
- 
- #define RAW_SAMPLES     1024
- 
-+typedef struct RawAudioDemuxerContext {
-+    AVClass *class;
-+    int sample_rate;
-+    int channels;
-+} RawAudioDemuxerContext;
-+
-+static int raw_read_header(AVFormatContext *s)
-+{
-+    RawAudioDemuxerContext *s1 = s->priv_data;
-+    AVStream *st;
-+
-+    st = avformat_new_stream(s, NULL);
-+    if (!st)
-+        return AVERROR(ENOMEM);
-+
-+
-+    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-+    st->codec->codec_id    = s->iformat->raw_codec_id;
-+    st->codec->sample_rate = s1->sample_rate;
-+    st->codec->channels    = s1->channels;
-+
-+    st->codec->bits_per_coded_sample =
-+        av_get_bits_per_sample(st->codec->codec_id);
-+
-+    assert(st->codec->bits_per_coded_sample > 0);
-+
-+    st->codec->block_align =
-+        st->codec->bits_per_coded_sample * st->codec->channels / 8;
-+
-+    avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
-+    return 0;
-+}
-+
- static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
- {
-     int ret, size, bps;
-@@ -65,7 +98,7 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = {              \
-     .name           = #name_,                               \
-     .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
-     .priv_data_size = sizeof(RawAudioDemuxerContext),       \
--    .read_header    = ff_raw_read_header,                   \
-+    .read_header    = raw_read_header,                      \
-     .read_packet    = raw_read_packet,                      \
-     .read_seek      = ff_pcm_read_seek,                     \
-     .flags          = AVFMT_GENERIC_INDEX,                  \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0024-rawdec-remove-ff_raw_read_header.patch b/debian/patches/post-9beta2/0024-rawdec-remove-ff_raw_read_header.patch
deleted file mode 100644
index 88d82f2..0000000
--- a/debian/patches/post-9beta2/0024-rawdec-remove-ff_raw_read_header.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 587874ef1c94a9b863d2f2db0e5d341e086ee232 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Wed, 24 Oct 2012 19:53:32 +0200
-Subject: [PATCH 024/278] rawdec: remove ff_raw_read_header
-
-It is not used anymore and is a kludge.
----
- libavformat/rawdec.c |   70 --------------------------------------------------
- libavformat/rawdec.h |    8 ------
- 2 files changed, 78 deletions(-)
-
-diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
-index fd1e9b9..1c9aabd 100644
---- a/libavformat/rawdec.c
-+++ b/libavformat/rawdec.c
-@@ -28,76 +28,6 @@
- #include "libavutil/parseutils.h"
- #include "libavutil/pixdesc.h"
- 
--/* raw input */
--int ff_raw_read_header(AVFormatContext *s)
--{
--    AVStream *st;
--    enum AVCodecID id;
--
--    st = avformat_new_stream(s, NULL);
--    if (!st)
--        return AVERROR(ENOMEM);
--
--        id = s->iformat->raw_codec_id;
--        if (id == AV_CODEC_ID_RAWVIDEO) {
--            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
--        } else {
--            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
--        }
--        st->codec->codec_id = id;
--
--        switch(st->codec->codec_type) {
--        case AVMEDIA_TYPE_AUDIO: {
--            RawAudioDemuxerContext *s1 = s->priv_data;
--
--            st->codec->channels = 1;
--
--            if (id == AV_CODEC_ID_ADPCM_G722)
--                st->codec->sample_rate = 16000;
--
--            if (s1 && s1->sample_rate)
--                st->codec->sample_rate = s1->sample_rate;
--            if (s1 && s1->channels)
--                st->codec->channels    = s1->channels;
--
--            st->codec->bits_per_coded_sample = av_get_bits_per_sample(st->codec->codec_id);
--            assert(st->codec->bits_per_coded_sample > 0);
--            st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
--            avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
--            break;
--            }
--        case AVMEDIA_TYPE_VIDEO: {
--            FFRawVideoDemuxerContext *s1 = s->priv_data;
--            int width = 0, height = 0, ret = 0;
--            enum AVPixelFormat pix_fmt;
--            AVRational framerate;
--
--            if (s1->video_size && (ret = av_parse_video_size(&width, &height, s1->video_size)) < 0) {
--                av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n");
--                goto fail;
--            }
--            if ((pix_fmt = av_get_pix_fmt(s1->pixel_format)) == AV_PIX_FMT_NONE) {
--                av_log(s, AV_LOG_ERROR, "No such pixel format: %s.\n", s1->pixel_format);
--                ret = AVERROR(EINVAL);
--                goto fail;
--            }
--            if ((ret = av_parse_video_rate(&framerate, s1->framerate)) < 0) {
--                av_log(s, AV_LOG_ERROR, "Could not parse framerate: %s.\n", s1->framerate);
--                goto fail;
--            }
--            avpriv_set_pts_info(st, 64, framerate.den, framerate.num);
--            st->codec->width  = width;
--            st->codec->height = height;
--            st->codec->pix_fmt = pix_fmt;
--fail:
--            return ret;
--            }
--        default:
--            return -1;
--        }
--    return 0;
--}
--
- #define RAW_PACKET_SIZE 1024
- 
- int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
-diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h
-index 4cce2cf..a548778 100644
---- a/libavformat/rawdec.h
-+++ b/libavformat/rawdec.h
-@@ -26,12 +26,6 @@
- #include "libavutil/log.h"
- #include "libavutil/opt.h"
- 
--typedef struct RawAudioDemuxerContext {
--    AVClass *class;
--    int sample_rate;
--    int channels;
--} RawAudioDemuxerContext;
--
- typedef struct FFRawVideoDemuxerContext {
-     const AVClass *class;     /**< Class for private options. */
-     char *video_size;         /**< String describing video size, set by a private option. */
-@@ -41,8 +35,6 @@ typedef struct FFRawVideoDemuxerContext {
- 
- extern const AVOption ff_rawvideo_options[];
- 
--int ff_raw_read_header(AVFormatContext *s);
--
- int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt);
- 
- int ff_raw_audio_read_header(AVFormatContext *s);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0025-avfilter-fix-graphparser-memleaks-on-error-paths.patch b/debian/patches/post-9beta2/0025-avfilter-fix-graphparser-memleaks-on-error-paths.patch
deleted file mode 100644
index d4b1631..0000000
--- a/debian/patches/post-9beta2/0025-avfilter-fix-graphparser-memleaks-on-error-paths.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 285b706b551b94e18f875ed01163926c8b98e68b Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Tue, 9 Oct 2012 21:28:32 +0200
-Subject: [PATCH 025/278] avfilter: fix graphparser memleaks on error paths
-
-Fixes CID700635, CID700636 and CID732274.
----
- libavfilter/graphparser.c |   24 +++++++++++++++---------
- 1 file changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
-index 3921189..04339c8 100644
---- a/libavfilter/graphparser.c
-+++ b/libavfilter/graphparser.c
-@@ -238,10 +238,11 @@ static int link_filter_inouts(AVFilterContext *filt_ctx,
-             return AVERROR(ENOMEM);
- 
-         if (p->filter_ctx) {
--            if ((ret = link_filter(p->filter_ctx, p->pad_idx, filt_ctx, pad, log_ctx)) < 0)
--                return ret;
-+            ret = link_filter(p->filter_ctx, p->pad_idx, filt_ctx, pad, log_ctx);
-             av_free(p->name);
-             av_free(p);
-+            if (ret < 0)
-+                return ret;
-         } else {
-             p->filter_ctx = filt_ctx;
-             p->pad_idx = pad;
-@@ -289,8 +290,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs,
-             av_free(name);
-         } else {
-             /* Not in the list, so add it as an input */
--            if (!(match = av_mallocz(sizeof(AVFilterInOut))))
-+            if (!(match = av_mallocz(sizeof(AVFilterInOut)))) {
-+                av_free(name);
-                 return AVERROR(ENOMEM);
-+            }
-             match->name    = name;
-             match->pad_idx = pad;
-         }
-@@ -318,24 +321,27 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs,
-         AVFilterInOut *match;
- 
-         AVFilterInOut *input = *curr_inputs;
-+
-+        if (!name)
-+            return AVERROR(EINVAL);
-+
-         if (!input) {
-             av_log(log_ctx, AV_LOG_ERROR,
--                   "No output pad can be associated to link label '%s'.\n",
--                   name);
-+                   "No output pad can be associated to link label '%s'.\n", name);
-+            av_free(name);
-             return AVERROR(EINVAL);
-         }
-         *curr_inputs = (*curr_inputs)->next;
- 
--        if (!name)
--            return AVERROR(EINVAL);
--
-         /* First check if the label is not in the open_inputs list */
-         match = extract_inout(name, open_inputs);
- 
-         if (match) {
-             if ((ret = link_filter(input->filter_ctx, input->pad_idx,
--                                   match->filter_ctx, match->pad_idx, log_ctx)) < 0)
-+                                   match->filter_ctx, match->pad_idx, log_ctx)) < 0) {
-+                av_free(name);
-                 return ret;
-+            }
-             av_free(match->name);
-             av_free(name);
-             av_free(match);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0026-avconv-fix-bitrate-report-when-writing-to-dev-null.patch b/debian/patches/post-9beta2/0026-avconv-fix-bitrate-report-when-writing-to-dev-null.patch
deleted file mode 100644
index 72add57..0000000
--- a/debian/patches/post-9beta2/0026-avconv-fix-bitrate-report-when-writing-to-dev-null.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1b891d17c531e8a63c2974aab4bf997ce70746f3 Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Tue, 9 Oct 2012 23:22:49 +0200
-Subject: [PATCH 026/278] avconv: fix bitrate report when writing to /dev/null
-
-avio_size() reports the filesize which returns 0 for /dev/null.
-avio_tell() reports the current position.
-
-Also handle errors from avio_tell().
----
- avconv.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/avconv.c b/avconv.c
-index bf1e2fa..54a0e2a 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -807,8 +807,15 @@ static void print_report(int is_last_report, int64_t timer_start)
-     oc = output_files[0]->ctx;
- 
-     total_size = avio_size(oc->pb);
--    if (total_size < 0) // FIXME improve avio_size() so it works with non seekable output too
-+    if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too
-         total_size = avio_tell(oc->pb);
-+    if (total_size < 0) {
-+        char errbuf[128];
-+        av_strerror(total_size, errbuf, sizeof(errbuf));
-+        av_log(NULL, AV_LOG_VERBOSE, "Bitrate not available, "
-+               "avio_tell() failed: %s\n", errbuf);
-+        total_size = 0;
-+    }
- 
-     buf[0] = '\0';
-     ti1 = 1e10;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0027-pcmdec-change-default-of-channels-parameter-to-1.patch b/debian/patches/post-9beta2/0027-pcmdec-change-default-of-channels-parameter-to-1.patch
deleted file mode 100644
index 040f07c..0000000
--- a/debian/patches/post-9beta2/0027-pcmdec-change-default-of-channels-parameter-to-1.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From dcdfb8ede3580cde6acc1c6ca889ad3b610d75dc Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Thu, 25 Oct 2012 15:10:22 +0200
-Subject: [PATCH 027/278] pcmdec: change default of channels parameter to 1
-
-This was previously implicitly done in ff_raw_read_header().
-Fixes fate tests with pcm input.
----
- libavformat/pcmdec.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
-index 40446c2..de6f13e 100644
---- a/libavformat/pcmdec.c
-+++ b/libavformat/pcmdec.c
-@@ -83,7 +83,7 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
- 
- static const AVOption pcm_options[] = {
-     { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
--    { "channels",    "", offsetof(RawAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
-+    { "channels",    "", offsetof(RawAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
-     { NULL },
- };
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0028-ffv1-set-the-range-coder-state-in-decode_slice_heade.patch b/debian/patches/post-9beta2/0028-ffv1-set-the-range-coder-state-in-decode_slice_heade.patch
deleted file mode 100644
index f2e469f..0000000
--- a/debian/patches/post-9beta2/0028-ffv1-set-the-range-coder-state-in-decode_slice_heade.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 22f7942fe7d7349e3562ac68fa101d9efec522df Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Thu, 25 Oct 2012 15:42:08 +0200
-Subject: [PATCH 028/278] ffv1: set the range coder state in
- decode_slice_header
-
----
- libavcodec/ffv1dec.c |    7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
-index f5f7a8f..c5329b4 100644
---- a/libavcodec/ffv1dec.c
-+++ b/libavcodec/ffv1dec.c
-@@ -273,7 +273,12 @@ static int decode_slice_header(FFV1Context *f, FFV1Context *fs)
-     unsigned ps, i, context_count;
-     memset(state, 128, sizeof(state));
- 
--    av_assert0(f->version > 2);
-+    if (fs->ac > 1) {
-+        for (i = 1; i < 256; i++) {
-+            fs->c.one_state[i]        = f->state_transition[i];
-+            fs->c.zero_state[256 - i] = 256 - fs->c.one_state[i];
-+        }
-+    }
- 
-     fs->slice_x      = get_symbol(c, state, 0) * f->width;
-     fs->slice_y      = get_symbol(c, state, 0) * f->height;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0029-pcm-change-references-to-raw-to-pcm.patch b/debian/patches/post-9beta2/0029-pcm-change-references-to-raw-to-pcm.patch
deleted file mode 100644
index 930763c..0000000
--- a/debian/patches/post-9beta2/0029-pcm-change-references-to-raw-to-pcm.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 254056c4ab6161d687caf8e9b837571db76e60c6 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Mon, 1 Jan 2001 01:08:20 +0100
-Subject: [PATCH 029/278] pcm: change references to raw to pcm
-
----
- libavformat/pcmdec.c |   20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
-index de6f13e..716d8b7 100644
---- a/libavformat/pcmdec.c
-+++ b/libavformat/pcmdec.c
-@@ -27,15 +27,15 @@
- 
- #define RAW_SAMPLES     1024
- 
--typedef struct RawAudioDemuxerContext {
-+typedef struct PCMAudioDemuxerContext {
-     AVClass *class;
-     int sample_rate;
-     int channels;
--} RawAudioDemuxerContext;
-+} PCMAudioDemuxerContext;
- 
--static int raw_read_header(AVFormatContext *s)
-+static int pcm_read_header(AVFormatContext *s)
- {
--    RawAudioDemuxerContext *s1 = s->priv_data;
-+    PCMAudioDemuxerContext *s1 = s->priv_data;
-     AVStream *st;
- 
-     st = avformat_new_stream(s, NULL);
-@@ -60,7 +60,7 @@ static int raw_read_header(AVFormatContext *s)
-     return 0;
- }
- 
--static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
-+static int pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
- {
-     int ret, size, bps;
-     //    AVStream *st = s->streams[0];
-@@ -82,8 +82,8 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
- }
- 
- static const AVOption pcm_options[] = {
--    { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
--    { "channels",    "", offsetof(RawAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
-+    { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
-+    { "channels",    "", offsetof(PCMAudioDemuxerContext, channels),    AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
-     { NULL },
- };
- 
-@@ -97,9 +97,9 @@ static const AVClass name_ ## _demuxer_class = {            \
- AVInputFormat ff_pcm_ ## name_ ## _demuxer = {              \
-     .name           = #name_,                               \
-     .long_name      = NULL_IF_CONFIG_SMALL(long_name_),     \
--    .priv_data_size = sizeof(RawAudioDemuxerContext),       \
--    .read_header    = raw_read_header,                      \
--    .read_packet    = raw_read_packet,                      \
-+    .priv_data_size = sizeof(PCMAudioDemuxerContext),       \
-+    .read_header    = pcm_read_header,                      \
-+    .read_packet    = pcm_read_packet,                      \
-     .read_seek      = ff_pcm_read_seek,                     \
-     .flags          = AVFMT_GENERIC_INDEX,                  \
-     .extensions     = ext,                                  \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0030-build-Include-HEADERS-yes-in-the-HEADERS-variable.patch b/debian/patches/post-9beta2/0030-build-Include-HEADERS-yes-in-the-HEADERS-variable.patch
deleted file mode 100644
index 1ad38e8..0000000
--- a/debian/patches/post-9beta2/0030-build-Include-HEADERS-yes-in-the-HEADERS-variable.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 121604b024cfd04644a9aa6012bd0e9a48efbd9f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Thu, 25 Oct 2012 17:13:06 +0300
-Subject: [PATCH 030/278] build: Include HEADERS-yes in the HEADERS variable
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This makes sure the previously always installed public header
-lzo.h is installed if the LZO functionality is enabled.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- Makefile   |    2 +-
- common.mak |    1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 07df538..1f73a0a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -102,7 +102,7 @@ config.h: .config
- 	@-tput sgr0 2>/dev/null
- 
- SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS      \
--               ARCH_HEADERS BUILT_HEADERS SKIPHEADERS                    \
-+               HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS            \
-                ARMV5TE-OBJS ARMV6-OBJS ARMVFP-OBJS NEON-OBJS             \
-                ALTIVEC-OBJS VIS-OBJS                                     \
-                MMX-OBJS YASM-OBJS                                        \
-diff --git a/common.mak b/common.mak
-index dd9f4cb..c4d2999 100644
---- a/common.mak
-+++ b/common.mak
-@@ -23,6 +23,7 @@ HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
- TOOLS     += $(TOOLS-yes)
- TOOLOBJS  := $(TOOLS:%=tools/%.o)
- TOOLS     := $(TOOLS:%=tools/%$(EXESUF))
-+HEADERS   += $(HEADERS-yes)
- 
- DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0031-configure-recognise-more-sparc-variants-as-cpu-argum.patch b/debian/patches/post-9beta2/0031-configure-recognise-more-sparc-variants-as-cpu-argum.patch
deleted file mode 100644
index d3456ab..0000000
--- a/debian/patches/post-9beta2/0031-configure-recognise-more-sparc-variants-as-cpu-argum.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From eadfb0560a2f194fbc453bcb22fea73f3c9a27ad Mon Sep 17 00:00:00 2001
-From: Michael Kostylev <michael.kostylev at gmail.com>
-Date: Thu, 25 Oct 2012 11:38:51 +0100
-Subject: [PATCH 031/278] configure: recognise more sparc variants as --cpu
- argument
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure b/configure
-index df07a6f..a39cb77 100755
---- a/configure
-+++ b/configure
-@@ -2568,12 +2568,12 @@ elif enabled x86; then
- elif enabled sparc; then
- 
-     case $cpu in
--        niagara)
-+        cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
-             cpuflags="-mcpu=$cpu"
-             disable vis
-         ;;
--        sparc64)
--            cpuflags="-mcpu=v9"
-+        ultrasparc*|niagara[234])
-+            cpuflags="-mcpu=$cpu"
-         ;;
-     esac
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0032-configure-sanitise-sparc-vis-check.patch b/debian/patches/post-9beta2/0032-configure-sanitise-sparc-vis-check.patch
deleted file mode 100644
index 7de3c2c..0000000
--- a/debian/patches/post-9beta2/0032-configure-sanitise-sparc-vis-check.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6aa93689abe8c095cec9fa828c2dee3131008995 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Thu, 25 Oct 2012 15:56:16 +0100
-Subject: [PATCH 032/278] configure: sanitise sparc vis check
-
-It is wrong to force -mcpu=ultrasparc when checking for vis.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/configure b/configure
-index a39cb77..bfa3a61 100755
---- a/configure
-+++ b/configure
-@@ -3100,9 +3100,7 @@ EOF
- 
- elif enabled sparc; then
- 
--    enabled vis &&
--        check_inline_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
--            add_cflags -mcpu=ultrasparc -mtune=ultrasparc
-+    enabled vis && check_inline_asm vis '"pdist %f0, %f0, %f0"'
- 
- elif enabled x86; then
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0033-h263-avoid-memcpys-over-array-bound-in-motion-vector.patch b/debian/patches/post-9beta2/0033-h263-avoid-memcpys-over-array-bound-in-motion-vector.patch
deleted file mode 100644
index 7385bf9..0000000
--- a/debian/patches/post-9beta2/0033-h263-avoid-memcpys-over-array-bound-in-motion-vector.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 154ff81870ce9838eaa87b19d0f5ecceb9dd514e Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Wed, 10 Oct 2012 14:25:44 +0200
-Subject: [PATCH 033/278] h263: avoid memcpys over array bound in motion
- vector caching for obmc
-
-Fixes CID602232.
----
- libavcodec/mpegvideo_motion.c |   34 +++++++++++++++++++++-------------
- 1 file changed, 21 insertions(+), 13 deletions(-)
-
-diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
-index 22948e2..9168793 100644
---- a/libavcodec/mpegvideo_motion.c
-+++ b/libavcodec/mpegvideo_motion.c
-@@ -638,37 +638,45 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
-     prefetch_motion(s, ref_picture, dir);
- 
-     if(!is_mpeg12 && s->obmc && s->pict_type != AV_PICTURE_TYPE_B){
--        int16_t mv_cache[4][4][2];
-+        LOCAL_ALIGNED_8(int16_t, mv_cache, [4], [4][2]);
-+        AVFrame *cur_frame = &s->current_picture.f;
-         const int xy= s->mb_x + s->mb_y*s->mb_stride;
-         const int mot_stride= s->b8_stride;
-         const int mot_xy= mb_x*2 + mb_y*2*mot_stride;
- 
-         assert(!s->mb_skipped);
- 
--        memcpy(mv_cache[1][1], s->current_picture.f.motion_val[0][mot_xy             ], sizeof(int16_t) * 4);
--        memcpy(mv_cache[2][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4);
--        memcpy(mv_cache[3][1], s->current_picture.f.motion_val[0][mot_xy + mot_stride], sizeof(int16_t) * 4);
-+        AV_COPY32(mv_cache[1][1], cur_frame->motion_val[0][mot_xy    ]);
-+        AV_COPY32(mv_cache[1][2], cur_frame->motion_val[0][mot_xy + 1]);
- 
--        if (mb_y == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - s->mb_stride])) {
--            memcpy(mv_cache[0][1], mv_cache[1][1], sizeof(int16_t)*4);
-+        AV_COPY32(mv_cache[2][1], cur_frame->motion_val[0][mot_xy + mot_stride    ]);
-+        AV_COPY32(mv_cache[2][2], cur_frame->motion_val[0][mot_xy + mot_stride + 1]);
-+
-+        AV_COPY32(mv_cache[3][1], cur_frame->motion_val[0][mot_xy + mot_stride    ]);
-+        AV_COPY32(mv_cache[3][2], cur_frame->motion_val[0][mot_xy + mot_stride + 1]);
-+
-+        if (mb_y == 0 || IS_INTRA(cur_frame->mb_type[xy - s->mb_stride])) {
-+            AV_COPY32(mv_cache[0][1], mv_cache[1][1]);
-+            AV_COPY32(mv_cache[0][2], mv_cache[1][2]);
-         }else{
--            memcpy(mv_cache[0][1], s->current_picture.f.motion_val[0][mot_xy - mot_stride], sizeof(int16_t) * 4);
-+            AV_COPY32(mv_cache[0][1], cur_frame->motion_val[0][mot_xy - mot_stride    ]);
-+            AV_COPY32(mv_cache[0][2], cur_frame->motion_val[0][mot_xy - mot_stride + 1]);
-         }
- 
--        if (mb_x == 0 || IS_INTRA(s->current_picture.f.mb_type[xy - 1])) {
-+        if (mb_x == 0 || IS_INTRA(cur_frame->mb_type[xy - 1])) {
-             AV_COPY32(mv_cache[1][0], mv_cache[1][1]);
-             AV_COPY32(mv_cache[2][0], mv_cache[2][1]);
-         }else{
--            AV_COPY32(mv_cache[1][0], s->current_picture.f.motion_val[0][mot_xy - 1]);
--            AV_COPY32(mv_cache[2][0], s->current_picture.f.motion_val[0][mot_xy - 1 + mot_stride]);
-+            AV_COPY32(mv_cache[1][0], cur_frame->motion_val[0][mot_xy - 1]);
-+            AV_COPY32(mv_cache[2][0], cur_frame->motion_val[0][mot_xy - 1 + mot_stride]);
-         }
- 
--        if (mb_x + 1 >= s->mb_width || IS_INTRA(s->current_picture.f.mb_type[xy + 1])) {
-+        if (mb_x + 1 >= s->mb_width || IS_INTRA(cur_frame->mb_type[xy + 1])) {
-             AV_COPY32(mv_cache[1][3], mv_cache[1][2]);
-             AV_COPY32(mv_cache[2][3], mv_cache[2][2]);
-         }else{
--            AV_COPY32(mv_cache[1][3], s->current_picture.f.motion_val[0][mot_xy + 2]);
--            AV_COPY32(mv_cache[2][3], s->current_picture.f.motion_val[0][mot_xy + 2 + mot_stride]);
-+            AV_COPY32(mv_cache[1][3], cur_frame->motion_val[0][mot_xy + 2]);
-+            AV_COPY32(mv_cache[2][3], cur_frame->motion_val[0][mot_xy + 2 + mot_stride]);
-         }
- 
-         mx = 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0034-doxygen-Drop-some-pointless-entries-from-PREDEFINED-.patch b/debian/patches/post-9beta2/0034-doxygen-Drop-some-pointless-entries-from-PREDEFINED-.patch
deleted file mode 100644
index f350b80..0000000
--- a/debian/patches/post-9beta2/0034-doxygen-Drop-some-pointless-entries-from-PREDEFINED-.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 74e742d6ad09becc2d43e5382c141e0356ad6071 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 23 Oct 2012 21:12:48 +0200
-Subject: [PATCH 034/278] doxygen: Drop some pointless entries from PREDEFINED
- macros list
-
----
- doc/Doxyfile |    6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/doc/Doxyfile b/doc/Doxyfile
-index 1b4e7d5..eb394f0 100644
---- a/doc/Doxyfile
-+++ b/doc/Doxyfile
-@@ -1374,12 +1374,6 @@ INCLUDE_FILE_PATTERNS  =
- # instead of the = operator.
- 
- PREDEFINED             = "__attribute__(x)=" \
--                         "RENAME(x)=x ## _TMPL" \
--                         "DEF(x)=x ## _TMPL" \
--                         HAVE_AV_CONFIG_H \
--                         HAVE_MMX \
--                         HAVE_MMXEXT \
--                         HAVE_AMD3DNOW \
-                          "DECLARE_ALIGNED(a,t,n)=t n" \
-                          "offsetof(x,y)=0x42"
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0035-doxygen-Add-av_alloc_size-to-list-of-predefined-macr.patch b/debian/patches/post-9beta2/0035-doxygen-Add-av_alloc_size-to-list-of-predefined-macr.patch
deleted file mode 100644
index c670599..0000000
--- a/debian/patches/post-9beta2/0035-doxygen-Add-av_alloc_size-to-list-of-predefined-macr.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 13bbefd57e8dcabae650f4a02e667d5c003c289f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 22 Oct 2012 16:16:07 +0200
-Subject: [PATCH 035/278] doxygen: Add av_alloc_size to list of predefined
- macros
-
-This avoids Doxygen believing the attribute is the function name.
----
- doc/Doxyfile |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/doc/Doxyfile b/doc/Doxyfile
-index eb394f0..aa1f4e2 100644
---- a/doc/Doxyfile
-+++ b/doc/Doxyfile
-@@ -1375,7 +1375,8 @@ INCLUDE_FILE_PATTERNS  =
- 
- PREDEFINED             = "__attribute__(x)=" \
-                          "DECLARE_ALIGNED(a,t,n)=t n" \
--                         "offsetof(x,y)=0x42"
-+                         "offsetof(x,y)=0x42" \
-+                         av_alloc_size \
- 
- # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
- # this tag can be used to specify a list of macro names that should be expanded.
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0036-cook-cosmetics-Better-name-for-ccpl-COOKSubpacket-me.patch b/debian/patches/post-9beta2/0036-cook-cosmetics-Better-name-for-ccpl-COOKSubpacket-me.patch
deleted file mode 100644
index 64b7235..0000000
--- a/debian/patches/post-9beta2/0036-cook-cosmetics-Better-name-for-ccpl-COOKSubpacket-me.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 20015379a46a3b261f57b0daf0c7237b62c1fd82 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 01:05:04 +0200
-Subject: [PATCH 036/278] cook: cosmetics: Better name for ccpl COOKSubpacket
- member
-
----
- libavcodec/cook.c |   11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index c5b17f9..28ee8ed 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -79,7 +79,7 @@ typedef struct {
-     int                 samples_per_channel;
-     int                 log2_numvector_size;
-     unsigned int        channel_mask;
--    VLC                 ccpl;                 ///< channel coupling
-+    VLC                 channel_coupling;
-     int                 joint_stereo;
-     int                 bits_per_subpacket;
-     int                 bits_per_subpdiv;
-@@ -205,7 +205,8 @@ static av_cold int init_cook_vlc_tables(COOKContext *q)
- 
-     for (i = 0; i < q->num_subpackets; i++) {
-         if (q->subpacket[i].joint_stereo == 1) {
--            result |= init_vlc(&q->subpacket[i].ccpl, 6, (1 << q->subpacket[i].js_vlc_bits) - 1,
-+            result |= init_vlc(&q->subpacket[i].channel_coupling, 6,
-+                               (1 << q->subpacket[i].js_vlc_bits) - 1,
-                                ccpl_huffbits[q->subpacket[i].js_vlc_bits - 2], 1, 1,
-                                ccpl_huffcodes[q->subpacket[i].js_vlc_bits - 2], 2, 2, 0);
-             av_log(q->avctx, AV_LOG_DEBUG, "subpacket %i Joint-stereo VLC used.\n", i);
-@@ -326,7 +327,7 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
-     for (i = 0; i < 7; i++)
-         ff_free_vlc(&q->sqvh[i]);
-     for (i = 0; i < q->num_subpackets; i++)
--        ff_free_vlc(&q->subpacket[i].ccpl);
-+        ff_free_vlc(&q->subpacket[i].channel_coupling);
- 
-     av_log(avctx, AV_LOG_DEBUG, "Memory deallocated.\n");
- 
-@@ -767,7 +768,9 @@ static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
- 
-     if (vlc)
-         for (i = 0; i < length; i++)
--            decouple_tab[start + i] = get_vlc2(&q->gb, p->ccpl.table, p->ccpl.bits, 2);
-+            decouple_tab[start + i] = get_vlc2(&q->gb,
-+                                               p->channel_coupling.table,
-+                                               p->channel_coupling.bits, 2);
-     else
-         for (i = 0; i < length; i++)
-             decouple_tab[start + i] = get_bits(&q->gb, p->js_vlc_bits);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0037-cook-cosmetics-Better-names-for-joint_decode-functio.patch b/debian/patches/post-9beta2/0037-cook-cosmetics-Better-names-for-joint_decode-functio.patch
deleted file mode 100644
index 45fb152..0000000
--- a/debian/patches/post-9beta2/0037-cook-cosmetics-Better-names-for-joint_decode-functio.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From f23b4a068230fb4ebed2449cd5f303f3b16d333d Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 01:08:19 +0200
-Subject: [PATCH 037/278] cook: cosmetics: Better names for joint_decode()
- function parameters
-
----
- libavcodec/cook.c |   15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 28ee8ed..05efa50 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -809,8 +809,8 @@ static void decouple_float(COOKContext *q,
-  * @param mlt_buffer1       pointer to left channel mlt coefficients
-  * @param mlt_buffer2       pointer to right channel mlt coefficients
-  */
--static int joint_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer1,
--                        float *mlt_buffer2)
-+static int joint_decode(COOKContext *q, COOKSubpacket *p,
-+                        float *mlt_buffer_left, float *mlt_buffer_right)
- {
-     int i, j, res;
-     int decouple_tab[SUBBAND_SIZE] = { 0 };
-@@ -822,8 +822,8 @@ static int joint_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer1,
-     memset(decode_buffer, 0, sizeof(q->decode_buffer_0));
- 
-     /* Make sure the buffers are zeroed out. */
--    memset(mlt_buffer1, 0, 1024 * sizeof(*mlt_buffer1));
--    memset(mlt_buffer2, 0, 1024 * sizeof(*mlt_buffer2));
-+    memset(mlt_buffer_left,  0, 1024 * sizeof(*mlt_buffer_left));
-+    memset(mlt_buffer_right, 0, 1024 * sizeof(*mlt_buffer_right));
-     decouple_info(q, p, decouple_tab);
-     if ((res = mono_decode(q, p, decode_buffer)) < 0)
-         return res;
-@@ -831,8 +831,8 @@ static int joint_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer1,
-     /* The two channels are stored interleaved in decode_buffer. */
-     for (i = 0; i < p->js_subband_start; i++) {
-         for (j = 0; j < SUBBAND_SIZE; j++) {
--            mlt_buffer1[i * 20 + j] = decode_buffer[i * 40 + j];
--            mlt_buffer2[i * 20 + j] = decode_buffer[i * 40 + 20 + j];
-+            mlt_buffer_left[i  * 20 + j] = decode_buffer[i * 40 + j];
-+            mlt_buffer_right[i * 20 + j] = decode_buffer[i * 40 + 20 + j];
-         }
-     }
- 
-@@ -845,7 +845,8 @@ static int joint_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer1,
-         cplscale = q->cplscales[p->js_vlc_bits - 2];  // choose decoupler table
-         f1 = cplscale[decouple_tab[cpl_tmp] + 1];
-         f2 = cplscale[idx];
--        q->decouple(q, p, i, f1, f2, decode_buffer, mlt_buffer1, mlt_buffer2);
-+        q->decouple(q, p, i, f1, f2, decode_buffer,
-+                    mlt_buffer_left, mlt_buffer_right);
-         idx = (1 << p->js_vlc_bits) - 1;
-     }
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0038-cook-Remove-senseless-maybe_reformat_buffer32-functi.patch b/debian/patches/post-9beta2/0038-cook-Remove-senseless-maybe_reformat_buffer32-functi.patch
deleted file mode 100644
index 3a72392..0000000
--- a/debian/patches/post-9beta2/0038-cook-Remove-senseless-maybe_reformat_buffer32-functi.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 8a61ba0e8194beffdfd9f843bdcf29dbbc974ca5 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 16:03:31 +0200
-Subject: [PATCH 038/278] cook: Remove senseless maybe_reformat_buffer32()
- function
-
----
- libavcodec/cook.c |    8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 05efa50..713d0b1 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -241,17 +241,11 @@ static av_cold int init_cook_mlt(COOKContext *q)
-     return 0;
- }
- 
--static const float *maybe_reformat_buffer32(COOKContext *q, const float *ptr, int n)
--{
--    if (1)
--        return ptr;
--}
--
- static av_cold void init_cplscales_table(COOKContext *q)
- {
-     int i;
-     for (i = 0; i < 5; i++)
--        q->cplscales[i] = maybe_reformat_buffer32(q, cplscales[i], (1 << (i + 2)) - 1);
-+        q->cplscales[i] = cplscales[i];
- }
- 
- /*************** init functions end ***********/
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0039-cook-Remove-some-silly-Doxygen-comments.patch b/debian/patches/post-9beta2/0039-cook-Remove-some-silly-Doxygen-comments.patch
deleted file mode 100644
index 0fc1dea..0000000
--- a/debian/patches/post-9beta2/0039-cook-Remove-some-silly-Doxygen-comments.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 707f58f515eeb282563af3c443cac10c2d3e81b4 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 19:00:33 +0200
-Subject: [PATCH 039/278] cook: Remove some silly Doxygen comments
-
----
- libavcodec/cook.c |   19 ++-----------------
- 1 file changed, 2 insertions(+), 17 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 713d0b1..a45bd80 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -84,11 +84,11 @@ typedef struct {
-     int                 bits_per_subpacket;
-     int                 bits_per_subpdiv;
-     int                 total_subbands;
--    int                 numvector_size;       ///< 1 << log2_numvector_size;
-+    int                 numvector_size;       // 1 << log2_numvector_size;
- 
-     float               mono_previous_buffer1[1024];
-     float               mono_previous_buffer2[1024];
--    /** gain buffers */
-+
-     cook_gains          gains1;
-     cook_gains          gains2;
-     int                 gain_1[9];
-@@ -299,9 +299,6 @@ static inline int decode_bytes(const uint8_t *inbuffer, uint8_t *out, int bytes)
-     return off;
- }
- 
--/**
-- * Cook uninit
-- */
- static av_cold int cook_decode_close(AVCodecContext *avctx)
- {
-     int i;
-@@ -631,12 +628,6 @@ static void decode_vectors(COOKContext *q, COOKSubpacket *p, int *category,
- }
- 
- 
--/**
-- * function for decoding mono data
-- *
-- * @param q                 pointer to the COOKContext
-- * @param mlt_buffer        pointer to mlt coefficients
-- */
- static int mono_decode(COOKContext *q, COOKSubpacket *p, float *mlt_buffer)
- {
-     int category_index[128] = { 0 };
-@@ -747,7 +738,6 @@ static void imlt_gain(COOKContext *q, float *inbuffer,
-  *
-  * @param q                 pointer to the COOKContext
-  * @param decouple_tab      decoupling array
-- *
-  */
- static void decouple_info(COOKContext *q, COOKSubpacket *p, int *decouple_tab)
- {
-@@ -954,11 +944,6 @@ static int decode_subpacket(COOKContext *q, COOKSubpacket *p,
- }
- 
- 
--/**
-- * Cook frame decoding
-- *
-- * @param avctx     pointer to the AVCodecContext
-- */
- static int cook_decode_frame(AVCodecContext *avctx, void *data,
-                              int *got_frame_ptr, AVPacket *avpkt)
- {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0040-ivi_common-Drop-unused-function-parameter-from-decod.patch b/debian/patches/post-9beta2/0040-ivi_common-Drop-unused-function-parameter-from-decod.patch
deleted file mode 100644
index 371a3ee..0000000
--- a/debian/patches/post-9beta2/0040-ivi_common-Drop-unused-function-parameter-from-decod.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 87cdd7c6949e0166a22b558e0657ac277c95d452 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 11:54:03 +0200
-Subject: [PATCH 040/278] ivi_common: Drop unused function parameter from
- decode_band()
-
----
- libavcodec/ivi_common.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
-index 149fffe..8566128 100644
---- a/libavcodec/ivi_common.c
-+++ b/libavcodec/ivi_common.c
-@@ -644,7 +644,7 @@ void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch)
-  *  @param[in]      avctx  ptr to the AVCodecContext
-  *  @return         result code: 0 = OK, -1 = error
-  */
--static int decode_band(IVI45DecContext *ctx, int plane_num,
-+static int decode_band(IVI45DecContext *ctx,
-                        IVIBandDesc *band, AVCodecContext *avctx)
- {
-     int         result, i, t, idx1, idx2, pos;
-@@ -775,7 +775,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-     if (ctx->is_nonnull_frame(ctx)) {
-         for (p = 0; p < 3; p++) {
-             for (b = 0; b < ctx->planes[p].num_bands; b++) {
--                result = decode_band(ctx, p, &ctx->planes[p].bands[b], avctx);
-+                result = decode_band(ctx, &ctx->planes[p].bands[b], avctx);
-                 if (result) {
-                     av_log(avctx, AV_LOG_ERROR,
-                            "Error while decoding band: %d, plane: %d\n", b, p);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0041-doc-git-howto-Clarify-comment-about-pushing-series-o.patch b/debian/patches/post-9beta2/0041-doc-git-howto-Clarify-comment-about-pushing-series-o.patch
deleted file mode 100644
index 840d939..0000000
--- a/debian/patches/post-9beta2/0041-doc-git-howto-Clarify-comment-about-pushing-series-o.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ca7f59119b8a53d60418c4adccb0c46922795f79 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Thu, 25 Oct 2012 18:25:25 +0200
-Subject: [PATCH 041/278] doc: git-howto: Clarify comment about pushing series
- of commits
-
----
- doc/git-howto.texi |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/doc/git-howto.texi b/doc/git-howto.texi
-index 5114115..68e0061 100644
---- a/doc/git-howto.texi
-+++ b/doc/git-howto.texi
-@@ -416,8 +416,8 @@ a panacea. Do not hesitate to perform any other tests necessary to convince
- yourself that the changes you are about to push actually work as expected.
- 
- Also note that every single commit should pass the test suite, not just
--the result of a series of patches. So if you have a series of related
--commits, run the test suite on every single commit.
-+the result of a series of patches. So if you have a series of commits
-+to push, run the test suite on every single commit.
- 
- Finally, after pushing, mark all patches as committed on
- @url{http://patches.libav.org/,patchwork}.
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0042-configure-fix-tests-for-2-arg-math-functions.patch b/debian/patches/post-9beta2/0042-configure-fix-tests-for-2-arg-math-functions.patch
deleted file mode 100644
index b277772..0000000
--- a/debian/patches/post-9beta2/0042-configure-fix-tests-for-2-arg-math-functions.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 1aa07aa21c4ee39f0ed5fcd33d8259eed74bd3ab Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 14:42:47 +0100
-Subject: [PATCH 042/278] configure: fix tests for 2-arg math functions
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/configure b/configure
-index bfa3a61..81f945f 100755
---- a/configure
-+++ b/configure
-@@ -785,11 +785,13 @@ EOF
- check_mathfunc(){
-     log check_mathfunc "$@"
-     func=$1
--    shift
-+    narg=$2
-+    shift 2
-+    test $narg = 2 && args="f, g" || args="f"
-     disable $func
-     check_ld "$@" <<EOF && enable $func
- #include <math.h>
--float foo(float f) { return $func(f); }
-+float foo(float f, float g) { return $func($args); }
- int main(void){ return 0; }
- EOF
- }
-@@ -3306,8 +3308,12 @@ done
- check_lib math.h sin -lm && LIBM="-lm"
- enabled vaapi && require vaapi va/va.h vaInitialize -lva
- 
-+atan2f_args=2
-+ldexpf_args=2
-+powf_args=2
-+
- for func in $MATH_FUNCS; do
--    check_mathfunc $func
-+    eval check_mathfunc $func \${${func}_args:-1}
- done
- 
- # these are off by default, so fail if requested and not available
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0043-buffersink-remove-stray-semicolon-after-function-def.patch b/debian/patches/post-9beta2/0043-buffersink-remove-stray-semicolon-after-function-def.patch
deleted file mode 100644
index 238023a..0000000
--- a/debian/patches/post-9beta2/0043-buffersink-remove-stray-semicolon-after-function-def.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 6b776c61da26428ca67abec919c8a186a276ca66 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 17:58:19 +0100
-Subject: [PATCH 043/278] buffersink: remove stray semicolon after function
- definition
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavfilter/buffersink.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
-index 73af25d..c68b909 100644
---- a/libavfilter/buffersink.c
-+++ b/libavfilter/buffersink.c
-@@ -57,7 +57,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *buf)
-     link->cur_buf = NULL;
- 
-     return 0;
--};
-+}
- 
- int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
- {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0044-af_channelmap-remove-stray-enum-declaration.patch b/debian/patches/post-9beta2/0044-af_channelmap-remove-stray-enum-declaration.patch
deleted file mode 100644
index 106f7ac..0000000
--- a/debian/patches/post-9beta2/0044-af_channelmap-remove-stray-enum-declaration.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 67a68dcec2271336c859d1fbd8f40c268f54ec8a Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 22:25:37 +0100
-Subject: [PATCH 044/278] af_channelmap: remove stray enum declaration
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavfilter/af_channelmap.c |    1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
-index 8c49d10..f70b481 100644
---- a/libavfilter/af_channelmap.c
-+++ b/libavfilter/af_channelmap.c
-@@ -124,7 +124,6 @@ static av_cold int channelmap_init(AVFilterContext *ctx, const char *args)
-     ChannelMapContext *s = ctx->priv;
-     int ret;
-     char *mapping;
--    enum mode;
-     int map_entries = 0;
-     char buf[256];
-     enum MappingMode mode;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0045-network-use-HAVE_THREADS-instead-of-local-hack.patch b/debian/patches/post-9beta2/0045-network-use-HAVE_THREADS-instead-of-local-hack.patch
deleted file mode 100644
index 551eb13..0000000
--- a/debian/patches/post-9beta2/0045-network-use-HAVE_THREADS-instead-of-local-hack.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 9efbfe57e082b0f42bf0c830a4fdc6b80d2b13ca Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 19:33:59 +0100
-Subject: [PATCH 045/278] network: use HAVE_THREADS instead of local hack
-
-HAVE_THREADS is set in config.h if pthreads or w32threads is
-available, which presumably the proper condition here.
-
-Also fixes undefined behaviour in preprocessor directives.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavformat/network.c |   14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/libavformat/network.c b/libavformat/network.c
-index 5b2b958..fe17bdf 100644
---- a/libavformat/network.c
-+++ b/libavformat/network.c
-@@ -22,9 +22,7 @@
- #include "libavcodec/internal.h"
- #include "libavutil/mem.h"
- 
--#define THREADS (HAVE_PTHREADS || (defined(WIN32) && !defined(__MINGW32CE__)))
--
--#if THREADS
-+#if HAVE_THREADS
- #if HAVE_PTHREADS
- #include <pthread.h>
- #else
-@@ -35,7 +33,7 @@
- #if CONFIG_OPENSSL
- #include <openssl/ssl.h>
- static int openssl_init;
--#if THREADS
-+#if HAVE_THREADS
- #include <openssl/crypto.h>
- #include "libavutil/avutil.h"
- pthread_mutex_t *openssl_mutexes;
-@@ -56,7 +54,7 @@ static unsigned long openssl_thread_id(void)
- #endif
- #if CONFIG_GNUTLS
- #include <gnutls/gnutls.h>
--#if THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00
-+#if HAVE_THREADS && GNUTLS_VERSION_NUMBER <= 0x020b00
- #include <gcrypt.h>
- #include <errno.h>
- #undef malloc
-@@ -72,7 +70,7 @@ void ff_tls_init(void)
-     if (!openssl_init) {
-         SSL_library_init();
-         SSL_load_error_strings();
--#if THREADS
-+#if HAVE_THREADS
-         if (!CRYPTO_get_locking_callback()) {
-             int i;
-             openssl_mutexes = av_malloc(sizeof(pthread_mutex_t) * CRYPTO_num_locks());
-@@ -88,7 +86,7 @@ void ff_tls_init(void)
-     openssl_init++;
- #endif
- #if CONFIG_GNUTLS
--#if THREADS && GNUTLS_VERSION_NUMBER < 0x020b00
-+#if HAVE_THREADS && GNUTLS_VERSION_NUMBER < 0x020b00
-     if (gcry_control(GCRYCTL_ANY_INITIALIZATION_P) == 0)
-         gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
- #endif
-@@ -103,7 +101,7 @@ void ff_tls_deinit(void)
- #if CONFIG_OPENSSL
-     openssl_init--;
-     if (!openssl_init) {
--#if THREADS
-+#if HAVE_THREADS
-         if (CRYPTO_get_locking_callback() == openssl_lock) {
-             int i;
-             CRYPTO_set_locking_callback(NULL);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0046-udp-use-socklen_t-where-appropriate.patch b/debian/patches/post-9beta2/0046-udp-use-socklen_t-where-appropriate.patch
deleted file mode 100644
index b0555e6..0000000
--- a/debian/patches/post-9beta2/0046-udp-use-socklen_t-where-appropriate.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From be2efe0c7b6a8188988d7de5da236d794312b5bb Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 19:46:37 +0100
-Subject: [PATCH 046/278] udp: use socklen_t where appropriate
-
-getsockname() takes a pointer to socklen_t which is not necessarily
-int.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavformat/udp.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/udp.c b/libavformat/udp.c
-index e848ecd..373a4c9 100644
---- a/libavformat/udp.c
-+++ b/libavformat/udp.c
-@@ -257,7 +257,7 @@ static int udp_set_url(struct sockaddr_storage *addr,
- }
- 
- static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr,
--                             int *addr_len, const char *localaddr)
-+                             socklen_t *addr_len, const char *localaddr)
- {
-     int udp_fd = -1;
-     struct addrinfo *res0 = NULL, *res = NULL;
-@@ -389,7 +389,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
-     const char *p;
-     char buf[256];
-     struct sockaddr_storage my_addr;
--    int len;
-+    socklen_t len;
-     int reuse_specified = 0;
-     int i, include = 0, num_sources = 0;
-     char *sources[32];
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0047-avserver-use-socklen_t-where-appropriate.patch b/debian/patches/post-9beta2/0047-avserver-use-socklen_t-where-appropriate.patch
deleted file mode 100644
index 23af001..0000000
--- a/debian/patches/post-9beta2/0047-avserver-use-socklen_t-where-appropriate.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From cc64ec570c92fe39db3f1db8c877a8cc70e3b668 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 21:53:31 +0100
-Subject: [PATCH 047/278] avserver: use socklen_t where appropriate
-
-Various socket functions expect a pointer to socklen_t which is not
-necessarily int.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- avserver.c |    9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/avserver.c b/avserver.c
-index 994edcd..f9d85d8 100644
---- a/avserver.c
-+++ b/avserver.c
-@@ -799,7 +799,8 @@ static void http_send_too_busy_reply(int fd)
- static void new_connection(int server_fd, int is_rtsp)
- {
-     struct sockaddr_in from_addr;
--    int fd, len;
-+    socklen_t len;
-+    int fd;
-     HTTPContext *c = NULL;
- 
-     len = sizeof(from_addr);
-@@ -1717,7 +1718,8 @@ static int http_parse_request(HTTPContext *c)
-                     case REDIR_SDP:
-                         {
-                             uint8_t *sdp_data;
--                            int sdp_data_size, len;
-+                            int sdp_data_size;
-+                            socklen_t len;
-                             struct sockaddr_in my_addr;
- 
-                             q += snprintf(q, c->buffer_size,
-@@ -2991,7 +2993,8 @@ static void rtsp_cmd_describe(HTTPContext *c, const char *url)
-     char path1[1024];
-     const char *path;
-     uint8_t *content;
--    int content_length, len;
-+    int content_length;
-+    socklen_t len;
-     struct sockaddr_in my_addr;
- 
-     /* find which url is asked */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0048-avio-fix-pointer-type-mismatches-in-avio_enum_protoc.patch b/debian/patches/post-9beta2/0048-avio-fix-pointer-type-mismatches-in-avio_enum_protoc.patch
deleted file mode 100644
index 40364fc..0000000
--- a/debian/patches/post-9beta2/0048-avio-fix-pointer-type-mismatches-in-avio_enum_protoc.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 18:42:29 +0100
-Subject: [PATCH 048/278] avio: fix pointer type mismatches in
- avio_enum_protocols()
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavformat/avio.c |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libavformat/avio.c b/libavformat/avio.c
-index 45ee866..a43b241 100644
---- a/libavformat/avio.c
-+++ b/libavformat/avio.c
-@@ -85,11 +85,11 @@ const AVClass ffurl_context_class = {
- 
- const char *avio_enum_protocols(void **opaque, int output)
- {
--    URLProtocol **p = opaque;
--    *p = ffurl_protocol_next(*p);
--    if (!*p) return NULL;
--    if ((output && (*p)->url_write) || (!output && (*p)->url_read))
--        return (*p)->name;
-+    URLProtocol *p;
-+    *opaque = ffurl_protocol_next(*opaque);
-+    if (!(p = *opaque)) return NULL;
-+    if ((output && p->url_write) || (!output && p->url_read))
-+        return p->name;
-     return avio_enum_protocols(opaque, output);
- }
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0049-amrwbdec-fix-invalid-pointer-arithmetic.patch b/debian/patches/post-9beta2/0049-amrwbdec-fix-invalid-pointer-arithmetic.patch
deleted file mode 100644
index 7dd7d96..0000000
--- a/debian/patches/post-9beta2/0049-amrwbdec-fix-invalid-pointer-arithmetic.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 50be207759aa7a69a27de585f7d870ec41eba036 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 22:44:38 +0100
-Subject: [PATCH 049/278] amrwbdec: fix invalid pointer arithmetic
-
-Subtracting a (positive) value from the address of an array violates
-C99 section 6.5.6:
-
-  If both the pointer operand and the result point to elements of the
-  same array object, or one past the last element of the array object,
-  the evaluation shall not produce an overflow; otherwise, the
-  behavior is undefined.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/amrwbdec.c |   21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
-diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
-index 5cc96ab..c9c793f 100644
---- a/libavcodec/amrwbdec.c
-+++ b/libavcodec/amrwbdec.c
-@@ -902,10 +902,9 @@ static float auto_correlation(float *diff_isf, float mean, int lag)
- static void extrapolate_isf(float isf[LP_ORDER_16k])
- {
-     float diff_isf[LP_ORDER - 2], diff_mean;
--    float *diff_hi = diff_isf - LP_ORDER + 1; // diff array for extrapolated indexes
-     float corr_lag[3];
-     float est, scale;
--    int i, i_max_corr;
-+    int i, j, i_max_corr;
- 
-     isf[LP_ORDER_16k - 1] = isf[LP_ORDER - 1];
- 
-@@ -936,20 +935,20 @@ static void extrapolate_isf(float isf[LP_ORDER_16k])
-     scale = 0.5 * (FFMIN(est, 7600) - isf[LP_ORDER - 2]) /
-             (isf[LP_ORDER_16k - 2] - isf[LP_ORDER - 2]);
- 
--    for (i = LP_ORDER - 1; i < LP_ORDER_16k - 1; i++)
--        diff_hi[i] = scale * (isf[i] - isf[i - 1]);
-+    for (i = LP_ORDER - 1, j = 0; i < LP_ORDER_16k - 1; i++, j++)
-+        diff_isf[j] = scale * (isf[i] - isf[i - 1]);
- 
-     /* Stability insurance */
--    for (i = LP_ORDER; i < LP_ORDER_16k - 1; i++)
--        if (diff_hi[i] + diff_hi[i - 1] < 5.0) {
--            if (diff_hi[i] > diff_hi[i - 1]) {
--                diff_hi[i - 1] = 5.0 - diff_hi[i];
-+    for (i = 1; i < LP_ORDER_16k - LP_ORDER; i++)
-+        if (diff_isf[i] + diff_isf[i - 1] < 5.0) {
-+            if (diff_isf[i] > diff_isf[i - 1]) {
-+                diff_isf[i - 1] = 5.0 - diff_isf[i];
-             } else
--                diff_hi[i] = 5.0 - diff_hi[i - 1];
-+                diff_isf[i] = 5.0 - diff_isf[i - 1];
-         }
- 
--    for (i = LP_ORDER - 1; i < LP_ORDER_16k - 1; i++)
--        isf[i] = isf[i - 1] + diff_hi[i] * (1.0f / (1 << 15));
-+    for (i = LP_ORDER - 1, j = 0; i < LP_ORDER_16k - 1; i++, j++)
-+        isf[i] = isf[i - 1] + diff_isf[j] * (1.0f / (1 << 15));
- 
-     /* Scale the ISF vector for 16000 Hz */
-     for (i = 0; i < LP_ORDER_16k - 1; i++)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0050-h264-fix-invalid-pointer-arithmetic.patch b/debian/patches/post-9beta2/0050-h264-fix-invalid-pointer-arithmetic.patch
deleted file mode 100644
index d93297a..0000000
--- a/debian/patches/post-9beta2/0050-h264-fix-invalid-pointer-arithmetic.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From c4cccc8d3f6605c5fdd73723a865486c5b7fb117 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 21:18:33 +0100
-Subject: [PATCH 050/278] h264: fix invalid pointer arithmetic
-
-Subtracting a (positive) value from the address of an array violates
-C99 section 6.5.6:
-
-  If both the pointer operand and the result point to elements of the
-  same array object, or one past the last element of the array object,
-  the evaluation shall not produce an overflow; otherwise, the
-  behavior is undefined.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/h264_cavlc.c |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
-index 8996057..8702122 100644
---- a/libavcodec/h264_cavlc.c
-+++ b/libavcodec/h264_cavlc.c
-@@ -566,13 +566,13 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
-     else{
-         if (max_coeff <= 8) {
-             if (max_coeff == 4)
--                zeros_left = get_vlc2(gb, (chroma_dc_total_zeros_vlc-1)[total_coeff].table,
-+                zeros_left = get_vlc2(gb, chroma_dc_total_zeros_vlc[total_coeff - 1].table,
-                                       CHROMA_DC_TOTAL_ZEROS_VLC_BITS, 1);
-             else
--                zeros_left = get_vlc2(gb, (chroma422_dc_total_zeros_vlc-1)[total_coeff].table,
-+                zeros_left = get_vlc2(gb, chroma422_dc_total_zeros_vlc[total_coeff - 1].table,
-                                       CHROMA422_DC_TOTAL_ZEROS_VLC_BITS, 1);
-         } else {
--            zeros_left= get_vlc2(gb, (total_zeros_vlc-1)[ total_coeff ].table, TOTAL_ZEROS_VLC_BITS, 1);
-+            zeros_left= get_vlc2(gb, total_zeros_vlc[total_coeff - 1].table, TOTAL_ZEROS_VLC_BITS, 1);
-         }
-     }
- 
-@@ -582,7 +582,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
-         ((type*)block)[*scantable] = level[0]; \
-         for(i=1;i<total_coeff && zeros_left > 0;i++) { \
-             if(zeros_left < 7) \
--                run_before= get_vlc2(gb, (run_vlc-1)[zeros_left].table, RUN_VLC_BITS, 1); \
-+                run_before= get_vlc2(gb, run_vlc[zeros_left - 1].table, RUN_VLC_BITS, 1); \
-             else \
-                 run_before= get_vlc2(gb, run7_vlc.table, RUN7_VLC_BITS, 2); \
-             zeros_left -= run_before; \
-@@ -597,7 +597,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
-         ((type*)block)[*scantable] = ((int)(level[0] * qmul[*scantable] + 32))>>6; \
-         for(i=1;i<total_coeff && zeros_left > 0;i++) { \
-             if(zeros_left < 7) \
--                run_before= get_vlc2(gb, (run_vlc-1)[zeros_left].table, RUN_VLC_BITS, 1); \
-+                run_before= get_vlc2(gb, run_vlc[zeros_left - 1].table, RUN_VLC_BITS, 1); \
-             else \
-                 run_before= get_vlc2(gb, run7_vlc.table, RUN7_VLC_BITS, 2); \
-             zeros_left -= run_before; \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0051-vp8-fix-memset-crossing-array-boundary.patch b/debian/patches/post-9beta2/0051-vp8-fix-memset-crossing-array-boundary.patch
deleted file mode 100644
index 49f1d4e..0000000
--- a/debian/patches/post-9beta2/0051-vp8-fix-memset-crossing-array-boundary.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4471a2420717d8dc10b573cca50292d0d598d925 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 21:43:55 +0100
-Subject: [PATCH 051/278] vp8: fix memset() crossing array boundary
-
-Indexing across array boundaries is not allowed by C99.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/vp8.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
-index 2766c9e..d9902c4 100644
---- a/libavcodec/vp8.c
-+++ b/libavcodec/vp8.c
-@@ -1964,7 +1964,8 @@ static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-     // top edge of 127 for intra prediction
-     if (!(avctx->flags & CODEC_FLAG_EMU_EDGE)) {
-         s->top_border[0][15] = s->top_border[0][23] = 127;
--        memset(s->top_border[1]-1, 127, s->mb_width*sizeof(*s->top_border)+1);
-+        s->top_border[0][31] = 127;
-+        memset(s->top_border[1], 127, s->mb_width*sizeof(*s->top_border));
-     }
-     memset(s->ref_count, 0, sizeof(s->ref_count));
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0052-configure-detect-sparc64-automatically.patch b/debian/patches/post-9beta2/0052-configure-detect-sparc64-automatically.patch
deleted file mode 100644
index 545644f..0000000
--- a/debian/patches/post-9beta2/0052-configure-detect-sparc64-automatically.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 4cd217c065e948a9cec38fef9c544d3c26ff8f37 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Wed, 24 Oct 2012 18:34:21 +0100
-Subject: [PATCH 052/278] configure: detect sparc64 automatically
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/configure b/configure
-index 81f945f..1a006be 100755
---- a/configure
-+++ b/configure
-@@ -2474,9 +2474,8 @@ case "$arch" in
-     sh4|sh)
-         arch="sh4"
-     ;;
--    sun4u|sparc64)
-+    sun4u|sparc*)
-         arch="sparc"
--        subarch="sparc64"
-     ;;
-     tilegx|tile-gx)
-         arch="tilegx"
-@@ -2671,7 +2670,7 @@ check_64bit(){
- }
- 
- case "$arch" in
--    alpha|ia64|sparc)
-+    alpha|ia64)
-         spic=$shared
-     ;;
-     mips)
-@@ -2685,6 +2684,10 @@ case "$arch" in
-     ppc)
-         check_64bit ppc ppc64 'sizeof(void *) > 4'
-     ;;
-+    sparc)
-+        check_64bit sparc sparc64 'sizeof(void *) > 4'
-+        spic=$shared
-+    ;;
-     x86)
-         check_64bit x86_32 x86_64 'sizeof(void *) > 4'
-         if test "$subarch" = "x86_64"; then
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0053-assdec-fix-qsort-callback-signature.patch b/debian/patches/post-9beta2/0053-assdec-fix-qsort-callback-signature.patch
deleted file mode 100644
index 60b293b..0000000
--- a/debian/patches/post-9beta2/0053-assdec-fix-qsort-callback-signature.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 4cbae57cef65df8705b77cf882372f835a42d842 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Fri, 26 Oct 2012 17:59:50 +0100
-Subject: [PATCH 053/278] assdec: fix qsort() callback signature
-
-This changes the event_cmp() function to the correct signature,
-avoiding an ugly cast.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavformat/assdec.c |    5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/assdec.c b/libavformat/assdec.c
-index 3d39845..0041ca4 100644
---- a/libavformat/assdec.c
-+++ b/libavformat/assdec.c
-@@ -68,8 +68,9 @@ static int64_t get_pts(const uint8_t *p)
-     return sec*100+hsec;
- }
- 
--static int event_cmp(uint8_t **a, uint8_t **b)
-+static int event_cmp(const void *_a, const void *_b)
- {
-+    const uint8_t *const *a = _a, *const *b = _b;
-     return get_pts(*a) - get_pts(*b);
- }
- 
-@@ -131,7 +132,7 @@ static int read_header(AVFormatContext *s)
-         p++;
-     }
- 
--    qsort(ass->event, ass->event_count, sizeof(*ass->event), (void*)event_cmp);
-+    qsort(ass->event, ass->event_count, sizeof(*ass->event), event_cmp);
- 
-     return 0;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0054-nutenc-K-R-formatting-cosmetics.patch b/debian/patches/post-9beta2/0054-nutenc-K-R-formatting-cosmetics.patch
deleted file mode 100644
index ffb1152..0000000
--- a/debian/patches/post-9beta2/0054-nutenc-K-R-formatting-cosmetics.patch
+++ /dev/null
@@ -1,1142 +0,0 @@
-From fce4450dec2f1287124a5c129281100f729f5771 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Sat, 27 Oct 2012 00:41:02 +0200
-Subject: [PATCH 054/278] nutenc: K&R formatting cosmetics
-
----
- libavformat/nutenc.c |  753 +++++++++++++++++++++++++++-----------------------
- 1 file changed, 412 insertions(+), 341 deletions(-)
-
-diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
-index 9985cd9..581a202 100644
---- a/libavformat/nutenc.c
-+++ b/libavformat/nutenc.c
-@@ -28,59 +28,68 @@
- #include "internal.h"
- #include "avio_internal.h"
- 
--static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint8_t out[64]){
--    int sample_rate= c->sample_rate;
-+static int find_expected_header(AVCodecContext *c, int size, int key_frame,
-+                                uint8_t out[64])
-+{
-+    int sample_rate = c->sample_rate;
- 
--    if(size>4096)
-+    if (size > 4096)
-         return 0;
- 
-     AV_WB24(out, 1);
- 
--    if(c->codec_id == AV_CODEC_ID_MPEG4){
--        if(key_frame){
-+    if (c->codec_id == AV_CODEC_ID_MPEG4) {
-+        if (key_frame) {
-             return 3;
--        }else{
--            out[3]= 0xB6;
-+        } else {
-+            out[3] = 0xB6;
-             return 4;
-         }
--    }else if(c->codec_id == AV_CODEC_ID_MPEG1VIDEO || c->codec_id == AV_CODEC_ID_MPEG2VIDEO){
-+    } else if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
-+               c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
-         return 3;
--    }else if(c->codec_id == AV_CODEC_ID_H264){
-+    } else if (c->codec_id == AV_CODEC_ID_H264) {
-         return 3;
--    }else if(c->codec_id == AV_CODEC_ID_MP3 || c->codec_id == AV_CODEC_ID_MP2){
-+    } else if (c->codec_id == AV_CODEC_ID_MP3 ||
-+               c->codec_id == AV_CODEC_ID_MP2) {
-         int lsf, mpeg25, sample_rate_index, bitrate_index, frame_size;
--        int layer= c->codec_id == AV_CODEC_ID_MP3 ? 3 : 2;
--        unsigned int header= 0xFFF00000;
-+        int layer           = c->codec_id == AV_CODEC_ID_MP3 ? 3 : 2;
-+        unsigned int header = 0xFFF00000;
- 
--        lsf     = sample_rate < (24000+32000)/2;
--        mpeg25  = sample_rate < (12000+16000)/2;
-+        lsf           = sample_rate < (24000 + 32000) / 2;
-+        mpeg25        = sample_rate < (12000 + 16000) / 2;
-         sample_rate <<= lsf + mpeg25;
--        if     (sample_rate < (32000 + 44100)/2) sample_rate_index=2;
--        else if(sample_rate < (44100 + 48000)/2) sample_rate_index=0;
--        else                                     sample_rate_index=1;
-+        if (sample_rate < (32000 + 44100) / 2)
-+            sample_rate_index = 2;
-+        else if (sample_rate < (44100 + 48000) / 2)
-+            sample_rate_index = 0;
-+        else
-+            sample_rate_index = 1;
- 
--        sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25);
-+        sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25);
- 
--        for(bitrate_index=2; bitrate_index<30; bitrate_index++){
--            frame_size = avpriv_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1];
--            frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1);
-+        for (bitrate_index = 2; bitrate_index < 30; bitrate_index++) {
-+            frame_size =
-+                avpriv_mpa_bitrate_tab[lsf][layer - 1][bitrate_index >> 1];
-+            frame_size = (frame_size * 144000) / (sample_rate << lsf) +
-+                (bitrate_index & 1);
- 
--            if(frame_size == size)
-+            if (frame_size == size)
-                 break;
-         }
- 
--        header |= (!lsf)<<19;
--        header |= (4-layer)<<17;
--        header |= 1<<16; //no crc
-+        header |= (!lsf) << 19;
-+        header |= (4 - layer) << 17;
-+        header |= 1 << 16; //no crc
-         AV_WB32(out, header);
--        if(size <= 0)
--            return 2; //we guess there is no crc, if there is one the user clearly does not care about overhead
--        if(bitrate_index == 30)
--            return -1; //something is wrong ...
-+        if (size <= 0)
-+            return 2;  //we guess there is no crc, if there is one the user clearly does not care about overhead
-+        if (bitrate_index == 30)
-+            return -1;  //something is wrong ...
- 
--        header |= (bitrate_index>>1)<<12;
--        header |= sample_rate_index<<10;
--        header |= (bitrate_index&1)<<9;
-+        header |= (bitrate_index >> 1) << 12;
-+        header |= sample_rate_index << 10;
-+        header |= (bitrate_index & 1) << 9;
- 
-         return 2; //FIXME actually put the needed ones in build_elision_headers()
-         return 3; //we guess that the private bit is not set
-@@ -89,173 +98,178 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint
-     return 0;
- }
- 
--static int find_header_idx(AVFormatContext *s, AVCodecContext *c, int size, int frame_type){
-+static int find_header_idx(AVFormatContext *s, AVCodecContext *c, int size,
-+                           int frame_type)
-+{
-     NUTContext *nut = s->priv_data;
-     uint8_t out[64];
-     int i;
--    int len= find_expected_header(c, size, frame_type, out);
-+    int len = find_expected_header(c, size, frame_type, out);
- 
--    for(i=1; i<nut->header_count; i++){
--        if(   len == nut->header_len[i]
--           && !memcmp(out, nut->header[i], len)){
-+    for (i = 1; i < nut->header_count; i++) {
-+        if (len == nut->header_len[i] && !memcmp(out, nut->header[i], len)) {
-             return i;
-         }
-     }
-+
-     return 0;
- }
- 
--static void build_elision_headers(AVFormatContext *s){
-+static void build_elision_headers(AVFormatContext *s)
-+{
-     NUTContext *nut = s->priv_data;
-     int i;
-     //FIXME this is lame
-     //FIXME write a 2pass mode to find the maximal headers
--    static const uint8_t headers[][5]={
--        {3, 0x00, 0x00, 0x01},
--        {4, 0x00, 0x00, 0x01, 0xB6},
--        {2, 0xFF, 0xFA}, //mp3+crc
--        {2, 0xFF, 0xFB}, //mp3
--        {2, 0xFF, 0xFC}, //mp2+crc
--        {2, 0xFF, 0xFD}, //mp2
-+    static const uint8_t headers[][5] = {
-+        { 3, 0x00, 0x00, 0x01 },
-+        { 4, 0x00, 0x00, 0x01, 0xB6},
-+        { 2, 0xFF, 0xFA }, //mp3+crc
-+        { 2, 0xFF, 0xFB }, //mp3
-+        { 2, 0xFF, 0xFC }, //mp2+crc
-+        { 2, 0xFF, 0xFD }, //mp2
-     };
- 
--    nut->header_count= 7;
--    for(i=1; i<nut->header_count; i++){
--        nut->header_len[i]=  headers[i-1][0];
--        nut->header    [i]= &headers[i-1][1];
-+    nut->header_count = 7;
-+    for (i = 1; i < nut->header_count; i++) {
-+        nut->header_len[i] = headers[i - 1][0];
-+        nut->header[i]     = &headers[i - 1][1];
-     }
- }
- 
--static void build_frame_code(AVFormatContext *s){
-+static void build_frame_code(AVFormatContext *s)
-+{
-     NUTContext *nut = s->priv_data;
-     int key_frame, index, pred, stream_id;
--    int start=1;
--    int end= 254;
--    int keyframe_0_esc= s->nb_streams > 2;
-+    int start = 1;
-+    int end   = 254;
-+    int keyframe_0_esc = s->nb_streams > 2;
-     int pred_table[10];
-     FrameCode *ft;
- 
--    ft= &nut->frame_code[start];
--    ft->flags= FLAG_CODED;
--    ft->size_mul=1;
--    ft->pts_delta=1;
-+    ft            = &nut->frame_code[start];
-+    ft->flags     = FLAG_CODED;
-+    ft->size_mul  = 1;
-+    ft->pts_delta = 1;
-     start++;
- 
--    if(keyframe_0_esc){
-+    if (keyframe_0_esc) {
-         /* keyframe = 0 escape */
--        FrameCode *ft= &nut->frame_code[start];
--        ft->flags= FLAG_STREAM_ID | FLAG_SIZE_MSB | FLAG_CODED_PTS;
--        ft->size_mul=1;
-+        FrameCode *ft = &nut->frame_code[start];
-+        ft->flags    = FLAG_STREAM_ID | FLAG_SIZE_MSB | FLAG_CODED_PTS;
-+        ft->size_mul = 1;
-         start++;
-     }
- 
--    for(stream_id= 0; stream_id<s->nb_streams; stream_id++){
--        int start2= start + (end-start)*stream_id / s->nb_streams;
--        int end2  = start + (end-start)*(stream_id+1) / s->nb_streams;
-+    for (stream_id = 0; stream_id < s->nb_streams; stream_id++) {
-+        int start2 = start + (end - start) * stream_id       / s->nb_streams;
-+        int end2   = start + (end - start) * (stream_id + 1) / s->nb_streams;
-         AVCodecContext *codec = s->streams[stream_id]->codec;
--        int is_audio= codec->codec_type == AVMEDIA_TYPE_AUDIO;
--        int intra_only= /*codec->intra_only || */is_audio;
-+        int is_audio          = codec->codec_type == AVMEDIA_TYPE_AUDIO;
-+        int intra_only        = /*codec->intra_only || */ is_audio;
-         int pred_count;
- 
--        for(key_frame=0; key_frame<2; key_frame++){
--            if(intra_only && keyframe_0_esc && key_frame==0)
--                continue;
--
--            {
--                FrameCode *ft= &nut->frame_code[start2];
--                ft->flags= FLAG_KEY*key_frame;
--                ft->flags|= FLAG_SIZE_MSB | FLAG_CODED_PTS;
--                ft->stream_id= stream_id;
--                ft->size_mul=1;
--                if(is_audio)
--                    ft->header_idx= find_header_idx(s, codec, -1, key_frame);
-+        for (key_frame = 0; key_frame < 2; key_frame++) {
-+            if (!intra_only || !keyframe_0_esc || key_frame != 0) {
-+                FrameCode *ft = &nut->frame_code[start2];
-+                ft->flags     = FLAG_KEY * key_frame;
-+                ft->flags    |= FLAG_SIZE_MSB | FLAG_CODED_PTS;
-+                ft->stream_id = stream_id;
-+                ft->size_mul  = 1;
-+                if (is_audio)
-+                    ft->header_idx = find_header_idx(s, codec, -1, key_frame);
-                 start2++;
-             }
-         }
- 
--        key_frame= intra_only;
--        if(is_audio){
--            int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate);
-+        key_frame = intra_only;
-+        if (is_audio) {
-+            int frame_bytes = codec->frame_size * (int64_t)codec->bit_rate /
-+                              (8 * codec->sample_rate);
-             int pts;
--            for(pts=0; pts<2; pts++){
--                for(pred=0; pred<2; pred++){
--                    FrameCode *ft= &nut->frame_code[start2];
--                    ft->flags= FLAG_KEY*key_frame;
--                    ft->stream_id= stream_id;
--                    ft->size_mul=frame_bytes + 2;
--                    ft->size_lsb=frame_bytes + pred;
--                    ft->pts_delta=pts;
--                    ft->header_idx= find_header_idx(s, codec, frame_bytes + pred, key_frame);
-+            for (pts = 0; pts < 2; pts++)
-+                for (pred = 0; pred < 2; pred++) {
-+                    FrameCode *ft = &nut->frame_code[start2];
-+                    ft->flags      = FLAG_KEY * key_frame;
-+                    ft->stream_id  = stream_id;
-+                    ft->size_mul   = frame_bytes + 2;
-+                    ft->size_lsb   = frame_bytes + pred;
-+                    ft->pts_delta  = pts;
-+                    ft->header_idx = find_header_idx(s, codec, frame_bytes + pred, key_frame);
-                     start2++;
-                 }
--            }
--        }else{
--            FrameCode *ft= &nut->frame_code[start2];
--            ft->flags= FLAG_KEY | FLAG_SIZE_MSB;
--            ft->stream_id= stream_id;
--            ft->size_mul=1;
--            ft->pts_delta=1;
-+        } else {
-+            FrameCode *ft = &nut->frame_code[start2];
-+            ft->flags     = FLAG_KEY | FLAG_SIZE_MSB;
-+            ft->stream_id = stream_id;
-+            ft->size_mul  = 1;
-+            ft->pts_delta = 1;
-             start2++;
-         }
- 
--        if(codec->has_b_frames){
--            pred_count=5;
--            pred_table[0]=-2;
--            pred_table[1]=-1;
--            pred_table[2]=1;
--            pred_table[3]=3;
--            pred_table[4]=4;
--        }else if(codec->codec_id == AV_CODEC_ID_VORBIS){
--            pred_count=3;
--            pred_table[0]=2;
--            pred_table[1]=9;
--            pred_table[2]=16;
--        }else{
--            pred_count=1;
--            pred_table[0]=1;
-+        if (codec->has_b_frames) {
-+            pred_count    = 5;
-+            pred_table[0] = -2;
-+            pred_table[1] = -1;
-+            pred_table[2] = 1;
-+            pred_table[3] = 3;
-+            pred_table[4] = 4;
-+        } else if (codec->codec_id == AV_CODEC_ID_VORBIS) {
-+            pred_count    = 3;
-+            pred_table[0] = 2;
-+            pred_table[1] = 9;
-+            pred_table[2] = 16;
-+        } else {
-+            pred_count    = 1;
-+            pred_table[0] = 1;
-         }
- 
--        for(pred=0; pred<pred_count; pred++){
--            int start3= start2 + (end2-start2)*pred / pred_count;
--            int end3  = start2 + (end2-start2)*(pred+1) / pred_count;
-+        for (pred = 0; pred < pred_count; pred++) {
-+            int start3 = start2 + (end2 - start2) * pred / pred_count;
-+            int end3   = start2 + (end2 - start2) * (pred + 1) / pred_count;
- 
--            for(index=start3; index<end3; index++){
--                FrameCode *ft= &nut->frame_code[index];
--                ft->flags= FLAG_KEY*key_frame;
--                ft->flags|= FLAG_SIZE_MSB;
--                ft->stream_id= stream_id;
-+            for (index = start3; index < end3; index++) {
-+                FrameCode *ft = &nut->frame_code[index];
-+                ft->flags     = FLAG_KEY * key_frame;
-+                ft->flags    |= FLAG_SIZE_MSB;
-+                ft->stream_id = stream_id;
- //FIXME use single byte size and pred from last
--                ft->size_mul= end3-start3;
--                ft->size_lsb= index - start3;
--                ft->pts_delta= pred_table[pred];
--                if(is_audio)
--                    ft->header_idx= find_header_idx(s, codec, -1, key_frame);
-+                ft->size_mul  = end3 - start3;
-+                ft->size_lsb  = index - start3;
-+                ft->pts_delta = pred_table[pred];
-+                if (is_audio)
-+                    ft->header_idx = find_header_idx(s, codec, -1, key_frame);
-             }
-         }
-     }
--    memmove(&nut->frame_code['N'+1], &nut->frame_code['N'], sizeof(FrameCode)*(255-'N'));
--    nut->frame_code[  0].flags=
--    nut->frame_code[255].flags=
--    nut->frame_code['N'].flags= FLAG_INVALID;
-+    memmove(&nut->frame_code['N' + 1], &nut->frame_code['N'],
-+            sizeof(FrameCode) * (255 - 'N'));
-+    nut->frame_code[0].flags       =
-+        nut->frame_code[255].flags =
-+        nut->frame_code['N'].flags = FLAG_INVALID;
- }
- 
--static void put_tt(NUTContext *nut, AVRational *time_base, AVIOContext *bc, uint64_t val){
-+static void put_tt(NUTContext *nut, AVRational *time_base, AVIOContext *bc,
-+                   uint64_t val)
-+{
-     val *= nut->time_base_count;
-     val += time_base - nut->time_base;
-     ff_put_v(bc, val);
- }
--
- /**
-  * Store a string as vb.
-  */
--static void put_str(AVIOContext *bc, const char *string){
--    int len= strlen(string);
-+static void put_str(AVIOContext *bc, const char *string)
-+{
-+    int len = strlen(string);
- 
-     ff_put_v(bc, len);
-     avio_write(bc, string, len);
- }
- 
--static void put_s(AVIOContext *bc, int64_t val){
--    ff_put_v(bc, 2*FFABS(val) - (val>0));
-+static void put_s(AVIOContext *bc, int64_t val)
-+{
-+    ff_put_v(bc, 2 * FFABS(val) - (val > 0));
- }
- 
- #ifdef TRACE
-@@ -279,29 +293,33 @@ static inline void put_s_trace(AVIOContext *bc, int64_t v, const char *file,
- #endif
- 
- //FIXME remove calculate_checksum
--static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, int calculate_checksum, uint64_t startcode){
--    uint8_t *dyn_buf=NULL;
--    int dyn_size= avio_close_dyn_buf(dyn_bc, &dyn_buf);
--    int forw_ptr= dyn_size + 4*calculate_checksum;
-+static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc,
-+                       int calculate_checksum, uint64_t startcode)
-+{
-+    uint8_t *dyn_buf = NULL;
-+    int dyn_size     = avio_close_dyn_buf(dyn_bc, &dyn_buf);
-+    int forw_ptr     = dyn_size + 4 * calculate_checksum;
- 
--    if(forw_ptr > 4096)
-+    if (forw_ptr > 4096)
-         ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
-     avio_wb64(bc, startcode);
-     ff_put_v(bc, forw_ptr);
--    if(forw_ptr > 4096)
-+    if (forw_ptr > 4096)
-         avio_wl32(bc, ffio_get_checksum(bc));
- 
--    if(calculate_checksum)
-+    if (calculate_checksum)
-         ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
-     avio_write(bc, dyn_buf, dyn_size);
--    if(calculate_checksum)
-+    if (calculate_checksum)
-         avio_wl32(bc, ffio_get_checksum(bc));
- 
-     av_free(dyn_buf);
- }
- 
--static void write_mainheader(NUTContext *nut, AVIOContext *bc){
--    int i, j, tmp_pts, tmp_flags, tmp_stream, tmp_mul, tmp_size, tmp_fields, tmp_head_idx;
-+static void write_mainheader(NUTContext *nut, AVIOContext *bc)
-+{
-+    int i, j, tmp_pts, tmp_flags, tmp_stream, tmp_mul, tmp_size, tmp_fields,
-+        tmp_head_idx;
-     int64_t tmp_match;
- 
-     ff_put_v(bc, 3); /* version */
-@@ -309,79 +327,104 @@ static void write_mainheader(NUTContext *nut, AVIOContext *bc){
-     ff_put_v(bc, nut->max_distance);
-     ff_put_v(bc, nut->time_base_count);
- 
--    for(i=0; i<nut->time_base_count; i++){
-+    for (i = 0; i < nut->time_base_count; i++) {
-         ff_put_v(bc, nut->time_base[i].num);
-         ff_put_v(bc, nut->time_base[i].den);
-     }
- 
--    tmp_pts=0;
--    tmp_mul=1;
--    tmp_stream=0;
--    tmp_match= 1-(1LL<<62);
--    tmp_head_idx= 0;
--    for(i=0; i<256;){
--        tmp_fields=0;
--        tmp_size=0;
-+    tmp_pts      = 0;
-+    tmp_mul      = 1;
-+    tmp_stream   = 0;
-+    tmp_match    = 1 - (1LL << 62);
-+    tmp_head_idx = 0;
-+    for (i = 0; i < 256; ) {
-+        tmp_fields = 0;
-+        tmp_size   = 0;
- //        tmp_res=0;
--        if(tmp_pts    != nut->frame_code[i].pts_delta) tmp_fields=1;
--        if(tmp_mul    != nut->frame_code[i].size_mul ) tmp_fields=2;
--        if(tmp_stream != nut->frame_code[i].stream_id) tmp_fields=3;
--        if(tmp_size   != nut->frame_code[i].size_lsb ) tmp_fields=4;
-+        if (tmp_pts != nut->frame_code[i].pts_delta)
-+            tmp_fields = 1;
-+        if (tmp_mul != nut->frame_code[i].size_mul)
-+            tmp_fields = 2;
-+        if (tmp_stream != nut->frame_code[i].stream_id)
-+            tmp_fields = 3;
-+        if (tmp_size != nut->frame_code[i].size_lsb)
-+            tmp_fields = 4;
- //        if(tmp_res    != nut->frame_code[i].res            ) tmp_fields=5;
--        if(tmp_head_idx!=nut->frame_code[i].header_idx)tmp_fields=8;
--
--        tmp_pts   = nut->frame_code[i].pts_delta;
--        tmp_flags = nut->frame_code[i].flags;
--        tmp_stream= nut->frame_code[i].stream_id;
--        tmp_mul   = nut->frame_code[i].size_mul;
--        tmp_size  = nut->frame_code[i].size_lsb;
-+        if (tmp_head_idx != nut->frame_code[i].header_idx)
-+            tmp_fields = 8;
-+
-+        tmp_pts    = nut->frame_code[i].pts_delta;
-+        tmp_flags  = nut->frame_code[i].flags;
-+        tmp_stream = nut->frame_code[i].stream_id;
-+        tmp_mul    = nut->frame_code[i].size_mul;
-+        tmp_size   = nut->frame_code[i].size_lsb;
- //        tmp_res   = nut->frame_code[i].res;
--        tmp_head_idx= nut->frame_code[i].header_idx;
-+        tmp_head_idx = nut->frame_code[i].header_idx;
- 
--        for(j=0; i<256; j++,i++){
--            if(i == 'N'){
-+        for (j = 0; i < 256; j++, i++) {
-+            if (i == 'N') {
-                 j--;
-                 continue;
-             }
--            if(nut->frame_code[i].pts_delta != tmp_pts   ) break;
--            if(nut->frame_code[i].flags     != tmp_flags ) break;
--            if(nut->frame_code[i].stream_id != tmp_stream) break;
--            if(nut->frame_code[i].size_mul  != tmp_mul   ) break;
--            if(nut->frame_code[i].size_lsb  != tmp_size+j) break;
--//            if(nut->frame_code[i].res       != tmp_res   ) break;
--            if(nut->frame_code[i].header_idx!= tmp_head_idx) break;
-+            if (nut->frame_code[i].pts_delta  != tmp_pts      ||
-+                nut->frame_code[i].flags      != tmp_flags    ||
-+                nut->frame_code[i].stream_id  != tmp_stream   ||
-+                nut->frame_code[i].size_mul   != tmp_mul      ||
-+                nut->frame_code[i].size_lsb   != tmp_size + j ||
-+//              nut->frame_code[i].res        != tmp_res      ||
-+                nut->frame_code[i].header_idx != tmp_head_idx)
-+                break;
-         }
--        if(j != tmp_mul - tmp_size) tmp_fields=6;
-+        if (j != tmp_mul - tmp_size)
-+            tmp_fields = 6;
- 
-         ff_put_v(bc, tmp_flags);
-         ff_put_v(bc, tmp_fields);
--        if(tmp_fields>0) put_s(bc, tmp_pts);
--        if(tmp_fields>1) ff_put_v(bc, tmp_mul);
--        if(tmp_fields>2) ff_put_v(bc, tmp_stream);
--        if(tmp_fields>3) ff_put_v(bc, tmp_size);
--        if(tmp_fields>4) ff_put_v(bc, 0 /*tmp_res*/);
--        if(tmp_fields>5) ff_put_v(bc, j);
--        if(tmp_fields>6) ff_put_v(bc, tmp_match);
--        if(tmp_fields>7) ff_put_v(bc, tmp_head_idx);
-+        if (tmp_fields > 0)
-+            put_s(bc, tmp_pts);
-+        if (tmp_fields > 1)
-+            ff_put_v(bc, tmp_mul);
-+        if (tmp_fields > 2)
-+            ff_put_v(bc, tmp_stream);
-+        if (tmp_fields > 3)
-+            ff_put_v(bc, tmp_size);
-+        if (tmp_fields > 4)
-+            ff_put_v(bc, 0 /*tmp_res*/);
-+        if (tmp_fields > 5)
-+            ff_put_v(bc, j);
-+        if (tmp_fields > 6)
-+            ff_put_v(bc, tmp_match);
-+        if (tmp_fields > 7)
-+            ff_put_v(bc, tmp_head_idx);
-     }
--    ff_put_v(bc, nut->header_count-1);
--    for(i=1; i<nut->header_count; i++){
-+    ff_put_v(bc, nut->header_count - 1);
-+    for (i = 1; i < nut->header_count; i++) {
-         ff_put_v(bc, nut->header_len[i]);
-         avio_write(bc, nut->header[i], nut->header_len[i]);
-     }
- }
- 
--static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i){
--    NUTContext *nut = avctx->priv_data;
-+static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc,
-+                              AVStream *st, int i)
-+{
-+    NUTContext *nut       = avctx->priv_data;
-     AVCodecContext *codec = st->codec;
--    unsigned codec_tag = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);
-+    unsigned codec_tag    = av_codec_get_tag(ff_nut_codec_tags, codec->codec_id);
- 
-     ff_put_v(bc, i);
--    switch(codec->codec_type){
--    case AVMEDIA_TYPE_VIDEO: ff_put_v(bc, 0); break;
--    case AVMEDIA_TYPE_AUDIO: ff_put_v(bc, 1); break;
--    case AVMEDIA_TYPE_SUBTITLE: ff_put_v(bc, 2); break;
--    default              : ff_put_v(bc, 3); break;
-+    switch (codec->codec_type) {
-+    case AVMEDIA_TYPE_VIDEO:
-+        ff_put_v(bc, 0);
-+        break;
-+    case AVMEDIA_TYPE_AUDIO:
-+        ff_put_v(bc, 1);
-+        break;
-+    case AVMEDIA_TYPE_SUBTITLE:
-+        ff_put_v(bc, 2);
-+        break;
-+    default:
-+        ff_put_v(bc, 3);
-+        break;
-     }
-     ff_put_v(bc, 4);
- 
-@@ -404,7 +447,7 @@ static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream
-     ff_put_v(bc, codec->extradata_size);
-     avio_write(bc, codec->extradata, codec->extradata_size);
- 
--    switch(codec->codec_type){
-+    switch (codec->codec_type) {
-     case AVMEDIA_TYPE_AUDIO:
-         ff_put_v(bc, codec->sample_rate);
-         ff_put_v(bc, 1);
-@@ -414,10 +457,11 @@ static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream
-         ff_put_v(bc, codec->width);
-         ff_put_v(bc, codec->height);
- 
--        if(st->sample_aspect_ratio.num<=0 || st->sample_aspect_ratio.den<=0){
-+        if (st->sample_aspect_ratio.num <= 0 ||
-+            st->sample_aspect_ratio.den <= 0) {
-             ff_put_v(bc, 0);
-             ff_put_v(bc, 0);
--        }else{
-+        } else {
-             ff_put_v(bc, st->sample_aspect_ratio.num);
-             ff_put_v(bc, st->sample_aspect_ratio.den);
-         }
-@@ -429,21 +473,23 @@ static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream
-     return 0;
- }
- 
--static int add_info(AVIOContext *bc, const char *type, const char *value){
-+static int add_info(AVIOContext *bc, const char *type, const char *value)
-+{
-     put_str(bc, type);
-     put_s(bc, -1);
-     put_str(bc, value);
-     return 1;
- }
- 
--static int write_globalinfo(NUTContext *nut, AVIOContext *bc){
--    AVFormatContext *s= nut->avf;
-+static int write_globalinfo(NUTContext *nut, AVIOContext *bc)
-+{
-+    AVFormatContext *s   = nut->avf;
-     AVDictionaryEntry *t = NULL;
-     AVIOContext *dyn_bc;
--    uint8_t *dyn_buf=NULL;
--    int count=0, dyn_size;
--    int ret = avio_open_dyn_buf(&dyn_bc);
--    if(ret < 0)
-+    uint8_t *dyn_buf = NULL;
-+    int count        = 0, dyn_size;
-+    int ret          = avio_open_dyn_buf(&dyn_bc);
-+    if (ret < 0)
-         return ret;
- 
-     while ((t = av_dict_get(s->metadata, "", t, AV_DICT_IGNORE_SUFFIX)))
-@@ -456,7 +502,7 @@ static int write_globalinfo(NUTContext *nut, AVIOContext *bc){
- 
-     ff_put_v(bc, count);
- 
--    dyn_size= avio_close_dyn_buf(dyn_bc, &dyn_buf);
-+    dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf);
-     avio_write(bc, dyn_buf, dyn_size);
-     av_free(dyn_buf);
-     return 0;
-@@ -496,9 +542,9 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){
- static int write_chapter(NUTContext *nut, AVIOContext *bc, int id)
- {
-     AVIOContext *dyn_bc;
--    uint8_t *dyn_buf = NULL;
-+    uint8_t *dyn_buf     = NULL;
-     AVDictionaryEntry *t = NULL;
--    AVChapter *ch    = nut->avf->chapters[id];
-+    AVChapter *ch        = nut->avf->chapters[id];
-     int ret, dyn_size, count = 0;
- 
-     ret = avio_open_dyn_buf(&dyn_bc);
-@@ -521,7 +567,8 @@ static int write_chapter(NUTContext *nut, AVIOContext *bc, int id)
-     return 0;
- }
- 
--static int write_headers(AVFormatContext *avctx, AVIOContext *bc){
-+static int write_headers(AVFormatContext *avctx, AVIOContext *bc)
-+{
-     NUTContext *nut = avctx->priv_data;
-     AVIOContext *dyn_bc;
-     int i, ret;
-@@ -529,29 +576,30 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){
-     ff_metadata_conv_ctx(avctx, ff_nut_metadata_conv, NULL);
- 
-     ret = avio_open_dyn_buf(&dyn_bc);
--    if(ret < 0)
-+    if (ret < 0)
-         return ret;
-     write_mainheader(nut, dyn_bc);
-     put_packet(nut, bc, dyn_bc, 1, MAIN_STARTCODE);
- 
--    for (i=0; i < nut->avf->nb_streams; i++){
-+    for (i = 0; i < nut->avf->nb_streams; i++) {
-         ret = avio_open_dyn_buf(&dyn_bc);
--        if(ret < 0)
-+        if (ret < 0)
-             return ret;
--        if ((ret = write_streamheader(avctx, dyn_bc, nut->avf->streams[i], i)) < 0)
-+        ret = write_streamheader(avctx, dyn_bc, nut->avf->streams[i], i);
-+        if (ret < 0)
-             return ret;
-         put_packet(nut, bc, dyn_bc, 1, STREAM_STARTCODE);
-     }
- 
-     ret = avio_open_dyn_buf(&dyn_bc);
--    if(ret < 0)
-+    if (ret < 0)
-         return ret;
-     write_globalinfo(nut, dyn_bc);
-     put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE);
- 
-     for (i = 0; i < nut->avf->nb_streams; i++) {
-         ret = avio_open_dyn_buf(&dyn_bc);
--        if(ret < 0)
-+        if (ret < 0)
-             return ret;
-         ret = write_streaminfo(nut, dyn_bc, i);
-         if (ret < 0)
-@@ -559,7 +607,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){
-         if (ret > 0)
-             put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE);
-         else {
--            uint8_t* buf;
-+            uint8_t *buf;
-             avio_close_dyn_buf(dyn_bc, &buf);
-             av_free(buf);
-         }
-@@ -579,22 +627,23 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){
-         put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE);
-     }
- 
--    nut->last_syncpoint_pos= INT_MIN;
-+    nut->last_syncpoint_pos = INT_MIN;
-     nut->header_count++;
-     return 0;
- }
- 
--static int nut_write_header(AVFormatContext *s){
-+static int nut_write_header(AVFormatContext *s)
-+{
-     NUTContext *nut = s->priv_data;
-     AVIOContext *bc = s->pb;
-     int i, j, ret;
- 
--    nut->avf= s;
-+    nut->avf = s;
- 
--    nut->stream   = av_mallocz(sizeof(StreamContext)*s->nb_streams);
-+    nut->stream = av_mallocz(sizeof(StreamContext) * s->nb_streams);
-     if (s->nb_chapters)
--        nut->chapter  = av_mallocz(sizeof(ChapterContext)*s->nb_chapters);
--    nut->time_base= av_mallocz(sizeof(AVRational   )*(s->nb_streams +
-+        nut->chapter = av_mallocz(sizeof(ChapterContext) * s->nb_chapters);
-+    nut->time_base = av_mallocz(sizeof(AVRational) * (s->nb_streams +
-                                                       s->nb_chapters));
-     if (!nut->stream || (s->nb_chapters && !nut->chapter) || !nut->time_base) {
-         av_freep(&nut->stream);
-@@ -603,42 +652,42 @@ static int nut_write_header(AVFormatContext *s){
-         return AVERROR(ENOMEM);
-     }
- 
--    for(i=0; i<s->nb_streams; i++){
--        AVStream *st= s->streams[i];
-+    for (i = 0; i < s->nb_streams; i++) {
-+        AVStream *st = s->streams[i];
-         int ssize;
-         AVRational time_base;
--        ff_parse_specific_params(st->codec, &time_base.den, &ssize, &time_base.num);
-+        ff_parse_specific_params(st->codec, &time_base.den, &ssize,
-+                                 &time_base.num);
- 
-         avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
- 
--        for(j=0; j<nut->time_base_count; j++){
--            if(!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))){
-+        for (j = 0; j < nut->time_base_count; j++)
-+            if (!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))) {
-                 break;
-             }
--        }
--        nut->time_base[j]= time_base;
--        nut->stream[i].time_base= &nut->time_base[j];
--        if(j==nut->time_base_count)
-+        nut->time_base[j]        = time_base;
-+        nut->stream[i].time_base = &nut->time_base[j];
-+        if (j == nut->time_base_count)
-             nut->time_base_count++;
- 
--        if(INT64_C(1000) * time_base.num >= time_base.den)
-+        if (INT64_C(1000) * time_base.num >= time_base.den)
-             nut->stream[i].msb_pts_shift = 7;
-         else
-             nut->stream[i].msb_pts_shift = 14;
--        nut->stream[i].max_pts_distance= FFMAX(time_base.den, time_base.num) / time_base.num;
-+        nut->stream[i].max_pts_distance =
-+            FFMAX(time_base.den, time_base.num) / time_base.num;
-     }
- 
-     for (i = 0; i < s->nb_chapters; i++) {
-         AVChapter *ch = s->chapters[i];
- 
--        for (j = 0; j < nut->time_base_count; j++) {
-+        for (j = 0; j < nut->time_base_count; j++)
-             if (!memcmp(&ch->time_base, &nut->time_base[j], sizeof(AVRational)))
-                 break;
--        }
- 
--        nut->time_base[j] = ch->time_base;
-+        nut->time_base[j]         = ch->time_base;
-         nut->chapter[i].time_base = &nut->time_base[j];
--        if(j == nut->time_base_count)
-+        if (j == nut->time_base_count)
-             nut->time_base_count++;
-     }
- 
-@@ -660,186 +709,207 @@ static int nut_write_header(AVFormatContext *s){
-     return 0;
- }
- 
--static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc, AVPacket *pkt){
--    int flags= 0;
--
--    if(pkt->flags & AV_PKT_FLAG_KEY             ) flags |= FLAG_KEY;
--    if(pkt->stream_index != fc->stream_id       ) flags |= FLAG_STREAM_ID;
--    if(pkt->size / fc->size_mul                 ) flags |= FLAG_SIZE_MSB;
--    if(pkt->pts - nus->last_pts != fc->pts_delta) flags |= FLAG_CODED_PTS;
--    if(pkt->size > 2*nut->max_distance          ) flags |= FLAG_CHECKSUM;
--    if(FFABS(pkt->pts - nus->last_pts)
--                         > nus->max_pts_distance) flags |= FLAG_CHECKSUM;
--    if(   pkt->size < nut->header_len[fc->header_idx]
--       || (pkt->size > 4096 && fc->header_idx)
--       || memcmp(pkt->data, nut->header[fc->header_idx], nut->header_len[fc->header_idx]))
--                                                  flags |= FLAG_HEADER_IDX;
-+static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc,
-+                            AVPacket *pkt)
-+{
-+    int flags = 0;
-+
-+    if (pkt->flags & AV_PKT_FLAG_KEY)
-+        flags |= FLAG_KEY;
-+    if (pkt->stream_index != fc->stream_id)
-+        flags |= FLAG_STREAM_ID;
-+    if (pkt->size / fc->size_mul)
-+        flags |= FLAG_SIZE_MSB;
-+    if (pkt->pts - nus->last_pts != fc->pts_delta)
-+        flags |= FLAG_CODED_PTS;
-+    if (pkt->size > 2 * nut->max_distance)
-+        flags |= FLAG_CHECKSUM;
-+    if (FFABS(pkt->pts - nus->last_pts) > nus->max_pts_distance)
-+        flags |= FLAG_CHECKSUM;
-+    if (pkt->size < nut->header_len[fc->header_idx] ||
-+        (pkt->size > 4096 && fc->header_idx)        ||
-+        memcmp(pkt->data, nut->header[fc->header_idx],
-+               nut->header_len[fc->header_idx]))
-+        flags |= FLAG_HEADER_IDX;
- 
-     return flags | (fc->flags & FLAG_CODED);
- }
- 
--static int find_best_header_idx(NUTContext *nut, AVPacket *pkt){
-+static int find_best_header_idx(NUTContext *nut, AVPacket *pkt)
-+{
-     int i;
--    int best_i  = 0;
--    int best_len= 0;
-+    int best_i   = 0;
-+    int best_len = 0;
- 
--    if(pkt->size > 4096)
-+    if (pkt->size > 4096)
-         return 0;
- 
--    for(i=1; i<nut->header_count; i++){
--        if(   pkt->size >= nut->header_len[i]
--           &&  nut->header_len[i] > best_len
--           && !memcmp(pkt->data, nut->header[i], nut->header_len[i])){
--            best_i= i;
--            best_len= nut->header_len[i];
-+    for (i = 1; i < nut->header_count; i++)
-+        if (pkt->size >= nut->header_len[i]
-+            && nut->header_len[i] > best_len
-+            && !memcmp(pkt->data, nut->header[i], nut->header_len[i])) {
-+            best_i   = i;
-+            best_len = nut->header_len[i];
-         }
--    }
-     return best_i;
- }
- 
--static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){
--    NUTContext *nut = s->priv_data;
--    StreamContext *nus= &nut->stream[pkt->stream_index];
--    AVIOContext *bc = s->pb, *dyn_bc;
-+static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
-+{
-+    NUTContext *nut    = s->priv_data;
-+    StreamContext *nus = &nut->stream[pkt->stream_index];
-+    AVIOContext *bc    = s->pb, *dyn_bc;
-     FrameCode *fc;
-     int64_t coded_pts;
--    int best_length, frame_code, flags, needed_flags, i, header_idx, best_header_idx;
-+    int best_length, frame_code, flags, needed_flags, i, header_idx,
-+        best_header_idx;
-     int key_frame = !!(pkt->flags & AV_PKT_FLAG_KEY);
--    int store_sp=0;
-+    int store_sp  = 0;
-     int ret;
- 
--    if(pkt->pts < 0)
-+    if (pkt->pts < 0)
-         return -1;
- 
--    if(1LL<<(20+3*nut->header_count) <= avio_tell(bc))
-+    if (1LL << (20 + 3 * nut->header_count) <= avio_tell(bc))
-         write_headers(s, bc);
- 
--    if(key_frame && !(nus->last_flags & FLAG_KEY))
--        store_sp= 1;
-+    if (key_frame && !(nus->last_flags & FLAG_KEY))
-+        store_sp = 1;
- 
--    if(pkt->size + 30/*FIXME check*/ + avio_tell(bc) >= nut->last_syncpoint_pos + nut->max_distance)
--        store_sp= 1;
-+    if (pkt->size + 30 /*FIXME check*/ + avio_tell(bc) >=
-+        nut->last_syncpoint_pos + nut->max_distance)
-+        store_sp = 1;
- 
- //FIXME: Ensure store_sp is 1 in the first place.
- 
--    if(store_sp){
--        Syncpoint *sp, dummy= {.pos= INT64_MAX};
-+    if (store_sp) {
-+        Syncpoint *sp, dummy = { .pos = INT64_MAX };
- 
-         ff_nut_reset_ts(nut, *nus->time_base, pkt->dts);
--        for(i=0; i<s->nb_streams; i++){
--            AVStream *st= s->streams[i];
-+        for (i = 0; i < s->nb_streams; i++) {
-+            AVStream *st   = s->streams[i];
-             int64_t dts_tb = av_rescale_rnd(pkt->dts,
-                 nus->time_base->num * (int64_t)nut->stream[i].time_base->den,
-                 nus->time_base->den * (int64_t)nut->stream[i].time_base->num,
-                 AV_ROUND_DOWN);
--            int index= av_index_search_timestamp(st, dts_tb, AVSEEK_FLAG_BACKWARD);
--            if(index>=0) dummy.pos= FFMIN(dummy.pos, st->index_entries[index].pos);
-+            int index = av_index_search_timestamp(st, dts_tb,
-+                                                  AVSEEK_FLAG_BACKWARD);
-+            if (index >= 0)
-+                dummy.pos = FFMIN(dummy.pos, st->index_entries[index].pos);
-         }
--        if(dummy.pos == INT64_MAX)
--            dummy.pos= 0;
--        sp= av_tree_find(nut->syncpoints, &dummy, (void *) ff_nut_sp_pos_cmp,
--                         NULL);
-+        if (dummy.pos == INT64_MAX)
-+            dummy.pos = 0;
-+        sp = av_tree_find(nut->syncpoints, &dummy, (void *)ff_nut_sp_pos_cmp,
-+                          NULL);
- 
--        nut->last_syncpoint_pos= avio_tell(bc);
--        ret = avio_open_dyn_buf(&dyn_bc);
--        if(ret < 0)
-+        nut->last_syncpoint_pos = avio_tell(bc);
-+        ret                     = avio_open_dyn_buf(&dyn_bc);
-+        if (ret < 0)
-             return ret;
-         put_tt(nut, nus->time_base, dyn_bc, pkt->dts);
--        ff_put_v(dyn_bc, sp ? (nut->last_syncpoint_pos - sp->pos)>>4 : 0);
-+        ff_put_v(dyn_bc, sp ? (nut->last_syncpoint_pos - sp->pos) >> 4 : 0);
-         put_packet(nut, bc, dyn_bc, 1, SYNCPOINT_STARTCODE);
- 
--        ff_nut_add_sp(nut, nut->last_syncpoint_pos, 0/*unused*/, pkt->dts);
-+        ff_nut_add_sp(nut, nut->last_syncpoint_pos, 0 /*unused*/, pkt->dts);
-     }
-     assert(nus->last_pts != AV_NOPTS_VALUE);
- 
--    coded_pts = pkt->pts & ((1<<nus->msb_pts_shift)-1);
--    if(ff_lsb2full(nus, coded_pts) != pkt->pts)
--        coded_pts= pkt->pts + (1<<nus->msb_pts_shift);
-+    coded_pts = pkt->pts & ((1 << nus->msb_pts_shift) - 1);
-+    if (ff_lsb2full(nus, coded_pts) != pkt->pts)
-+        coded_pts = pkt->pts + (1 << nus->msb_pts_shift);
- 
--    best_header_idx= find_best_header_idx(nut, pkt);
-+    best_header_idx = find_best_header_idx(nut, pkt);
- 
--    best_length=INT_MAX;
--    frame_code= -1;
--    for(i=0; i<256; i++){
--        int length= 0;
--        FrameCode *fc= &nut->frame_code[i];
--        int flags= fc->flags;
-+    best_length = INT_MAX;
-+    frame_code  = -1;
-+    for (i = 0; i < 256; i++) {
-+        int length    = 0;
-+        FrameCode *fc = &nut->frame_code[i];
-+        int flags     = fc->flags;
- 
--        if(flags & FLAG_INVALID)
-+        if (flags & FLAG_INVALID)
-             continue;
--        needed_flags= get_needed_flags(nut, nus, fc, pkt);
-+        needed_flags = get_needed_flags(nut, nus, fc, pkt);
- 
--        if(flags & FLAG_CODED){
-+        if (flags & FLAG_CODED) {
-             length++;
-             flags = needed_flags;
-         }
- 
--        if((flags & needed_flags) != needed_flags)
-+        if ((flags & needed_flags) != needed_flags)
-             continue;
- 
--        if((flags ^ needed_flags) & FLAG_KEY)
-+        if ((flags ^ needed_flags) & FLAG_KEY)
-             continue;
- 
--        if(flags & FLAG_STREAM_ID)
--            length+= ff_get_v_length(pkt->stream_index);
-+        if (flags & FLAG_STREAM_ID)
-+            length += ff_get_v_length(pkt->stream_index);
- 
--        if(pkt->size % fc->size_mul != fc->size_lsb)
-+        if (pkt->size % fc->size_mul != fc->size_lsb)
-             continue;
--        if(flags & FLAG_SIZE_MSB)
-+        if (flags & FLAG_SIZE_MSB)
-             length += ff_get_v_length(pkt->size / fc->size_mul);
- 
--        if(flags & FLAG_CHECKSUM)
--            length+=4;
-+        if (flags & FLAG_CHECKSUM)
-+            length += 4;
- 
--        if(flags & FLAG_CODED_PTS)
-+        if (flags & FLAG_CODED_PTS)
-             length += ff_get_v_length(coded_pts);
- 
--        if(   (flags & FLAG_CODED)
--           && nut->header_len[best_header_idx] > nut->header_len[fc->header_idx]+1){
-+        if ((flags & FLAG_CODED)
-+            && nut->header_len[best_header_idx] >
-+            nut->header_len[fc->header_idx] + 1) {
-             flags |= FLAG_HEADER_IDX;
-         }
- 
--        if(flags & FLAG_HEADER_IDX){
-+        if (flags & FLAG_HEADER_IDX) {
-             length += 1 - nut->header_len[best_header_idx];
--        }else{
-+        } else {
-             length -= nut->header_len[fc->header_idx];
-         }
- 
--        length*=4;
--        length+= !(flags & FLAG_CODED_PTS);
--        length+= !(flags & FLAG_CHECKSUM);
-+        length *= 4;
-+        length += !(flags & FLAG_CODED_PTS);
-+        length += !(flags & FLAG_CHECKSUM);
- 
--        if(length < best_length){
--            best_length= length;
--            frame_code=i;
-+        if (length < best_length) {
-+            best_length = length;
-+            frame_code  = i;
-         }
-     }
-     assert(frame_code != -1);
--    fc= &nut->frame_code[frame_code];
--    flags= fc->flags;
--    needed_flags= get_needed_flags(nut, nus, fc, pkt);
--    header_idx= fc->header_idx;
-+    fc           = &nut->frame_code[frame_code];
-+    flags        = fc->flags;
-+    needed_flags = get_needed_flags(nut, nus, fc, pkt);
-+    header_idx   = fc->header_idx;
- 
-     ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
-     avio_w8(bc, frame_code);
--    if(flags & FLAG_CODED){
--        ff_put_v(bc, (flags^needed_flags) & ~(FLAG_CODED));
-+    if (flags & FLAG_CODED) {
-+        ff_put_v(bc, (flags ^ needed_flags) & ~(FLAG_CODED));
-         flags = needed_flags;
-     }
--    if(flags & FLAG_STREAM_ID)  ff_put_v(bc, pkt->stream_index);
--    if(flags & FLAG_CODED_PTS)  ff_put_v(bc, coded_pts);
--    if(flags & FLAG_SIZE_MSB)   ff_put_v(bc, pkt->size / fc->size_mul);
--    if(flags & FLAG_HEADER_IDX) ff_put_v(bc, header_idx= best_header_idx);
--
--    if(flags & FLAG_CHECKSUM)   avio_wl32(bc, ffio_get_checksum(bc));
--    else                        ffio_get_checksum(bc);
-+    if (flags & FLAG_STREAM_ID)
-+        ff_put_v(bc, pkt->stream_index);
-+    if (flags & FLAG_CODED_PTS)
-+        ff_put_v(bc, coded_pts);
-+    if (flags & FLAG_SIZE_MSB)
-+        ff_put_v(bc, pkt->size / fc->size_mul);
-+    if (flags & FLAG_HEADER_IDX)
-+        ff_put_v(bc, header_idx = best_header_idx);
-+
-+    if (flags & FLAG_CHECKSUM)
-+        avio_wl32(bc, ffio_get_checksum(bc));
-+    else
-+        ffio_get_checksum(bc);
- 
--    avio_write(bc, pkt->data + nut->header_len[header_idx], pkt->size - nut->header_len[header_idx]);
--    nus->last_flags= flags;
--    nus->last_pts= pkt->pts;
-+    avio_write(bc, pkt->data + nut->header_len[header_idx],
-+               pkt->size - nut->header_len[header_idx]);
-+    nus->last_flags = flags;
-+    nus->last_pts   = pkt->pts;
- 
-     //FIXME just store one per syncpoint
--    if(flags & FLAG_KEY)
-+    if (flags & FLAG_KEY)
-         av_add_index_entry(
-             s->streams[pkt->stream_index],
-             nut->last_syncpoint_pos,
-@@ -851,11 +921,12 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){
-     return 0;
- }
- 
--static int nut_write_trailer(AVFormatContext *s){
--    NUTContext *nut= s->priv_data;
--    AVIOContext *bc= s->pb;
-+static int nut_write_trailer(AVFormatContext *s)
-+{
-+    NUTContext *nut = s->priv_data;
-+    AVIOContext *bc = s->pb;
- 
--    while(nut->header_count<3)
-+    while (nut->header_count < 3)
-         write_headers(s, bc);
- 
-     ff_nut_free_sp(nut);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0055-yuv4mpeg-reject-unsupported-codecs.patch b/debian/patches/post-9beta2/0055-yuv4mpeg-reject-unsupported-codecs.patch
deleted file mode 100644
index b6066d1..0000000
--- a/debian/patches/post-9beta2/0055-yuv4mpeg-reject-unsupported-codecs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 424b1e764263b1493de4c34365ef367ddae856db Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Fri, 26 Oct 2012 22:55:04 +0200
-Subject: [PATCH 055/278] yuv4mpeg: reject unsupported codecs
-
-The muxer already rejects unsupported pixel formats, reject also
-unsupported codecs to prevent dangerous misuses.
----
- libavformat/yuv4mpeg.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
-index bdae17b..a8077a0 100644
---- a/libavformat/yuv4mpeg.c
-+++ b/libavformat/yuv4mpeg.c
-@@ -155,6 +155,11 @@ static int yuv4_write_header(AVFormatContext *s)
-     if (s->nb_streams != 1)
-         return AVERROR(EIO);
- 
-+    if (s->streams[0]->codec->codec_id != AV_CODEC_ID_RAWVIDEO) {
-+        av_log(s, AV_LOG_ERROR, "ERROR: Only rawvideo supported.\n");
-+        return AVERROR_INVALIDDATA;
-+    }
-+
-     if (s->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUV411P) {
-         av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV "
-                "stream, some mjpegtools might not work.\n");
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0056-rtpdec-Cosmetic-cleanup.patch b/debian/patches/post-9beta2/0056-rtpdec-Cosmetic-cleanup.patch
deleted file mode 100644
index 7cf42ff..0000000
--- a/debian/patches/post-9beta2/0056-rtpdec-Cosmetic-cleanup.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 48f01398ba30d8d921b27558df0029033e2d4402 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Mon, 22 Oct 2012 15:54:25 +0300
-Subject: [PATCH 056/278] rtpdec: Cosmetic cleanup
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Mainly clean up the RTP statistics code, plus a few other obviously
-misindentend lines.
-
-Remove some useless comments, de-doxygenize some comments,
-add spacing around operators and fix a typo.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/rtpdec.c |  106 ++++++++++++++++++++++++--------------------------
- 1 file changed, 51 insertions(+), 55 deletions(-)
-
-diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
-index 9a1c497..d16122d 100644
---- a/libavformat/rtpdec.c
-+++ b/libavformat/rtpdec.c
-@@ -166,71 +166,67 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int l
- 
- #define RTP_SEQ_MOD (1<<16)
- 
--/**
--* called on parse open packet
--*/
--static void rtp_init_statistics(RTPStatistics *s, uint16_t base_sequence) // called on parse open packet.
-+static void rtp_init_statistics(RTPStatistics *s, uint16_t base_sequence)
- {
-     memset(s, 0, sizeof(RTPStatistics));
--    s->max_seq= base_sequence;
--    s->probation= 1;
-+    s->max_seq   = base_sequence;
-+    s->probation = 1;
- }
- 
--/**
-+/*
- * called whenever there is a large jump in sequence numbers, or when they get out of probation...
- */
- static void rtp_init_sequence(RTPStatistics *s, uint16_t seq)
- {
--    s->max_seq= seq;
--    s->cycles= 0;
--    s->base_seq= seq -1;
--    s->bad_seq= RTP_SEQ_MOD + 1;
--    s->received= 0;
--    s->expected_prior= 0;
--    s->received_prior= 0;
--    s->jitter= 0;
--    s->transit= 0;
-+    s->max_seq        = seq;
-+    s->cycles         = 0;
-+    s->base_seq       = seq - 1;
-+    s->bad_seq        = RTP_SEQ_MOD + 1;
-+    s->received       = 0;
-+    s->expected_prior = 0;
-+    s->received_prior = 0;
-+    s->jitter         = 0;
-+    s->transit        = 0;
- }
- 
--/**
-+/*
- * returns 1 if we should handle this packet.
- */
- static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
- {
--    uint16_t udelta= seq - s->max_seq;
--    const int MAX_DROPOUT= 3000;
--    const int MAX_MISORDER = 100;
-+    uint16_t udelta = seq - s->max_seq;
-+    const int MAX_DROPOUT    = 3000;
-+    const int MAX_MISORDER   = 100;
-     const int MIN_SEQUENTIAL = 2;
- 
-     /* source not valid until MIN_SEQUENTIAL packets with sequence seq. numbers have been received */
--    if(s->probation)
--    {
--        if(seq==s->max_seq + 1) {
-+    if (s->probation) {
-+        if (seq == s->max_seq + 1) {
-             s->probation--;
--            s->max_seq= seq;
--            if(s->probation==0) {
-+            s->max_seq = seq;
-+            if (s->probation == 0) {
-                 rtp_init_sequence(s, seq);
-                 s->received++;
-                 return 1;
-             }
-         } else {
--            s->probation= MIN_SEQUENTIAL - 1;
-+            s->probation = MIN_SEQUENTIAL - 1;
-             s->max_seq = seq;
-         }
-     } else if (udelta < MAX_DROPOUT) {
-         // in order, with permissible gap
--        if(seq < s->max_seq) {
--            //sequence number wrapped; count antother 64k cycles
-+        if (seq < s->max_seq) {
-+            // sequence number wrapped; count another 64k cycles
-             s->cycles += RTP_SEQ_MOD;
-         }
--        s->max_seq= seq;
-+        s->max_seq = seq;
-     } else if (udelta <= RTP_SEQ_MOD - MAX_MISORDER) {
-         // sequence made a large jump...
--        if(seq==s->bad_seq) {
-+        if (seq == s->bad_seq) {
-             // two sequential packets-- assume that the other side restarted without telling us; just resync.
-             rtp_init_sequence(s, seq);
-         } else {
--            s->bad_seq= (seq + 1) & (RTP_SEQ_MOD-1);
-+            s->bad_seq = (seq + 1) & (RTP_SEQ_MOD - 1);
-             return 0;
-         }
-     } else {
-@@ -246,7 +242,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
-     uint8_t *buf;
-     int len;
-     int rtcp_bytes;
--    RTPStatistics *stats= &s->statistics;
-+    RTPStatistics *stats = &s->statistics;
-     uint32_t lost;
-     uint32_t extended_max;
-     uint32_t expected_interval;
-@@ -254,7 +250,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
-     uint32_t lost_interval;
-     uint32_t expected;
-     uint32_t fraction;
--    uint64_t ntp_time= s->last_rtcp_ntp_time; // TODO: Get local ntp time?
-+    uint64_t ntp_time = s->last_rtcp_ntp_time; // TODO: Get local ntp time?
- 
-     if (!s->rtp_ctx || (count < 1))
-         return -1;
-@@ -281,31 +277,32 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
-     avio_wb32(pb, s->ssrc); // server SSRC
-     // some placeholders we should really fill...
-     // RFC 1889/p64
--    extended_max= stats->cycles + stats->max_seq;
--    expected= extended_max - stats->base_seq + 1;
--    lost= expected - stats->received;
--    lost= FFMIN(lost, 0xffffff); // clamp it since it's only 24 bits...
--    expected_interval= expected - stats->expected_prior;
--    stats->expected_prior= expected;
--    received_interval= stats->received - stats->received_prior;
--    stats->received_prior= stats->received;
--    lost_interval= expected_interval - received_interval;
--    if (expected_interval==0 || lost_interval<=0) fraction= 0;
--    else fraction = (lost_interval<<8)/expected_interval;
--
--    fraction= (fraction<<24) | lost;
-+    extended_max = stats->cycles + stats->max_seq;
-+    expected = extended_max - stats->base_seq + 1;
-+    lost = expected - stats->received;
-+    lost = FFMIN(lost, 0xffffff); // clamp it since it's only 24 bits...
-+    expected_interval = expected - stats->expected_prior;
-+    stats->expected_prior = expected;
-+    received_interval = stats->received - stats->received_prior;
-+    stats->received_prior = stats->received;
-+    lost_interval = expected_interval - received_interval;
-+    if (expected_interval == 0 || lost_interval <= 0)
-+        fraction = 0;
-+    else
-+        fraction = (lost_interval << 8) / expected_interval;
-+
-+    fraction = (fraction << 24) | lost;
- 
-     avio_wb32(pb, fraction); /* 8 bits of fraction, 24 bits of total packets lost */
-     avio_wb32(pb, extended_max); /* max sequence received */
--    avio_wb32(pb, stats->jitter>>4); /* jitter */
-+    avio_wb32(pb, stats->jitter >> 4); /* jitter */
- 
--    if(s->last_rtcp_ntp_time==AV_NOPTS_VALUE)
--    {
-+    if (s->last_rtcp_ntp_time == AV_NOPTS_VALUE) {
-         avio_wb32(pb, 0); /* last SR timestamp */
-         avio_wb32(pb, 0); /* delay since last SR */
-     } else {
--        uint32_t middle_32_bits= s->last_rtcp_ntp_time>>16; // this is valid, right? do we need to handle 64 bit values special?
--        uint32_t delay_since_last= ntp_time - s->last_rtcp_ntp_time;
-+        uint32_t middle_32_bits = s->last_rtcp_ntp_time >> 16; // this is valid, right? do we need to handle 64 bit values special?
-+        uint32_t delay_since_last = ntp_time - s->last_rtcp_ntp_time;
- 
-         avio_wb32(pb, middle_32_bits); /* last SR timestamp */
-         avio_wb32(pb, delay_since_last); /* delay since last SR */
-@@ -431,9 +428,8 @@ RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext
-     return s;
- }
- 
--void
--ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
--                                  RTPDynamicProtocolHandler *handler)
-+void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
-+                                       RTPDynamicProtocolHandler *handler)
- {
-     s->dynamic_protocol_context = ctx;
-     s->parse_packet = handler->parse_packet;
-@@ -671,7 +667,7 @@ static int rtp_parse_queued_packet(RTPDemuxContext *s, AVPacket *pkt)
- }
- 
- static int rtp_parse_one_packet(RTPDemuxContext *s, AVPacket *pkt,
--                     uint8_t **bufptr, int len)
-+                                uint8_t **bufptr, int len)
- {
-     uint8_t* buf = bufptr ? *bufptr : NULL;
-     int ret, flags = 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0057-lavc-add-CODEC_CAP_DR1-to-all-video-decoders-missing.patch b/debian/patches/post-9beta2/0057-lavc-add-CODEC_CAP_DR1-to-all-video-decoders-missing.patch
deleted file mode 100644
index dd0484e..0000000
--- a/debian/patches/post-9beta2/0057-lavc-add-CODEC_CAP_DR1-to-all-video-decoders-missing.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From f174fbac3cb127273b8f3df8e05d7156ec1d7658 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 17 Oct 2012 21:39:04 +0200
-Subject: [PATCH 057/278] lavc: add CODEC_CAP_DR1 to all video decoders
- missing them
-
----
- libavcodec/bink.c    |    1 +
- libavcodec/dpx.c     |    1 +
- libavcodec/indeo3.c  |    1 +
- libavcodec/indeo4.c  |    1 +
- libavcodec/indeo5.c  |    1 +
- libavcodec/kgv1dec.c |    1 +
- libavcodec/sgidec.c  |    1 +
- libavcodec/vb.c      |    1 +
- libavcodec/yop.c     |    1 +
- 9 files changed, 9 insertions(+)
-
-diff --git a/libavcodec/bink.c b/libavcodec/bink.c
-index b6c8c4b..636bb20 100644
---- a/libavcodec/bink.c
-+++ b/libavcodec/bink.c
-@@ -1336,4 +1336,5 @@ AVCodec ff_bink_decoder = {
-     .close          = decode_end,
-     .decode         = decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Bink video"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
-index f1a4e86..55f71c9 100644
---- a/libavcodec/dpx.c
-+++ b/libavcodec/dpx.c
-@@ -243,4 +243,5 @@ AVCodec ff_dpx_decoder = {
-     .close          = decode_end,
-     .decode         = decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("DPX image"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
-index fc0d2bc..322d360 100644
---- a/libavcodec/indeo3.c
-+++ b/libavcodec/indeo3.c
-@@ -1114,4 +1114,5 @@ AVCodec ff_indeo3_decoder = {
-     .decode         = decode_frame,
-     .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
-index b837ffb..2eebc26 100644
---- a/libavcodec/indeo4.c
-+++ b/libavcodec/indeo4.c
-@@ -607,4 +607,5 @@ AVCodec ff_indeo4_decoder = {
-     .close          = ff_ivi_decode_close,
-     .decode         = ff_ivi_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
-index e9f7733..dc5f6f0 100644
---- a/libavcodec/indeo5.c
-+++ b/libavcodec/indeo5.c
-@@ -642,4 +642,5 @@ AVCodec ff_indeo5_decoder = {
-     .close          = ff_ivi_decode_close,
-     .decode         = ff_ivi_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
-index 8f32943..bd362bf 100644
---- a/libavcodec/kgv1dec.c
-+++ b/libavcodec/kgv1dec.c
-@@ -191,4 +191,5 @@ AVCodec ff_kgv1_decoder = {
-     .decode         = decode_frame,
-     .flush          = decode_flush,
-     .long_name      = NULL_IF_CONFIG_SMALL("Kega Game Video"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
-index c220452..412709c 100644
---- a/libavcodec/sgidec.c
-+++ b/libavcodec/sgidec.c
-@@ -267,4 +267,5 @@ AVCodec ff_sgi_decoder = {
-     .close          = sgi_end,
-     .decode         = decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("SGI image"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/vb.c b/libavcodec/vb.c
-index 39e14a0..13f965d 100644
---- a/libavcodec/vb.c
-+++ b/libavcodec/vb.c
-@@ -275,4 +275,5 @@ AVCodec ff_vb_decoder = {
-     .close          = decode_end,
-     .decode         = decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Beam Software VB"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
-diff --git a/libavcodec/yop.c b/libavcodec/yop.c
-index cda9cad..f1ab525 100644
---- a/libavcodec/yop.c
-+++ b/libavcodec/yop.c
-@@ -256,4 +256,5 @@ AVCodec ff_yop_decoder = {
-     .close          = yop_decode_close,
-     .decode         = yop_decode_frame,
-     .long_name      = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
-+    .capabilities   = CODEC_CAP_DR1,
- };
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0058-nutenc-verbosely-report-unsupported-negative-pts.patch b/debian/patches/post-9beta2/0058-nutenc-verbosely-report-unsupported-negative-pts.patch
deleted file mode 100644
index c38ee58..0000000
--- a/debian/patches/post-9beta2/0058-nutenc-verbosely-report-unsupported-negative-pts.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 07585ffa62eebebcd35326935fec7cd948021daf Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Sat, 27 Oct 2012 16:56:37 +0200
-Subject: [PATCH 058/278] nutenc: verbosely report unsupported negative pts
-
-Additionally use the correct error number.
----
- libavformat/nutenc.c |    8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
-index 581a202..e9e313b 100644
---- a/libavformat/nutenc.c
-+++ b/libavformat/nutenc.c
-@@ -767,8 +767,12 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
-     int store_sp  = 0;
-     int ret;
- 
--    if (pkt->pts < 0)
--        return -1;
-+    if (pkt->pts < 0) {
-+        av_log(s, AV_LOG_ERROR,
-+               "Negative pts not supported stream %d, pts %"PRId64"\n",
-+               pkt->stream_index, pkt->pts);
-+        return AVERROR_INVALIDDATA;
-+    }
- 
-     if (1LL << (20 + 3 * nut->header_count) <= avio_tell(bc))
-         write_headers(s, bc);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0059-nut-support-textual-data.patch b/debian/patches/post-9beta2/0059-nut-support-textual-data.patch
deleted file mode 100644
index c68cc52..0000000
--- a/debian/patches/post-9beta2/0059-nut-support-textual-data.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From d4bff9f1ab59f4ae58841bd7b056f2ff1b8854d7 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Thu, 25 Oct 2012 14:05:40 +0200
-Subject: [PATCH 059/278] nut: support textual data
-
-Plain text (utf8 encoded) data can be muxed and demuxed in nut.
----
- doc/nut.texi         |    6 ++++++
- libavformat/nut.c    |    7 ++++++-
- libavformat/nut.h    |    1 +
- libavformat/nutdec.c |    1 +
- 4 files changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/doc/nut.texi b/doc/nut.texi
-index 1c23934..9b84241 100644
---- a/doc/nut.texi
-+++ b/doc/nut.texi
-@@ -66,6 +66,12 @@ PFD[32]   would for example be signed 32 bit little-endian IEEE float
- @item DVBS   @tab DVB subtitles
- @end multitable
- 
-+ at section Raw Data
-+
-+ at multitable @columnfractions .4 .4
-+ at item UTF8   @tab Raw UTF-8
-+ at end multitable
-+
- @section Codecs
- 
- @multitable @columnfractions .4 .4
-diff --git a/libavformat/nut.c b/libavformat/nut.c
-index e367d1c..85b126b 100644
---- a/libavformat/nut.c
-+++ b/libavformat/nut.c
-@@ -33,6 +33,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = {
-     { AV_CODEC_ID_NONE        , 0                         }
- };
- 
-+const AVCodecTag ff_nut_data_tags[] = {
-+    { AV_CODEC_ID_TEXT        , MKTAG('U', 'T', 'F', '8') },
-+    { AV_CODEC_ID_NONE        , 0                         }
-+};
-+
- const AVCodecTag ff_nut_video_tags[] = {
-     { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },
-     { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },
-@@ -117,7 +122,7 @@ const AVCodecTag ff_nut_audio_tags[] = {
- 
- const AVCodecTag * const ff_nut_codec_tags[] = {
-     ff_nut_video_tags, ff_nut_audio_tags, ff_nut_subtitle_tags,
--    ff_codec_bmp_tags, ff_codec_wav_tags, 0
-+    ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_data_tags, 0
- };
- 
- void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
-diff --git a/libavformat/nut.h b/libavformat/nut.h
-index a91a109..5f624eb 100644
---- a/libavformat/nut.h
-+++ b/libavformat/nut.h
-@@ -106,6 +106,7 @@ typedef struct NUTContext {
- extern const AVCodecTag ff_nut_subtitle_tags[];
- extern const AVCodecTag ff_nut_video_tags[];
- extern const AVCodecTag ff_nut_audio_tags[];
-+extern const AVCodecTag ff_nut_data_tags[];
- 
- extern const AVCodecTag * const ff_nut_codec_tags[];
- 
-diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
-index 9b1891f..9ce0519 100644
---- a/libavformat/nutdec.c
-+++ b/libavformat/nutdec.c
-@@ -371,6 +371,7 @@ static int decode_stream_header(NUTContext *nut)
-         break;
-     case 3:
-         st->codec->codec_type = AVMEDIA_TYPE_DATA;
-+        st->codec->codec_id   = ff_codec_get_id(ff_nut_data_tags, tmp);
-         break;
-     default:
-         av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0060-rtsp-Avoid-a-cast-when-calling-strtol.patch b/debian/patches/post-9beta2/0060-rtsp-Avoid-a-cast-when-calling-strtol.patch
deleted file mode 100644
index ea371f2..0000000
--- a/debian/patches/post-9beta2/0060-rtsp-Avoid-a-cast-when-calling-strtol.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f21d5c905dd5c6a56583c85623a376a029ec041a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Mon, 22 Oct 2012 23:13:49 +0300
-Subject: [PATCH 060/278] rtsp: Avoid a cast when calling strtol
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This gets rid of this warning:
-
-libavformat/rtsp.c: In function ‘rtsp_parse_transport’:
-libavformat/rtsp.c:794: warning: cast discards qualifiers from pointer target type
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/rtsp.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
-index bbe08e6..44de4af 100644
---- a/libavformat/rtsp.c
-+++ b/libavformat/rtsp.c
-@@ -765,8 +765,10 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
-                     th->lower_transport = RTSP_LOWER_TRANSPORT_UDP_MULTICAST;
-             } else if (!strcmp(parameter, "ttl")) {
-                 if (*p == '=') {
-+                    char *end;
-                     p++;
--                    th->ttl = strtol(p, (char **)&p, 10);
-+                    th->ttl = strtol(p, &end, 10);
-+                    p = end;
-                 }
-             } else if (!strcmp(parameter, "destination")) {
-                 if (*p == '=') {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0061-aacenc-Drop-some-unused-function-arguments.patch b/debian/patches/post-9beta2/0061-aacenc-Drop-some-unused-function-arguments.patch
deleted file mode 100644
index ebf09d2..0000000
--- a/debian/patches/post-9beta2/0061-aacenc-Drop-some-unused-function-arguments.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 72c758f1fd06e812a2075bae836ec18891d99852 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 19:16:08 +0200
-Subject: [PATCH 061/278] aacenc: Drop some unused function arguments
-
----
- libavcodec/aacenc.c |    9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
-index f5ab40f..e9f6e2f 100644
---- a/libavcodec/aacenc.c
-+++ b/libavcodec/aacenc.c
-@@ -302,7 +302,7 @@ static void encode_ms_info(PutBitContext *pb, ChannelElement *cpe)
- /**
-  * Produce integer coefficients from scalefactors provided by the model.
-  */
--static void adjust_frame_information(AACEncContext *apc, ChannelElement *cpe, int chans)
-+static void adjust_frame_information(ChannelElement *cpe, int chans)
- {
-     int i, w, w2, g, ch;
-     int start, maxsfb, cmaxsfb;
-@@ -460,8 +460,7 @@ static int encode_individual_channel(AVCodecContext *avctx, AACEncContext *s,
- /**
-  * Write some auxiliary information about the created AAC file.
-  */
--static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s,
--                               const char *name)
-+static void put_bitstream_info(AACEncContext *s, const char *name)
- {
-     int i, namelen, padbits;
- 
-@@ -584,7 +583,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-         init_put_bits(&s->pb, avpkt->data, avpkt->size);
- 
-         if ((avctx->frame_number & 0xFF)==1 && !(avctx->flags & CODEC_FLAG_BITEXACT))
--            put_bitstream_info(avctx, s, LIBAVCODEC_IDENT);
-+            put_bitstream_info(s, LIBAVCODEC_IDENT);
-         start_ch = 0;
-         memset(chan_el_counter, 0, sizeof(chan_el_counter));
-         for (i = 0; i < s->chan_map[0]; i++) {
-@@ -626,7 +625,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-                     s->coder->search_for_ms(s, cpe, s->lambda);
-                 }
-             }
--            adjust_frame_information(s, cpe, chans);
-+            adjust_frame_information(cpe, chans);
-             if (chans == 2) {
-                 put_bits(&s->pb, 1, cpe->common_window);
-                 if (cpe->common_window) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0062-cmdutils-Conditionally-compile-libswscale-related-bi.patch b/debian/patches/post-9beta2/0062-cmdutils-Conditionally-compile-libswscale-related-bi.patch
deleted file mode 100644
index 5a99b1b..0000000
--- a/debian/patches/post-9beta2/0062-cmdutils-Conditionally-compile-libswscale-related-bi.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From ab799664755c8bc2c439c428ff5b538c105a5c38 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 29 Oct 2012 18:00:14 +0100
-Subject: [PATCH 062/278] cmdutils: Conditionally compile libswscale-related
- bits
-
-This fixes compilation with libswscale disabled.
----
- cmdutils.c |    7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/cmdutils.c b/cmdutils.c
-index 6570968..630301f 100644
---- a/cmdutils.c
-+++ b/cmdutils.c
-@@ -371,7 +371,10 @@ int opt_default(void *optctx, const char *opt, const char *arg)
-     const AVOption *o;
-     char opt_stripped[128];
-     const char *p;
--    const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc = sws_get_class();
-+    const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class();
-+#if CONFIG_SWSCALE
-+    const AVClass *sc = sws_get_class();
-+#endif
- 
-     if (!(p = strchr(opt, ':')))
-         p = opt + strlen(opt);
-@@ -385,6 +388,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
-     else if ((o = av_opt_find(&fc, opt, NULL, 0,
-                               AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)))
-         av_dict_set(&format_opts, opt, arg, FLAGS);
-+#if CONFIG_SWSCALE
-     else if ((o = av_opt_find(&sc, opt, NULL, 0,
-                               AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
-         // XXX we only support sws_flags, not arbitrary sws options
-@@ -394,6 +398,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
-             return ret;
-         }
-     }
-+#endif
- 
-     if (o)
-         return 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0063-avconv-Drop-unused-function-argument-from-do_video_s.patch b/debian/patches/post-9beta2/0063-avconv-Drop-unused-function-argument-from-do_video_s.patch
deleted file mode 100644
index 38c2cb0..0000000
--- a/debian/patches/post-9beta2/0063-avconv-Drop-unused-function-argument-from-do_video_s.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 70478746a94eba6467c02f1c2ae8d8090ad9168e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 19:18:12 +0200
-Subject: [PATCH 063/278] avconv: Drop unused function argument from
- do_video_stats()
-
----
- avconv.c |    5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/avconv.c b/avconv.c
-index 54a0e2a..d0902a6 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -621,8 +621,7 @@ static double psnr(double d)
-     return -10.0 * log(d) / log(10.0);
- }
- 
--static void do_video_stats(AVFormatContext *os, OutputStream *ost,
--                           int frame_size)
-+static void do_video_stats(OutputStream *ost, int frame_size)
- {
-     AVCodecContext *enc;
-     int frame_number;
-@@ -706,7 +705,7 @@ static int poll_filter(OutputStream *ost)
- 
-         do_video_out(of->ctx, ost, filtered_frame, &frame_size);
-         if (vstats_filename && frame_size)
--            do_video_stats(of->ctx, ost, frame_size);
-+            do_video_stats(ost, frame_size);
-         break;
-     case AVMEDIA_TYPE_AUDIO:
-         do_audio_out(of->ctx, ost, filtered_frame);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0064-fate-Add-shorthands-for-acodec-PCM-and-ADPCM-tests.patch b/debian/patches/post-9beta2/0064-fate-Add-shorthands-for-acodec-PCM-and-ADPCM-tests.patch
deleted file mode 100644
index 1576f5b..0000000
--- a/debian/patches/post-9beta2/0064-fate-Add-shorthands-for-acodec-PCM-and-ADPCM-tests.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e519990ced06467ea3be249d0267205758a375eb Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 17 Oct 2012 19:47:03 +0200
-Subject: [PATCH 064/278] fate: Add shorthands for acodec PCM and ADPCM tests
-
----
- tests/fate/acodec.mak |    8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak
-index 609559c..531f2f3 100644
---- a/tests/fate/acodec.mak
-+++ b/tests/fate/acodec.mak
-@@ -18,7 +18,9 @@ FATE_ACODEC_PCM-$(call ENCDEC, PCM_F32LE, WAV) += f32le
- FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64BE, AU)  += f64be
- FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64LE, WAV) += f64le
- 
--FATE_ACODEC += $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%)
-+FATE_ACODEC_PCM := $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%)
-+FATE_AVCONV += $(FATE_ACODEC_PCM)
-+fate-acodec-pcm: $(FATE_ACODEC_PCM)
- 
- fate-acodec-pcm-%: FMT = wav
- fate-acodec-pcm-%: CODEC = pcm_$(@:fate-acodec-pcm-%=%)
-@@ -34,7 +36,9 @@ FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_MS,      WAV)  += ms
- FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_SWF,     FLV)  += swf
- FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_YAMAHA,  WAV)  += yamaha
- 
--FATE_ACODEC += $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%)
-+FATE_ACODEC_ADPCM := $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%)
-+FATE_AVCONV += $(FATE_ACODEC_ADPCM)
-+fate-acodec-adpcm: $(FATE_ACODEC_ADPCM)
- 
- fate-acodec-adpcm-%: CODEC = adpcm_$(@:fate-acodec-adpcm-%=%)
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0065-fate-ac3-Place-E-AC-3-tests-and-AC-3-tests-in-differ.patch b/debian/patches/post-9beta2/0065-fate-ac3-Place-E-AC-3-tests-and-AC-3-tests-in-differ.patch
deleted file mode 100644
index 9059b52..0000000
--- a/debian/patches/post-9beta2/0065-fate-ac3-Place-E-AC-3-tests-and-AC-3-tests-in-differ.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 381dc1a5ec0925b281c573457c413ae643567086 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 00:14:26 +0200
-Subject: [PATCH 065/278] fate: ac3: Place E-AC-3 tests and AC-3 tests in
- different groups
-
----
- tests/fate/ac3.mak |   21 ++++++++++++---------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak
-index b2bfb8e..235414d 100644
---- a/tests/fate/ac3.mak
-+++ b/tests/fate/ac3.mak
-@@ -26,23 +26,23 @@ FATE_AC3 += fate-ac3-5.1-downmix-stereo
- fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channels 2 -i $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3
- fate-ac3-5.1-downmix-stereo: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_stereo.pcm
- 
--FATE_AC3 += fate-eac3-1
-+FATE_EAC3 += fate-eac3-1
- fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3
- fate-eac3-1: REF = $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.pcm
- 
--FATE_AC3 += fate-eac3-2
-+FATE_EAC3 += fate-eac3-2
- fate-eac3-2: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.eac3
- fate-eac3-2: REF = $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.pcm
- 
--FATE_AC3 += fate-eac3-3
-+FATE_EAC3 += fate-eac3-3
- fate-eac3-3: CMD = pcm -i $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.eac3
- fate-eac3-3: REF = $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.pcm
- 
--FATE_AC3 += fate-eac3-4
-+FATE_EAC3 += fate-eac3-4
- fate-eac3-4: CMD = pcm -i $(SAMPLES)/eac3/serenity_english_5.1_1536_small.eac3
- fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm
- 
--$(FATE_AC3): CMP = oneoff
-+$(FATE_AC3) $(FATE_EAC3): CMP = oneoff
- 
- FATE_AC3_ENCODE += fate-ac3-encode
- fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k
-@@ -51,7 +51,7 @@ fate-ac3-encode: CMP_TARGET = 399.62
- fate-ac3-encode: SIZE_TOLERANCE = 488
- fate-ac3-encode: FUZZ = 3
- 
--FATE_AC3_ENCODE += fate-eac3-encode
-+FATE_EAC3_ENCODE += fate-eac3-encode
- fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k
- fate-eac3-encode: CMP_SHIFT = -1024
- fate-eac3-encode: CMP_TARGET = 514.02
-@@ -61,12 +61,15 @@ fate-eac3-encode: FUZZ = 3
- fate-ac3-encode fate-eac3-encode: CMP = stddev
- fate-ac3-encode fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
- 
--FATE_AC3_ENCODE += fate-ac3-fixed-encode
-+FATE_AC3_FIXED_ENCODE += fate-ac3-fixed-encode
- fate-ac3-fixed-encode: tests/data/asynth-44100-2.wav
- fate-ac3-fixed-encode: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
- fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -b 128k -f ac3 -flags bitexact
- fate-ac3-fixed-encode: CMP = oneline
- fate-ac3-fixed-encode: REF = a1d1fc116463b771abf5aef7ed37d7b1
- 
--FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE)
--fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE)
-+FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE)
-+FATE_SAMPLES_AVCONV += $(FATE_EAC3) $(FATE_EAC3_ENCODE)
-+
-+fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE)
-+fate-ac3: $(FATE_EAC3) $(FATE_EAC3_ENCODE)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0066-fate-ac3-Add-dependencies.patch b/debian/patches/post-9beta2/0066-fate-ac3-Add-dependencies.patch
deleted file mode 100644
index 36ab94c..0000000
--- a/debian/patches/post-9beta2/0066-fate-ac3-Add-dependencies.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 2cbdd7c92958cb8226491d8eb23ed2d57d4b841e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 01:13:39 +0200
-Subject: [PATCH 066/278] fate: ac3: Add dependencies
-
----
- tests/fate/ac3.mak |   15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak
-index 235414d..59d0780 100644
---- a/tests/fate/ac3.mak
-+++ b/tests/fate/ac3.mak
-@@ -44,14 +44,17 @@ fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm
- 
- $(FATE_AC3) $(FATE_EAC3): CMP = oneoff
- 
--FATE_AC3_ENCODE += fate-ac3-encode
-+FATE_AC3-$(call  DEMDEC, AC3,  AC3)  += $(FATE_AC3)
-+FATE_EAC3-$(call DEMDEC, EAC3, EAC3) += $(FATE_EAC3)
-+
-+FATE_AC3-$(call ENCDEC, AC3, AC3) += fate-ac3-encode
- fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k
- fate-ac3-encode: CMP_SHIFT = -1024
- fate-ac3-encode: CMP_TARGET = 399.62
- fate-ac3-encode: SIZE_TOLERANCE = 488
- fate-ac3-encode: FUZZ = 3
- 
--FATE_EAC3_ENCODE += fate-eac3-encode
-+FATE_EAC3-$(call ENCDEC, EAC3, EAC3) += fate-eac3-encode
- fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k
- fate-eac3-encode: CMP_SHIFT = -1024
- fate-eac3-encode: CMP_TARGET = 514.02
-@@ -61,15 +64,13 @@ fate-eac3-encode: FUZZ = 3
- fate-ac3-encode fate-eac3-encode: CMP = stddev
- fate-ac3-encode fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
- 
--FATE_AC3_FIXED_ENCODE += fate-ac3-fixed-encode
-+FATE_AC3-$(call ENCMUX, AC3_FIXED, AC3) += fate-ac3-fixed-encode
- fate-ac3-fixed-encode: tests/data/asynth-44100-2.wav
- fate-ac3-fixed-encode: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav
- fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -b 128k -f ac3 -flags bitexact
- fate-ac3-fixed-encode: CMP = oneline
- fate-ac3-fixed-encode: REF = a1d1fc116463b771abf5aef7ed37d7b1
- 
--FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE)
--FATE_SAMPLES_AVCONV += $(FATE_EAC3) $(FATE_EAC3_ENCODE)
-+FATE_SAMPLES_AVCONV- += $(FATE_AC3-yes) $(FATE_EAC3-yes)
- 
--fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE)
--fate-ac3: $(FATE_EAC3) $(FATE_EAC3_ENCODE)
-+fate-ac3: $(FATE_AC3-yes) $(FATE_EAC3-yes)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0067-indeo3-remove-duplicate-capabilities-line.patch b/debian/patches/post-9beta2/0067-indeo3-remove-duplicate-capabilities-line.patch
deleted file mode 100644
index e78c5a1..0000000
--- a/debian/patches/post-9beta2/0067-indeo3-remove-duplicate-capabilities-line.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From bff5e5f8b3c5892a21a0df7b3352b31511e42a94 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Mon, 29 Oct 2012 12:16:05 +0100
-Subject: [PATCH 067/278] indeo3: remove duplicate capabilities line.
-
----
- libavcodec/indeo3.c |    1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
-index 322d360..fc0d2bc 100644
---- a/libavcodec/indeo3.c
-+++ b/libavcodec/indeo3.c
-@@ -1114,5 +1114,4 @@ AVCodec ff_indeo3_decoder = {
-     .decode         = decode_frame,
-     .capabilities   = CODEC_CAP_DR1,
-     .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
--    .capabilities   = CODEC_CAP_DR1,
- };
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0068-lavr-add-general-API-usage-doxy.patch b/debian/patches/post-9beta2/0068-lavr-add-general-API-usage-doxy.patch
deleted file mode 100644
index ff34582..0000000
--- a/debian/patches/post-9beta2/0068-lavr-add-general-API-usage-doxy.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 01b760190d32550683d7c790309acadea3fe0820 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Sun, 28 Oct 2012 22:52:54 +0100
-Subject: [PATCH 068/278] lavr: add general API usage doxy
-
-Signed-off-by: Anton Khirnov <anton at khirnov.net>
----
- libavresample/avresample.h |   71 ++++++++++++++++++++++++++++++++++++++++++++
- libavutil/avutil.h         |    1 +
- 2 files changed, 72 insertions(+)
-
-diff --git a/libavresample/avresample.h b/libavresample/avresample.h
-index ea93952..87134b3 100644
---- a/libavresample/avresample.h
-+++ b/libavresample/avresample.h
-@@ -23,9 +23,76 @@
- 
- /**
-  * @file
-+ * @ingroup lavr
-  * external API header
-  */
- 
-+/**
-+ * @defgroup lavr Libavresample
-+ * @{
-+ *
-+ * Libavresample (lavr) is a library that handles audio resampling, sample
-+ * format conversion and mixing.
-+ *
-+ * Interaction with lavr is done through AVAudioResampleContext, which is
-+ * allocated with avresample_alloc_context(). It is opaque, so all parameters
-+ * must be set with the @ref avoptions API.
-+ *
-+ * For example the following code will setup conversion from planar float sample
-+ * format to interleaved signed 16-bit integer, downsampling from 48kHz to
-+ * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing
-+ * matrix):
-+ * @code
-+ * AVAudioResampleContext *avr = avresample_alloc_context();
-+ * av_opt_set_int(avr, "in_channel_layout",  AV_CH_LAYOUT_5POINT1, 0);
-+ * av_opt_set_int(avr, "out_channel_layout", AV_CH_LAYOUT_STEREO,  0);
-+ * av_opt_set_int(avr, "in_sample_rate",     48000,                0);
-+ * av_opt_set_int(avr, "out_sample_rate",    44100,                0);
-+ * av_opt_set_int(avr, "in_sample_fmt",      AV_SAMPLE_FMT_FLTP,   0);
-+ * av_opt_set_int(avr, "out_sample_fmt,      AV_SAMPLE_FMT_S16,    0);
-+ * @endcode
-+ *
-+ * Once the context is initialized, it must be opened with avresample_open(). If
-+ * you need to change the conversion parameters, you must close the context with
-+ * avresample_close(), change the parameters as described above, then reopen it
-+ * again.
-+ *
-+ * The conversion itself is done by repeatedly calling avresample_convert().
-+ * Note that the samples may get buffered in two places in lavr. The first one
-+ * is the output FIFO, where the samples end up if the output buffer is not
-+ * large enough. The data stored in there may be retrieved at any time with
-+ * avresample_read(). The second place is the resampling delay buffer,
-+ * applicable only when resampling is done. The samples in it require more input
-+ * before they can be processed. Their current amount is returned by
-+ * avresample_get_delay(). At the end of conversion the resampling buffer can be
-+ * flushed by calling avresample_convert() with NULL input.
-+ *
-+ * The following code demonstrates the conversion loop assuming the parameters
-+ * from above and caller-defined functions get_input() and handle_output():
-+ * @code
-+ * uint8_t **input;
-+ * int in_linesize, in_samples;
-+ *
-+ * while (get_input(&input, &in_linesize, &in_samples)) {
-+ *     uint8_t *output
-+ *     int out_linesize;
-+ *     int out_samples = avresample_available(avr) +
-+ *                       av_rescale_rnd(avresample_get_delay(avr) +
-+ *                                      in_samples, 44100, 48000, AV_ROUND_UP);
-+ *     av_samples_alloc(&output, &out_linesize, 2, out_samples,
-+ *                      AV_SAMPLE_FMT_S16, 0);
-+ *     out_samples = avresample_convert(avr, &output, out_linesize, out_samples,
-+ *                                      input, in_linesize, in_samples);
-+ *     handle_output(output, out_linesize, out_samples);
-+ *     av_freep(&output);
-+ *  }
-+ *  @endcode
-+ *
-+ *  When the conversion is finished and the FIFOs are flushed if required, the
-+ *  conversion context and everything associated with it must be freed with
-+ *  avresample_free().
-+ */
-+
- #include "libavutil/audioconvert.h"
- #include "libavutil/avutil.h"
- #include "libavutil/dict.h"
-@@ -289,4 +356,8 @@ int avresample_available(AVAudioResampleContext *avr);
-  */
- int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples);
- 
-+/**
-+ * @}
-+ */
-+
- #endif /* AVRESAMPLE_AVRESAMPLE_H */
-diff --git a/libavutil/avutil.h b/libavutil/avutil.h
-index a1433b4..33f9bea 100644
---- a/libavutil/avutil.h
-+++ b/libavutil/avutil.h
-@@ -39,6 +39,7 @@
-  * @li @ref libavf "libavformat" I/O and muxing/demuxing library
-  * @li @ref lavd "libavdevice" special devices muxing/demuxing library
-  * @li @ref lavu "libavutil" common utility library
-+ * @li @ref lavr "libavresample" audio resampling, format conversion and mixing
-  * @li @subpage libswscale  color conversion and scaling library
-  */
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0069-lavr-document-upper-bound-on-number-of-output-sample.patch b/debian/patches/post-9beta2/0069-lavr-document-upper-bound-on-number-of-output-sample.patch
deleted file mode 100644
index e728519..0000000
--- a/debian/patches/post-9beta2/0069-lavr-document-upper-bound-on-number-of-output-sample.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dc5793062e7a0f6d195fc403d7ce242729b4ea4a Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Sun, 28 Oct 2012 22:52:55 +0100
-Subject: [PATCH 069/278] lavr: document upper bound on number of output
- samples.
-
-Signed-off-by: Anton Khirnov <anton at khirnov.net>
----
- libavresample/avresample.h |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavresample/avresample.h b/libavresample/avresample.h
-index 87134b3..b0a9e24 100644
---- a/libavresample/avresample.h
-+++ b/libavresample/avresample.h
-@@ -265,6 +265,10 @@ int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta,
- /**
-  * Convert input samples and write them to the output FIFO.
-  *
-+ * The upper bound on the number of output samples is given by
-+ * avresample_available() + (avresample_get_delay() + number of input samples) *
-+ * output sample rate / input sample rate.
-+ *
-  * The output data can be NULL or have fewer allocated samples than required.
-  * In this case, any remaining samples not written to the output will be added
-  * to an internal FIFO buffer, to be returned at the next call to this function
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0070-lpc-Add-a-function-for-calculating-reflection-coeffi.patch b/debian/patches/post-9beta2/0070-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
deleted file mode 100644
index f418300..0000000
--- a/debian/patches/post-9beta2/0070-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 39ef66f5300c2a42acc29937f5417bc2efe09752 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 27 Oct 2012 22:29:56 +0300
-Subject: [PATCH 070/278] lpc: Add a function for calculating reflection
- coefficients from autocorrelation coefficients
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/lpc.h |   31 +++++++++++++++++++++++++++++++
- 1 file changed, 31 insertions(+)
-
-diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
-index cbee46f..0e54f0d 100644
---- a/libavcodec/lpc.h
-+++ b/libavcodec/lpc.h
-@@ -111,6 +111,37 @@ void ff_lpc_end(LPCContext *s);
- #endif
- 
- /**
-+ * Schur recursion.
-+ * Produces reflection coefficients from autocorrelation data.
-+ */
-+static inline void compute_ref_coefs(const LPC_TYPE *autoc, int max_order,
-+                                     LPC_TYPE *ref, LPC_TYPE *error)
-+{
-+    int i, j;
-+    LPC_TYPE err;
-+    LPC_TYPE gen0[MAX_LPC_ORDER], gen1[MAX_LPC_ORDER];
-+
-+    for (i = 0; i < max_order; i++)
-+        gen0[i] = gen1[i] = autoc[i + 1];
-+
-+    err    = autoc[0];
-+    ref[0] = -gen1[0] / err;
-+    err   +=  gen1[0] * ref[0];
-+    if (error)
-+        error[0] = err;
-+    for (i = 1; i < max_order; i++) {
-+        for (j = 0; j < max_order - i; j++) {
-+            gen1[j] = gen1[j + 1] + ref[i - 1] * gen0[j];
-+            gen0[j] = gen1[j + 1] * ref[i - 1] + gen0[j];
-+        }
-+        ref[i] = -gen1[0] / err;
-+        err   +=  gen1[0] * ref[i];
-+        if (error)
-+            error[i] = err;
-+    }
-+}
-+
-+/**
-  * Levinson-Durbin recursion.
-  * Produce LPC coefficients from autocorrelation data.
-  */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0071-lpc-Add-a-function-for-calculating-reflection-coeffi.patch b/debian/patches/post-9beta2/0071-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
deleted file mode 100644
index 9a46fce..0000000
--- a/debian/patches/post-9beta2/0071-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8b25a20efbf4ca261bcd3327a385330eca775ec6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Thu, 25 Oct 2012 15:33:15 +0300
-Subject: [PATCH 071/278] lpc: Add a function for calculating reflection
- coefficients from samples
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/lpc.c |   12 ++++++++++++
- libavcodec/lpc.h |    3 +++
- 2 files changed, 15 insertions(+)
-
-diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
-index 126dbc1..2093e7e 100644
---- a/libavcodec/lpc.c
-+++ b/libavcodec/lpc.c
-@@ -148,6 +148,18 @@ static int estimate_best_order(double *ref, int min_order, int max_order)
-     return est;
- }
- 
-+int ff_lpc_calc_ref_coefs(LPCContext *s,
-+                          const int32_t *samples, int order, double *ref)
-+{
-+    double autoc[MAX_LPC_ORDER + 1];
-+
-+    s->lpc_apply_welch_window(samples, s->blocksize, s->windowed_samples);
-+    s->lpc_compute_autocorr(s->windowed_samples, s->blocksize, order, autoc);
-+    compute_ref_coefs(autoc, order, ref, NULL);
-+
-+    return order;
-+}
-+
- /**
-  * Calculate LPC coefficients for multiple orders
-  *
-diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
-index 0e54f0d..6590608 100644
---- a/libavcodec/lpc.h
-+++ b/libavcodec/lpc.h
-@@ -92,6 +92,9 @@ int ff_lpc_calc_coefs(LPCContext *s,
-                       enum FFLPCType lpc_type, int lpc_passes,
-                       int omethod, int max_shift, int zero_shift);
- 
-+int ff_lpc_calc_ref_coefs(LPCContext *s,
-+                          const int32_t *samples, int order, double *ref);
-+
- /**
-  * Initialize LPCContext.
-  */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0072-avcodec-Add-a-RFC-3389-comfort-noise-codec.patch b/debian/patches/post-9beta2/0072-avcodec-Add-a-RFC-3389-comfort-noise-codec.patch
deleted file mode 100644
index c2766f0..0000000
--- a/debian/patches/post-9beta2/0072-avcodec-Add-a-RFC-3389-comfort-noise-codec.patch
+++ /dev/null
@@ -1,401 +0,0 @@
-From 9b500b8f6c9806f3979f9d1fb874b7f4a802c656 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 23 Oct 2012 00:02:41 +0300
-Subject: [PATCH 072/278] avcodec: Add a RFC 3389 comfort noise codec
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This isn't too useful as a normal codec, but can be used in
-voip style applications. The decoder updates the noise
-generator parameters when a packet is given to it for decoding,
-but if called with an empty packet, it generates more noise
-according to the last parameters.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- configure               |    1 +
- libavcodec/Makefile     |    2 +
- libavcodec/allcodecs.c  |    1 +
- libavcodec/avcodec.h    |    1 +
- libavcodec/cngdec.c     |  162 +++++++++++++++++++++++++++++++++++++++++++++++
- libavcodec/cngenc.c     |  116 +++++++++++++++++++++++++++++++++
- libavcodec/codec_desc.c |    7 ++
- libavcodec/version.h    |    2 +-
- 8 files changed, 291 insertions(+), 1 deletion(-)
- create mode 100644 libavcodec/cngdec.c
- create mode 100644 libavcodec/cngenc.c
-
-diff --git a/configure b/configure
-index 1a006be..2abc465 100755
---- a/configure
-+++ b/configure
-@@ -1440,6 +1440,7 @@ atrac3_decoder_select="mdct"
- binkaudio_dct_decoder_select="mdct rdft dct sinewin"
- binkaudio_rdft_decoder_select="mdct rdft sinewin"
- cavs_decoder_select="golomb mpegvideo"
-+comfortnoise_encoder_select="lpc"
- cook_decoder_select="mdct sinewin"
- cscd_decoder_select="lzo"
- cscd_decoder_suggest="zlib"
-diff --git a/libavcodec/Makefile b/libavcodec/Makefile
-index d8c853a..4d14aea 100644
---- a/libavcodec/Makefile
-+++ b/libavcodec/Makefile
-@@ -129,6 +129,8 @@ OBJS-$(CONFIG_CLJR_DECODER)            += cljr.o
- OBJS-$(CONFIG_CLJR_ENCODER)            += cljr.o
- OBJS-$(CONFIG_CLLC_DECODER)            += cllc.o
- OBJS-$(CONFIG_COOK_DECODER)            += cook.o
-+OBJS-$(CONFIG_COMFORTNOISE_DECODER)    += cngdec.o celp_filters.o
-+OBJS-$(CONFIG_COMFORTNOISE_ENCODER)    += cngenc.o
- OBJS-$(CONFIG_CSCD_DECODER)            += cscd.o
- OBJS-$(CONFIG_CYUV_DECODER)            += cyuv.o
- OBJS-$(CONFIG_DCA_DECODER)             += dcadec.o dca.o dcadsp.o      \
-diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
-index b175fbb..e5fb351 100644
---- a/libavcodec/allcodecs.c
-+++ b/libavcodec/allcodecs.c
-@@ -91,6 +91,7 @@ void avcodec_register_all(void)
-     REGISTER_DECODER (CINEPAK, cinepak);
-     REGISTER_ENCDEC  (CLJR, cljr);
-     REGISTER_DECODER (CLLC, cllc);
-+    REGISTER_ENCDEC  (COMFORTNOISE, comfortnoise);
-     REGISTER_DECODER (CSCD, cscd);
-     REGISTER_DECODER (CYUV, cyuv);
-     REGISTER_DECODER (DFA, dfa);
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index c505a92..d6a4e4d 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -406,6 +406,7 @@ enum AVCodecID {
-     AV_CODEC_ID_IAC,
-     AV_CODEC_ID_ILBC,
-     AV_CODEC_ID_OPUS,
-+    AV_CODEC_ID_COMFORT_NOISE,
- 
-     /* subtitle codecs */
-     AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,          ///< A dummy ID pointing at the start of subtitle codecs.
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-new file mode 100644
-index 0000000..c22fd55
---- /dev/null
-+++ b/libavcodec/cngdec.c
-@@ -0,0 +1,162 @@
-+/*
-+ * RFC 3389 comfort noise generator
-+ * Copyright (c) 2012 Martin Storsjo
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include <math.h>
-+
-+#include "libavutil/common.h"
-+#include "avcodec.h"
-+#include "celp_filters.h"
-+#include "libavutil/lfg.h"
-+
-+typedef struct CNGContext {
-+    AVFrame avframe;
-+    float *refl_coef, *target_refl_coef;
-+    float *lpc_coef;
-+    int order;
-+    int energy, target_energy;
-+    float *filter_out;
-+    float *excitation;
-+    AVLFG lfg;
-+} CNGContext;
-+
-+static av_cold int cng_decode_close(AVCodecContext *avctx)
-+{
-+    CNGContext *p = avctx->priv_data;
-+    av_free(p->refl_coef);
-+    av_free(p->target_refl_coef);
-+    av_free(p->lpc_coef);
-+    av_free(p->filter_out);
-+    av_free(p->excitation);
-+    return 0;
-+}
-+
-+static av_cold int cng_decode_init(AVCodecContext *avctx)
-+{
-+    CNGContext *p = avctx->priv_data;
-+
-+    avctx->sample_fmt  = AV_SAMPLE_FMT_S16;
-+    avctx->channels    = 1;
-+    avctx->sample_rate = 8000;
-+
-+    avcodec_get_frame_defaults(&p->avframe);
-+    avctx->coded_frame  = &p->avframe;
-+    p->order            = 12;
-+    avctx->frame_size   = 640;
-+    p->refl_coef        = av_mallocz(p->order * sizeof(*p->refl_coef));
-+    p->target_refl_coef = av_mallocz(p->order * sizeof(*p->target_refl_coef));
-+    p->lpc_coef         = av_mallocz(p->order * sizeof(*p->lpc_coef));
-+    p->filter_out       = av_mallocz((avctx->frame_size + p->order) *
-+                                     sizeof(*p->filter_out));
-+    p->excitation       = av_mallocz(avctx->frame_size * sizeof(*p->excitation));
-+    if (!p->refl_coef || !p->target_refl_coef || !p->lpc_coef ||
-+        !p->filter_out || !p->excitation) {
-+        cng_decode_close(avctx);
-+        return AVERROR(ENOMEM);
-+    }
-+
-+    av_lfg_init(&p->lfg, 0);
-+
-+    return 0;
-+}
-+
-+static void make_lpc_coefs(float *lpc, const float *refl, int order)
-+{
-+    float buf[100];
-+    float *next, *cur;
-+    int m, i;
-+    next = buf;
-+    cur  = lpc;
-+    for (m = 0; m < order; m++) {
-+        next[m] = refl[m];
-+        for (i = 0; i < m; i++)
-+            next[i] = cur[i] + refl[m] * cur[m - i - 1];
-+        FFSWAP(float*, next, cur);
-+    }
-+    if (cur != lpc)
-+        memcpy(lpc, cur, sizeof(*lpc) * order);
-+}
-+
-+static int cng_decode_frame(AVCodecContext *avctx, void *data,
-+                              int *got_frame_ptr, AVPacket *avpkt)
-+{
-+
-+    CNGContext *p = avctx->priv_data;
-+    int buf_size  = avpkt->size;
-+    int ret, i;
-+    int16_t *buf_out;
-+    float e = 1.0;
-+    float scaling;
-+
-+    if (avpkt->size) {
-+        float dbov = -avpkt->data[0] / 10.0;
-+        p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
-+        memset(p->target_refl_coef, 0, sizeof(p->refl_coef));
-+        for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
-+            p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
-+        }
-+        make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
-+    }
-+
-+    p->energy = p->energy / 2 + p->target_energy / 2;
-+    for (i = 0; i < p->order; i++)
-+        p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
-+
-+    for (i = 0; i < p->order; i++)
-+        e *= 1.0 - p->refl_coef[i]*p->refl_coef[i];
-+
-+    scaling = sqrt(e * p->energy / 1081109975);
-+    for (i = 0; i < avctx->frame_size; i++) {
-+        int r = (av_lfg_get(&p->lfg) & 0xffff) - 0x8000;
-+        p->excitation[i] = scaling * r;
-+    }
-+    ff_celp_lp_synthesis_filterf(p->filter_out + p->order, p->lpc_coef,
-+                                 p->excitation, avctx->frame_size, p->order);
-+
-+    p->avframe.nb_samples = avctx->frame_size;
-+    if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
-+        av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-+        return ret;
-+    }
-+    buf_out = (int16_t *)p->avframe.data[0];
-+    for (i = 0; i < avctx->frame_size; i++)
-+        buf_out[i] = p->filter_out[i + p->order];
-+    memcpy(p->filter_out, p->filter_out + avctx->frame_size,
-+           p->order * sizeof(*p->filter_out));
-+
-+    *got_frame_ptr   = 1;
-+    *(AVFrame *)data = p->avframe;
-+
-+    return buf_size;
-+}
-+
-+AVCodec ff_comfortnoise_decoder = {
-+    .name           = "comfortnoise",
-+    .type           = AVMEDIA_TYPE_AUDIO,
-+    .id             = AV_CODEC_ID_COMFORT_NOISE,
-+    .priv_data_size = sizeof(CNGContext),
-+    .init           = cng_decode_init,
-+    .decode         = cng_decode_frame,
-+    .close          = cng_decode_close,
-+    .long_name      = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
-+    .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
-+                                                     AV_SAMPLE_FMT_NONE },
-+    .capabilities   = CODEC_CAP_DELAY | CODEC_CAP_DR1,
-+};
-diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c
-new file mode 100644
-index 0000000..1e3f8f0
---- /dev/null
-+++ b/libavcodec/cngenc.c
-@@ -0,0 +1,116 @@
-+/*
-+ * RFC 3389 comfort noise generator
-+ * Copyright (c) 2012 Martin Storsjo
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include <math.h>
-+
-+#include "libavutil/common.h"
-+#include "avcodec.h"
-+#include "internal.h"
-+#include "lpc.h"
-+
-+typedef struct CNGContext {
-+    LPCContext lpc;
-+    int order;
-+    int32_t *samples32;
-+    double *ref_coef;
-+} CNGContext;
-+
-+static av_cold int cng_encode_close(AVCodecContext *avctx)
-+{
-+    CNGContext *p = avctx->priv_data;
-+    ff_lpc_end(&p->lpc);
-+    av_free(p->samples32);
-+    av_free(p->ref_coef);
-+    return 0;
-+}
-+
-+static av_cold int cng_encode_init(AVCodecContext *avctx)
-+{
-+    CNGContext *p = avctx->priv_data;
-+    int ret;
-+
-+    if (avctx->channels != 1) {
-+        av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
-+        return AVERROR(EINVAL);
-+    }
-+
-+    avctx->frame_size = 640;
-+    p->order = 10;
-+    if ((ret = ff_lpc_init(&p->lpc, avctx->frame_size, p->order, FF_LPC_TYPE_LEVINSON)) < 0)
-+        return ret;
-+    p->samples32 = av_malloc(avctx->frame_size * sizeof(*p->samples32));
-+    p->ref_coef = av_malloc(p->order * sizeof(*p->ref_coef));
-+    if (!p->samples32 || !p->ref_coef) {
-+        cng_encode_close(avctx);
-+        return AVERROR(ENOMEM);
-+    }
-+
-+    return 0;
-+}
-+
-+static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-+                             const AVFrame *frame, int *got_packet_ptr)
-+{
-+    CNGContext *p = avctx->priv_data;
-+    int ret, i;
-+    double energy = 0;
-+    int qdbov;
-+    int16_t *samples = (int16_t*) frame->data[0];
-+
-+    if ((ret = ff_alloc_packet(avpkt, 1 + p->order))) {
-+        av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
-+        return ret;
-+    }
-+
-+    for (i = 0; i < frame->nb_samples; i++) {
-+        p->samples32[i] = samples[i];
-+        energy += samples[i] * samples[i];
-+    }
-+    energy /= frame->nb_samples;
-+    if (energy > 0) {
-+        double dbov = 10 * log10(energy / 1081109975);
-+        qdbov = av_clip(-floor(dbov), 0, 127);
-+    } else {
-+        qdbov = 127;
-+    }
-+    ret = ff_lpc_calc_ref_coefs(&p->lpc, p->samples32, p->order, p->ref_coef);
-+    avpkt->data[0] = qdbov;
-+    for (i = 0; i < p->order; i++)
-+        avpkt->data[1 + i] = p->ref_coef[i] * 127 + 127;
-+
-+    *got_packet_ptr = 1;
-+    avpkt->size = 1 + p->order;
-+
-+    return 0;
-+}
-+
-+AVCodec ff_comfortnoise_encoder = {
-+    .name           = "comfortnoise",
-+    .type           = AVMEDIA_TYPE_AUDIO,
-+    .id             = AV_CODEC_ID_COMFORT_NOISE,
-+    .priv_data_size = sizeof(CNGContext),
-+    .init           = cng_encode_init,
-+    .encode2        = cng_encode_frame,
-+    .close          = cng_encode_close,
-+    .long_name      = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
-+    .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
-+                                                     AV_SAMPLE_FMT_NONE },
-+};
-diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
-index 818a35e..a8ff314 100644
---- a/libavcodec/codec_desc.c
-+++ b/libavcodec/codec_desc.c
-@@ -2112,6 +2112,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
-         .long_name = NULL_IF_CONFIG_SMALL("Opus (Opus Interactive Audio Codec)"),
-         .props     = AV_CODEC_PROP_LOSSY,
-     },
-+    {
-+        .id        = AV_CODEC_ID_COMFORT_NOISE,
-+        .type      = AVMEDIA_TYPE_AUDIO,
-+        .name      = "comfortnoise",
-+        .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 Comfort Noise"),
-+        .props     = AV_CODEC_PROP_LOSSY,
-+    },
- 
-     /* subtitle codecs */
-     {
-diff --git a/libavcodec/version.h b/libavcodec/version.h
-index b702f4b..5ee7c7c 100644
---- a/libavcodec/version.h
-+++ b/libavcodec/version.h
-@@ -27,7 +27,7 @@
-  */
- 
- #define LIBAVCODEC_VERSION_MAJOR 54
--#define LIBAVCODEC_VERSION_MINOR 31
-+#define LIBAVCODEC_VERSION_MINOR 32
- #define LIBAVCODEC_VERSION_MICRO  0
- 
- #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0073-lavfi-add-ashowinfo-filter.patch b/debian/patches/post-9beta2/0073-lavfi-add-ashowinfo-filter.patch
deleted file mode 100644
index 9dbc6b4..0000000
--- a/debian/patches/post-9beta2/0073-lavfi-add-ashowinfo-filter.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-From 20dd41af8513de427b00ee598339c9bc5778bdc5 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Tue, 23 Oct 2012 21:37:26 +0200
-Subject: [PATCH 073/278] lavfi: add ashowinfo filter
-
-It can be useful for debugging.
-
-Based on a patch by Stefano Sabatini <stefano.sabatini-lala at poste.it>
----
- Changelog                  |    1 +
- doc/filters.texi           |   41 +++++++++++++
- libavfilter/Makefile       |    1 +
- libavfilter/af_ashowinfo.c |  136 ++++++++++++++++++++++++++++++++++++++++++++
- libavfilter/allfilters.c   |    1 +
- libavfilter/version.h      |    2 +-
- 6 files changed, 181 insertions(+), 1 deletion(-)
- create mode 100644 libavfilter/af_ashowinfo.c
-
-diff --git a/Changelog b/Changelog
-index c3d55c1..e2c4273 100644
---- a/Changelog
-+++ b/Changelog
-@@ -4,6 +4,7 @@ releases are sorted from youngest to oldest.
- version <next>:
- - metadata (INFO tag) support in WAV muxer
- - support for building DLLs using MSVC
-+- ashowinfo audio filter
- 
- 
- version 9_beta1:
-diff --git a/doc/filters.texi b/doc/filters.texi
-index 8f90e84..85c8ae0 100644
---- a/doc/filters.texi
-+++ b/doc/filters.texi
-@@ -175,6 +175,47 @@ stream ends. The default value is 2 seconds.
- 
- Pass the audio source unchanged to the output.
- 
-+ at section ashowinfo
-+
-+Show a line containing various information for each input audio frame.
-+The input audio is not modified.
-+
-+The shown line contains a sequence of key/value pairs of the form
-+ at var{key}:@var{value}.
-+
-+A description of each shown parameter follows:
-+
-+ at table @option
-+ at item n
-+sequential number of the input frame, starting from 0
-+
-+ at item pts
-+Presentation timestamp of the input frame, in time base units; the time base
-+depends on the filter input pad, and is usually 1/@var{sample_rate}.
-+
-+ at item pts_time
-+presentation timestamp of the input frame in seconds
-+
-+ at item fmt
-+sample format
-+
-+ at item chlayout
-+channel layout
-+
-+ at item rate
-+sample rate for the audio frame
-+
-+ at item nb_samples
-+number of samples (per channel) in the frame
-+
-+ at item checksum
-+Adler-32 checksum (printed in hexadecimal) of the audio data. For planar audio
-+the data is treated as if all the planes were concatenated.
-+
-+ at item plane_checksums
-+A list of Adler-32 checksums for each data plane.
-+ at end table
-+
- @section asplit
- 
- Split input audio into several identical outputs.
-diff --git a/libavfilter/Makefile b/libavfilter/Makefile
-index 530aa57..9770e1f 100644
---- a/libavfilter/Makefile
-+++ b/libavfilter/Makefile
-@@ -28,6 +28,7 @@ OBJS-$(CONFIG_AFIFO_FILTER)                  += fifo.o
- OBJS-$(CONFIG_AFORMAT_FILTER)                += af_aformat.o
- OBJS-$(CONFIG_AMIX_FILTER)                   += af_amix.o
- OBJS-$(CONFIG_ANULL_FILTER)                  += af_anull.o
-+OBJS-$(CONFIG_ASHOWINFO_FILTER)              += af_ashowinfo.o
- OBJS-$(CONFIG_ASPLIT_FILTER)                 += split.o
- OBJS-$(CONFIG_ASYNCTS_FILTER)                += af_asyncts.o
- OBJS-$(CONFIG_CHANNELMAP_FILTER)             += af_channelmap.o
-diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
-new file mode 100644
-index 0000000..00e0322
---- /dev/null
-+++ b/libavfilter/af_ashowinfo.c
-@@ -0,0 +1,136 @@
-+/*
-+ * Copyright (c) 2011 Stefano Sabatini
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file
-+ * filter for showing textual audio frame information
-+ */
-+
-+#include <inttypes.h>
-+#include <stddef.h>
-+
-+#include "libavutil/adler32.h"
-+#include "libavutil/audioconvert.h"
-+#include "libavutil/common.h"
-+#include "libavutil/mem.h"
-+#include "libavutil/samplefmt.h"
-+
-+#include "audio.h"
-+#include "avfilter.h"
-+
-+typedef struct AShowInfoContext {
-+    /**
-+     * Scratch space for individual plane checksums for planar audio
-+     */
-+    uint32_t *plane_checksums;
-+
-+    /**
-+     * Frame counter
-+     */
-+    uint64_t frame;
-+} AShowInfoContext;
-+
-+static int config_input(AVFilterLink *inlink)
-+{
-+    AShowInfoContext *s = inlink->dst->priv;
-+    int channels = av_get_channel_layout_nb_channels(inlink->channel_layout);
-+    s->plane_checksums = av_malloc(channels * sizeof(*s->plane_checksums));
-+    if (!s->plane_checksums)
-+        return AVERROR(ENOMEM);
-+
-+    return 0;
-+}
-+
-+static void uninit(AVFilterContext *ctx)
-+{
-+    AShowInfoContext *s = ctx->priv;
-+    av_freep(&s->plane_checksums);
-+}
-+
-+static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
-+{
-+    AVFilterContext *ctx = inlink->dst;
-+    AShowInfoContext *s  = ctx->priv;
-+    char chlayout_str[128];
-+    uint32_t checksum = 0;
-+    int channels    = av_get_channel_layout_nb_channels(buf->audio->channel_layout);
-+    int planar      = av_sample_fmt_is_planar(buf->format);
-+    int block_align = av_get_bytes_per_sample(buf->format) * (planar ? 1 : channels);
-+    int data_size   = buf->audio->nb_samples * block_align;
-+    int planes      = planar ? channels : 1;
-+    int i;
-+
-+    for (i = 0; i < planes; i++) {
-+        uint8_t *data = buf->extended_data[i];
-+
-+        s->plane_checksums[i] = av_adler32_update(0, data, data_size);
-+        checksum = i ? av_adler32_update(checksum, data, data_size) :
-+                       s->plane_checksums[0];
-+    }
-+
-+    av_get_channel_layout_string(chlayout_str, sizeof(chlayout_str), -1,
-+                                 buf->audio->channel_layout);
-+
-+    av_log(ctx, AV_LOG_INFO,
-+           "n:%"PRIu64" pts:%"PRId64" pts_time:%f "
-+           "fmt:%s chlayout:%s rate:%d nb_samples:%d "
-+           "checksum:%08X ",
-+           s->frame, buf->pts, buf->pts * av_q2d(inlink->time_base),
-+           av_get_sample_fmt_name(buf->format), chlayout_str,
-+           buf->audio->sample_rate, buf->audio->nb_samples,
-+           checksum);
-+
-+    av_log(ctx, AV_LOG_INFO, "plane_checksums: [ ");
-+    for (i = 0; i < planes; i++)
-+        av_log(ctx, AV_LOG_INFO, "%08X ", s->plane_checksums[i]);
-+    av_log(ctx, AV_LOG_INFO, "]\n");
-+
-+    s->frame++;
-+    return ff_filter_samples(inlink->dst->outputs[0], buf);
-+}
-+
-+static const AVFilterPad inputs[] = {
-+    {
-+        .name       = "default",
-+        .type             = AVMEDIA_TYPE_AUDIO,
-+        .get_audio_buffer = ff_null_get_audio_buffer,
-+        .config_props     = config_input,
-+        .filter_samples   = filter_samples,
-+        .min_perms        = AV_PERM_READ,
-+    },
-+    { NULL },
-+};
-+
-+static const AVFilterPad outputs[] = {
-+    {
-+        .name = "default",
-+        .type = AVMEDIA_TYPE_AUDIO,
-+    },
-+    { NULL },
-+};
-+
-+AVFilter avfilter_af_ashowinfo = {
-+    .name        = "ashowinfo",
-+    .description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."),
-+    .priv_size   = sizeof(AShowInfoContext),
-+    .uninit      = uninit,
-+    .inputs      = inputs,
-+    .outputs     = outputs,
-+};
-diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
-index 94b3115..e759931 100644
---- a/libavfilter/allfilters.c
-+++ b/libavfilter/allfilters.c
-@@ -39,6 +39,7 @@ void avfilter_register_all(void)
-     REGISTER_FILTER (AFORMAT,     aformat,     af);
-     REGISTER_FILTER (AMIX,        amix,        af);
-     REGISTER_FILTER (ANULL,       anull,       af);
-+    REGISTER_FILTER (ASHOWINFO,   ashowinfo,   af);
-     REGISTER_FILTER (ASPLIT,      asplit,      af);
-     REGISTER_FILTER (ASYNCTS,     asyncts,     af);
-     REGISTER_FILTER (CHANNELMAP,  channelmap,  af);
-diff --git a/libavfilter/version.h b/libavfilter/version.h
-index 0e72a47..eb5326b 100644
---- a/libavfilter/version.h
-+++ b/libavfilter/version.h
-@@ -29,7 +29,7 @@
- #include "libavutil/avutil.h"
- 
- #define LIBAVFILTER_VERSION_MAJOR  3
--#define LIBAVFILTER_VERSION_MINOR  1
-+#define LIBAVFILTER_VERSION_MINOR  2
- #define LIBAVFILTER_VERSION_MICRO  0
- 
- #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0074-dv-use-AVStream.index-instead-of-abusing-AVStream.id.patch b/debian/patches/post-9beta2/0074-dv-use-AVStream.index-instead-of-abusing-AVStream.id.patch
deleted file mode 100644
index ec10376..0000000
--- a/debian/patches/post-9beta2/0074-dv-use-AVStream.index-instead-of-abusing-AVStream.id.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 14f031d7ecfabba0ef02776d4516aa3dcb7c40d8 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 24 Oct 2012 09:06:32 +0200
-Subject: [PATCH 074/278] dv: use AVStream.index instead of abusing
- AVStream.id
-
----
- libavformat/dv.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/dv.c b/libavformat/dv.c
-index 70786b1..17c545c 100644
---- a/libavformat/dv.c
-+++ b/libavformat/dv.c
-@@ -372,7 +372,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
-     pkt->data         = buf;
-     pkt->size         = size;
-     pkt->flags       |= AV_PKT_FLAG_KEY;
--    pkt->stream_index = c->vst->id;
-+    pkt->stream_index = c->vst->index;
-     pkt->pts          = c->frames;
- 
-     c->frames++;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0075-dv-fix-indentation.patch b/debian/patches/post-9beta2/0075-dv-fix-indentation.patch
deleted file mode 100644
index cfb4256..0000000
--- a/debian/patches/post-9beta2/0075-dv-fix-indentation.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From ede4cedf47f4f0ad26d61d28aa0ae2917c0c833e Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 24 Oct 2012 09:12:42 +0200
-Subject: [PATCH 075/278] dv: fix indentation
-
----
- libavformat/dv.c |   60 +++++++++++++++++++++++++++---------------------------
- 1 file changed, 30 insertions(+), 30 deletions(-)
-
-diff --git a/libavformat/dv.c b/libavformat/dv.c
-index 17c545c..5ce73f7 100644
---- a/libavformat/dv.c
-+++ b/libavformat/dv.c
-@@ -230,24 +230,24 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
- 
-     /* Dynamic handling of the audio streams in DV */
-     for (i = 0; i < ach; i++) {
--       if (!c->ast[i]) {
--           c->ast[i] = avformat_new_stream(c->fctx, NULL);
--           if (!c->ast[i])
--               break;
--           avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
--           c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
--           c->ast[i]->codec->codec_id   = AV_CODEC_ID_PCM_S16LE;
--
--           av_init_packet(&c->audio_pkt[i]);
--           c->audio_pkt[i].size         = 0;
--           c->audio_pkt[i].data         = c->audio_buf[i];
--           c->audio_pkt[i].stream_index = c->ast[i]->index;
--           c->audio_pkt[i].flags       |= AV_PKT_FLAG_KEY;
--       }
--       c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
--       c->ast[i]->codec->channels    = 2;
--       c->ast[i]->codec->bit_rate    = 2 * dv_audio_frequency[freq] * 16;
--       c->ast[i]->start_time         = 0;
-+        if (!c->ast[i]) {
-+            c->ast[i] = avformat_new_stream(c->fctx, NULL);
-+            if (!c->ast[i])
-+                break;
-+            avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
-+            c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-+            c->ast[i]->codec->codec_id   = AV_CODEC_ID_PCM_S16LE;
-+
-+            av_init_packet(&c->audio_pkt[i]);
-+            c->audio_pkt[i].size         = 0;
-+            c->audio_pkt[i].data         = c->audio_buf[i];
-+            c->audio_pkt[i].stream_index = c->ast[i]->index;
-+            c->audio_pkt[i].flags       |= AV_PKT_FLAG_KEY;
-+        }
-+        c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
-+        c->ast[i]->codec->channels    = 2;
-+        c->ast[i]->codec->bit_rate    = 2 * dv_audio_frequency[freq] * 16;
-+        c->ast[i]->start_time         = 0;
-     }
-     c->ach = i;
- 
-@@ -265,7 +265,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
-         avctx = c->vst->codec;
- 
-         avpriv_set_pts_info(c->vst, 64, c->sys->time_base.num,
--                        c->sys->time_base.den);
-+                            c->sys->time_base.den);
-         avctx->time_base= c->sys->time_base;
-         if (!avctx->width){
-             avctx->width = c->sys->width;
-@@ -277,7 +277,7 @@ static int dv_extract_video_info(DVDemuxContext *c, uint8_t* frame)
-         vsc_pack = dv_extract_pack(frame, dv_video_control);
-         apt      = frame[4] & 0x07;
-         is16_9   = (vsc_pack && ((vsc_pack[2] & 0x07) == 0x02 ||
--                                (!apt && (vsc_pack[2] & 0x07) == 0x07)));
-+                                 (!apt && (vsc_pack[2] & 0x07) == 0x07)));
-         c->vst->sample_aspect_ratio = c->sys->sar[is16_9];
-         avctx->bit_rate = av_rescale_q(c->sys->frame_size, (AVRational){8,1},
-                                        c->sys->time_base);
-@@ -319,12 +319,12 @@ int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt)
-     int i;
- 
-     for (i = 0; i < c->ach; i++) {
--       if (c->ast[i] && c->audio_pkt[i].size) {
--           *pkt = c->audio_pkt[i];
--           c->audio_pkt[i].size = 0;
--           size = pkt->size;
--           break;
--       }
-+        if (c->ast[i] && c->audio_pkt[i].size) {
-+            *pkt = c->audio_pkt[i];
-+            c->audio_pkt[i].size = 0;
-+            size = pkt->size;
-+            break;
-+        }
-     }
- 
-     return size;
-@@ -339,16 +339,16 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
-     if (buf_size < DV_PROFILE_BYTES ||
-         !(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) ||
-         buf_size < c->sys->frame_size) {
--          return -1;   /* Broken frame, or not enough data */
-+        return -1;   /* Broken frame, or not enough data */
-     }
- 
-     /* Queueing audio packet */
-     /* FIXME: in case of no audio/bad audio we have to do something */
-     size = dv_extract_audio_info(c, buf);
-     for (i = 0; i < c->ach; i++) {
--       c->audio_pkt[i].size = size;
--       c->audio_pkt[i].pts  = c->abytes * 30000*8 / c->ast[i]->codec->bit_rate;
--       ppcm[i] = c->audio_buf[i];
-+        c->audio_pkt[i].size = size;
-+        c->audio_pkt[i].pts  = c->abytes * 30000 * 8 / c->ast[i]->codec->bit_rate;
-+        ppcm[i] = c->audio_buf[i];
-     }
-     if (c->ach)
-         dv_extract_audio(buf, ppcm, c->sys);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0076-Remove-usage-of-INIT_AVX-in-h264_intrapred_10bit.asm.patch b/debian/patches/post-9beta2/0076-Remove-usage-of-INIT_AVX-in-h264_intrapred_10bit.asm.patch
deleted file mode 100644
index e7a58b2..0000000
--- a/debian/patches/post-9beta2/0076-Remove-usage-of-INIT_AVX-in-h264_intrapred_10bit.asm.patch
+++ /dev/null
@@ -1,760 +0,0 @@
-From c285edd06ea64a24c610c10c06975975cec0d50f Mon Sep 17 00:00:00 2001
-From: "Ronald S. Bultje" <rsbultje at gmail.com>
-Date: Sun, 28 Oct 2012 18:39:22 -0700
-Subject: [PATCH 076/278] Remove usage of INIT_AVX in
- h264_intrapred_10bit.asm.
-
-Replace INIT_AVX by INIT_XMM avx. Port the whole file to use cpuflag
-based function declarations. Remove (now unused) cputype argument in
-function declaration macros. Change function prototypes to have mmx2
-instead of mmxext as suffix, since that's required by cpuflags.
----
- libavcodec/x86/h264_intrapred_10bit.asm |  306 ++++++++++++++++---------------
- libavcodec/x86/h264_intrapred_init.c    |   40 ++--
- 2 files changed, 177 insertions(+), 169 deletions(-)
-
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index 529134e..c3f6dc4 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -53,8 +53,8 @@ SECTION .text
- ;-----------------------------------------------------------------------------
- ; void pred4x4_down_right(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED4x4_DR 1
--cglobal pred4x4_down_right_10_%1, 3,3
-+%macro PRED4x4_DR 0
-+cglobal pred4x4_down_right_10, 3, 3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movhps    m1, [r1-8]
-@@ -79,21 +79,22 @@ cglobal pred4x4_down_right_10_%1, 3,3
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED4x4_DR sse2
-+PRED4x4_DR
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED4x4_DR ssse3
-+PRED4x4_DR
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED4x4_DR avx
-+INIT_XMM avx
-+PRED4x4_DR
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_vertical_right(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED4x4_VR 1
--cglobal pred4x4_vertical_right_10_%1, 3,3,6
-+%macro PRED4x4_VR 0
-+cglobal pred4x4_vertical_right_10, 3, 3, 6
-     sub     r0, r2
-     lea     r1, [r0+r2*2]
-     movq    m5, [r0]            ; ........t3t2t1t0
-@@ -119,21 +120,22 @@ cglobal pred4x4_vertical_right_10_%1, 3,3,6
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED4x4_VR sse2
-+PRED4x4_VR
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED4x4_VR ssse3
-+PRED4x4_VR
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED4x4_VR avx
-+INIT_XMM avx
-+PRED4x4_VR
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_horizontal_down(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED4x4_HD 1
--cglobal pred4x4_horizontal_down_10_%1, 3,3
-+%macro PRED4x4_HD 0
-+cglobal pred4x4_horizontal_down_10, 3, 3
-     sub        r0, r2
-     lea        r1, [r0+r2*2]
-     movq       m0, [r0-8]      ; lt ..
-@@ -162,14 +164,15 @@ cglobal pred4x4_horizontal_down_10_%1, 3,3
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED4x4_HD sse2
-+PRED4x4_HD
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED4x4_HD ssse3
-+PRED4x4_HD
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED4x4_HD avx
-+INIT_XMM avx
-+PRED4x4_HD
- %endif
- 
- ;-----------------------------------------------------------------------------
-@@ -192,8 +195,8 @@ PRED4x4_HD avx
-     HADDD   %1, %2
- %endmacro
- 
--INIT_MMX
--cglobal pred4x4_dc_10_mmxext, 3,3
-+INIT_MMX mmx2
-+cglobal pred4x4_dc_10, 3, 3
-     sub    r0, r2
-     lea    r1, [r0+r2*2]
-     movq   m2, [r0+r2*1-8]
-@@ -216,8 +219,8 @@ cglobal pred4x4_dc_10_mmxext, 3,3
- ;-----------------------------------------------------------------------------
- ; void pred4x4_down_left(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED4x4_DL 1
--cglobal pred4x4_down_left_10_%1, 3,3
-+%macro PRED4x4_DL 0
-+cglobal pred4x4_down_left_10, 3, 3
-     sub        r0, r2
-     movq       m0, [r0]
-     movhps     m0, [r1]
-@@ -236,18 +239,18 @@ cglobal pred4x4_down_left_10_%1, 3,3
-     RET
- %endmacro
- 
--INIT_XMM
--PRED4x4_DL sse2
-+INIT_XMM sse2
-+PRED4x4_DL
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED4x4_DL avx
-+INIT_XMM avx
-+PRED4x4_DL
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_vertical_left(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED4x4_VL 1
--cglobal pred4x4_vertical_left_10_%1, 3,3
-+%macro PRED4x4_VL 0
-+cglobal pred4x4_vertical_left_10, 3, 3
-     sub        r0, r2
-     movu       m1, [r0]
-     movhps     m1, [r1]
-@@ -265,18 +268,18 @@ cglobal pred4x4_vertical_left_10_%1, 3,3
-     RET
- %endmacro
- 
--INIT_XMM
--PRED4x4_VL sse2
-+INIT_XMM sse2
-+PRED4x4_VL
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED4x4_VL avx
-+INIT_XMM avx
-+PRED4x4_VL
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_horizontal_up(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--INIT_MMX
--cglobal pred4x4_horizontal_up_10_mmxext, 3,3
-+INIT_MMX mmx2
-+cglobal pred4x4_horizontal_up_10, 3, 3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movq      m0, [r0+r2*1-8]
-@@ -309,8 +312,8 @@ cglobal pred4x4_horizontal_up_10_mmxext, 3,3
- ;-----------------------------------------------------------------------------
- ; void pred8x8_vertical(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--INIT_XMM
--cglobal pred8x8_vertical_10_sse2, 2,2
-+INIT_XMM sse2
-+cglobal pred8x8_vertical_10, 2, 2
-     sub  r0, r1
-     mova m0, [r0]
- %rep 3
-@@ -325,8 +328,8 @@ cglobal pred8x8_vertical_10_sse2, 2,2
- ;-----------------------------------------------------------------------------
- ; void pred8x8_horizontal(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--INIT_XMM
--cglobal pred8x8_horizontal_10_sse2, 2,3
-+INIT_XMM sse2
-+cglobal pred8x8_horizontal_10, 2, 3
-     mov         r2d, 4
- .loop:
-     movq         m0, [r0+r1*0-8]
-@@ -355,8 +358,8 @@ cglobal pred8x8_horizontal_10_sse2, 2,3
- %endif
- %endmacro
- 
--%macro PRED8x8_DC 2
--cglobal pred8x8_dc_10_%1, 2,6
-+%macro PRED8x8_DC 1
-+cglobal pred8x8_dc_10, 2, 6
-     sub         r0, r1
-     pxor        m4, m4
-     movq        m0, [r0+0]
-@@ -372,7 +375,7 @@ cglobal pred8x8_dc_10_%1, 2,6
-     paddw       m1, m3
-     punpcklwd   m0, m1
- %endif
--    %2          m2, m0, 00001110b
-+    %1          m2, m0, 00001110b
-     paddw       m0, m2
- 
-     lea         r5, [r1*3]
-@@ -397,8 +400,8 @@ cglobal pred8x8_dc_10_%1, 2,6
- 
-     punpcklwd   m2, m3
-     punpckldq   m0, m2            ; s0, s1, s2, s3
--    %2          m3, m0, 11110110b ; s2, s1, s3, s3
--    %2          m0, m0, 01110100b ; s0, s1, s3, s1
-+    %1          m3, m0, 11110110b ; s2, s1, s3, s3
-+    %1          m0, m0, 01110100b ; s0, s1, s3, s1
-     paddw       m0, m3
-     psrlw       m0, 2
-     pavgw       m0, m4            ; s0+s2, s1, s3, s1+s3
-@@ -424,16 +427,16 @@ cglobal pred8x8_dc_10_%1, 2,6
-     RET
- %endmacro
- 
--INIT_MMX
--PRED8x8_DC mmxext, pshufw
--INIT_XMM
--PRED8x8_DC sse2  , pshuflw
-+INIT_MMX mmx2
-+PRED8x8_DC pshufw
-+INIT_XMM sse2
-+PRED8x8_DC pshuflw
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8_top_dc(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--INIT_XMM
--cglobal pred8x8_top_dc_10_sse2, 2,4
-+INIT_XMM sse2
-+cglobal pred8x8_top_dc_10, 2, 4
-     sub         r0, r1
-     mova        m0, [r0]
-     pshuflw     m1, m0, 0x4e
-@@ -459,8 +462,8 @@ cglobal pred8x8_top_dc_10_sse2, 2,4
- ;-----------------------------------------------------------------------------
- ; void pred8x8_plane(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--INIT_XMM
--cglobal pred8x8_plane_10_sse2, 2,7,7
-+INIT_XMM sse2
-+cglobal pred8x8_plane_10, 2, 7, 7
-     sub       r0, r1
-     lea       r2, [r1*3]
-     lea       r3, [r0+r1*4]
-@@ -522,8 +525,8 @@ cglobal pred8x8_plane_10_sse2, 2,7,7
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_128_dc(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_128_DC 1
--cglobal pred8x8l_128_dc_10_%1, 4,4
-+%macro PRED8x8L_128_DC 0
-+cglobal pred8x8l_128_dc_10, 4, 4
-     mova      m0, [pw_512] ; (1<<(BIT_DEPTH-1))
-     lea       r1, [r3*3]
-     lea       r2, [r0+r3*4]
-@@ -538,16 +541,16 @@ cglobal pred8x8l_128_dc_10_%1, 4,4
-     RET
- %endmacro
- 
--INIT_MMX
--PRED8x8L_128_DC mmxext
--INIT_XMM
--PRED8x8L_128_DC sse2
-+INIT_MMX mmx2
-+PRED8x8L_128_DC
-+INIT_XMM sse2
-+PRED8x8L_128_DC
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_top_dc(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_TOP_DC 1
--cglobal pred8x8l_top_dc_10_%1, 4,4,6
-+%macro PRED8x8L_TOP_DC 0
-+cglobal pred8x8l_top_dc_10, 4, 4, 6
-     sub         r0, r3
-     mova        m0, [r0]
-     shr        r1d, 14
-@@ -575,19 +578,19 @@ cglobal pred8x8l_top_dc_10_%1, 4,4,6
-     RET
- %endmacro
- 
--INIT_XMM
--PRED8x8L_TOP_DC sse2
-+INIT_XMM sse2
-+PRED8x8L_TOP_DC
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_TOP_DC avx
-+INIT_XMM avx
-+PRED8x8L_TOP_DC
- %endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_dc(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- ;TODO: see if scalar is faster
--%macro PRED8x8L_DC 1
--cglobal pred8x8l_dc_10_%1, 4,6,6
-+%macro PRED8x8L_DC 0
-+cglobal pred8x8l_dc_10, 4, 6, 6
-     sub         r0, r3
-     lea         r4, [r0+r3*4]
-     lea         r5, [r3*3]
-@@ -634,18 +637,18 @@ cglobal pred8x8l_dc_10_%1, 4,6,6
-     RET
- %endmacro
- 
--INIT_XMM
--PRED8x8L_DC sse2
-+INIT_XMM sse2
-+PRED8x8L_DC
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_DC avx
-+INIT_XMM avx
-+PRED8x8L_DC
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_VERTICAL 1
--cglobal pred8x8l_vertical_10_%1, 4,4,6
-+%macro PRED8x8L_VERTICAL 0
-+cglobal pred8x8l_vertical_10, 4, 4, 6
-     sub         r0, r3
-     mova        m0, [r0]
-     shr        r1d, 14
-@@ -669,18 +672,18 @@ cglobal pred8x8l_vertical_10_%1, 4,4,6
-     RET
- %endmacro
- 
--INIT_XMM
--PRED8x8L_VERTICAL sse2
-+INIT_XMM sse2
-+PRED8x8L_VERTICAL
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_VERTICAL avx
-+INIT_XMM avx
-+PRED8x8L_VERTICAL
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_HORIZONTAL 1
--cglobal pred8x8l_horizontal_10_%1, 4,4,5
-+%macro PRED8x8L_HORIZONTAL 0
-+cglobal pred8x8l_horizontal_10, 4, 4, 5
-     mova        m0, [r0-16]
-     shr        r1d, 14
-     dec         r1
-@@ -723,21 +726,22 @@ cglobal pred8x8l_horizontal_10_%1, 4,4,5
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_HORIZONTAL sse2
-+PRED8x8L_HORIZONTAL
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_HORIZONTAL ssse3
-+PRED8x8L_HORIZONTAL
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_HORIZONTAL avx
-+INIT_XMM avx
-+PRED8x8L_HORIZONTAL
- %endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_left(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_DOWN_LEFT 1
--cglobal pred8x8l_down_left_10_%1, 4,4,7
-+%macro PRED8x8L_DOWN_LEFT 0
-+cglobal pred8x8l_down_left_10, 4, 4, 7
-     sub         r0, r3
-     mova        m3, [r0]
-     shr        r1d, 14
-@@ -792,23 +796,24 @@ cglobal pred8x8l_down_left_10_%1, 4,4,7
-     jmp .do_topright
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_DOWN_LEFT sse2
-+PRED8x8L_DOWN_LEFT
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_DOWN_LEFT ssse3
-+PRED8x8L_DOWN_LEFT
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_DOWN_LEFT avx
-+INIT_XMM avx
-+PRED8x8L_DOWN_LEFT
- %endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_right(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_DOWN_RIGHT 1
-+%macro PRED8x8L_DOWN_RIGHT 0
- ; standard forbids this when has_topleft is false
- ; no need to check
--cglobal pred8x8l_down_right_10_%1, 4,5,8
-+cglobal pred8x8l_down_right_10, 4, 5, 8
-     sub         r0, r3
-     lea         r4, [r0+r3*4]
-     lea         r1, [r3*3]
-@@ -867,22 +872,23 @@ cglobal pred8x8l_down_right_10_%1, 4,5,8
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_DOWN_RIGHT sse2
-+PRED8x8L_DOWN_RIGHT
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_DOWN_RIGHT ssse3
-+PRED8x8L_DOWN_RIGHT
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_DOWN_RIGHT avx
-+INIT_XMM avx
-+PRED8x8L_DOWN_RIGHT
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical_right(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_VERTICAL_RIGHT 1
-+%macro PRED8x8L_VERTICAL_RIGHT 0
- ; likewise with 8x8l_down_right
--cglobal pred8x8l_vertical_right_10_%1, 4,5,7
-+cglobal pred8x8l_vertical_right_10, 4, 5, 7
-     sub         r0, r3
-     lea         r4, [r0+r3*4]
-     lea         r1, [r3*3]
-@@ -938,21 +944,22 @@ cglobal pred8x8l_vertical_right_10_%1, 4,5,7
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_VERTICAL_RIGHT sse2
-+PRED8x8L_VERTICAL_RIGHT
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_VERTICAL_RIGHT ssse3
-+PRED8x8L_VERTICAL_RIGHT
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_VERTICAL_RIGHT avx
-+INIT_XMM avx
-+PRED8x8L_VERTICAL_RIGHT
- %endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal_up(pixel *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_HORIZONTAL_UP 1
--cglobal pred8x8l_horizontal_up_10_%1, 4,4,6
-+%macro PRED8x8L_HORIZONTAL_UP 0
-+cglobal pred8x8l_horizontal_up_10, 4, 4, 6
-     mova        m0, [r0+r3*0-16]
-     punpckhwd   m0, [r0+r3*1-16]
-     shr        r1d, 14
-@@ -1000,14 +1007,15 @@ cglobal pred8x8l_horizontal_up_10_%1, 4,4,6
-     RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_HORIZONTAL_UP sse2
-+PRED8x8L_HORIZONTAL_UP
-+INIT_XMM ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_HORIZONTAL_UP ssse3
-+PRED8x8L_HORIZONTAL_UP
- %if HAVE_AVX_EXTERNAL
--INIT_AVX
--PRED8x8L_HORIZONTAL_UP avx
-+INIT_XMM avx
-+PRED8x8L_HORIZONTAL_UP
- %endif
- 
- 
-@@ -1023,8 +1031,8 @@ PRED8x8L_HORIZONTAL_UP avx
- %endif
- %endmacro
- 
--%macro PRED16x16_VERTICAL 1
--cglobal pred16x16_vertical_10_%1, 2,3
-+%macro PRED16x16_VERTICAL 0
-+cglobal pred16x16_vertical_10, 2, 3
-     sub   r0, r1
-     mov  r2d, 8
-     mova  m0, [r0+ 0]
-@@ -1042,16 +1050,16 @@ cglobal pred16x16_vertical_10_%1, 2,3
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_VERTICAL mmxext
--INIT_XMM
--PRED16x16_VERTICAL sse2
-+INIT_MMX mmx2
-+PRED16x16_VERTICAL
-+INIT_XMM sse2
-+PRED16x16_VERTICAL
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_horizontal(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED16x16_HORIZONTAL 1
--cglobal pred16x16_horizontal_10_%1, 2,3
-+%macro PRED16x16_HORIZONTAL 0
-+cglobal pred16x16_horizontal_10, 2, 3
-     mov   r2d, 8
- .vloop:
-     movd   m0, [r0+r1*0-4]
-@@ -1066,16 +1074,16 @@ cglobal pred16x16_horizontal_10_%1, 2,3
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_HORIZONTAL mmxext
--INIT_XMM
--PRED16x16_HORIZONTAL sse2
-+INIT_MMX mmx2
-+PRED16x16_HORIZONTAL
-+INIT_XMM sse2
-+PRED16x16_HORIZONTAL
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_dc(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED16x16_DC 1
--cglobal pred16x16_dc_10_%1, 2,6
-+%macro PRED16x16_DC 0
-+cglobal pred16x16_dc_10, 2, 6
-     mov        r5, r0
-     sub        r0, r1
-     mova       m0, [r0+0]
-@@ -1112,16 +1120,16 @@ cglobal pred16x16_dc_10_%1, 2,6
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_DC mmxext
--INIT_XMM
--PRED16x16_DC sse2
-+INIT_MMX mmx2
-+PRED16x16_DC
-+INIT_XMM sse2
-+PRED16x16_DC
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_top_dc(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED16x16_TOP_DC 1
--cglobal pred16x16_top_dc_10_%1, 2,3
-+%macro PRED16x16_TOP_DC 0
-+cglobal pred16x16_top_dc_10, 2, 3
-     sub        r0, r1
-     mova       m0, [r0+0]
-     paddw      m0, [r0+mmsize]
-@@ -1144,16 +1152,16 @@ cglobal pred16x16_top_dc_10_%1, 2,3
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_TOP_DC mmxext
--INIT_XMM
--PRED16x16_TOP_DC sse2
-+INIT_MMX mmx2
-+PRED16x16_TOP_DC
-+INIT_XMM sse2
-+PRED16x16_TOP_DC
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_left_dc(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED16x16_LEFT_DC 1
--cglobal pred16x16_left_dc_10_%1, 2,6
-+%macro PRED16x16_LEFT_DC 0
-+cglobal pred16x16_left_dc_10, 2, 6
-     mov        r5, r0
- 
-     sub        r0, 2
-@@ -1181,16 +1189,16 @@ cglobal pred16x16_left_dc_10_%1, 2,6
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_LEFT_DC mmxext
--INIT_XMM
--PRED16x16_LEFT_DC sse2
-+INIT_MMX mmx2
-+PRED16x16_LEFT_DC
-+INIT_XMM sse2
-+PRED16x16_LEFT_DC
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_128_dc(pixel *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED16x16_128_DC 1
--cglobal pred16x16_128_dc_10_%1, 2,3
-+%macro PRED16x16_128_DC 0
-+cglobal pred16x16_128_dc_10, 2,3
-     mova       m0, [pw_512]
-     mov       r2d, 8
- .loop:
-@@ -1202,7 +1210,7 @@ cglobal pred16x16_128_dc_10_%1, 2,3
-     REP_RET
- %endmacro
- 
--INIT_MMX
--PRED16x16_128_DC mmxext
--INIT_XMM
--PRED16x16_128_DC sse2
-+INIT_MMX mmx2
-+PRED16x16_128_DC
-+INIT_XMM sse2
-+PRED16x16_128_DC
-diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
-index cd82f47..7a6daac 100644
---- a/libavcodec/x86/h264_intrapred_init.c
-+++ b/libavcodec/x86/h264_intrapred_init.c
-@@ -25,7 +25,7 @@
- #define PRED4x4(TYPE, DEPTH, OPT) \
- void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const uint8_t *topright, int stride);
- 
--PRED4x4(dc, 10, mmxext)
-+PRED4x4(dc, 10, mmx2)
- PRED4x4(down_left, 10, sse2)
- PRED4x4(down_left, 10, avx)
- PRED4x4(down_right, 10, sse2)
-@@ -36,7 +36,7 @@ PRED4x4(vertical_left, 10, avx)
- PRED4x4(vertical_right, 10, sse2)
- PRED4x4(vertical_right, 10, ssse3)
- PRED4x4(vertical_right, 10, avx)
--PRED4x4(horizontal_up, 10, mmxext)
-+PRED4x4(horizontal_up, 10, mmx2)
- PRED4x4(horizontal_down, 10, sse2)
- PRED4x4(horizontal_down, 10, ssse3)
- PRED4x4(horizontal_down, 10, avx)
-@@ -44,7 +44,7 @@ PRED4x4(horizontal_down, 10, avx)
- #define PRED8x8(TYPE, DEPTH, OPT) \
- void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
- 
--PRED8x8(dc, 10, mmxext)
-+PRED8x8(dc, 10, mmx2)
- PRED8x8(dc, 10, sse2)
- PRED8x8(top_dc, 10, sse2)
- PRED8x8(plane, 10, sse2)
-@@ -56,7 +56,7 @@ void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_tople
- 
- PRED8x8L(dc, 10, sse2)
- PRED8x8L(dc, 10, avx)
--PRED8x8L(128_dc, 10, mmxext)
-+PRED8x8L(128_dc, 10, mmx2)
- PRED8x8L(128_dc, 10, sse2)
- PRED8x8L(top_dc, 10, sse2)
- PRED8x8L(top_dc, 10, avx)
-@@ -81,17 +81,17 @@ PRED8x8L(horizontal_up, 10, avx)
- #define PRED16x16(TYPE, DEPTH, OPT)\
- void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
- 
--PRED16x16(dc, 10, mmxext)
-+PRED16x16(dc, 10, mmx2)
- PRED16x16(dc, 10, sse2)
--PRED16x16(top_dc, 10, mmxext)
-+PRED16x16(top_dc, 10, mmx2)
- PRED16x16(top_dc, 10, sse2)
--PRED16x16(128_dc, 10, mmxext)
-+PRED16x16(128_dc, 10, mmx2)
- PRED16x16(128_dc, 10, sse2)
--PRED16x16(left_dc, 10, mmxext)
-+PRED16x16(left_dc, 10, mmx2)
- PRED16x16(left_dc, 10, sse2)
--PRED16x16(vertical, 10, mmxext)
-+PRED16x16(vertical, 10, mmx2)
- PRED16x16(vertical, 10, sse2)
--PRED16x16(horizontal, 10, mmxext)
-+PRED16x16(horizontal, 10, mmx2)
- PRED16x16(horizontal, 10, sse2)
- 
- void ff_pred16x16_vertical_mmx     (uint8_t *src, int stride);
-@@ -309,20 +309,20 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
-         }
-     } else if (bit_depth == 10) {
-         if (EXTERNAL_MMXEXT(mm_flags)) {
--            h->pred4x4[DC_PRED             ] = ff_pred4x4_dc_10_mmxext;
--            h->pred4x4[HOR_UP_PRED         ] = ff_pred4x4_horizontal_up_10_mmxext;
-+            h->pred4x4[DC_PRED             ] = ff_pred4x4_dc_10_mmx2;
-+            h->pred4x4[HOR_UP_PRED         ] = ff_pred4x4_horizontal_up_10_mmx2;
- 
-             if (chroma_format_idc == 1)
--                h->pred8x8[DC_PRED8x8      ] = ff_pred8x8_dc_10_mmxext;
-+                h->pred8x8[DC_PRED8x8      ] = ff_pred8x8_dc_10_mmx2;
- 
--            h->pred8x8l[DC_128_PRED        ] = ff_pred8x8l_128_dc_10_mmxext;
-+            h->pred8x8l[DC_128_PRED        ] = ff_pred8x8l_128_dc_10_mmx2;
- 
--            h->pred16x16[DC_PRED8x8        ] = ff_pred16x16_dc_10_mmxext;
--            h->pred16x16[TOP_DC_PRED8x8    ] = ff_pred16x16_top_dc_10_mmxext;
--            h->pred16x16[DC_128_PRED8x8    ] = ff_pred16x16_128_dc_10_mmxext;
--            h->pred16x16[LEFT_DC_PRED8x8   ] = ff_pred16x16_left_dc_10_mmxext;
--            h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmxext;
--            h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmxext;
-+            h->pred16x16[DC_PRED8x8        ] = ff_pred16x16_dc_10_mmx2;
-+            h->pred16x16[TOP_DC_PRED8x8    ] = ff_pred16x16_top_dc_10_mmx2;
-+            h->pred16x16[DC_128_PRED8x8    ] = ff_pred16x16_128_dc_10_mmx2;
-+            h->pred16x16[LEFT_DC_PRED8x8   ] = ff_pred16x16_left_dc_10_mmx2;
-+            h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmx2;
-+            h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmx2;
-         }
-         if (EXTERNAL_SSE2(mm_flags)) {
-             h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0077-Remove-INIT_AVX-from-x86inc.asm.patch b/debian/patches/post-9beta2/0077-Remove-INIT_AVX-from-x86inc.asm.patch
deleted file mode 100644
index f606c29..0000000
--- a/debian/patches/post-9beta2/0077-Remove-INIT_AVX-from-x86inc.asm.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 08b028c18dc31b6de741861b9555669dcca4d12a Mon Sep 17 00:00:00 2001
-From: "Ronald S. Bultje" <rsbultje at gmail.com>
-Date: Sun, 28 Oct 2012 18:39:23 -0700
-Subject: [PATCH 077/278] Remove INIT_AVX from x86inc.asm.
-
----
- libavutil/x86/x86inc.asm |    8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
-index d734c6e..1fe9f55 100644
---- a/libavutil/x86/x86inc.asm
-+++ b/libavutil/x86/x86inc.asm
-@@ -678,14 +678,6 @@ SECTION .note.GNU-stack noalloc noexec nowrite progbits
-     INIT_CPUFLAGS %1
- %endmacro
- 
--; FIXME: INIT_AVX can be replaced by INIT_XMM avx
--%macro INIT_AVX 0
--    INIT_XMM
--    %assign avx_enabled 1
--    %define PALIGNR PALIGNR_SSSE3
--    %define RESET_MM_PERMUTATION INIT_AVX
--%endmacro
--
- %macro INIT_YMM 0-1+
-     %assign avx_enabled 1
-     %define RESET_MM_PERMUTATION INIT_YMM %1
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0078-x86-use-PRED4x4-8x8-8x8L-16x16-macros-to-declare-int.patch b/debian/patches/post-9beta2/0078-x86-use-PRED4x4-8x8-8x8L-16x16-macros-to-declare-int.patch
deleted file mode 100644
index 0f00f79..0000000
--- a/debian/patches/post-9beta2/0078-x86-use-PRED4x4-8x8-8x8L-16x16-macros-to-declare-int.patch
+++ /dev/null
@@ -1,749 +0,0 @@
-From bad8e33dc92aa2abd39410be86159a1d4336ff90 Mon Sep 17 00:00:00 2001
-From: "Ronald S. Bultje" <rsbultje at gmail.com>
-Date: Sun, 28 Oct 2012 20:44:53 -0700
-Subject: [PATCH 078/278] x86: use PRED4x4/8x8/8x8L/16x16 macros to declare
- intrapred prototypes.
-
----
- libavcodec/x86/h264_intrapred.asm    |   80 ++++-----
- libavcodec/x86/h264_intrapred_init.c |  296 +++++++++++++++++-----------------
- 2 files changed, 190 insertions(+), 186 deletions(-)
-
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index dc418f7..7c6aa12 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -53,7 +53,7 @@ cextern pw_32
- ; void pred16x16_vertical(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred16x16_vertical_mmx, 2,3
-+cglobal pred16x16_vertical_8_mmx, 2,3
-     sub   r0, r1
-     mov   r2, 8
-     movq mm0, [r0+0]
-@@ -68,7 +68,7 @@ cglobal pred16x16_vertical_mmx, 2,3
-     jg .loop
-     REP_RET
- 
--cglobal pred16x16_vertical_sse, 2,3
-+cglobal pred16x16_vertical_8_sse, 2,3
-     sub   r0, r1
-     mov   r2, 4
-     movaps xmm0, [r0]
-@@ -88,7 +88,7 @@ cglobal pred16x16_vertical_sse, 2,3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED16x16_H 0
--cglobal pred16x16_horizontal, 2,3
-+cglobal pred16x16_horizontal_8, 2,3
-     mov       r2, 8
- %if cpuflag(ssse3)
-     mova      m2, [pb_3]
-@@ -130,7 +130,7 @@ INIT_XMM
- ;-----------------------------------------------------------------------------
- 
- %macro PRED16x16_DC 0
--cglobal pred16x16_dc, 2,7
-+cglobal pred16x16_dc_8, 2,7
-     mov       r4, r0
-     sub       r0, r1
-     pxor      mm0, mm0
-@@ -193,7 +193,7 @@ INIT_XMM
- ;-----------------------------------------------------------------------------
- 
- %macro PRED16x16_TM_MMX 0
--cglobal pred16x16_tm_vp8, 2,5
-+cglobal pred16x16_tm_vp8_8, 2,5
-     sub        r0, r1
-     pxor      mm7, mm7
-     movq      mm0, [r0+0]
-@@ -234,7 +234,7 @@ INIT_MMX mmx2
- PRED16x16_TM_MMX
- INIT_MMX
- 
--cglobal pred16x16_tm_vp8_sse2, 2,6,6
-+cglobal pred16x16_tm_vp8_8_sse2, 2,6,6
-     sub          r0, r1
-     pxor       xmm2, xmm2
-     movdqa     xmm0, [r0]
-@@ -274,7 +274,7 @@ cglobal pred16x16_tm_vp8_sse2, 2,6,6
- ;-----------------------------------------------------------------------------
- 
- %macro H264_PRED16x16_PLANE 1
--cglobal pred16x16_plane_%1, 2,9,7
-+cglobal pred16x16_plane_%1_8, 2,9,7
-     mov          r2, r1           ; +stride
-     neg          r1               ; -stride
- 
-@@ -556,7 +556,7 @@ INIT_XMM
- ;-----------------------------------------------------------------------------
- 
- %macro H264_PRED8x8_PLANE 0
--cglobal pred8x8_plane, 2,9,7
-+cglobal pred8x8_plane_8, 2,9,7
-     mov          r2, r1           ; +stride
-     neg          r1               ; -stride
- 
-@@ -730,7 +730,7 @@ INIT_XMM
- ; void pred8x8_vertical(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred8x8_vertical_mmx, 2,2
-+cglobal pred8x8_vertical_8_mmx, 2,2
-     sub    r0, r1
-     movq  mm0, [r0]
- %rep 3
-@@ -747,7 +747,7 @@ cglobal pred8x8_vertical_mmx, 2,2
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8_H 0
--cglobal pred8x8_horizontal, 2,3
-+cglobal pred8x8_horizontal_8, 2,3
-     mov       r2, 4
- %if cpuflag(ssse3)
-     mova      m2, [pb_3]
-@@ -774,7 +774,7 @@ INIT_MMX
- ;-----------------------------------------------------------------------------
- ; void pred8x8_top_dc_mmxext(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--cglobal pred8x8_top_dc_mmxext, 2,5
-+cglobal pred8x8_top_dc_8_mmxext, 2,5
-     sub         r0, r1
-     movq       mm0, [r0]
-     pxor       mm1, mm1
-@@ -809,7 +809,7 @@ cglobal pred8x8_top_dc_mmxext, 2,5
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX
--cglobal pred8x8_dc_mmxext, 2,5
-+cglobal pred8x8_dc_8_mmxext, 2,5
-     sub       r0, r1
-     pxor      m7, m7
-     movd      m0, [r0+0]
-@@ -869,7 +869,7 @@ cglobal pred8x8_dc_mmxext, 2,5
- ; void pred8x8_dc_rv40(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred8x8_dc_rv40_mmxext, 2,7
-+cglobal pred8x8_dc_rv40_8_mmxext, 2,7
-     mov       r4, r0
-     sub       r0, r1
-     pxor      mm0, mm0
-@@ -906,7 +906,7 @@ cglobal pred8x8_dc_rv40_mmxext, 2,7
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8_TM_MMX 0
--cglobal pred8x8_tm_vp8, 2,6
-+cglobal pred8x8_tm_vp8_8, 2,6
-     sub        r0, r1
-     pxor      mm7, mm7
-     movq      mm0, [r0]
-@@ -946,7 +946,7 @@ INIT_MMX mmx2
- PRED8x8_TM_MMX
- INIT_MMX
- 
--cglobal pred8x8_tm_vp8_sse2, 2,6,4
-+cglobal pred8x8_tm_vp8_8_sse2, 2,6,4
-     sub          r0, r1
-     pxor       xmm1, xmm1
-     movq       xmm0, [r0]
-@@ -974,7 +974,7 @@ cglobal pred8x8_tm_vp8_sse2, 2,6,4
-     jg .loop
-     REP_RET
- 
--cglobal pred8x8_tm_vp8_ssse3, 2,3,6
-+cglobal pred8x8_tm_vp8_8_ssse3, 2,3,6
-     sub          r0, r1
-     movdqa     xmm4, [tm_shuf]
-     pxor       xmm1, xmm1
-@@ -1016,7 +1016,7 @@ cglobal pred8x8_tm_vp8_ssse3, 2,3,6
- ; void pred8x8l_top_dc(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- %macro PRED8x8L_TOP_DC 1
--cglobal pred8x8l_top_dc_%1, 4,4
-+cglobal pred8x8l_top_dc_8_%1, 4,4
-     sub          r0, r3
-     pxor        mm7, mm7
-     movq        mm0, [r0-8]
-@@ -1073,7 +1073,7 @@ PRED8x8L_TOP_DC ssse3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8L_DC 1
--cglobal pred8x8l_dc_%1, 4,5
-+cglobal pred8x8l_dc_8_%1, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1176,7 +1176,7 @@ PRED8x8L_DC ssse3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8L_HORIZONTAL 1
--cglobal pred8x8l_horizontal_%1, 4,4
-+cglobal pred8x8l_horizontal_8_%1, 4,4
-     sub          r0, r3
-     lea          r2, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1248,7 +1248,7 @@ PRED8x8L_HORIZONTAL ssse3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8L_VERTICAL 1
--cglobal pred8x8l_vertical_%1, 4,4
-+cglobal pred8x8l_vertical_8_%1, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1300,7 +1300,7 @@ PRED8x8L_VERTICAL ssse3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_down_left_mmxext, 4,5
-+cglobal pred8x8l_down_left_8_mmxext, 4,5
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1408,7 +1408,7 @@ cglobal pred8x8l_down_left_mmxext, 4,5
-     RET
- 
- %macro PRED8x8L_DOWN_LEFT 1
--cglobal pred8x8l_down_left_%1, 4,4
-+cglobal pred8x8l_down_left_8_%1, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1503,7 +1503,7 @@ PRED8x8L_DOWN_LEFT ssse3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_down_right_mmxext, 4,5
-+cglobal pred8x8l_down_right_8_mmxext, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1635,7 +1635,7 @@ cglobal pred8x8l_down_right_mmxext, 4,5
-     RET
- 
- %macro PRED8x8L_DOWN_RIGHT 1
--cglobal pred8x8l_down_right_%1, 4,5
-+cglobal pred8x8l_down_right_8_%1, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1757,7 +1757,7 @@ PRED8x8L_DOWN_RIGHT ssse3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_vertical_right_mmxext, 4,5
-+cglobal pred8x8l_vertical_right_8_mmxext, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1864,7 +1864,7 @@ cglobal pred8x8l_vertical_right_mmxext, 4,5
-     RET
- 
- %macro PRED8x8L_VERTICAL_RIGHT 1
--cglobal pred8x8l_vertical_right_%1, 4,5,7
-+cglobal pred8x8l_vertical_right_8_%1, 4,5,7
-     ; manually spill XMM registers for Win64 because
-     ; the code here is initialized with INIT_MMX
-     WIN64_SPILL_XMM 7
-@@ -1986,7 +1986,7 @@ PRED8x8L_VERTICAL_RIGHT ssse3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8L_VERTICAL_LEFT 1
--cglobal pred8x8l_vertical_left_%1, 4,4
-+cglobal pred8x8l_vertical_left_8_%1, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -2077,7 +2077,7 @@ PRED8x8L_VERTICAL_LEFT ssse3
- ;-----------------------------------------------------------------------------
- 
- %macro PRED8x8L_HORIZONTAL_UP 1
--cglobal pred8x8l_horizontal_up_%1, 4,4
-+cglobal pred8x8l_horizontal_up_8_%1, 4,4
-     sub          r0, r3
-     lea          r2, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2166,7 +2166,7 @@ PRED8x8L_HORIZONTAL_UP ssse3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_horizontal_down_mmxext, 4,5
-+cglobal pred8x8l_horizontal_down_8_mmxext, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2281,7 +2281,7 @@ cglobal pred8x8l_horizontal_down_mmxext, 4,5
-     RET
- 
- %macro PRED8x8L_HORIZONTAL_DOWN 1
--cglobal pred8x8l_horizontal_down_%1, 4,5
-+cglobal pred8x8l_horizontal_down_8_%1, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2415,7 +2415,7 @@ PRED8x8L_HORIZONTAL_DOWN ssse3
- ; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred4x4_dc_mmxext, 3,5
-+cglobal pred4x4_dc_8_mmxext, 3,5
-     pxor   mm7, mm7
-     mov     r4, r0
-     sub     r0, r2
-@@ -2445,7 +2445,7 @@ cglobal pred4x4_dc_mmxext, 3,5
- ;-----------------------------------------------------------------------------
- 
- %macro PRED4x4_TM_MMX 0
--cglobal pred4x4_tm_vp8, 3,6
-+cglobal pred4x4_tm_vp8_8, 3,6
-     sub        r0, r2
-     pxor      mm7, mm7
-     movd      mm0, [r0]
-@@ -2486,7 +2486,7 @@ INIT_MMX mmx2
- PRED4x4_TM_MMX
- INIT_MMX
- 
--cglobal pred4x4_tm_vp8_ssse3, 3,3
-+cglobal pred4x4_tm_vp8_8_ssse3, 3,3
-     sub         r0, r2
-     movq       mm6, [tm_shuf]
-     pxor       mm1, mm1
-@@ -2526,7 +2526,7 @@ cglobal pred4x4_tm_vp8_ssse3, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX
--cglobal pred4x4_vertical_vp8_mmxext, 3,3
-+cglobal pred4x4_vertical_vp8_8_mmxext, 3,3
-     sub       r0, r2
-     movd      m1, [r0-1]
-     movd      m0, [r0]
-@@ -2545,7 +2545,7 @@ cglobal pred4x4_vertical_vp8_mmxext, 3,3
- ; void pred4x4_down_left_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- INIT_MMX
--cglobal pred4x4_down_left_mmxext, 3,3
-+cglobal pred4x4_down_left_8_mmxext, 3,3
-     sub       r0, r2
-     movq      m1, [r0]
-     punpckldq m1, [r1]
-@@ -2572,7 +2572,7 @@ cglobal pred4x4_down_left_mmxext, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX
--cglobal pred4x4_vertical_left_mmxext, 3,3
-+cglobal pred4x4_vertical_left_8_mmxext, 3,3
-     sub       r0, r2
-     movq      m1, [r0]
-     punpckldq m1, [r1]
-@@ -2597,7 +2597,7 @@ cglobal pred4x4_vertical_left_mmxext, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX
--cglobal pred4x4_horizontal_up_mmxext, 3,3
-+cglobal pred4x4_horizontal_up_8_mmxext, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movd      m0, [r0+r2*1-4]
-@@ -2631,7 +2631,7 @@ cglobal pred4x4_horizontal_up_mmxext, 3,3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_horizontal_down_mmxext, 3,3
-+cglobal pred4x4_horizontal_down_8_mmxext, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movh      m0, [r0-4]      ; lt ..
-@@ -2667,7 +2667,7 @@ cglobal pred4x4_horizontal_down_mmxext, 3,3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_vertical_right_mmxext, 3,3
-+cglobal pred4x4_vertical_right_8_mmxext, 3,3
-     sub     r0, r2
-     lea     r1, [r0+r2*2]
-     movh    m0, [r0]                    ; ........t3t2t1t0
-@@ -2698,7 +2698,7 @@ cglobal pred4x4_vertical_right_mmxext, 3,3
- 
- INIT_MMX
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_down_right_mmxext, 3,3
-+cglobal pred4x4_down_right_8_mmxext, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movq      m1, [r1-8]
-diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
-index 7a6daac..a686473 100644
---- a/libavcodec/x86/h264_intrapred_init.c
-+++ b/libavcodec/x86/h264_intrapred_init.c
-@@ -94,79 +94,83 @@ PRED16x16(vertical, 10, sse2)
- PRED16x16(horizontal, 10, mmx2)
- PRED16x16(horizontal, 10, sse2)
- 
--void ff_pred16x16_vertical_mmx     (uint8_t *src, int stride);
--void ff_pred16x16_vertical_sse     (uint8_t *src, int stride);
--void ff_pred16x16_horizontal_mmx   (uint8_t *src, int stride);
--void ff_pred16x16_horizontal_mmx2  (uint8_t *src, int stride);
--void ff_pred16x16_horizontal_ssse3 (uint8_t *src, int stride);
--void ff_pred16x16_dc_mmx2          (uint8_t *src, int stride);
--void ff_pred16x16_dc_sse2          (uint8_t *src, int stride);
--void ff_pred16x16_dc_ssse3         (uint8_t *src, int stride);
--void ff_pred16x16_plane_h264_mmx   (uint8_t *src, int stride);
--void ff_pred16x16_plane_h264_mmx2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_h264_sse2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_h264_ssse3 (uint8_t *src, int stride);
--void ff_pred16x16_plane_rv40_mmx   (uint8_t *src, int stride);
--void ff_pred16x16_plane_rv40_mmx2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_rv40_sse2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_rv40_ssse3 (uint8_t *src, int stride);
--void ff_pred16x16_plane_svq3_mmx   (uint8_t *src, int stride);
--void ff_pred16x16_plane_svq3_mmx2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_svq3_sse2  (uint8_t *src, int stride);
--void ff_pred16x16_plane_svq3_ssse3 (uint8_t *src, int stride);
--void ff_pred16x16_tm_vp8_mmx       (uint8_t *src, int stride);
--void ff_pred16x16_tm_vp8_mmx2      (uint8_t *src, int stride);
--void ff_pred16x16_tm_vp8_sse2      (uint8_t *src, int stride);
--void ff_pred8x8_top_dc_mmxext      (uint8_t *src, int stride);
--void ff_pred8x8_dc_rv40_mmxext     (uint8_t *src, int stride);
--void ff_pred8x8_dc_mmxext          (uint8_t *src, int stride);
--void ff_pred8x8_vertical_mmx       (uint8_t *src, int stride);
--void ff_pred8x8_horizontal_mmx     (uint8_t *src, int stride);
--void ff_pred8x8_horizontal_mmx2    (uint8_t *src, int stride);
--void ff_pred8x8_horizontal_ssse3   (uint8_t *src, int stride);
--void ff_pred8x8_plane_mmx          (uint8_t *src, int stride);
--void ff_pred8x8_plane_mmx2         (uint8_t *src, int stride);
--void ff_pred8x8_plane_sse2         (uint8_t *src, int stride);
--void ff_pred8x8_plane_ssse3        (uint8_t *src, int stride);
--void ff_pred8x8_tm_vp8_mmx         (uint8_t *src, int stride);
--void ff_pred8x8_tm_vp8_mmx2        (uint8_t *src, int stride);
--void ff_pred8x8_tm_vp8_sse2        (uint8_t *src, int stride);
--void ff_pred8x8_tm_vp8_ssse3       (uint8_t *src, int stride);
--void ff_pred8x8l_top_dc_mmxext     (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_top_dc_ssse3      (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_dc_mmxext         (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_dc_ssse3          (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_mmxext   (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_ssse3    (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_left_mmxext  (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_left_sse2    (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_left_ssse3   (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_right_mmxext (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_right_sse2   (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_down_right_ssse3  (uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_right_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_right_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_left_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_vertical_left_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_up_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_up_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_down_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_down_sse2(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred8x8l_horizontal_down_ssse3(uint8_t *src, int has_topleft, int has_topright, int stride);
--void ff_pred4x4_dc_mmxext          (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_down_left_mmxext   (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_down_right_mmxext  (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_vertical_right_mmxext(uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_horizontal_up_mmxext(uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_horizontal_down_mmxext(uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_tm_vp8_mmx         (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_tm_vp8_mmx2        (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_tm_vp8_ssse3       (uint8_t *src, const uint8_t *topright, int stride);
--void ff_pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride);
-+/* 8-bit versions */
-+PRED16x16(vertical, 8, mmx)
-+PRED16x16(vertical, 8, sse)
-+PRED16x16(horizontal, 8, mmx)
-+PRED16x16(horizontal, 8, mmx2)
-+PRED16x16(horizontal, 8, ssse3)
-+PRED16x16(dc, 8, mmx2)
-+PRED16x16(dc, 8, sse2)
-+PRED16x16(dc, 8, ssse3)
-+PRED16x16(plane_h264, 8, mmx)
-+PRED16x16(plane_h264, 8, mmx2)
-+PRED16x16(plane_h264, 8, sse2)
-+PRED16x16(plane_h264, 8, ssse3)
-+PRED16x16(plane_rv40, 8, mmx)
-+PRED16x16(plane_rv40, 8, mmx2)
-+PRED16x16(plane_rv40, 8, sse2)
-+PRED16x16(plane_rv40, 8, ssse3)
-+PRED16x16(plane_svq3, 8, mmx)
-+PRED16x16(plane_svq3, 8, mmx2)
-+PRED16x16(plane_svq3, 8, sse2)
-+PRED16x16(plane_svq3, 8, ssse3)
-+PRED16x16(tm_vp8, 8, mmx)
-+PRED16x16(tm_vp8, 8, mmx2)
-+PRED16x16(tm_vp8, 8, sse2)
-+
-+PRED8x8(top_dc, 8, mmxext)
-+PRED8x8(dc_rv40, 8, mmxext)
-+PRED8x8(dc, 8, mmxext)
-+PRED8x8(vertical, 8, mmx)
-+PRED8x8(horizontal, 8, mmx)
-+PRED8x8(horizontal, 8, mmx2)
-+PRED8x8(horizontal, 8, ssse3)
-+PRED8x8(plane, 8, mmx)
-+PRED8x8(plane, 8, mmx2)
-+PRED8x8(plane, 8, sse2)
-+PRED8x8(plane, 8, ssse3)
-+PRED8x8(tm_vp8, 8, mmx)
-+PRED8x8(tm_vp8, 8, mmx2)
-+PRED8x8(tm_vp8, 8, sse2)
-+PRED8x8(tm_vp8, 8, ssse3)
-+
-+PRED8x8L(top_dc, 8, mmxext)
-+PRED8x8L(top_dc, 8, ssse3)
-+PRED8x8L(dc, 8, mmxext)
-+PRED8x8L(dc, 8, ssse3)
-+PRED8x8L(horizontal, 8, mmxext)
-+PRED8x8L(horizontal, 8, ssse3)
-+PRED8x8L(vertical, 8, mmxext)
-+PRED8x8L(vertical, 8, ssse3)
-+PRED8x8L(down_left, 8, mmxext)
-+PRED8x8L(down_left, 8, sse2)
-+PRED8x8L(down_left, 8, ssse3)
-+PRED8x8L(down_right, 8, mmxext)
-+PRED8x8L(down_right, 8, sse2)
-+PRED8x8L(down_right, 8, ssse3)
-+PRED8x8L(vertical_right, 8, mmxext)
-+PRED8x8L(vertical_right, 8, sse2)
-+PRED8x8L(vertical_right, 8, ssse3)
-+PRED8x8L(vertical_left, 8, sse2)
-+PRED8x8L(vertical_left, 8, ssse3)
-+PRED8x8L(horizontal_up, 8, mmxext)
-+PRED8x8L(horizontal_up, 8, ssse3)
-+PRED8x8L(horizontal_down, 8, mmxext)
-+PRED8x8L(horizontal_down, 8, sse2)
-+PRED8x8L(horizontal_down, 8, ssse3)
-+
-+PRED4x4(dc, 8, mmxext)
-+PRED4x4(down_left, 8, mmxext)
-+PRED4x4(down_right, 8, mmxext)
-+PRED4x4(vertical_left, 8, mmxext)
-+PRED4x4(vertical_right, 8, mmxext)
-+PRED4x4(horizontal_up, 8, mmxext)
-+PRED4x4(horizontal_down, 8, mmxext)
-+PRED4x4(tm_vp8, 8, mmx)
-+PRED4x4(tm_vp8, 8, mmx2)
-+PRED4x4(tm_vp8, 8, ssse3)
-+PRED4x4(vertical_vp8, 8, mmxext)
- 
- void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
- {
-@@ -174,136 +178,136 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
- 
-     if (bit_depth == 8) {
-         if (EXTERNAL_MMX(mm_flags)) {
--            h->pred16x16[VERT_PRED8x8         ] = ff_pred16x16_vertical_mmx;
--            h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_mmx;
-+            h->pred16x16[VERT_PRED8x8         ] = ff_pred16x16_vertical_8_mmx;
-+            h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_8_mmx;
-             if (chroma_format_idc == 1) {
--                h->pred8x8  [VERT_PRED8x8     ] = ff_pred8x8_vertical_mmx;
--                h->pred8x8  [HOR_PRED8x8      ] = ff_pred8x8_horizontal_mmx;
-+                h->pred8x8  [VERT_PRED8x8     ] = ff_pred8x8_vertical_8_mmx;
-+                h->pred8x8  [HOR_PRED8x8      ] = ff_pred8x8_horizontal_8_mmx;
-             }
-             if (codec_id == AV_CODEC_ID_VP8) {
--                h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_mmx;
--                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_mmx;
--                h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_mmx;
-+                h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_8_mmx;
-+                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_8_mmx;
-+                h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_8_mmx;
-             } else {
-                 if (chroma_format_idc == 1)
--                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;
-+                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx;
-                 if (codec_id == AV_CODEC_ID_SVQ3) {
-                     if (mm_flags & AV_CPU_FLAG_CMOV)
--                        h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;
-+                        h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx;
-                 } else if (codec_id == AV_CODEC_ID_RV40) {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_mmx;
-                 } else {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_mmx;
-                 }
-             }
-         }
- 
-         if (EXTERNAL_MMXEXT(mm_flags)) {
--            h->pred16x16[HOR_PRED8x8            ] = ff_pred16x16_horizontal_mmx2;
--            h->pred16x16[DC_PRED8x8             ] = ff_pred16x16_dc_mmx2;
-+            h->pred16x16[HOR_PRED8x8            ] = ff_pred16x16_horizontal_8_mmx2;
-+            h->pred16x16[DC_PRED8x8             ] = ff_pred16x16_dc_8_mmx2;
-             if (chroma_format_idc == 1)
--                h->pred8x8[HOR_PRED8x8          ] = ff_pred8x8_horizontal_mmx2;
--            h->pred8x8l [TOP_DC_PRED            ] = ff_pred8x8l_top_dc_mmxext;
--            h->pred8x8l [DC_PRED                ] = ff_pred8x8l_dc_mmxext;
--            h->pred8x8l [HOR_PRED               ] = ff_pred8x8l_horizontal_mmxext;
--            h->pred8x8l [VERT_PRED              ] = ff_pred8x8l_vertical_mmxext;
--            h->pred8x8l [DIAG_DOWN_RIGHT_PRED   ] = ff_pred8x8l_down_right_mmxext;
--            h->pred8x8l [VERT_RIGHT_PRED        ] = ff_pred8x8l_vertical_right_mmxext;
--            h->pred8x8l [HOR_UP_PRED            ] = ff_pred8x8l_horizontal_up_mmxext;
--            h->pred8x8l [DIAG_DOWN_LEFT_PRED    ] = ff_pred8x8l_down_left_mmxext;
--            h->pred8x8l [HOR_DOWN_PRED          ] = ff_pred8x8l_horizontal_down_mmxext;
--            h->pred4x4  [DIAG_DOWN_RIGHT_PRED   ] = ff_pred4x4_down_right_mmxext;
--            h->pred4x4  [VERT_RIGHT_PRED        ] = ff_pred4x4_vertical_right_mmxext;
--            h->pred4x4  [HOR_DOWN_PRED          ] = ff_pred4x4_horizontal_down_mmxext;
--            h->pred4x4  [DC_PRED                ] = ff_pred4x4_dc_mmxext;
-+                h->pred8x8[HOR_PRED8x8          ] = ff_pred8x8_horizontal_8_mmx2;
-+            h->pred8x8l [TOP_DC_PRED            ] = ff_pred8x8l_top_dc_8_mmxext;
-+            h->pred8x8l [DC_PRED                ] = ff_pred8x8l_dc_8_mmxext;
-+            h->pred8x8l [HOR_PRED               ] = ff_pred8x8l_horizontal_8_mmxext;
-+            h->pred8x8l [VERT_PRED              ] = ff_pred8x8l_vertical_8_mmxext;
-+            h->pred8x8l [DIAG_DOWN_RIGHT_PRED   ] = ff_pred8x8l_down_right_8_mmxext;
-+            h->pred8x8l [VERT_RIGHT_PRED        ] = ff_pred8x8l_vertical_right_8_mmxext;
-+            h->pred8x8l [HOR_UP_PRED            ] = ff_pred8x8l_horizontal_up_8_mmxext;
-+            h->pred8x8l [DIAG_DOWN_LEFT_PRED    ] = ff_pred8x8l_down_left_8_mmxext;
-+            h->pred8x8l [HOR_DOWN_PRED          ] = ff_pred8x8l_horizontal_down_8_mmxext;
-+            h->pred4x4  [DIAG_DOWN_RIGHT_PRED   ] = ff_pred4x4_down_right_8_mmxext;
-+            h->pred4x4  [VERT_RIGHT_PRED        ] = ff_pred4x4_vertical_right_8_mmxext;
-+            h->pred4x4  [HOR_DOWN_PRED          ] = ff_pred4x4_horizontal_down_8_mmxext;
-+            h->pred4x4  [DC_PRED                ] = ff_pred4x4_dc_8_mmxext;
-             if (codec_id == AV_CODEC_ID_VP8 || codec_id == AV_CODEC_ID_H264) {
--                h->pred4x4  [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;
-+                h->pred4x4  [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_8_mmxext;
-             }
-             if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
--                h->pred4x4  [VERT_LEFT_PRED     ] = ff_pred4x4_vertical_left_mmxext;
-+                h->pred4x4  [VERT_LEFT_PRED     ] = ff_pred4x4_vertical_left_8_mmxext;
-             }
-             if (codec_id != AV_CODEC_ID_RV40) {
--                h->pred4x4  [HOR_UP_PRED        ] = ff_pred4x4_horizontal_up_mmxext;
-+                h->pred4x4  [HOR_UP_PRED        ] = ff_pred4x4_horizontal_up_8_mmxext;
-             }
-             if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
-                 if (chroma_format_idc == 1) {
--                    h->pred8x8[TOP_DC_PRED8x8   ] = ff_pred8x8_top_dc_mmxext;
--                    h->pred8x8[DC_PRED8x8       ] = ff_pred8x8_dc_mmxext;
-+                    h->pred8x8[TOP_DC_PRED8x8   ] = ff_pred8x8_top_dc_8_mmxext;
-+                    h->pred8x8[DC_PRED8x8       ] = ff_pred8x8_dc_8_mmxext;
-                 }
-             }
-             if (codec_id == AV_CODEC_ID_VP8) {
--                h->pred16x16[PLANE_PRED8x8      ] = ff_pred16x16_tm_vp8_mmx2;
--                h->pred8x8  [DC_PRED8x8         ] = ff_pred8x8_dc_rv40_mmxext;
--                h->pred8x8  [PLANE_PRED8x8      ] = ff_pred8x8_tm_vp8_mmx2;
--                h->pred4x4  [TM_VP8_PRED        ] = ff_pred4x4_tm_vp8_mmx2;
--                h->pred4x4  [VERT_PRED          ] = ff_pred4x4_vertical_vp8_mmxext;
-+                h->pred16x16[PLANE_PRED8x8      ] = ff_pred16x16_tm_vp8_8_mmx2;
-+                h->pred8x8  [DC_PRED8x8         ] = ff_pred8x8_dc_rv40_8_mmxext;
-+                h->pred8x8  [PLANE_PRED8x8      ] = ff_pred8x8_tm_vp8_8_mmx2;
-+                h->pred4x4  [TM_VP8_PRED        ] = ff_pred4x4_tm_vp8_8_mmx2;
-+                h->pred4x4  [VERT_PRED          ] = ff_pred4x4_vertical_vp8_8_mmxext;
-             } else {
-                 if (chroma_format_idc == 1)
--                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;
-+                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx2;
-                 if (codec_id == AV_CODEC_ID_SVQ3) {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_svq3_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_svq3_8_mmx2;
-                 } else if (codec_id == AV_CODEC_ID_RV40) {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_rv40_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_rv40_8_mmx2;
-                 } else {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_h264_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_h264_8_mmx2;
-                 }
-             }
-         }
- 
-         if (EXTERNAL_SSE(mm_flags)) {
--            h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_sse;
-+            h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_8_sse;
-         }
- 
-         if (EXTERNAL_SSE2(mm_flags)) {
--            h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_sse2;
--            h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_sse2;
--            h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_sse2;
--            h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_sse2;
--            h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_sse2;
--            h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_sse2;
-+            h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_8_sse2;
-+            h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_8_sse2;
-+            h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_sse2;
-+            h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_8_sse2;
-+            h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_8_sse2;
-+            h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_8_sse2;
-             if (codec_id == AV_CODEC_ID_VP8) {
--                h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_sse2;
--                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_sse2;
-+                h->pred16x16[PLANE_PRED8x8    ] = ff_pred16x16_tm_vp8_8_sse2;
-+                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_8_sse2;
-             } else {
-                 if (chroma_format_idc == 1)
--                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_sse2;
-+                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2;
-                 if (codec_id == AV_CODEC_ID_SVQ3) {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_sse2;
-                 } else if (codec_id == AV_CODEC_ID_RV40) {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_sse2;
-                 } else {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_sse2;
-                 }
-             }
-         }
- 
-         if (EXTERNAL_SSSE3(mm_flags)) {
--            h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_ssse3;
--            h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_ssse3;
-+            h->pred16x16[HOR_PRED8x8          ] = ff_pred16x16_horizontal_8_ssse3;
-+            h->pred16x16[DC_PRED8x8           ] = ff_pred16x16_dc_8_ssse3;
-             if (chroma_format_idc == 1)
--                h->pred8x8  [HOR_PRED8x8      ] = ff_pred8x8_horizontal_ssse3;
--            h->pred8x8l [TOP_DC_PRED          ] = ff_pred8x8l_top_dc_ssse3;
--            h->pred8x8l [DC_PRED              ] = ff_pred8x8l_dc_ssse3;
--            h->pred8x8l [HOR_PRED             ] = ff_pred8x8l_horizontal_ssse3;
--            h->pred8x8l [VERT_PRED            ] = ff_pred8x8l_vertical_ssse3;
--            h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_ssse3;
--            h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_ssse3;
--            h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_ssse3;
--            h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_ssse3;
--            h->pred8x8l [HOR_UP_PRED          ] = ff_pred8x8l_horizontal_up_ssse3;
--            h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_ssse3;
-+                h->pred8x8  [HOR_PRED8x8      ] = ff_pred8x8_horizontal_8_ssse3;
-+            h->pred8x8l [TOP_DC_PRED          ] = ff_pred8x8l_top_dc_8_ssse3;
-+            h->pred8x8l [DC_PRED              ] = ff_pred8x8l_dc_8_ssse3;
-+            h->pred8x8l [HOR_PRED             ] = ff_pred8x8l_horizontal_8_ssse3;
-+            h->pred8x8l [VERT_PRED            ] = ff_pred8x8l_vertical_8_ssse3;
-+            h->pred8x8l [DIAG_DOWN_LEFT_PRED  ] = ff_pred8x8l_down_left_8_ssse3;
-+            h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_ssse3;
-+            h->pred8x8l [VERT_RIGHT_PRED      ] = ff_pred8x8l_vertical_right_8_ssse3;
-+            h->pred8x8l [VERT_LEFT_PRED       ] = ff_pred8x8l_vertical_left_8_ssse3;
-+            h->pred8x8l [HOR_UP_PRED          ] = ff_pred8x8l_horizontal_up_8_ssse3;
-+            h->pred8x8l [HOR_DOWN_PRED        ] = ff_pred8x8l_horizontal_down_8_ssse3;
-             if (codec_id == AV_CODEC_ID_VP8) {
--                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_ssse3;
--                h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_ssse3;
-+                h->pred8x8  [PLANE_PRED8x8    ] = ff_pred8x8_tm_vp8_8_ssse3;
-+                h->pred4x4  [TM_VP8_PRED      ] = ff_pred4x4_tm_vp8_8_ssse3;
-             } else {
-                 if (chroma_format_idc == 1)
--                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;
-+                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_ssse3;
-                 if (codec_id == AV_CODEC_ID_SVQ3) {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_ssse3;
-                 } else if (codec_id == AV_CODEC_ID_RV40) {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_ssse3;
-                 } else {
--                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;
-+                    h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_ssse3;
-                 }
-             }
-         }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0079-Use-ptrdiff_t-instead-of-int-for-intra-pred-stride-f.patch b/debian/patches/post-9beta2/0079-Use-ptrdiff_t-instead-of-int-for-intra-pred-stride-f.patch
deleted file mode 100644
index 63c5b91..0000000
--- a/debian/patches/post-9beta2/0079-Use-ptrdiff_t-instead-of-int-for-intra-pred-stride-f.patch
+++ /dev/null
@@ -1,1022 +0,0 @@
-From 95c89da36ebeeb96b7146c0d70f46c582397da7f Mon Sep 17 00:00:00 2001
-From: "Ronald S. Bultje" <rsbultje at gmail.com>
-Date: Sun, 28 Oct 2012 20:44:54 -0700
-Subject: [PATCH 079/278] Use ptrdiff_t instead of int for intra pred "stride"
- function parameter.
-
-This way, SIMD-optimized functions don't have to sign-extend their
-stride argument manually to be able to do pointer arithmetic.
----
- libavcodec/arm/h264pred_init_arm.c   |   36 +++---
- libavcodec/h264pred.c                |   79 +++++++++---
- libavcodec/h264pred.h                |   18 +--
- libavcodec/h264pred_template.c       |  233 ++++++++++++++++++++++++----------
- libavcodec/x86/h264_intrapred_init.c |   15 ++-
- 5 files changed, 264 insertions(+), 117 deletions(-)
-
-diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c
-index 371b1a6..39c0121 100644
---- a/libavcodec/arm/h264pred_init_arm.c
-+++ b/libavcodec/arm/h264pred_init_arm.c
-@@ -23,25 +23,25 @@
- #include "libavutil/arm/cpu.h"
- #include "libavcodec/h264pred.h"
- 
--void ff_pred16x16_vert_neon(uint8_t *src, int stride);
--void ff_pred16x16_hor_neon(uint8_t *src, int stride);
--void ff_pred16x16_plane_neon(uint8_t *src, int stride);
--void ff_pred16x16_dc_neon(uint8_t *src, int stride);
--void ff_pred16x16_128_dc_neon(uint8_t *src, int stride);
--void ff_pred16x16_left_dc_neon(uint8_t *src, int stride);
--void ff_pred16x16_top_dc_neon(uint8_t *src, int stride);
-+void ff_pred16x16_vert_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_hor_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_plane_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_128_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_left_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred16x16_top_dc_neon(uint8_t *src, ptrdiff_t stride);
- 
--void ff_pred8x8_vert_neon(uint8_t *src, int stride);
--void ff_pred8x8_hor_neon(uint8_t *src, int stride);
--void ff_pred8x8_plane_neon(uint8_t *src, int stride);
--void ff_pred8x8_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_128_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_left_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_top_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_l0t_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_0lt_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_l00_dc_neon(uint8_t *src, int stride);
--void ff_pred8x8_0l0_dc_neon(uint8_t *src, int stride);
-+void ff_pred8x8_vert_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_hor_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_plane_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_128_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_left_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_top_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_l0t_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_0lt_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_l00_dc_neon(uint8_t *src, ptrdiff_t stride);
-+void ff_pred8x8_0l0_dc_neon(uint8_t *src, ptrdiff_t stride);
- 
- static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
- {
-diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
-index fb44046..94cf9d0 100644
---- a/libavcodec/h264pred.c
-+++ b/libavcodec/h264pred.c
-@@ -39,7 +39,9 @@
- #include "h264pred_template.c"
- #undef BIT_DEPTH
- 
--static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright,
-+                                   ptrdiff_t stride)
-+{
-     const unsigned lt = src[-1-1*stride];
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
-@@ -54,7 +56,9 @@ static void pred4x4_vertical_vp8_c(uint8_t *src, const uint8_t *topright, int st
-     AV_WN32A(src+3*stride, v);
- }
- 
--static void pred4x4_horizontal_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_horizontal_vp8_c(uint8_t *src, const uint8_t *topright,
-+                                     ptrdiff_t stride)
-+{
-     const unsigned lt = src[-1-1*stride];
-     LOAD_LEFT_EDGE
- 
-@@ -64,7 +68,9 @@ static void pred4x4_horizontal_vp8_c(uint8_t *src, const uint8_t *topright, int
-     AV_WN32A(src+3*stride, ((l2 + 2*l3 + l3 + 2) >> 2)*0x01010101);
- }
- 
--static void pred4x4_down_left_svq3_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_down_left_svq3_c(uint8_t *src, const uint8_t *topright,
-+                                     ptrdiff_t stride)
-+{
-     LOAD_TOP_EDGE
-     LOAD_LEFT_EDGE
- 
-@@ -86,7 +92,9 @@ static void pred4x4_down_left_svq3_c(uint8_t *src, const uint8_t *topright, int
-     src[3+3*stride]=(l3 + t3)>>1;
- }
- 
--static void pred4x4_down_left_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_down_left_rv40_c(uint8_t *src, const uint8_t *topright,
-+                                     ptrdiff_t stride)
-+{
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
-     LOAD_LEFT_EDGE
-@@ -110,7 +118,10 @@ static void pred4x4_down_left_rv40_c(uint8_t *src, const uint8_t *topright, int
-     src[3+3*stride]=(t6 + t7 + 1 + l6 + l7 + 1)>>2;
- }
- 
--static void pred4x4_down_left_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_down_left_rv40_nodown_c(uint8_t *src,
-+                                            const uint8_t *topright,
-+                                            ptrdiff_t stride)
-+{
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
-     LOAD_LEFT_EDGE
-@@ -133,8 +144,11 @@ static void pred4x4_down_left_rv40_nodown_c(uint8_t *src, const uint8_t *toprigh
-     src[3+3*stride]=(t6 + t7 + 1 + 2*l3 + 1)>>2;
- }
- 
--static void pred4x4_vertical_left_rv40(uint8_t *src, const uint8_t *topright, int stride,
--                                       const int l0, const int l1, const int l2, const int l3, const int l4){
-+static void pred4x4_vertical_left_rv40(uint8_t *src, const uint8_t *topright,
-+                                       ptrdiff_t stride,
-+                                       const int l0, const int l1, const int l2,
-+                                       const int l3, const int l4)
-+{
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
- 
-@@ -156,20 +170,27 @@ static void pred4x4_vertical_left_rv40(uint8_t *src, const uint8_t *topright, in
-     src[3+3*stride]=(t4 + 2*t5 + t6 + 2)>>2;
- }
- 
--static void pred4x4_vertical_left_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_vertical_left_rv40_c(uint8_t *src, const uint8_t *topright,
-+                                         ptrdiff_t stride)
-+{
-     LOAD_LEFT_EDGE
-     LOAD_DOWN_LEFT_EDGE
- 
-     pred4x4_vertical_left_rv40(src, topright, stride, l0, l1, l2, l3, l4);
- }
- 
--static void pred4x4_vertical_left_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_vertical_left_rv40_nodown_c(uint8_t *src,
-+                                                const uint8_t *topright,
-+                                                ptrdiff_t stride)
-+{
-     LOAD_LEFT_EDGE
- 
-     pred4x4_vertical_left_rv40(src, topright, stride, l0, l1, l2, l3, l3);
- }
- 
--static void pred4x4_vertical_left_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_vertical_left_vp8_c(uint8_t *src, const uint8_t *topright,
-+                                        ptrdiff_t stride)
-+{
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
- 
-@@ -191,7 +212,9 @@ static void pred4x4_vertical_left_vp8_c(uint8_t *src, const uint8_t *topright, i
-     src[3+3*stride]=(t5 + 2*t6 + t7 + 2)>>2;
- }
- 
--static void pred4x4_horizontal_up_rv40_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_horizontal_up_rv40_c(uint8_t *src, const uint8_t *topright,
-+                                         ptrdiff_t stride)
-+{
-     LOAD_LEFT_EDGE
-     LOAD_DOWN_LEFT_EDGE
-     LOAD_TOP_EDGE
-@@ -215,7 +238,10 @@ static void pred4x4_horizontal_up_rv40_c(uint8_t *src, const uint8_t *topright,
-     src[3+3*stride]=(l4 + 2*l5 + l6 + 2)>>2;
- }
- 
--static void pred4x4_horizontal_up_rv40_nodown_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_horizontal_up_rv40_nodown_c(uint8_t *src,
-+                                                const uint8_t *topright,
-+                                                ptrdiff_t stride)
-+{
-     LOAD_LEFT_EDGE
-     LOAD_TOP_EDGE
-     LOAD_TOP_RIGHT_EDGE
-@@ -238,7 +264,9 @@ static void pred4x4_horizontal_up_rv40_nodown_c(uint8_t *src, const uint8_t *top
-     src[3+3*stride]=l3;
- }
- 
--static void pred4x4_tm_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
-+static void pred4x4_tm_vp8_c(uint8_t *src, const uint8_t *topright,
-+                             ptrdiff_t stride)
-+{
-     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
-     uint8_t *top = src-stride;
-     int y;
-@@ -253,15 +281,18 @@ static void pred4x4_tm_vp8_c(uint8_t *src, const uint8_t *topright, int stride){
-     }
- }
- 
--static void pred16x16_plane_svq3_c(uint8_t *src, int stride){
-+static void pred16x16_plane_svq3_c(uint8_t *src, ptrdiff_t stride)
-+{
-     pred16x16_plane_compat_8_c(src, stride, 1, 0);
- }
- 
--static void pred16x16_plane_rv40_c(uint8_t *src, int stride){
-+static void pred16x16_plane_rv40_c(uint8_t *src, ptrdiff_t stride)
-+{
-     pred16x16_plane_compat_8_c(src, stride, 0, 1);
- }
- 
--static void pred16x16_tm_vp8_c(uint8_t *src, int stride){
-+static void pred16x16_tm_vp8_c(uint8_t *src, ptrdiff_t stride)
-+{
-     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
-     uint8_t *top = src-stride;
-     int y;
-@@ -288,7 +319,8 @@ static void pred16x16_tm_vp8_c(uint8_t *src, int stride){
-     }
- }
- 
--static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){
-+static void pred8x8_left_dc_rv40_c(uint8_t *src, ptrdiff_t stride)
-+{
-     int i;
-     unsigned dc0;
- 
-@@ -303,7 +335,8 @@ static void pred8x8_left_dc_rv40_c(uint8_t *src, int stride){
-     }
- }
- 
--static void pred8x8_top_dc_rv40_c(uint8_t *src, int stride){
-+static void pred8x8_top_dc_rv40_c(uint8_t *src, ptrdiff_t stride)
-+{
-     int i;
-     unsigned dc0;
- 
-@@ -318,7 +351,8 @@ static void pred8x8_top_dc_rv40_c(uint8_t *src, int stride){
-     }
- }
- 
--static void pred8x8_dc_rv40_c(uint8_t *src, int stride){
-+static void pred8x8_dc_rv40_c(uint8_t *src, ptrdiff_t stride)
-+{
-     int i;
-     unsigned dc0 = 0;
- 
-@@ -339,7 +373,8 @@ static void pred8x8_dc_rv40_c(uint8_t *src, int stride){
-     }
- }
- 
--static void pred8x8_tm_vp8_c(uint8_t *src, int stride){
-+static void pred8x8_tm_vp8_c(uint8_t *src, ptrdiff_t stride)
-+{
-     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP - src[-1-stride];
-     uint8_t *top = src-stride;
-     int y;
-@@ -361,7 +396,9 @@ static void pred8x8_tm_vp8_c(uint8_t *src, int stride){
- /**
-  * Set the intra prediction function pointers.
-  */
--void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc){
-+void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth,
-+                       const int chroma_format_idc)
-+{
- //    MpegEncContext * const s = &h->s;
- 
- #undef FUNC
-diff --git a/libavcodec/h264pred.h b/libavcodec/h264pred.h
-index a964ae3..a8b3dba 100644
---- a/libavcodec/h264pred.h
-+++ b/libavcodec/h264pred.h
-@@ -90,21 +90,23 @@
-  * Context for storing H.264 prediction functions
-  */
- typedef struct H264PredContext {
--    void(*pred4x4[9 + 3 + 3])(uint8_t *src, const uint8_t *topright, int stride); //FIXME move to dsp?
--    void(*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright, int stride);
--    void(*pred8x8[4 + 3 + 4])(uint8_t *src, int stride);
--    void(*pred16x16[4 + 3 + 2])(uint8_t *src, int stride);
-+    void(*pred4x4[9 + 3 + 3])(uint8_t *src, const uint8_t *topright,
-+                              ptrdiff_t stride);
-+    void(*pred8x8l[9 + 3])(uint8_t *src, int topleft, int topright,
-+                           ptrdiff_t stride);
-+    void(*pred8x8[4 + 3 + 4])(uint8_t *src, ptrdiff_t stride);
-+    void(*pred16x16[4 + 3 + 2])(uint8_t *src, ptrdiff_t stride);
- 
-     void(*pred4x4_add[2])(uint8_t *pix /*align  4*/,
--                          const DCTELEM *block /*align 16*/, int stride);
-+                          const DCTELEM *block /*align 16*/, ptrdiff_t stride);
-     void(*pred8x8l_add[2])(uint8_t *pix /*align  8*/,
--                           const DCTELEM *block /*align 16*/, int stride);
-+                           const DCTELEM *block /*align 16*/, ptrdiff_t stride);
-     void(*pred8x8_add[3])(uint8_t *pix /*align  8*/,
-                           const int *block_offset,
--                          const DCTELEM *block /*align 16*/, int stride);
-+                          const DCTELEM *block /*align 16*/, ptrdiff_t stride);
-     void(*pred16x16_add[3])(uint8_t *pix /*align 16*/,
-                             const int *block_offset,
--                            const DCTELEM *block /*align 16*/, int stride);
-+                            const DCTELEM *block /*align 16*/, ptrdiff_t stride);
- } H264PredContext;
- 
- void ff_h264_pred_init(H264PredContext *h, int codec_id,
-diff --git a/libavcodec/h264pred_template.c b/libavcodec/h264pred_template.c
-index 19100b6..8ae13b0 100644
---- a/libavcodec/h264pred_template.c
-+++ b/libavcodec/h264pred_template.c
-@@ -29,7 +29,9 @@
- 
- #include "bit_depth_template.c"
- 
--static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright,
-+                                    ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const pixel4 a= AV_RN4PA(src-stride);
-@@ -40,7 +42,9 @@ static void FUNCC(pred4x4_vertical)(uint8_t *_src, const uint8_t *topright, int
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_horizontal)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_horizontal)(uint8_t *_src, const uint8_t *topright,
-+                                      ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     AV_WN4PA(src+0*stride, PIXEL_SPLAT_X4(src[-1+0*stride]));
-@@ -49,7 +53,9 @@ static void FUNCC(pred4x4_horizontal)(uint8_t *_src, const uint8_t *topright, in
-     AV_WN4PA(src+3*stride, PIXEL_SPLAT_X4(src[-1+3*stride]));
- }
- 
--static void FUNCC(pred4x4_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_dc)(uint8_t *_src, const uint8_t *topright,
-+                              ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int dc= (  src[-stride] + src[1-stride] + src[2-stride] + src[3-stride]
-@@ -62,7 +68,9 @@ static void FUNCC(pred4x4_dc)(uint8_t *_src, const uint8_t *topright, int _strid
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_left_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_left_dc)(uint8_t *_src, const uint8_t *topright,
-+                                   ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int dc= (  src[-1+0*stride] + src[-1+1*stride] + src[-1+2*stride] + src[-1+3*stride] + 2) >>2;
-@@ -74,7 +82,9 @@ static void FUNCC(pred4x4_left_dc)(uint8_t *_src, const uint8_t *topright, int _
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_top_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_top_dc)(uint8_t *_src, const uint8_t *topright,
-+                                  ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int dc= (  src[-stride] + src[1-stride] + src[2-stride] + src[3-stride] + 2) >>2;
-@@ -86,7 +96,9 @@ static void FUNCC(pred4x4_top_dc)(uint8_t *_src, const uint8_t *topright, int _s
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_128_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_128_dc)(uint8_t *_src, const uint8_t *topright,
-+                                  ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const pixel4 a = PIXEL_SPLAT_X4(1<<(BIT_DEPTH-1));
-@@ -97,7 +109,9 @@ static void FUNCC(pred4x4_128_dc)(uint8_t *_src, const uint8_t *topright, int _s
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_127_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_127_dc)(uint8_t *_src, const uint8_t *topright,
-+                                  ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const pixel4 a = PIXEL_SPLAT_X4((1<<(BIT_DEPTH-1))-1);
-@@ -108,7 +122,9 @@ static void FUNCC(pred4x4_127_dc)(uint8_t *_src, const uint8_t *topright, int _s
-     AV_WN4PA(src+3*stride, a);
- }
- 
--static void FUNCC(pred4x4_129_dc)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_129_dc)(uint8_t *_src, const uint8_t *topright,
-+                                  ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const pixel4 a = PIXEL_SPLAT_X4((1<<(BIT_DEPTH-1))+1);
-@@ -144,7 +160,9 @@ static void FUNCC(pred4x4_129_dc)(uint8_t *_src, const uint8_t *topright, int _s
-     const unsigned av_unused t2 = src[ 2-1*stride];\
-     const unsigned av_unused t3 = src[ 3-1*stride];\
- 
--static void FUNCC(pred4x4_down_right)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_down_right)(uint8_t *_src, const uint8_t *topright,
-+                                      ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int lt= src[-1-1*stride];
-@@ -169,7 +187,9 @@ static void FUNCC(pred4x4_down_right)(uint8_t *_src, const uint8_t *topright, in
-     src[3+0*stride]=(t1 + 2*t2 + t3 + 2)>>2;
- }
- 
--static void FUNCC(pred4x4_down_left)(uint8_t *_src, const uint8_t *_topright, int _stride){
-+static void FUNCC(pred4x4_down_left)(uint8_t *_src, const uint8_t *_topright,
-+                                     ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     const pixel *topright = (const pixel*)_topright;
-     int stride = _stride/sizeof(pixel);
-@@ -195,7 +215,10 @@ static void FUNCC(pred4x4_down_left)(uint8_t *_src, const uint8_t *_topright, in
-     src[3+3*stride]=(t6 + 3*t7 + 2)>>2;
- }
- 
--static void FUNCC(pred4x4_vertical_right)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_vertical_right)(uint8_t *_src,
-+                                          const uint8_t *topright,
-+                                          ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int lt= src[-1-1*stride];
-@@ -220,7 +243,10 @@ static void FUNCC(pred4x4_vertical_right)(uint8_t *_src, const uint8_t *topright
-     src[0+3*stride]=(l0 + 2*l1 + l2 + 2)>>2;
- }
- 
--static void FUNCC(pred4x4_vertical_left)(uint8_t *_src, const uint8_t *_topright, int _stride){
-+static void FUNCC(pred4x4_vertical_left)(uint8_t *_src,
-+                                         const uint8_t *_topright,
-+                                         ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     const pixel *topright = (const pixel*)_topright;
-     int stride = _stride/sizeof(pixel);
-@@ -245,7 +271,9 @@ static void FUNCC(pred4x4_vertical_left)(uint8_t *_src, const uint8_t *_topright
-     src[3+3*stride]=(t4 + 2*t5 + t6 + 2)>>2;
- }
- 
--static void FUNCC(pred4x4_horizontal_up)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_horizontal_up)(uint8_t *_src, const uint8_t *topright,
-+                                         ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     LOAD_LEFT_EDGE
-@@ -268,7 +296,10 @@ static void FUNCC(pred4x4_horizontal_up)(uint8_t *_src, const uint8_t *topright,
-     src[3+3*stride]=l3;
- }
- 
--static void FUNCC(pred4x4_horizontal_down)(uint8_t *_src, const uint8_t *topright, int _stride){
-+static void FUNCC(pred4x4_horizontal_down)(uint8_t *_src,
-+                                           const uint8_t *topright,
-+                                           ptrdiff_t _stride)
-+{
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-     const int lt= src[-1-1*stride];
-@@ -293,7 +324,8 @@ static void FUNCC(pred4x4_horizontal_down)(uint8_t *_src, const uint8_t *toprigh
-     src[1+3*stride]=(l1 + 2*l2 + l3 + 2)>>2;
- }
- 
--static void FUNCC(pred16x16_vertical)(uint8_t *_src, int _stride){
-+static void FUNCC(pred16x16_vertical)(uint8_t *_src, ptrdiff_t _stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -310,7 +342,8 @@ static void FUNCC(pred16x16_vertical)(uint8_t *_src, int _stride){
-     }
- }
- 
--static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride){
-+static void FUNCC(pred16x16_horizontal)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     stride /= sizeof(pixel);
-@@ -334,7 +367,8 @@ static void FUNCC(pred16x16_horizontal)(uint8_t *_src, int stride){
-         src += stride;\
-     }
- 
--static void FUNCC(pred16x16_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred16x16_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i, dc=0;
-     pixel *src = (pixel*)_src;
-     pixel4 dcsplat;
-@@ -352,7 +386,8 @@ static void FUNCC(pred16x16_dc)(uint8_t *_src, int stride){
-     PREDICT_16x16_DC(dcsplat);
- }
- 
--static void FUNCC(pred16x16_left_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred16x16_left_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i, dc=0;
-     pixel *src = (pixel*)_src;
-     pixel4 dcsplat;
-@@ -366,7 +401,8 @@ static void FUNCC(pred16x16_left_dc)(uint8_t *_src, int stride){
-     PREDICT_16x16_DC(dcsplat);
- }
- 
--static void FUNCC(pred16x16_top_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred16x16_top_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i, dc=0;
-     pixel *src = (pixel*)_src;
-     pixel4 dcsplat;
-@@ -381,7 +417,8 @@ static void FUNCC(pred16x16_top_dc)(uint8_t *_src, int stride){
- }
- 
- #define PRED16x16_X(n, v) \
--static void FUNCC(pred16x16_##n##_dc)(uint8_t *_src, int stride){\
-+static void FUNCC(pred16x16_##n##_dc)(uint8_t *_src, ptrdiff_t stride)\
-+{\
-     int i;\
-     pixel *src = (pixel*)_src;\
-     stride /= sizeof(pixel);\
-@@ -392,7 +429,11 @@ PRED16x16_X(127, (1<<(BIT_DEPTH-1))-1)
- PRED16x16_X(128, (1<<(BIT_DEPTH-1))+0)
- PRED16x16_X(129, (1<<(BIT_DEPTH-1))+1)
- 
--static inline void FUNCC(pred16x16_plane_compat)(uint8_t *_src, int _stride, const int svq3, const int rv40){
-+static inline void FUNCC(pred16x16_plane_compat)(uint8_t *_src,
-+                                                 ptrdiff_t _stride,
-+                                                 const int svq3,
-+                                                 const int rv40)
-+{
-   int i, j, k;
-   int a;
-   INIT_CLIP
-@@ -437,11 +478,13 @@ static inline void FUNCC(pred16x16_plane_compat)(uint8_t *_src, int _stride, con
-   }
- }
- 
--static void FUNCC(pred16x16_plane)(uint8_t *src, int stride){
-+static void FUNCC(pred16x16_plane)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred16x16_plane_compat)(src, stride, 0, 0);
- }
- 
--static void FUNCC(pred8x8_vertical)(uint8_t *_src, int _stride){
-+static void FUNCC(pred8x8_vertical)(uint8_t *_src, ptrdiff_t _stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -454,7 +497,8 @@ static void FUNCC(pred8x8_vertical)(uint8_t *_src, int _stride){
-     }
- }
- 
--static void FUNCC(pred8x16_vertical)(uint8_t *_src, int _stride){
-+static void FUNCC(pred8x16_vertical)(uint8_t *_src, ptrdiff_t _stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     int stride = _stride>>(sizeof(pixel)-1);
-@@ -467,7 +511,8 @@ static void FUNCC(pred8x16_vertical)(uint8_t *_src, int _stride){
-     }
- }
- 
--static void FUNCC(pred8x8_horizontal)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x8_horizontal)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     stride /= sizeof(pixel);
-@@ -479,7 +524,8 @@ static void FUNCC(pred8x8_horizontal)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNCC(pred8x16_horizontal)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x16_horizontal)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     pixel *src = (pixel*)_src;
-     stride >>= sizeof(pixel)-1;
-@@ -491,7 +537,8 @@ static void FUNCC(pred8x16_horizontal)(uint8_t *_src, int stride){
- }
- 
- #define PRED8x8_X(n, v)\
--static void FUNCC(pred8x8_##n##_dc)(uint8_t *_src, int stride){\
-+static void FUNCC(pred8x8_##n##_dc)(uint8_t *_src, ptrdiff_t stride)\
-+{\
-     int i;\
-     const pixel4 a = PIXEL_SPLAT_X4(v);\
-     pixel *src = (pixel*)_src;\
-@@ -506,12 +553,14 @@ PRED8x8_X(127, (1<<(BIT_DEPTH-1))-1)
- PRED8x8_X(128, (1<<(BIT_DEPTH-1))+0)
- PRED8x8_X(129, (1<<(BIT_DEPTH-1))+1)
- 
--static void FUNCC(pred8x16_128_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x16_128_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_128_dc)(_src, stride);
-     FUNCC(pred8x8_128_dc)(_src+8*stride, stride);
- }
- 
--static void FUNCC(pred8x8_left_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x8_left_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     int dc0, dc2;
-     pixel4 dc0splat, dc2splat;
-@@ -536,12 +585,14 @@ static void FUNCC(pred8x8_left_dc)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNCC(pred8x16_left_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x16_left_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_left_dc)(_src, stride);
-     FUNCC(pred8x8_left_dc)(_src+8*stride, stride);
- }
- 
--static void FUNCC(pred8x8_top_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x8_top_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     int dc0, dc1;
-     pixel4 dc0splat, dc1splat;
-@@ -566,7 +617,8 @@ static void FUNCC(pred8x8_top_dc)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNCC(pred8x16_top_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x16_top_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     int dc0, dc1;
-     pixel4 dc0splat, dc1splat;
-@@ -587,7 +639,8 @@ static void FUNCC(pred8x16_top_dc)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNCC(pred8x8_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x8_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     int dc0, dc1, dc2;
-     pixel4 dc0splat, dc1splat, dc2splat, dc3splat;
-@@ -615,7 +668,8 @@ static void FUNCC(pred8x8_dc)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNCC(pred8x16_dc)(uint8_t *_src, int stride){
-+static void FUNCC(pred8x16_dc)(uint8_t *_src, ptrdiff_t stride)
-+{
-     int i;
-     int dc0, dc1, dc2, dc3, dc4;
-     pixel4 dc0splat, dc1splat, dc2splat, dc3splat, dc4splat, dc5splat, dc6splat, dc7splat;
-@@ -657,51 +711,60 @@ static void FUNCC(pred8x16_dc)(uint8_t *_src, int stride){
-     }
- }
- 
--static void FUNC(pred8x8_mad_cow_dc_l0t)(uint8_t *src, int stride){
-+static void FUNC(pred8x8_mad_cow_dc_l0t)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_top_dc)(src, stride);
-     FUNCC(pred4x4_dc)(src, NULL, stride);
- }
- 
--static void FUNC(pred8x16_mad_cow_dc_l0t)(uint8_t *src, int stride){
-+static void FUNC(pred8x16_mad_cow_dc_l0t)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x16_top_dc)(src, stride);
-     FUNCC(pred4x4_dc)(src, NULL, stride);
- }
- 
--static void FUNC(pred8x8_mad_cow_dc_0lt)(uint8_t *src, int stride){
-+static void FUNC(pred8x8_mad_cow_dc_0lt)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_dc)(src, stride);
-     FUNCC(pred4x4_top_dc)(src, NULL, stride);
- }
- 
--static void FUNC(pred8x16_mad_cow_dc_0lt)(uint8_t *src, int stride){
-+static void FUNC(pred8x16_mad_cow_dc_0lt)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x16_dc)(src, stride);
-     FUNCC(pred4x4_top_dc)(src, NULL, stride);
- }
- 
--static void FUNC(pred8x8_mad_cow_dc_l00)(uint8_t *src, int stride){
-+static void FUNC(pred8x8_mad_cow_dc_l00)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_left_dc)(src, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*stride                  , NULL, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*stride + 4*sizeof(pixel), NULL, stride);
- }
- 
--static void FUNC(pred8x16_mad_cow_dc_l00)(uint8_t *src, int stride){
-+static void FUNC(pred8x16_mad_cow_dc_l00)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x16_left_dc)(src, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*stride                  , NULL, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*stride + 4*sizeof(pixel), NULL, stride);
- }
- 
--static void FUNC(pred8x8_mad_cow_dc_0l0)(uint8_t *src, int stride){
-+static void FUNC(pred8x8_mad_cow_dc_0l0)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x8_left_dc)(src, stride);
-     FUNCC(pred4x4_128_dc)(src                  , NULL, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*sizeof(pixel), NULL, stride);
- }
- 
--static void FUNC(pred8x16_mad_cow_dc_0l0)(uint8_t *src, int stride){
-+static void FUNC(pred8x16_mad_cow_dc_0l0)(uint8_t *src, ptrdiff_t stride)
-+{
-     FUNCC(pred8x16_left_dc)(src, stride);
-     FUNCC(pred4x4_128_dc)(src                  , NULL, stride);
-     FUNCC(pred4x4_128_dc)(src + 4*sizeof(pixel), NULL, stride);
- }
- 
--static void FUNCC(pred8x8_plane)(uint8_t *_src, int _stride){
-+static void FUNCC(pred8x8_plane)(uint8_t *_src, ptrdiff_t _stride)
-+{
-   int j, k;
-   int a;
-   INIT_CLIP
-@@ -736,7 +799,8 @@ static void FUNCC(pred8x8_plane)(uint8_t *_src, int _stride){
-   }
- }
- 
--static void FUNCC(pred8x16_plane)(uint8_t *_src, int _stride){
-+static void FUNCC(pred8x16_plane)(uint8_t *_src, ptrdiff_t _stride)
-+{
-   int j, k;
-   int a;
-   INIT_CLIP
-@@ -815,14 +879,16 @@ static void FUNCC(pred8x16_plane)(uint8_t *_src, int _stride){
-         src += stride; \
-     }
- 
--static void FUNCC(pred8x8l_128_dc)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_128_dc)(uint8_t *_src, int has_topleft,
-+                                   int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
- 
-     PREDICT_8x8_DC(PIXEL_SPLAT_X4(1<<(BIT_DEPTH-1)));
- }
--static void FUNCC(pred8x8l_left_dc)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_left_dc)(uint8_t *_src, int has_topleft,
-+                                    int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -831,7 +897,8 @@ static void FUNCC(pred8x8l_left_dc)(uint8_t *_src, int has_topleft, int has_topr
-     const pixel4 dc = PIXEL_SPLAT_X4((l0+l1+l2+l3+l4+l5+l6+l7+4) >> 3);
-     PREDICT_8x8_DC(dc);
- }
--static void FUNCC(pred8x8l_top_dc)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_top_dc)(uint8_t *_src, int has_topleft,
-+                                   int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -840,7 +907,8 @@ static void FUNCC(pred8x8l_top_dc)(uint8_t *_src, int has_topleft, int has_topri
-     const pixel4 dc = PIXEL_SPLAT_X4((t0+t1+t2+t3+t4+t5+t6+t7+4) >> 3);
-     PREDICT_8x8_DC(dc);
- }
--static void FUNCC(pred8x8l_dc)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_dc)(uint8_t *_src, int has_topleft,
-+                               int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -851,7 +919,8 @@ static void FUNCC(pred8x8l_dc)(uint8_t *_src, int has_topleft, int has_topright,
-                                      +t0+t1+t2+t3+t4+t5+t6+t7+8) >> 4);
-     PREDICT_8x8_DC(dc);
- }
--static void FUNCC(pred8x8l_horizontal)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_horizontal)(uint8_t *_src, int has_topleft,
-+                                       int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -864,7 +933,8 @@ static void FUNCC(pred8x8l_horizontal)(uint8_t *_src, int has_topleft, int has_t
-     ROW(0); ROW(1); ROW(2); ROW(3); ROW(4); ROW(5); ROW(6); ROW(7);
- #undef ROW
- }
--static void FUNCC(pred8x8l_vertical)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_vertical)(uint8_t *_src, int has_topleft,
-+                                     int has_topright, ptrdiff_t _stride)
- {
-     int y;
-     pixel *src = (pixel*)_src;
-@@ -887,7 +957,8 @@ static void FUNCC(pred8x8l_vertical)(uint8_t *_src, int has_topleft, int has_top
-         AV_WN4PA(((pixel4*)(src+y*stride))+1, b);
-     }
- }
--static void FUNCC(pred8x8l_down_left)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_down_left)(uint8_t *_src, int has_topleft,
-+                                      int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -909,7 +980,8 @@ static void FUNCC(pred8x8l_down_left)(uint8_t *_src, int has_topleft, int has_to
-     SRC(6,7)=SRC(7,6)= (t13 + 2*t14 + t15 + 2) >> 2;
-     SRC(7,7)= (t14 + 3*t15 + 2) >> 2;
- }
--static void FUNCC(pred8x8l_down_right)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_down_right)(uint8_t *_src, int has_topleft,
-+                                       int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -932,7 +1004,8 @@ static void FUNCC(pred8x8l_down_right)(uint8_t *_src, int has_topleft, int has_t
-     SRC(6,0)=SRC(7,1)= (t4 + 2*t5 + t6 + 2) >> 2;
-     SRC(7,0)= (t5 + 2*t6 + t7 + 2) >> 2;
- }
--static void FUNCC(pred8x8l_vertical_right)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_vertical_right)(uint8_t *_src, int has_topleft,
-+                                           int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -962,7 +1035,8 @@ static void FUNCC(pred8x8l_vertical_right)(uint8_t *_src, int has_topleft, int h
-     SRC(7,1)= (t5 + 2*t6 + t7 + 2) >> 2;
-     SRC(7,0)= (t6 + t7 + 1) >> 1;
- }
--static void FUNCC(pred8x8l_horizontal_down)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_horizontal_down)(uint8_t *_src, int has_topleft,
-+                                            int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -992,7 +1066,8 @@ static void FUNCC(pred8x8l_horizontal_down)(uint8_t *_src, int has_topleft, int
-     SRC(6,0)= (t5 + 2*t4 + t3 + 2) >> 2;
-     SRC(7,0)= (t6 + 2*t5 + t4 + 2) >> 2;
- }
--static void FUNCC(pred8x8l_vertical_left)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_vertical_left)(uint8_t *_src, int has_topleft,
-+                                          int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -1021,7 +1096,8 @@ static void FUNCC(pred8x8l_vertical_left)(uint8_t *_src, int has_topleft, int ha
-     SRC(7,6)= (t10 + t11 + 1) >> 1;
-     SRC(7,7)= (t10 + 2*t11 + t12 + 2) >> 2;
- }
--static void FUNCC(pred8x8l_horizontal_up)(uint8_t *_src, int has_topleft, int has_topright, int _stride)
-+static void FUNCC(pred8x8l_horizontal_up)(uint8_t *_src, int has_topleft,
-+                                          int has_topright, ptrdiff_t _stride)
- {
-     pixel *src = (pixel*)_src;
-     int stride = _stride/sizeof(pixel);
-@@ -1055,7 +1131,9 @@ static void FUNCC(pred8x8l_horizontal_up)(uint8_t *_src, int has_topleft, int ha
- #undef PL
- #undef SRC
- 
--static void FUNCC(pred4x4_vertical_add)(uint8_t *_pix, const DCTELEM *_block, int stride){
-+static void FUNCC(pred4x4_vertical_add)(uint8_t *_pix, const DCTELEM *_block,
-+                                        ptrdiff_t stride)
-+{
-     int i;
-     pixel *pix = (pixel*)_pix;
-     const dctcoef *block = (const dctcoef*)_block;
-@@ -1072,7 +1150,9 @@ static void FUNCC(pred4x4_vertical_add)(uint8_t *_pix, const DCTELEM *_block, in
-     }
- }
- 
--static void FUNCC(pred4x4_horizontal_add)(uint8_t *_pix, const DCTELEM *_block, int stride){
-+static void FUNCC(pred4x4_horizontal_add)(uint8_t *_pix, const DCTELEM *_block,
-+                                          ptrdiff_t stride)
-+{
-     int i;
-     pixel *pix = (pixel*)_pix;
-     const dctcoef *block = (const dctcoef*)_block;
-@@ -1088,7 +1168,9 @@ static void FUNCC(pred4x4_horizontal_add)(uint8_t *_pix, const DCTELEM *_block,
-     }
- }
- 
--static void FUNCC(pred8x8l_vertical_add)(uint8_t *_pix, const DCTELEM *_block, int stride){
-+static void FUNCC(pred8x8l_vertical_add)(uint8_t *_pix, const DCTELEM *_block,
-+                                         ptrdiff_t stride)
-+{
-     int i;
-     pixel *pix = (pixel*)_pix;
-     const dctcoef *block = (const dctcoef*)_block;
-@@ -1109,7 +1191,9 @@ static void FUNCC(pred8x8l_vertical_add)(uint8_t *_pix, const DCTELEM *_block, i
-     }
- }
- 
--static void FUNCC(pred8x8l_horizontal_add)(uint8_t *_pix, const DCTELEM *_block, int stride){
-+static void FUNCC(pred8x8l_horizontal_add)(uint8_t *_pix, const DCTELEM *_block,
-+                                           ptrdiff_t stride)
-+{
-     int i;
-     pixel *pix = (pixel*)_pix;
-     const dctcoef *block = (const dctcoef*)_block;
-@@ -1129,25 +1213,36 @@ static void FUNCC(pred8x8l_horizontal_add)(uint8_t *_pix, const DCTELEM *_block,
-     }
- }
- 
--static void FUNCC(pred16x16_vertical_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred16x16_vertical_add)(uint8_t *pix, const int *block_offset,
-+                                          const DCTELEM *block,
-+                                          ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<16; i++)
-         FUNCC(pred4x4_vertical_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
- }
- 
--static void FUNCC(pred16x16_horizontal_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred16x16_horizontal_add)(uint8_t *pix,
-+                                            const int *block_offset,
-+                                            const DCTELEM *block,
-+                                            ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<16; i++)
-         FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
- }
- 
--static void FUNCC(pred8x8_vertical_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred8x8_vertical_add)(uint8_t *pix, const int *block_offset,
-+                                        const DCTELEM *block, ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<4; i++)
-         FUNCC(pred4x4_vertical_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
- }
- 
--static void FUNCC(pred8x16_vertical_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred8x16_vertical_add)(uint8_t *pix, const int *block_offset,
-+                                         const DCTELEM *block, ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<4; i++)
-         FUNCC(pred4x4_vertical_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
-@@ -1155,13 +1250,19 @@ static void FUNCC(pred8x16_vertical_add)(uint8_t *pix, const int *block_offset,
-         FUNCC(pred4x4_vertical_add)(pix + block_offset[i+4], block + i*16*sizeof(pixel), stride);
- }
- 
--static void FUNCC(pred8x8_horizontal_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred8x8_horizontal_add)(uint8_t *pix, const int *block_offset,
-+                                          const DCTELEM *block,
-+                                          ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<4; i++)
-         FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
- }
- 
--static void FUNCC(pred8x16_horizontal_add)(uint8_t *pix, const int *block_offset, const DCTELEM *block, int stride){
-+static void FUNCC(pred8x16_horizontal_add)(uint8_t *pix,
-+                                           const int *block_offset,
-+                                           const DCTELEM *block, ptrdiff_t stride)
-+{
-     int i;
-     for(i=0; i<4; i++)
-         FUNCC(pred4x4_horizontal_add)(pix + block_offset[i], block + i*16*sizeof(pixel), stride);
-diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
-index a686473..eebd137 100644
---- a/libavcodec/x86/h264_intrapred_init.c
-+++ b/libavcodec/x86/h264_intrapred_init.c
-@@ -23,7 +23,9 @@
- #include "libavcodec/h264pred.h"
- 
- #define PRED4x4(TYPE, DEPTH, OPT) \
--void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const uint8_t *topright, int stride);
-+void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-+                                                    const uint8_t *topright, \
-+                                                    ptrdiff_t stride);
- 
- PRED4x4(dc, 10, mmx2)
- PRED4x4(down_left, 10, sse2)
-@@ -42,7 +44,8 @@ PRED4x4(horizontal_down, 10, ssse3)
- PRED4x4(horizontal_down, 10, avx)
- 
- #define PRED8x8(TYPE, DEPTH, OPT) \
--void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
-+void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-+                                                    ptrdiff_t stride);
- 
- PRED8x8(dc, 10, mmx2)
- PRED8x8(dc, 10, sse2)
-@@ -52,7 +55,10 @@ PRED8x8(vertical, 10, sse2)
- PRED8x8(horizontal, 10, sse2)
- 
- #define PRED8x8L(TYPE, DEPTH, OPT)\
--void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int has_topleft, int has_topright, int stride);
-+void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-+                                                     int has_topleft, \
-+                                                     int has_topright, \
-+                                                     ptrdiff_t stride);
- 
- PRED8x8L(dc, 10, sse2)
- PRED8x8L(dc, 10, avx)
-@@ -79,7 +85,8 @@ PRED8x8L(horizontal_up, 10, ssse3)
- PRED8x8L(horizontal_up, 10, avx)
- 
- #define PRED16x16(TYPE, DEPTH, OPT)\
--void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int stride);
-+void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-+                                                      ptrdiff_t stride);
- 
- PRED16x16(dc, 10, mmx2)
- PRED16x16(dc, 10, sse2)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0080-FATE-fix-AD-PCM-test-dependencies-broken-in-e519990.patch b/debian/patches/post-9beta2/0080-FATE-fix-AD-PCM-test-dependencies-broken-in-e519990.patch
deleted file mode 100644
index d547db7..0000000
--- a/debian/patches/post-9beta2/0080-FATE-fix-AD-PCM-test-dependencies-broken-in-e519990.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 02e636425970fc9b9aebb31dcc7abbd36e54af2a Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Mon, 29 Oct 2012 21:26:46 +0100
-Subject: [PATCH 080/278] FATE: fix (AD)PCM test dependencies broken in
- e519990
-
-Signed-off-by: Diego Biurrun <diego at biurrun.de>
----
- tests/fate/acodec.mak |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak
-index 531f2f3..71521ab 100644
---- a/tests/fate/acodec.mak
-+++ b/tests/fate/acodec.mak
-@@ -19,7 +19,7 @@ FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64BE, AU)  += f64be
- FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64LE, WAV) += f64le
- 
- FATE_ACODEC_PCM := $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%)
--FATE_AVCONV += $(FATE_ACODEC_PCM)
-+FATE_ACODEC += $(FATE_ACODEC_PCM)
- fate-acodec-pcm: $(FATE_ACODEC_PCM)
- 
- fate-acodec-pcm-%: FMT = wav
-@@ -37,7 +37,7 @@ FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_SWF,     FLV)  += swf
- FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_YAMAHA,  WAV)  += yamaha
- 
- FATE_ACODEC_ADPCM := $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%)
--FATE_AVCONV += $(FATE_ACODEC_ADPCM)
-+FATE_ACODEC += $(FATE_ACODEC_ADPCM)
- fate-acodec-adpcm: $(FATE_ACODEC_ADPCM)
- 
- fate-acodec-adpcm-%: CODEC = adpcm_$(@:fate-acodec-adpcm-%=%)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0081-configure-rewrite-print_config-function-using-awk.patch b/debian/patches/post-9beta2/0081-configure-rewrite-print_config-function-using-awk.patch
deleted file mode 100644
index 6c025c7..0000000
--- a/debian/patches/post-9beta2/0081-configure-rewrite-print_config-function-using-awk.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From f454e879238ce317c6d905d187e7608c461a7087 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Sat, 27 Oct 2012 16:43:12 +0100
-Subject: [PATCH 081/278] configure: rewrite print_config() function using awk
-
-This is much faster with slow shells and noticeably faster even
-with bash on a fast Linux system.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   40 +++++++++++++++++++---------------------
- 1 file changed, 19 insertions(+), 21 deletions(-)
-
-diff --git a/configure b/configure
-index 2abc465..f215c76 100755
---- a/configure
-+++ b/configure
-@@ -566,31 +566,29 @@ check_deps(){
-     done
- }
- 
--print_config_h(){
--    enabled $1 && v=1 || v=0
--    echo "#define $2 $v"
--}
--
--print_config_mak(){
--    enabled $1 && v= || v=!
--    echo "$v$2=yes"
--}
--
--print_config_asm(){
--    enabled $1 && v=1 || v=0
--    echo "%define $2 $v"
--}
--
- print_config(){
-     pfx=$1
-     files=$2
-     shift 2
--    for cfg; do
--        ucname="$(toupper $cfg)"
--        for f in $files; do
--            "print_config_${f##*.}" $cfg ${pfx}${ucname} >>$f
--        done
--    done
-+    map 'eval echo "$v \${$v:-no}"' "$@" |
-+    awk "BEGIN { split(\"$files\", files) }
-+        {
-+            c = \"$pfx\" toupper(\$1);
-+            v = \$2;
-+            sub(/yes/, 1, v);
-+            sub(/no/,  0, v);
-+            for (f in files) {
-+                file = files[f];
-+                if (file ~ /\\.h\$/) {
-+                    printf(\"#define %s %d\\n\", c, v) >>file;
-+                } else if (file ~ /\\.asm\$/) {
-+                    printf(\"%%define %s %d\\n\", c, v) >>file;
-+                } else if (file ~ /\\.mak\$/) {
-+                    n = +v ? \"\" : \"!\";
-+                    printf(\"%s%s=yes\\n\", n, c) >>file;
-+                }
-+            }
-+        }"
- }
- 
- print_enabled(){
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0082-swscale-support-gray-to-9bit-and-10bit-formats.patch b/debian/patches/post-9beta2/0082-swscale-support-gray-to-9bit-and-10bit-formats.patch
deleted file mode 100644
index 8dc8c97..0000000
--- a/debian/patches/post-9beta2/0082-swscale-support-gray-to-9bit-and-10bit-formats.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 26b5ad2543305f0b148e5b91e9773b6a9a185922 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Mon, 29 Oct 2012 19:07:01 +0100
-Subject: [PATCH 082/278] swscale: support gray to 9bit and 10bit formats
-
-With the input of Kostya and Ronald.
----
- libswscale/swscale.c          |   38 ++++++++++++++++++++++++++++++++++++--
- libswscale/swscale_unscaled.c |   32 ++++++++++++++++++++++++++++++--
- 2 files changed, 66 insertions(+), 4 deletions(-)
-
-diff --git a/libswscale/swscale.c b/libswscale/swscale.c
-index 3f54e4d..c1920de 100644
---- a/libswscale/swscale.c
-+++ b/libswscale/swscale.c
-@@ -61,6 +61,28 @@ static av_always_inline void fillPlane(uint8_t *plane, int stride, int width,
-     }
- }
- 
-+static void fill_plane9or10(uint8_t *plane, int stride, int width,
-+                            int height, int y, uint8_t val,
-+                            const int dst_depth, const int big_endian)
-+{
-+    int i, j;
-+    uint16_t *dst = (uint16_t *) (plane + stride * y);
-+#define FILL8TO9_OR_10(wfunc) \
-+    for (i = 0; i < height; i++) { \
-+        for (j = 0; j < width; j++) { \
-+            wfunc(&dst[j], (val << (dst_depth - 8)) |  \
-+                               (val >> (16 - dst_depth))); \
-+        } \
-+        dst += stride / 2; \
-+    }
-+    if (big_endian) {
-+        FILL8TO9_OR_10(AV_WB16);
-+    } else {
-+        FILL8TO9_OR_10(AV_WL16);
-+    }
-+}
-+
-+
- static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW,
-                            const uint8_t *_src, const int16_t *filter,
-                            const int32_t *filterPos, int filterSize)
-@@ -658,8 +680,20 @@ static int swScale(SwsContext *c, const uint8_t *src[],
-         }
-     }
- 
--    if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf)
--        fillPlane(dst[3], dstStride[3], dstW, dstY - lastDstY, lastDstY, 255);
-+    if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf) {
-+        int length = dstW;
-+        int height = dstY - lastDstY;
-+        if (is16BPS(c->dstFormat))
-+            length *= 2;
-+
-+        if (is9_OR_10BPS(dstFormat)) {
-+            const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat);
-+            fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY,
-+                            255, desc->comp[3].depth_minus1 + 1,
-+                            isBE(dstFormat));
-+        } else
-+            fillPlane(dst[3], dstStride[3], length, height, lastDstY, 255);
-+    }
- 
- #if HAVE_MMXEXT_INLINE
-     if (av_get_cpu_flags() & AV_CPU_FLAG_MMXEXT)
-diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
-index 5efc647..9b919f8 100644
---- a/libswscale/swscale_unscaled.c
-+++ b/libswscale/swscale_unscaled.c
-@@ -98,6 +98,27 @@ static void fillPlane(uint8_t *plane, int stride, int width, int height, int y,
-     }
- }
- 
-+static void fill_plane9or10(uint8_t *plane, int stride, int width,
-+                            int height, int y, uint8_t val,
-+                            const int dst_depth, const int big_endian)
-+{
-+    int i, j;
-+    uint16_t *dst = (uint16_t *) (plane + stride * y);
-+#define FILL8TO9_OR_10(wfunc) \
-+    for (i = 0; i < height; i++) { \
-+        for (j = 0; j < width; j++) { \
-+            wfunc(&dst[j], (val << (dst_depth - 8)) |  \
-+                               (val >> (16 - dst_depth))); \
-+        } \
-+        dst += stride / 2; \
-+    }
-+    if (big_endian) {
-+        FILL8TO9_OR_10(AV_WB16);
-+    } else {
-+        FILL8TO9_OR_10(AV_WL16);
-+    }
-+}
-+
- static void copyPlane(const uint8_t *src, int srcStride,
-                       int srcSliceY, int srcSliceH, int width,
-                       uint8_t *dst, int dstStride)
-@@ -677,10 +698,17 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
-         // ignore palette for GRAY8
-         if (plane == 1 && !dst[2]) continue;
-         if (!src[plane] || (plane == 1 && !src[2])) {
-+            int val = (plane == 3) ? 255 : 128;
-             if (is16BPS(c->dstFormat))
-                 length *= 2;
--            fillPlane(dst[plane], dstStride[plane], length, height, y,
--                      (plane == 3) ? 255 : 128);
-+            if (is9_OR_10BPS(c->dstFormat)) {
-+                fill_plane9or10(dst[plane], dstStride[plane],
-+                                length, height, y, val,
-+                                desc_dst->comp[plane].depth_minus1 + 1,
-+                                isBE(c->dstFormat));
-+            } else
-+                fillPlane(dst[plane], dstStride[plane], length, height, y,
-+                          val);
-         } else {
-             if (is9_OR_10BPS(c->srcFormat)) {
-                 const int src_depth = desc_src->comp[plane].depth_minus1 + 1;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0083-pixfmt-support-more-yuva-formats.patch b/debian/patches/post-9beta2/0083-pixfmt-support-more-yuva-formats.patch
deleted file mode 100644
index 901cf2e..0000000
--- a/debian/patches/post-9beta2/0083-pixfmt-support-more-yuva-formats.patch
+++ /dev/null
@@ -1,566 +0,0 @@
-From 7658295ba353b8bedb3af904f46cfb1ba0cea86a Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Sun, 14 Oct 2012 08:06:27 +0200
-Subject: [PATCH 083/278] pixfmt: support more yuva formats
-
-Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
----
- libavcodec/raw.c              |   19 ++++
- libavformat/nut.c             |   28 +++++
- libavutil/pixdesc.c           |  234 +++++++++++++++++++++++++++++++++++++++++
- libavutil/pixfmt.h            |   28 +++++
- libswscale/utils.c            |   18 ++++
- tests/ref/lavfi/pixdesc       |   18 ++++
- tests/ref/lavfi/pixfmts_copy  |   18 ++++
- tests/ref/lavfi/pixfmts_null  |   18 ++++
- tests/ref/lavfi/pixfmts_scale |   18 ++++
- tests/ref/lavfi/pixfmts_vflip |   18 ++++
- 10 files changed, 417 insertions(+)
-
-diff --git a/libavcodec/raw.c b/libavcodec/raw.c
-index 6f0c923..4ccc6cc 100644
---- a/libavcodec/raw.c
-+++ b/libavcodec/raw.c
-@@ -124,6 +124,25 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
-     { AV_PIX_FMT_YUVA420P,    MKTAG('Y', '4', 11 ,  8 ) },
-     { AV_PIX_FMT_Y400A,       MKTAG('Y', '2',  0 ,  8 ) },
- 
-+    { AV_PIX_FMT_YUVA420P9LE,  MKTAG('Y', '4', 11 ,  9 ) },
-+    { AV_PIX_FMT_YUVA420P9BE,  MKTAG( 9 , 11 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA422P9LE,  MKTAG('Y', '4', 10 ,  9 ) },
-+    { AV_PIX_FMT_YUVA422P9BE,  MKTAG( 9 , 10 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA444P9LE,  MKTAG('Y', '4',  0 ,  9 ) },
-+    { AV_PIX_FMT_YUVA444P9BE,  MKTAG( 9 ,  0 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA420P10LE, MKTAG('Y', '4', 11 , 10 ) },
-+    { AV_PIX_FMT_YUVA420P10BE, MKTAG(10 , 11 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA422P10LE, MKTAG('Y', '4', 10 , 10 ) },
-+    { AV_PIX_FMT_YUVA422P10BE, MKTAG(10 , 10 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA444P10LE, MKTAG('Y', '4',  0 , 10 ) },
-+    { AV_PIX_FMT_YUVA444P10BE, MKTAG(10 ,  0 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA420P16LE, MKTAG('Y', '4', 11 , 16 ) },
-+    { AV_PIX_FMT_YUVA420P16BE, MKTAG(16 , 11 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA422P16LE, MKTAG('Y', '4', 10 , 16 ) },
-+    { AV_PIX_FMT_YUVA422P16BE, MKTAG(16 , 10 , '4', 'Y') },
-+    { AV_PIX_FMT_YUVA444P16LE, MKTAG('Y', '4',  0 , 16 ) },
-+    { AV_PIX_FMT_YUVA444P16BE, MKTAG(16 ,  0 , '4', 'Y') },
-+
-     /* quicktime */
-     { AV_PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
-     { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', 'y') },
-diff --git a/libavformat/nut.c b/libavformat/nut.c
-index 85b126b..65fadbf 100644
---- a/libavformat/nut.c
-+++ b/libavformat/nut.c
-@@ -92,6 +92,34 @@ const AVCodecTag ff_nut_video_tags[] = {
-     { AV_CODEC_ID_RAWVIDEO, MKTAG(16 ,  0 , '3', 'Y') },
-     { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 ,  8 ) },
-     { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2',  0 ,  8 ) },
-+
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1',  0 ,  9 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG( 9 ,  0 , '1', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 ,  9 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 11 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 ,  9 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 10 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4',  0 ,  9 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG( 9 ,  0 , '4', 'Y') },
-+
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1',  0 , 10 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(10 ,  0 , '1', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 10 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 10 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4',  0 , 10 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(10 ,  0 , '4', 'Y') },
-+
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1',  0 , 16 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(16 ,  0 , '1', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 16 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 16 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '4', 'Y') },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4',  0 , 16 ) },
-+    { AV_CODEC_ID_RAWVIDEO, MKTAG(16 ,  0 , '4', 'Y') },
-+
-     { AV_CODEC_ID_NONE    , 0                         }
- };
- 
-diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
-index b8cfabd..bc446b1 100644
---- a/libavutil/pixdesc.c
-+++ b/libavutil/pixdesc.c
-@@ -558,6 +558,240 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
-         },
-         .flags = PIX_FMT_PLANAR,
-     },
-+    [AV_PIX_FMT_YUVA420P9BE] = {
-+        .name = "yuva420p9be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA420P9LE] = {
-+        .name = "yuva420p9le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P9BE] = {
-+        .name = "yuva422p9be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P9LE] = {
-+        .name = "yuva422p9le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P9BE] = {
-+        .name = "yuva444p9be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P9LE] = {
-+        .name = "yuva444p9le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 8 },        /* Y */
-+            { 1, 1, 1, 0, 8 },        /* U */
-+            { 2, 1, 1, 0, 8 },        /* V */
-+            { 3, 1, 1, 0, 8 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA420P10BE] = {
-+        .name = "yuva420p10be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 9 },        /* Y */
-+            { 1, 1, 1, 0, 9 },        /* U */
-+            { 2, 1, 1, 0, 9 },        /* V */
-+            { 3, 1, 1, 0, 9 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA420P10LE] = {
-+        .name = "yuva420p10le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P10BE] = {
-+        .name = "yuva422p10be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P10LE] = {
-+        .name = "yuva422p10le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P10BE] = {
-+        .name = "yuva444p10be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P10LE] = {
-+        .name = "yuva444p10le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA420P16BE] = {
-+        .name = "yuva420p16be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA420P16LE] = {
-+        .name = "yuva420p16le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 1,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P16BE] = {
-+        .name = "yuva422p16be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA422P16LE] = {
-+        .name = "yuva422p16le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 1,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P16BE] = {
-+        .name = "yuva444p16be",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_BE | PIX_FMT_PLANAR,
-+    },
-+    [AV_PIX_FMT_YUVA444P16LE] = {
-+        .name = "yuva444p16le",
-+        .nb_components = 4,
-+        .log2_chroma_w = 0,
-+        .log2_chroma_h = 0,
-+        .comp = {
-+            { 0, 1, 1, 0, 15 },        /* Y */
-+            { 1, 1, 1, 0, 15 },        /* U */
-+            { 2, 1, 1, 0, 15 },        /* V */
-+            { 3, 1, 1, 0, 15 },        /* A */
-+        },
-+        .flags = PIX_FMT_PLANAR,
-+    },
-     [AV_PIX_FMT_VDPAU_H264] = {
-         .name = "vdpau_h264",
-         .log2_chroma_w = 1,
-diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
-index b11a034..8e454a8 100644
---- a/libavutil/pixfmt.h
-+++ b/libavutil/pixfmt.h
-@@ -160,6 +160,24 @@ enum AVPixelFormat {
-     AV_PIX_FMT_GBRP16LE,  ///< planar GBR 4:4:4 48bpp, little endian
-     AV_PIX_FMT_YUVA422P,  ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
-     AV_PIX_FMT_YUVA444P,  ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
-+    AV_PIX_FMT_YUVA420P9BE,  ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big endian
-+    AV_PIX_FMT_YUVA420P9LE,  ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little endian
-+    AV_PIX_FMT_YUVA422P9BE,  ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big endian
-+    AV_PIX_FMT_YUVA422P9LE,  ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little endian
-+    AV_PIX_FMT_YUVA444P9BE,  ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big endian
-+    AV_PIX_FMT_YUVA444P9LE,  ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little endian
-+    AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
-+    AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
-+    AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little endian)
-+    AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little endian)
-+    AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little endian)
-+    AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big endian)
-+    AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little endian)
-     AV_PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
- 
- #if FF_API_PIX_FMT
-@@ -202,6 +220,16 @@ enum AVPixelFormat {
- #define AV_PIX_FMT_GBRP10    AV_PIX_FMT_NE(GBRP10BE,    GBRP10LE)
- #define AV_PIX_FMT_GBRP16    AV_PIX_FMT_NE(GBRP16BE,    GBRP16LE)
- 
-+#define AV_PIX_FMT_YUVA420P9  AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
-+#define AV_PIX_FMT_YUVA422P9  AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
-+#define AV_PIX_FMT_YUVA444P9  AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
-+#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
-+#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
-+#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
-+#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
-+#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
-+#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
-+
- #if FF_API_PIX_FMT
- #define PixelFormat AVPixelFormat
- 
-diff --git a/libswscale/utils.c b/libswscale/utils.c
-index a40dfe7..f68f120 100644
---- a/libswscale/utils.c
-+++ b/libswscale/utils.c
-@@ -110,6 +110,24 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
-     [AV_PIX_FMT_YUVA420P]    = { 1, 1 },
-     [AV_PIX_FMT_YUVA422P]    = { 1, 1 },
-     [AV_PIX_FMT_YUVA444P]    = { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P9BE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P9LE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P9BE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P9LE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P9BE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P9LE] = { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P10BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P10LE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P10BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P10LE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P10BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P10LE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P16BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA420P16LE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P16BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA422P16LE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P16BE]= { 1, 1 },
-+    [AV_PIX_FMT_YUVA444P16LE]= { 1, 1 },
-     [AV_PIX_FMT_RGB48BE]     = { 1, 1 },
-     [AV_PIX_FMT_RGB48LE]     = { 1, 1 },
-     [AV_PIX_FMT_RGB565BE]    = { 1, 1 },
-diff --git a/tests/ref/lavfi/pixdesc b/tests/ref/lavfi/pixdesc
-index dc1b857..5716cf1 100644
---- a/tests/ref/lavfi/pixdesc
-+++ b/tests/ref/lavfi/pixdesc
-@@ -57,8 +57,26 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
- yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
- yuv444p9le          f0606604a5c08becab6ba500124c4b7c
- yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
-+yuva420p10be        145366ff1632de3e300d947f49844284
-+yuva420p10le        242b310218a41aacc59f78f42f949d60
-+yuva420p16be        25a335f66a0670911ced818aa42fb670
-+yuva420p16le        97bf252e6c030f0f0412d3826c2ea259
-+yuva420p9be         06b764d85bd3c22e9b7ca4babed84d4f
-+yuva420p9le         1f01cdd4fc46f98d4c11b2947307a0e3
- yuva422p            92b6815f465297284cdb843711682cee
-+yuva422p10be        c8722cb6e86d478f501d514a2d004867
-+yuva422p10le        5c2767a47c94966052955bc48f72dd94
-+yuva422p16be        ef442b11b26e5e61f3c958fa309576dd
-+yuva422p16le        5789009759d7a44dacc6da2194e402b1
-+yuva422p9be         e0d2f45f7f5541eee988137c7ebb3495
-+yuva422p9le         a4ec81f328efd3856dec430fb27f2f56
- yuva444p            c523716e4900cfe515eaab1d7124fdd9
-+yuva444p10be        03df7c3936c25626ea596c28e0466129
-+yuva444p10le        55398bb467bc7957288d59af9f0bfadd
-+yuva444p16be        ee7b9dd854e36b165d5b7cffb646ba6c
-+yuva444p16le        ec93b2907923d5655e9fb085479260ef
-+yuva444p9be         03414257d78e72c28d03e3c247319b7c
-+yuva444p9le         e421d753257e36a79c2c0ec1607ac9e6
- yuvj420p            32eec78ba51857b16ce9b813a49b7189
- yuvj422p            0dfa0ed434f73be51428758c69e082cb
- yuvj440p            657501a28004e27a592757a7509f5189
-diff --git a/tests/ref/lavfi/pixfmts_copy b/tests/ref/lavfi/pixfmts_copy
-index dc1b857..5716cf1 100644
---- a/tests/ref/lavfi/pixfmts_copy
-+++ b/tests/ref/lavfi/pixfmts_copy
-@@ -57,8 +57,26 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
- yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
- yuv444p9le          f0606604a5c08becab6ba500124c4b7c
- yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
-+yuva420p10be        145366ff1632de3e300d947f49844284
-+yuva420p10le        242b310218a41aacc59f78f42f949d60
-+yuva420p16be        25a335f66a0670911ced818aa42fb670
-+yuva420p16le        97bf252e6c030f0f0412d3826c2ea259
-+yuva420p9be         06b764d85bd3c22e9b7ca4babed84d4f
-+yuva420p9le         1f01cdd4fc46f98d4c11b2947307a0e3
- yuva422p            92b6815f465297284cdb843711682cee
-+yuva422p10be        c8722cb6e86d478f501d514a2d004867
-+yuva422p10le        5c2767a47c94966052955bc48f72dd94
-+yuva422p16be        ef442b11b26e5e61f3c958fa309576dd
-+yuva422p16le        5789009759d7a44dacc6da2194e402b1
-+yuva422p9be         e0d2f45f7f5541eee988137c7ebb3495
-+yuva422p9le         a4ec81f328efd3856dec430fb27f2f56
- yuva444p            c523716e4900cfe515eaab1d7124fdd9
-+yuva444p10be        03df7c3936c25626ea596c28e0466129
-+yuva444p10le        55398bb467bc7957288d59af9f0bfadd
-+yuva444p16be        ee7b9dd854e36b165d5b7cffb646ba6c
-+yuva444p16le        ec93b2907923d5655e9fb085479260ef
-+yuva444p9be         03414257d78e72c28d03e3c247319b7c
-+yuva444p9le         e421d753257e36a79c2c0ec1607ac9e6
- yuvj420p            32eec78ba51857b16ce9b813a49b7189
- yuvj422p            0dfa0ed434f73be51428758c69e082cb
- yuvj440p            657501a28004e27a592757a7509f5189
-diff --git a/tests/ref/lavfi/pixfmts_null b/tests/ref/lavfi/pixfmts_null
-index dc1b857..5716cf1 100644
---- a/tests/ref/lavfi/pixfmts_null
-+++ b/tests/ref/lavfi/pixfmts_null
-@@ -57,8 +57,26 @@ yuv444p16le         20f86bc2f68d2b3f1f2b48b97b2189f4
- yuv444p9be          6ab31f4c12b533ce318ecdff83cdd054
- yuv444p9le          f0606604a5c08becab6ba500124c4b7c
- yuva420p            a29884f3f3dfe1e00b961bc17bef3d47
-+yuva420p10be        145366ff1632de3e300d947f49844284
-+yuva420p10le        242b310218a41aacc59f78f42f949d60
-+yuva420p16be        25a335f66a0670911ced818aa42fb670
-+yuva420p16le        97bf252e6c030f0f0412d3826c2ea259
-+yuva420p9be         06b764d85bd3c22e9b7ca4babed84d4f
-+yuva420p9le         1f01cdd4fc46f98d4c11b2947307a0e3
- yuva422p            92b6815f465297284cdb843711682cee
-+yuva422p10be        c8722cb6e86d478f501d514a2d004867
-+yuva422p10le        5c2767a47c94966052955bc48f72dd94
-+yuva422p16be        ef442b11b26e5e61f3c958fa309576dd
-+yuva422p16le        5789009759d7a44dacc6da2194e402b1
-+yuva422p9be         e0d2f45f7f5541eee988137c7ebb3495
-+yuva422p9le         a4ec81f328efd3856dec430fb27f2f56
- yuva444p            c523716e4900cfe515eaab1d7124fdd9
-+yuva444p10be        03df7c3936c25626ea596c28e0466129
-+yuva444p10le        55398bb467bc7957288d59af9f0bfadd
-+yuva444p16be        ee7b9dd854e36b165d5b7cffb646ba6c
-+yuva444p16le        ec93b2907923d5655e9fb085479260ef
-+yuva444p9be         03414257d78e72c28d03e3c247319b7c
-+yuva444p9le         e421d753257e36a79c2c0ec1607ac9e6
- yuvj420p            32eec78ba51857b16ce9b813a49b7189
- yuvj422p            0dfa0ed434f73be51428758c69e082cb
- yuvj440p            657501a28004e27a592757a7509f5189
-diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
-index acd40e3..d8ae09c 100644
---- a/tests/ref/lavfi/pixfmts_scale
-+++ b/tests/ref/lavfi/pixfmts_scale
-@@ -57,8 +57,26 @@ yuv444p16le         a0c5d3c7bf3f181db503cf8e450d1335
- yuv444p9be          9ac2643ce7f7e5c4e17c8c9fd8494d4a
- yuv444p9le          896a1cc9cccca1ba410dd53942d33cc4
- yuva420p            8673a9131fb47de69788863f93a50eb7
-+yuva420p10be        cf397b35db9407496093b2ad64f3106c
-+yuva420p10le        8a06c377b8aa2b2979054e074582a5b5
-+yuva420p16be        a61d8ddb646e2d26020fc7ed2a48c1a9
-+yuva420p16le        90ef774f86ad3177ec57eca8744b4e09
-+yuva420p9be         b43d5d88a474c80abad8e887eb5a3317
-+yuva420p9le         ada2b719827059d70ebc57e2a3f9da92
- yuva422p            3c76ebeca0a7d3aa5f8e31ef80a86ffe
-+yuva422p10be        c12a427d2b8fc84f93fd3cf9fd5bcb14
-+yuva422p10le        aefcda062e7e3463c887faa9d926aca7
-+yuva422p16be        a31bd04c58c22690f2a7c745f34cf48f
-+yuva422p16le        0bc3720dba6076dcce3b74b1d3c6c4b7
-+yuva422p9be         b21d2aa97ff643c86bbc08b578729c39
-+yuva422p9le         c3eda8831e9b9c94a3eb487d33114103
- yuva444p            3268c6abe5e3cdbd16552a1eddced816
-+yuva444p10be        4f6eaf2bbe8a083773b9f061fec20e41
-+yuva444p10le        2eeda83856df77760cd30e477e8ba00b
-+yuva444p16be        3587f05da58a8435aad648506562d39b
-+yuva444p16le        3a3df23feb60d8832b566fd9765983d0
-+yuva444p9be         d5342be0074975ea65907f5b65c7a335
-+yuva444p9le         c41849b0134670d6f6253c337defbb04
- yuvj420p            30427bd6caf5bda93a173dbebe759e09
- yuvj422p            fc8288f64fd149573f73cf8da05d8e6d
- yuvj440p            508ac7a9ddeb6d1794a1100ba7a1664c
-diff --git a/tests/ref/lavfi/pixfmts_vflip b/tests/ref/lavfi/pixfmts_vflip
-index a4dffb9..d820518 100644
---- a/tests/ref/lavfi/pixfmts_vflip
-+++ b/tests/ref/lavfi/pixfmts_vflip
-@@ -57,8 +57,26 @@ yuv444p16le         8e83323cf102d6c823a03ae8a7b7e033
- yuv444p9be          6ac92b7dc9ab2fc59bee99204886899a
- yuv444p9le          85aef13a654953d3455d89770b0d74bd
- yuva420p            c705d1cf061d8c6580ac690b55f92276
-+yuva420p10be        baa5e3b0ff6d0ebbb0958560cd763c6e
-+yuva420p10le        32473853156341586ed716090427fc10
-+yuva420p16be        bf3b134eb70878df9afba61d03e930b8
-+yuva420p16le        105d375154329a381aa58379a0a6ec46
-+yuva420p9be         8273d591e055f48990c29dd905a6cdfd
-+yuva420p9le         95ced0bb07e422d98db61a35cdb3fb8f
- yuva422p            6aed0ea657ed51cc047a4fbdd981aec8
-+yuva422p10be        b76d8be9b4035d3164c35a2fdb020636
-+yuva422p10le        09aa2454075f999dbd3175b5c435dacf
-+yuva422p16be        39552c259ca242f2417e913ffc602fde
-+yuva422p16le        16faa558a34291ca32f6d94dce211ee2
-+yuva422p9be         a951eafb62c092c63f7566b6803f60df
-+yuva422p9le         00b39cfca78666e057ee527f5e174a04
- yuva444p            da5d64f2b2bd2013c186456f595fad65
-+yuva444p10be        09375aa0c3a60436fc65ca0da76ca542
-+yuva444p10le        a4baf701134c7ff33f806ad00501d8f5
-+yuva444p16be        7e9b799b057e1446dabbf0f738480cfb
-+yuva444p16le        556d58b91a617fe4a83af99a4aea1c2e
-+yuva444p9be         b5a31de4fac408eeecaf3aff11f40e55
-+yuva444p9le         67467f1e1d9edbd59d3984ebbfe24be6
- yuvj420p            41fd02b204da0ab62452cd14b595e2e4
- yuvj422p            7f6ca9bc1812cde02036d7d29a7cce43
- yuvj440p            25711c3c0fd15ec19c59a10784fcfb96
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0084-configure-fix-print_config-with-broke-awks.patch b/debian/patches/post-9beta2/0084-configure-fix-print_config-with-broke-awks.patch
deleted file mode 100644
index 6ec5837..0000000
--- a/debian/patches/post-9beta2/0084-configure-fix-print_config-with-broke-awks.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d16c4aebba1ba611e10d86aa02be4cdfd3fbc3c5 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 30 Oct 2012 11:57:30 +0000
-Subject: [PATCH 084/278] configure: fix print_config() with broke awks
-
-Some awk versions do not treat the result of unary + on a (numeric)
-string as numeric, giving wrong results when used in a boolean context
-Using unary - instead is logically equivalent works as expected.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index f215c76..9528b5d 100755
---- a/configure
-+++ b/configure
-@@ -584,7 +584,7 @@ print_config(){
-                 } else if (file ~ /\\.asm\$/) {
-                     printf(\"%%define %s %d\\n\", c, v) >>file;
-                 } else if (file ~ /\\.mak\$/) {
--                    n = +v ? \"\" : \"!\";
-+                    n = -v ? \"\" : \"!\";
-                     printf(\"%s%s=yes\\n\", n, c) >>file;
-                 }
-             }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0085-cngdec-Update-the-LPC-coefficients-after-averaging-t.patch b/debian/patches/post-9beta2/0085-cngdec-Update-the-LPC-coefficients-after-averaging-t.patch
deleted file mode 100644
index 1a184d7..0000000
--- a/debian/patches/post-9beta2/0085-cngdec-Update-the-LPC-coefficients-after-averaging-t.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 9b50d20cd24c0a91bace9d651e2d0fd1e91db3c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 30 Oct 2012 12:26:39 +0200
-Subject: [PATCH 085/278] cngdec: Update the LPC coefficients after averaging
- the reflection coefficients
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-I somehow messed up the placement of this one.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/cngdec.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-index c22fd55..8cfe9cf 100644
---- a/libavcodec/cngdec.c
-+++ b/libavcodec/cngdec.c
-@@ -112,12 +112,12 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
-         for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
-             p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
-         }
--        make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
-     }
- 
-     p->energy = p->energy / 2 + p->target_energy / 2;
-     for (i = 0; i < p->order; i++)
-         p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
-+    make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
- 
-     for (i = 0; i < p->order; i++)
-         e *= 1.0 - p->refl_coef[i]*p->refl_coef[i];
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0086-cngdec-Fix-the-memset-size-to-cover-the-full-array.patch b/debian/patches/post-9beta2/0086-cngdec-Fix-the-memset-size-to-cover-the-full-array.patch
deleted file mode 100644
index 981acf5..0000000
--- a/debian/patches/post-9beta2/0086-cngdec-Fix-the-memset-size-to-cover-the-full-array.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From cafefd889b9e9f36814dc4ca13ed169f667b41a4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 30 Oct 2012 12:17:35 +0200
-Subject: [PATCH 086/278] cngdec: Fix the memset size to cover the full array
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This was a leftover from previous iterations of the code, where the
-refl coef arrays were statically allocated.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/cngdec.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-index 8cfe9cf..c05bfd9 100644
---- a/libavcodec/cngdec.c
-+++ b/libavcodec/cngdec.c
-@@ -108,7 +108,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
-     if (avpkt->size) {
-         float dbov = -avpkt->data[0] / 10.0;
-         p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
--        memset(p->target_refl_coef, 0, sizeof(p->refl_coef));
-+        memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
-         for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
-             p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
-         }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0087-cngdec-Make-the-dbov-variable-have-the-right-unit.patch b/debian/patches/post-9beta2/0087-cngdec-Make-the-dbov-variable-have-the-right-unit.patch
deleted file mode 100644
index e97b374..0000000
--- a/debian/patches/post-9beta2/0087-cngdec-Make-the-dbov-variable-have-the-right-unit.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 036e6c37d31e471447f71decaea55996bde3d9a2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 30 Oct 2012 11:56:54 +0200
-Subject: [PATCH 087/278] cngdec: Make the dbov variable have the right unit
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Previously the unit of the variable was Bov, not dBov.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/cngdec.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-index c05bfd9..fca4b9e 100644
---- a/libavcodec/cngdec.c
-+++ b/libavcodec/cngdec.c
-@@ -106,8 +106,8 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
-     float scaling;
- 
-     if (avpkt->size) {
--        float dbov = -avpkt->data[0] / 10.0;
--        p->target_energy = 1081109975 * pow(10, dbov) * 0.75;
-+        int dbov = -avpkt->data[0];
-+        p->target_energy = 1081109975 * pow(10, dbov / 10.0) * 0.75;
-         memset(p->target_refl_coef, 0, p->order * sizeof(*p->target_refl_coef));
-         for (i = 0; i < FFMIN(avpkt->size - 1, p->order); i++) {
-             p->target_refl_coef[i] = (avpkt->data[1 + i] - 127) / 128.0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0088-cngdec-Allow-flushing-the-decoder.patch b/debian/patches/post-9beta2/0088-cngdec-Allow-flushing-the-decoder.patch
deleted file mode 100644
index 904aaff..0000000
--- a/debian/patches/post-9beta2/0088-cngdec-Allow-flushing-the-decoder.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 6b68223d315aa4daf2e9006f6f37418ca5766698 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 30 Oct 2012 12:03:25 +0200
-Subject: [PATCH 088/278] cngdec: Allow flushing the decoder
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-After a flush, don't average the output envelope and energy with
-previous iterations.
-
-Also start directly from the target values for the first iteration
-at startup.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/cngdec.c |   20 +++++++++++++++++---
- 1 file changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-index fca4b9e..4fe7839 100644
---- a/libavcodec/cngdec.c
-+++ b/libavcodec/cngdec.c
-@@ -32,6 +32,7 @@ typedef struct CNGContext {
-     float *lpc_coef;
-     int order;
-     int energy, target_energy;
-+    int inited;
-     float *filter_out;
-     float *excitation;
-     AVLFG lfg;
-@@ -94,6 +95,12 @@ static void make_lpc_coefs(float *lpc, const float *refl, int order)
-         memcpy(lpc, cur, sizeof(*lpc) * order);
- }
- 
-+static void cng_decode_flush(AVCodecContext *avctx)
-+{
-+    CNGContext *p = avctx->priv_data;
-+    p->inited = 0;
-+}
-+
- static int cng_decode_frame(AVCodecContext *avctx, void *data,
-                               int *got_frame_ptr, AVPacket *avpkt)
- {
-@@ -114,9 +121,15 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
-         }
-     }
- 
--    p->energy = p->energy / 2 + p->target_energy / 2;
--    for (i = 0; i < p->order; i++)
--        p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
-+    if (p->inited) {
-+        p->energy = p->energy / 2 + p->target_energy / 2;
-+        for (i = 0; i < p->order; i++)
-+            p->refl_coef[i] = 0.6 *p->refl_coef[i] + 0.4 * p->target_refl_coef[i];
-+    } else {
-+        p->energy = p->target_energy;
-+        memcpy(p->refl_coef, p->target_refl_coef, p->order * sizeof(*p->refl_coef));
-+        p->inited = 1;
-+    }
-     make_lpc_coefs(p->lpc_coef, p->refl_coef, p->order);
- 
-     for (i = 0; i < p->order; i++)
-@@ -154,6 +167,7 @@ AVCodec ff_comfortnoise_decoder = {
-     .priv_data_size = sizeof(CNGContext),
-     .init           = cng_decode_init,
-     .decode         = cng_decode_frame,
-+    .flush          = cng_decode_flush,
-     .close          = cng_decode_close,
-     .long_name      = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
-     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0089-cng-Reindent-some-incorrectly-indented-lines.patch b/debian/patches/post-9beta2/0089-cng-Reindent-some-incorrectly-indented-lines.patch
deleted file mode 100644
index 676740f..0000000
--- a/debian/patches/post-9beta2/0089-cng-Reindent-some-incorrectly-indented-lines.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ab9545a290d1f48eb4c361ecd0b5df0a966a9a79 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 30 Oct 2012 12:09:57 +0200
-Subject: [PATCH 089/278] cng: Reindent some incorrectly indented lines
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/cngdec.c |    2 +-
- libavcodec/cngenc.c |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c
-index 4fe7839..caaa9c1 100644
---- a/libavcodec/cngdec.c
-+++ b/libavcodec/cngdec.c
-@@ -102,7 +102,7 @@ static void cng_decode_flush(AVCodecContext *avctx)
- }
- 
- static int cng_decode_frame(AVCodecContext *avctx, void *data,
--                              int *got_frame_ptr, AVPacket *avpkt)
-+                            int *got_frame_ptr, AVPacket *avpkt)
- {
- 
-     CNGContext *p = avctx->priv_data;
-diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c
-index 1e3f8f0..a553a3f 100644
---- a/libavcodec/cngenc.c
-+++ b/libavcodec/cngenc.c
-@@ -67,7 +67,7 @@ static av_cold int cng_encode_init(AVCodecContext *avctx)
- }
- 
- static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
--                             const AVFrame *frame, int *got_packet_ptr)
-+                            const AVFrame *frame, int *got_packet_ptr)
- {
-     CNGContext *p = avctx->priv_data;
-     int ret, i;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0090-x86-include-x86inc.asm-in-x86util.asm.patch b/debian/patches/post-9beta2/0090-x86-include-x86inc.asm-in-x86util.asm.patch
deleted file mode 100644
index efc27e6..0000000
--- a/debian/patches/post-9beta2/0090-x86-include-x86inc.asm-in-x86util.asm.patch
+++ /dev/null
@@ -1,497 +0,0 @@
-From 6860b4081d046558c44b1b42f22022ea341a2a73 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 01:20:48 +0200
-Subject: [PATCH 090/278] x86: include x86inc.asm in x86util.asm
-
-This is necessary to allow refactoring some x86util macros with cpuflags.
----
- libavcodec/x86/ac3dsp.asm               |    1 -
- libavcodec/x86/dct32.asm                |    1 -
- libavcodec/x86/deinterlace.asm          |    1 -
- libavcodec/x86/dsputil.asm              |    1 -
- libavcodec/x86/dsputilenc.asm           |    1 -
- libavcodec/x86/fft.asm                  |    1 -
- libavcodec/x86/fmtconvert.asm           |    1 -
- libavcodec/x86/h264_chromamc.asm        |    1 -
- libavcodec/x86/h264_chromamc_10bit.asm  |    1 -
- libavcodec/x86/h264_deblock.asm         |    1 -
- libavcodec/x86/h264_deblock_10bit.asm   |    1 -
- libavcodec/x86/h264_idct.asm            |    1 -
- libavcodec/x86/h264_idct_10bit.asm      |    1 -
- libavcodec/x86/h264_intrapred.asm       |    1 -
- libavcodec/x86/h264_intrapred_10bit.asm |    1 -
- libavcodec/x86/h264_qpel_10bit.asm      |    1 -
- libavcodec/x86/h264_weight.asm          |    2 +-
- libavcodec/x86/h264_weight_10bit.asm    |    1 -
- libavcodec/x86/imdct36.asm              |    1 -
- libavcodec/x86/pngdsp.asm               |    1 -
- libavcodec/x86/proresdsp.asm            |    1 -
- libavcodec/x86/rv34dsp.asm              |    1 -
- libavcodec/x86/rv40dsp.asm              |    1 -
- libavcodec/x86/sbrdsp.asm               |    1 -
- libavcodec/x86/vc1dsp.asm               |    1 -
- libavcodec/x86/vp3dsp.asm               |    1 -
- libavcodec/x86/vp56dsp.asm              |    1 -
- libavcodec/x86/vp8dsp.asm               |    1 -
- libavfilter/x86/hqdn3d.asm              |    2 +-
- libavresample/x86/audio_convert.asm     |    1 -
- libavresample/x86/audio_mix.asm         |    1 -
- libavutil/x86/cpuid.asm                 |    2 +-
- libavutil/x86/float_dsp.asm             |    1 -
- libavutil/x86/x86util.asm               |    2 ++
- libswscale/x86/input.asm                |    1 -
- libswscale/x86/output.asm               |    1 -
- libswscale/x86/scale.asm                |    1 -
- 37 files changed, 5 insertions(+), 36 deletions(-)
-
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 176fd3d..01c1b8e 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
-index 58ee8d3..53c2415 100644
---- a/libavcodec/x86/dct32.asm
-+++ b/libavcodec/x86/dct32.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA 32
-diff --git a/libavcodec/x86/deinterlace.asm b/libavcodec/x86/deinterlace.asm
-index 8681181..f15b8ea 100644
---- a/libavcodec/x86/deinterlace.asm
-+++ b/libavcodec/x86/deinterlace.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
-index fcb1b6d..4b36ca8 100644
---- a/libavcodec/x86/dsputil.asm
-+++ b/libavcodec/x86/dsputil.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm
-index b7078f1..39031cb 100644
---- a/libavcodec/x86/dsputilenc.asm
-+++ b/libavcodec/x86/dsputilenc.asm
-@@ -21,7 +21,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;*****************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION .text
-diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
-index f054298..465c08b 100644
---- a/libavcodec/x86/fft.asm
-+++ b/libavcodec/x86/fft.asm
-@@ -28,7 +28,6 @@
- ; in blocks as conventient to the vector size.
- ; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively)
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- %if ARCH_X86_64
-diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
-index 46b7e85..d59c43b 100644
---- a/libavcodec/x86/fmtconvert.asm
-+++ b/libavcodec/x86/fmtconvert.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_TEXT
-diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
-index 56b8e56..4651883 100644
---- a/libavcodec/x86/h264_chromamc.asm
-+++ b/libavcodec/x86/h264_chromamc.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
-index bcdb27c..254c69f 100644
---- a/libavcodec/x86/h264_chromamc_10bit.asm
-+++ b/libavcodec/x86/h264_chromamc_10bit.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
-index 940a8f7..103fb0d 100644
---- a/libavcodec/x86/h264_deblock.asm
-+++ b/libavcodec/x86/h264_deblock.asm
-@@ -24,7 +24,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_deblock_10bit.asm b/libavcodec/x86/h264_deblock_10bit.asm
-index 7b9316d..e718613 100644
---- a/libavcodec/x86/h264_deblock_10bit.asm
-+++ b/libavcodec/x86/h264_deblock_10bit.asm
-@@ -24,7 +24,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
-index 68864a4..5ae3263 100644
---- a/libavcodec/x86/h264_idct.asm
-+++ b/libavcodec/x86/h264_idct.asm
-@@ -26,7 +26,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;*****************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_idct_10bit.asm b/libavcodec/x86/h264_idct_10bit.asm
-index 6afcee2..ad923f9 100644
---- a/libavcodec/x86/h264_idct_10bit.asm
-+++ b/libavcodec/x86/h264_idct_10bit.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index 7c6aa12..3a5a6d4 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index c3f6dc4..98c9118 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/h264_qpel_10bit.asm b/libavcodec/x86/h264_qpel_10bit.asm
-index f380cfc..0a9c433 100644
---- a/libavcodec/x86/h264_qpel_10bit.asm
-+++ b/libavcodec/x86/h264_qpel_10bit.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA 32
-diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm
-index c8779cc..6fe9a40 100644
---- a/libavcodec/x86/h264_weight.asm
-+++ b/libavcodec/x86/h264_weight.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
-+%include "x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavcodec/x86/h264_weight_10bit.asm b/libavcodec/x86/h264_weight_10bit.asm
-index 24386f8..b2228bb 100644
---- a/libavcodec/x86/h264_weight_10bit.asm
-+++ b/libavcodec/x86/h264_weight_10bit.asm
-@@ -22,7 +22,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA 32
-diff --git a/libavcodec/x86/imdct36.asm b/libavcodec/x86/imdct36.asm
-index 937a2cc..633fcd9 100644
---- a/libavcodec/x86/imdct36.asm
-+++ b/libavcodec/x86/imdct36.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "libavutil/x86/x86inc.asm"
- %include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
-index 970f3db..e0b3871 100644
---- a/libavcodec/x86/pngdsp.asm
-+++ b/libavcodec/x86/pngdsp.asm
-@@ -21,7 +21,6 @@
- ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm
-index bce36ac..5b7b7fc 100644
---- a/libavcodec/x86/proresdsp.asm
-+++ b/libavcodec/x86/proresdsp.asm
-@@ -21,7 +21,6 @@
- ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- %define W1sh2 22725 ; W1 = 90901 = 22725<<2 + 1
-diff --git a/libavcodec/x86/rv34dsp.asm b/libavcodec/x86/rv34dsp.asm
-index 78d8c92..d6a2897 100644
---- a/libavcodec/x86/rv34dsp.asm
-+++ b/libavcodec/x86/rv34dsp.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm
-index 70c0c04..834b12b 100644
---- a/libavcodec/x86/rv40dsp.asm
-+++ b/libavcodec/x86/rv40dsp.asm
-@@ -21,7 +21,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm
-index 47cb312..b10b424 100644
---- a/libavcodec/x86/sbrdsp.asm
-+++ b/libavcodec/x86/sbrdsp.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- ;SECTION_RODATA
-diff --git a/libavcodec/x86/vc1dsp.asm b/libavcodec/x86/vc1dsp.asm
-index ced2b5b..0aa4cf4 100644
---- a/libavcodec/x86/vc1dsp.asm
-+++ b/libavcodec/x86/vc1dsp.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- cextern pw_4
-diff --git a/libavcodec/x86/vp3dsp.asm b/libavcodec/x86/vp3dsp.asm
-index 7a88892..865f176 100644
---- a/libavcodec/x86/vp3dsp.asm
-+++ b/libavcodec/x86/vp3dsp.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- ; MMX-optimized functions cribbed from the original VP3 source code.
-diff --git a/libavcodec/x86/vp56dsp.asm b/libavcodec/x86/vp56dsp.asm
-index d80680f..f89ec7f 100644
---- a/libavcodec/x86/vp56dsp.asm
-+++ b/libavcodec/x86/vp56dsp.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- cextern pw_64
-diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm
-index ab58e95..b7355c4 100644
---- a/libavcodec/x86/vp8dsp.asm
-+++ b/libavcodec/x86/vp8dsp.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libavfilter/x86/hqdn3d.asm b/libavfilter/x86/hqdn3d.asm
-index 7254194..a84c7b7 100644
---- a/libavfilter/x86/hqdn3d.asm
-+++ b/libavfilter/x86/hqdn3d.asm
-@@ -18,7 +18,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
-+%include "x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
-index 25166af..a1213a6 100644
---- a/libavresample/x86/audio_convert.asm
-+++ b/libavresample/x86/audio_convert.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- %include "util.asm"
- 
-diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm
-index 0c4a9bd..13b364a 100644
---- a/libavresample/x86/audio_mix.asm
-+++ b/libavresample/x86/audio_mix.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- %include "util.asm"
- 
-diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm
-index d2ac1f0..e739ebe 100644
---- a/libavutil/x86/cpuid.asm
-+++ b/libavutil/x86/cpuid.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
-+%include "x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm
-index 5b9b444..bbc9a8b 100644
---- a/libavutil/x86/float_dsp.asm
-+++ b/libavutil/x86/float_dsp.asm
-@@ -18,7 +18,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION .text
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index a5d89a1..3aac639 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -23,6 +23,8 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
-+%include "x86inc.asm"
-+
- %macro SBUTTERFLY 4
- %if avx_enabled == 0
-     mova      m%4, m%2
-diff --git a/libswscale/x86/input.asm b/libswscale/x86/input.asm
-index 66d8845..5d10e23 100644
---- a/libswscale/x86/input.asm
-+++ b/libswscale/x86/input.asm
-@@ -21,7 +21,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
-index 9b0b012..7a138d1 100644
---- a/libswscale/x86/output.asm
-+++ b/libswscale/x86/output.asm
-@@ -20,7 +20,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
-diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
-index d56e253..3a36ee6 100644
---- a/libswscale/x86/scale.asm
-+++ b/libswscale/x86/scale.asm
-@@ -19,7 +19,6 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
- %include "x86util.asm"
- 
- SECTION_RODATA
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0091-x86-yasm-Use-complete-source-path-for-macro-helper-i.patch b/debian/patches/post-9beta2/0091-x86-yasm-Use-complete-source-path-for-macro-helper-i.patch
deleted file mode 100644
index e8f1d38..0000000
--- a/debian/patches/post-9beta2/0091-x86-yasm-Use-complete-source-path-for-macro-helper-i.patch
+++ /dev/null
@@ -1,490 +0,0 @@
-From 04581c8c77ce779e4e70684ac45302972766be0f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 11:48:21 +0200
-Subject: [PATCH 091/278] x86: yasm: Use complete source path for macro helper
- %includes
-
-This is more consistent with the way we handle C #includes and
-it simplifies the build system.
----
- Makefile                                |    2 +-
- libavcodec/x86/ac3dsp.asm               |    2 +-
- libavcodec/x86/dct32.asm                |    2 +-
- libavcodec/x86/deinterlace.asm          |    2 +-
- libavcodec/x86/dsputil.asm              |    2 +-
- libavcodec/x86/dsputilenc.asm           |    2 +-
- libavcodec/x86/fft.asm                  |    2 +-
- libavcodec/x86/fmtconvert.asm           |    2 +-
- libavcodec/x86/h264_chromamc.asm        |    2 +-
- libavcodec/x86/h264_chromamc_10bit.asm  |    2 +-
- libavcodec/x86/h264_deblock.asm         |    2 +-
- libavcodec/x86/h264_deblock_10bit.asm   |    2 +-
- libavcodec/x86/h264_idct.asm            |    2 +-
- libavcodec/x86/h264_idct_10bit.asm      |    2 +-
- libavcodec/x86/h264_intrapred.asm       |    2 +-
- libavcodec/x86/h264_intrapred_10bit.asm |    2 +-
- libavcodec/x86/h264_qpel_10bit.asm      |    2 +-
- libavcodec/x86/h264_weight.asm          |    2 +-
- libavcodec/x86/h264_weight_10bit.asm    |    2 +-
- libavcodec/x86/pngdsp.asm               |    2 +-
- libavcodec/x86/proresdsp.asm            |    2 +-
- libavcodec/x86/rv34dsp.asm              |    2 +-
- libavcodec/x86/rv40dsp.asm              |    2 +-
- libavcodec/x86/sbrdsp.asm               |    2 +-
- libavcodec/x86/vc1dsp.asm               |    2 +-
- libavcodec/x86/vp3dsp.asm               |    2 +-
- libavcodec/x86/vp56dsp.asm              |    2 +-
- libavcodec/x86/vp8dsp.asm               |    2 +-
- libavfilter/x86/hqdn3d.asm              |    2 +-
- libavresample/x86/audio_convert.asm     |    2 +-
- libavresample/x86/audio_mix.asm         |    2 +-
- libswscale/x86/input.asm                |    2 +-
- libswscale/x86/output.asm               |    2 +-
- libswscale/x86/scale.asm                |    2 +-
- 34 files changed, 34 insertions(+), 34 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 1f73a0a..5e1dae6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -27,7 +27,7 @@ CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
- CFLAGS     += $(ECFLAGS)
- CCFLAGS     = $(CPPFLAGS) $(CFLAGS)
- ASFLAGS    := $(CPPFLAGS) $(ASFLAGS)
--YASMFLAGS  += $(IFLAGS:%=%/) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
-+YASMFLAGS  += $(IFLAGS:%=%/) -Pconfig.asm
- HOSTCCFLAGS = $(IFLAGS) $(HOSTCFLAGS)
- LDFLAGS    := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
- 
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 01c1b8e..724b0dc 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
-index 53c2415..25bc8f7 100644
---- a/libavcodec/x86/dct32.asm
-+++ b/libavcodec/x86/dct32.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA 32
- 
-diff --git a/libavcodec/x86/deinterlace.asm b/libavcodec/x86/deinterlace.asm
-index f15b8ea..b2828f3 100644
---- a/libavcodec/x86/deinterlace.asm
-+++ b/libavcodec/x86/deinterlace.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
-index 4b36ca8..0ed64aa 100644
---- a/libavcodec/x86/dsputil.asm
-+++ b/libavcodec/x86/dsputil.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- pb_f: times 16 db 15
-diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm
-index 39031cb..597f894 100644
---- a/libavcodec/x86/dsputilenc.asm
-+++ b/libavcodec/x86/dsputilenc.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;*****************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
-index 465c08b..8c69f1f 100644
---- a/libavcodec/x86/fft.asm
-+++ b/libavcodec/x86/fft.asm
-@@ -28,7 +28,7 @@
- ; in blocks as conventient to the vector size.
- ; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively)
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- %if ARCH_X86_64
- %define pointer resq
-diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
-index d59c43b..2951b16 100644
---- a/libavcodec/x86/fmtconvert.asm
-+++ b/libavcodec/x86/fmtconvert.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_TEXT
- 
-diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
-index 4651883..e3aff0b 100644
---- a/libavcodec/x86/h264_chromamc.asm
-+++ b/libavcodec/x86/h264_chromamc.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
-index 254c69f..4481efe 100644
---- a/libavcodec/x86/h264_chromamc_10bit.asm
-+++ b/libavcodec/x86/h264_chromamc_10bit.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
-index 103fb0d..f5de7c9 100644
---- a/libavcodec/x86/h264_deblock.asm
-+++ b/libavcodec/x86/h264_deblock.asm
-@@ -24,7 +24,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_deblock_10bit.asm b/libavcodec/x86/h264_deblock_10bit.asm
-index e718613..e105c6c 100644
---- a/libavcodec/x86/h264_deblock_10bit.asm
-+++ b/libavcodec/x86/h264_deblock_10bit.asm
-@@ -24,7 +24,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
-index 5ae3263..5d861d3 100644
---- a/libavcodec/x86/h264_idct.asm
-+++ b/libavcodec/x86/h264_idct.asm
-@@ -26,7 +26,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;*****************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_idct_10bit.asm b/libavcodec/x86/h264_idct_10bit.asm
-index ad923f9..5ba241b 100644
---- a/libavcodec/x86/h264_idct_10bit.asm
-+++ b/libavcodec/x86/h264_idct_10bit.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index 3a5a6d4..94d979c 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index 98c9118..50ebaa7 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/h264_qpel_10bit.asm b/libavcodec/x86/h264_qpel_10bit.asm
-index 0a9c433..a84b810 100644
---- a/libavcodec/x86/h264_qpel_10bit.asm
-+++ b/libavcodec/x86/h264_qpel_10bit.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA 32
- 
-diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm
-index 6fe9a40..bc3fb4b 100644
---- a/libavcodec/x86/h264_weight.asm
-+++ b/libavcodec/x86/h264_weight.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavcodec/x86/h264_weight_10bit.asm b/libavcodec/x86/h264_weight_10bit.asm
-index b2228bb..20d26a4 100644
---- a/libavcodec/x86/h264_weight_10bit.asm
-+++ b/libavcodec/x86/h264_weight_10bit.asm
-@@ -22,7 +22,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA 32
- 
-diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
-index e0b3871..1573363 100644
---- a/libavcodec/x86/pngdsp.asm
-+++ b/libavcodec/x86/pngdsp.asm
-@@ -21,7 +21,7 @@
- ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm
-index 5b7b7fc..91e0800 100644
---- a/libavcodec/x86/proresdsp.asm
-+++ b/libavcodec/x86/proresdsp.asm
-@@ -21,7 +21,7 @@
- ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- %define W1sh2 22725 ; W1 = 90901 = 22725<<2 + 1
- %define W2sh2 21407 ; W2 = 85627 = 21407<<2 - 1
-diff --git a/libavcodec/x86/rv34dsp.asm b/libavcodec/x86/rv34dsp.asm
-index d6a2897..2f12446 100644
---- a/libavcodec/x86/rv34dsp.asm
-+++ b/libavcodec/x86/rv34dsp.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- pw_row_coeffs:  times 4 dw 13
-diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm
-index 834b12b..02267ef 100644
---- a/libavcodec/x86/rv40dsp.asm
-+++ b/libavcodec/x86/rv40dsp.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavcodec/x86/sbrdsp.asm b/libavcodec/x86/sbrdsp.asm
-index b10b424..c351de4 100644
---- a/libavcodec/x86/sbrdsp.asm
-+++ b/libavcodec/x86/sbrdsp.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- ;SECTION_RODATA
- SECTION .text
-diff --git a/libavcodec/x86/vc1dsp.asm b/libavcodec/x86/vc1dsp.asm
-index 0aa4cf4..e759cf5 100644
---- a/libavcodec/x86/vc1dsp.asm
-+++ b/libavcodec/x86/vc1dsp.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- cextern pw_4
- cextern pw_5
-diff --git a/libavcodec/x86/vp3dsp.asm b/libavcodec/x86/vp3dsp.asm
-index 865f176..d300304 100644
---- a/libavcodec/x86/vp3dsp.asm
-+++ b/libavcodec/x86/vp3dsp.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- ; MMX-optimized functions cribbed from the original VP3 source code.
- 
-diff --git a/libavcodec/x86/vp56dsp.asm b/libavcodec/x86/vp56dsp.asm
-index f89ec7f..80f8ca5 100644
---- a/libavcodec/x86/vp56dsp.asm
-+++ b/libavcodec/x86/vp56dsp.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- cextern pw_64
- 
-diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm
-index b7355c4..5dc4ca3 100644
---- a/libavcodec/x86/vp8dsp.asm
-+++ b/libavcodec/x86/vp8dsp.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libavfilter/x86/hqdn3d.asm b/libavfilter/x86/hqdn3d.asm
-index a84c7b7..dee2c96 100644
---- a/libavfilter/x86/hqdn3d.asm
-+++ b/libavfilter/x86/hqdn3d.asm
-@@ -18,7 +18,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION .text
- 
-diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
-index a1213a6..e7f7157 100644
---- a/libavresample/x86/audio_convert.asm
-+++ b/libavresample/x86/audio_convert.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- %include "util.asm"
- 
- SECTION_RODATA 32
-diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm
-index 13b364a..7f3b5b9 100644
---- a/libavresample/x86/audio_mix.asm
-+++ b/libavresample/x86/audio_mix.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- %include "util.asm"
- 
- SECTION_TEXT
-diff --git a/libswscale/x86/input.asm b/libswscale/x86/input.asm
-index 5d10e23..a8d5a5a 100644
---- a/libswscale/x86/input.asm
-+++ b/libswscale/x86/input.asm
-@@ -21,7 +21,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
-index 7a138d1..c29aa7e 100644
---- a/libswscale/x86/output.asm
-+++ b/libswscale/x86/output.asm
-@@ -20,7 +20,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
-diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
-index 3a36ee6..440a27b 100644
---- a/libswscale/x86/scale.asm
-+++ b/libswscale/x86/scale.asm
-@@ -19,7 +19,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86util.asm"
-+%include "libavutil/x86/x86util.asm"
- 
- SECTION_RODATA
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0092-x86-mmx2-mmxext-in-comments-and-messages.patch b/debian/patches/post-9beta2/0092-x86-mmx2-mmxext-in-comments-and-messages.patch
deleted file mode 100644
index 688e1c1..0000000
--- a/debian/patches/post-9beta2/0092-x86-mmx2-mmxext-in-comments-and-messages.patch
+++ /dev/null
@@ -1,265 +0,0 @@
-From 652f5185945c8405fc57aed353286858df8d066f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 19:16:20 +0200
-Subject: [PATCH 092/278] x86: mmx2 ---> mmxext in comments and messages
-
----
- doc/optimization.txt                  |    2 +-
- doc/swscale.txt                       |    2 +-
- libavcodec/x86/dsputil_avg_template.c |    2 +-
- libavcodec/x86/dsputil_mmx.c          |    4 ++--
- libswscale/rgb2rgb.c                  |    2 +-
- libswscale/rgb2rgb_template.c         |    2 +-
- libswscale/swscale_internal.h         |    8 ++++----
- libswscale/utils.c                    |    6 +++---
- libswscale/x86/output.asm             |    4 ++--
- libswscale/x86/rgb2rgb.c              |    6 +++---
- libswscale/x86/rgb2rgb_template.c     |    2 +-
- libswscale/x86/swscale.c              |    2 +-
- libswscale/x86/swscale_template.c     |    2 +-
- libswscale/x86/yuv2rgb.c              |    4 ++--
- 14 files changed, 24 insertions(+), 24 deletions(-)
-
-diff --git a/doc/optimization.txt b/doc/optimization.txt
-index 78e0077..c3e640c 100644
---- a/doc/optimization.txt
-+++ b/doc/optimization.txt
-@@ -253,7 +253,7 @@ Optimization guide for ARM11 (used in Nokia N800 Internet Tablet):
- http://infocenter.arm.com/help/topic/com.arm.doc.ddi0211j/DDI0211J_arm1136_r1p5_trm.pdf
- Optimization guide for Intel XScale (used in Sharp Zaurus PDA):
- http://download.intel.com/design/intelxscale/27347302.pdf
--Intel Wireless MMX2 Coprocessor: Programmers Reference Manual
-+Intel Wireless MMX 2 Coprocessor: Programmers Reference Manual
- http://download.intel.com/design/intelxscale/31451001.pdf
- 
- PowerPC-specific:
-diff --git a/doc/swscale.txt b/doc/swscale.txt
-index 0dc4b8a..2066009 100644
---- a/doc/swscale.txt
-+++ b/doc/swscale.txt
-@@ -58,7 +58,7 @@ Input to YUV Converter
- 
- Horizontal scaler
-     There are several horizontal scalers. A special case worth mentioning is
--    the fast bilinear scaler that is made of runtime-generated MMX2 code
-+    the fast bilinear scaler that is made of runtime-generated MMXEXT code
-     using specially tuned pshufw instructions.
-     The remaining scalers are specially-tuned for various filter lengths.
-     They scale 8-bit unsigned planar data to 16-bit signed planar data.
-diff --git a/libavcodec/x86/dsputil_avg_template.c b/libavcodec/x86/dsputil_avg_template.c
-index 8b116b7..89eaedf 100644
---- a/libavcodec/x86/dsputil_avg_template.c
-+++ b/libavcodec/x86/dsputil_avg_template.c
-@@ -1,5 +1,5 @@
- /*
-- * DSP utils : average functions are compiled twice for 3dnow/mmx2
-+ * DSP utils : average functions are compiled twice for 3dnow/mmxext
-  * Copyright (c) 2000, 2001 Fabrice Bellard
-  * Copyright (c) 2002-2004 Michael Niedermayer
-  *
-diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
-index 86a08cb..ef843b5 100644
---- a/libavcodec/x86/dsputil_mmx.c
-+++ b/libavcodec/x86/dsputil_mmx.c
-@@ -205,11 +205,11 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
- #undef OP_AVG
- 
- /***********************************/
--/* MMX2 specific */
-+/* MMXEXT specific */
- 
- #define DEF(x) x ## _mmx2
- 
--/* Introduced only in MMX2 set */
-+/* Introduced only in MMXEXT set */
- #define PAVGB "pavgb"
- #define OP_AVG PAVGB
- 
-diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c
-index 26ef648..c261fe6 100644
---- a/libswscale/rgb2rgb.c
-+++ b/libswscale/rgb2rgb.c
-@@ -122,7 +122,7 @@ void (*yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
- /*
-  * RGB15->RGB16 original by Strepto/Astral
-  * ported to gcc & bugfixed : A'rpi
-- * MMX2, 3DNOW optimization by Nick Kurshev
-+ * MMXEXT, 3DNOW optimization by Nick Kurshev
-  * 32-bit C version, and and&add trick by Michael Niedermayer
-  */
- 
-diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
-index d1a43e0..3785ef9 100644
---- a/libswscale/rgb2rgb_template.c
-+++ b/libswscale/rgb2rgb_template.c
-@@ -77,7 +77,7 @@ static inline void rgb32tobgr24_c(const uint8_t *src, uint8_t *dst,
- /*
-  * original by Strepto/Astral
-  * ported to gcc & bugfixed: A'rpi
-- * MMX2, 3DNOW optimization by Nick Kurshev
-+ * MMXEXT, 3DNOW optimization by Nick Kurshev
-  * 32-bit C version, and and&add trick by Michael Niedermayer
-  */
- static inline void rgb15to16_c(const uint8_t *src, uint8_t *dst, int src_size)
-diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
-index 011626a..c239c2a 100644
---- a/libswscale/swscale_internal.h
-+++ b/libswscale/swscale_internal.h
-@@ -307,10 +307,10 @@ typedef struct SwsContext {
-     int vChrFilterSize;           ///< Vertical   filter size for chroma     pixels.
-     //@}
- 
--    int lumMmx2FilterCodeSize;    ///< Runtime-generated MMX2 horizontal fast bilinear scaler code size for luma/alpha planes.
--    int chrMmx2FilterCodeSize;    ///< Runtime-generated MMX2 horizontal fast bilinear scaler code size for chroma     planes.
--    uint8_t *lumMmx2FilterCode;   ///< Runtime-generated MMX2 horizontal fast bilinear scaler code for luma/alpha planes.
--    uint8_t *chrMmx2FilterCode;   ///< Runtime-generated MMX2 horizontal fast bilinear scaler code for chroma     planes.
-+    int lumMmx2FilterCodeSize;    ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes.
-+    int chrMmx2FilterCodeSize;    ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes.
-+    uint8_t *lumMmx2FilterCode;   ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes.
-+    uint8_t *chrMmx2FilterCode;   ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes.
- 
-     int canMMX2BeUsed;
- 
-diff --git a/libswscale/utils.c b/libswscale/utils.c
-index f68f120..9e5ebac 100644
---- a/libswscale/utils.c
-+++ b/libswscale/utils.c
-@@ -616,7 +616,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode,
-     int xpos, i;
- 
-     // create an optimized horizontal scaling routine
--    /* This scaler is made of runtime-generated MMX2 code using specially tuned
-+    /* This scaler is made of runtime-generated MMXEXT code using specially tuned
-      * pshufw instructions. For every four output pixels, if four input pixels
-      * are enough for the fast bilinear scaling, then a chunk of fragmentB is
-      * used. If five input pixels are needed, then a chunk of fragmentA is used.
-@@ -1007,7 +1007,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-             && (flags & SWS_FAST_BILINEAR)) {
-             if (flags & SWS_PRINT_INFO)
-                 av_log(c, AV_LOG_INFO,
--                       "output width is not a multiple of 32 -> no MMX2 scaler\n");
-+                       "output width is not a multiple of 32 -> no MMXEXT scaler\n");
-         }
-         if (usesHFilter)
-             c->canMMX2BeUsed = 0;
-@@ -1237,7 +1237,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-                sws_format_name(dstFormat));
- 
-         if (INLINE_MMXEXT(cpu_flags))
--            av_log(c, AV_LOG_INFO, "using MMX2\n");
-+            av_log(c, AV_LOG_INFO, "using MMXEXT\n");
-         else if (INLINE_AMD3DNOW(cpu_flags))
-             av_log(c, AV_LOG_INFO, "using 3DNOW\n");
-         else if (INLINE_MMX(cpu_flags))
-diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
-index c29aa7e..cf0dec3 100644
---- a/libswscale/x86/output.asm
-+++ b/libswscale/x86/output.asm
-@@ -218,10 +218,10 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
- %else ; %1 == 9/10
- %if cpuflag(sse4)
-     packusdw        m2,  m1
--%else ; mmx2/sse2
-+%else ; mmxext/sse2
-     packssdw        m2,  m1
-     pmaxsw          m2,  m6
--%endif ; mmx2/sse2/sse4/avx
-+%endif ; mmxext/sse2/sse4/avx
-     pminsw          m2, [yuv2yuvX_%1_upper]
- %endif ; %1 == 9/10/16
-     mova   [dstq+r5*2],  m2
-diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
-index 5962680..486f436 100644
---- a/libswscale/x86/rgb2rgb.c
-+++ b/libswscale/x86/rgb2rgb.c
-@@ -84,7 +84,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask)  = 0x0000001f0000001fULL;
- #define RV ((int)( 0.439*(1<<RGB2YUV_SHIFT)+0.5))
- #define RU ((int)(-0.148*(1<<RGB2YUV_SHIFT)+0.5))
- 
--//Note: We have C, MMX, MMX2, 3DNOW versions, there is no 3DNOW + MMX2 one.
-+// Note: We have C, MMX, MMXEXT, 3DNOW versions, there is no 3DNOW + MMXEXT one.
- 
- #define COMPILE_TEMPLATE_MMXEXT 0
- #define COMPILE_TEMPLATE_AMD3DNOW 0
-@@ -95,7 +95,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask)  = 0x0000001f0000001fULL;
- #define RENAME(a) a ## _MMX
- #include "rgb2rgb_template.c"
- 
--//MMX2 versions
-+// MMXEXT versions
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
- #define COMPILE_TEMPLATE_MMXEXT 1
-@@ -123,7 +123,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask)  = 0x0000001f0000001fULL;
- /*
-  RGB15->RGB16 original by Strepto/Astral
-  ported to gcc & bugfixed : A'rpi
-- MMX2, 3DNOW optimization by Nick Kurshev
-+ MMXEXT, 3DNOW optimization by Nick Kurshev
-  32-bit C version, and and&add trick by Michael Niedermayer
- */
- 
-diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c
-index f312053..205b749 100644
---- a/libswscale/x86/rgb2rgb_template.c
-+++ b/libswscale/x86/rgb2rgb_template.c
-@@ -181,7 +181,7 @@ static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, int sr
- /*
-  original by Strepto/Astral
-  ported to gcc & bugfixed: A'rpi
-- MMX2, 3DNOW optimization by Nick Kurshev
-+ MMXEXT, 3DNOW optimization by Nick Kurshev
-  32-bit C version, and and&add trick by Michael Niedermayer
- */
- static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, int src_size)
-diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
-index ba7990e..fc74d97 100644
---- a/libswscale/x86/swscale.c
-+++ b/libswscale/x86/swscale.c
-@@ -78,7 +78,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111)        = 0x0001000100010001ULL;
- #include "swscale_template.c"
- #endif
- 
--//MMX2 versions
-+// MMXEXT versions
- #if HAVE_MMXEXT_INLINE
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
-diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
-index 0d5ba7e..8be6398 100644
---- a/libswscale/x86/swscale_template.c
-+++ b/libswscale/x86/swscale_template.c
-@@ -1615,7 +1615,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
-     }
- 
-     if (c->srcBpc == 8 && c->dstBpc <= 10) {
--    // Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
-+    // Use the new MMX scaler if the MMXEXT one can't be used (it is faster than the x86 ASM one).
- #if COMPILE_TEMPLATE_MMXEXT
-     if (c->flags & SWS_FAST_BILINEAR && c->canMMX2BeUsed)
-     {
-diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
-index b7d8f42..17ac3e2 100644
---- a/libswscale/x86/yuv2rgb.c
-+++ b/libswscale/x86/yuv2rgb.c
-@@ -3,7 +3,7 @@
-  *
-  * Copyright (C) 2009 Konstantin Shishkov
-  *
-- * MMX/MMX2 template stuff (needed for fast movntq support),
-+ * MMX/MMXEXT template stuff (needed for fast movntq support),
-  * 1,4,8bpp support and context / deglobalize stuff
-  * by Michael Niedermayer (michaelni at gmx.at)
-  *
-@@ -58,7 +58,7 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
- #include "yuv2rgb_template.c"
- #endif /* HAVE_MMX_INLINE */
- 
--//MMX2 versions
-+// MMXEXT versions
- #if HAVE_MMXEXT_INLINE
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0093-x86-mmx2-mmxext-in-variable-names.patch b/debian/patches/post-9beta2/0093-x86-mmx2-mmxext-in-variable-names.patch
deleted file mode 100644
index 0424502..0000000
--- a/debian/patches/post-9beta2/0093-x86-mmx2-mmxext-in-variable-names.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From a65bdceb060628881578afb29df4eb222421381f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 19:55:31 +0200
-Subject: [PATCH 093/278] x86: mmx2 ---> mmxext in variable names
-
----
- libswscale/swscale_internal.h     |   10 ++---
- libswscale/utils.c                |   80 +++++++++++++++++++++----------------
- libswscale/x86/swscale_template.c |   11 +++--
- 3 files changed, 56 insertions(+), 45 deletions(-)
-
-diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
-index c239c2a..8752672 100644
---- a/libswscale/swscale_internal.h
-+++ b/libswscale/swscale_internal.h
-@@ -307,12 +307,12 @@ typedef struct SwsContext {
-     int vChrFilterSize;           ///< Vertical   filter size for chroma     pixels.
-     //@}
- 
--    int lumMmx2FilterCodeSize;    ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes.
--    int chrMmx2FilterCodeSize;    ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes.
--    uint8_t *lumMmx2FilterCode;   ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes.
--    uint8_t *chrMmx2FilterCode;   ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes.
-+    int lumMmxextFilterCodeSize;  ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for luma/alpha planes.
-+    int chrMmxextFilterCodeSize;  ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code size for chroma planes.
-+    uint8_t *lumMmxextFilterCode; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for luma/alpha planes.
-+    uint8_t *chrMmxextFilterCode; ///< Runtime-generated MMXEXT horizontal fast bilinear scaler code for chroma planes.
- 
--    int canMMX2BeUsed;
-+    int canMMXEXTBeUsed;
- 
-     int dstY;                     ///< Last destination vertical line output from last slice.
-     int flags;                    ///< Flags passed by the user to select scaler algorithm, optimizations, subsampling, etc...
-diff --git a/libswscale/utils.c b/libswscale/utils.c
-index 9e5ebac..64a3a58 100644
---- a/libswscale/utils.c
-+++ b/libswscale/utils.c
-@@ -1001,18 +1001,18 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-                      (FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3) + 16,
-                      fail);
-     if (INLINE_MMXEXT(cpu_flags) && c->srcBpc == 8 && c->dstBpc <= 10) {
--        c->canMMX2BeUsed = (dstW >= srcW && (dstW & 31) == 0 &&
--                            (srcW & 15) == 0) ? 1 : 0;
--        if (!c->canMMX2BeUsed && dstW >= srcW && (srcW & 15) == 0
-+        c->canMMXEXTBeUsed = (dstW >= srcW && (dstW & 31) == 0 &&
-+                              (srcW & 15) == 0) ? 1 : 0;
-+        if (!c->canMMXEXTBeUsed && dstW >= srcW && (srcW & 15) == 0
-             && (flags & SWS_FAST_BILINEAR)) {
-             if (flags & SWS_PRINT_INFO)
-                 av_log(c, AV_LOG_INFO,
-                        "output width is not a multiple of 32 -> no MMXEXT scaler\n");
-         }
-         if (usesHFilter)
--            c->canMMX2BeUsed = 0;
-+            c->canMMXEXTBeUsed = 0;
-     } else
--        c->canMMX2BeUsed = 0;
-+        c->canMMXEXTBeUsed = 0;
- 
-     c->chrXInc = (((int64_t)c->chrSrcW << 16) + (c->chrDstW >> 1)) / c->chrDstW;
-     c->chrYInc = (((int64_t)c->chrSrcH << 16) + (c->chrDstH >> 1)) / c->chrDstH;
-@@ -1025,7 +1025,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-      * correct variant would be like the vertical one, but that would require
-      * some special code for the first and last pixel */
-     if (flags & SWS_FAST_BILINEAR) {
--        if (c->canMMX2BeUsed) {
-+        if (c->canMMXEXTBeUsed) {
-             c->lumXInc += 20;
-             c->chrXInc += 20;
-         }
-@@ -1042,38 +1042,50 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-     {
- #if HAVE_MMXEXT_INLINE
- // can't downscale !!!
--        if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) {
--            c->lumMmx2FilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL,
--                                                       NULL, NULL, 8);
--            c->chrMmx2FilterCodeSize = initMMX2HScaler(c->chrDstW, c->chrXInc,
--                                                       NULL, NULL, NULL, 4);
-+        if (c->canMMXEXTBeUsed && (flags & SWS_FAST_BILINEAR)) {
-+            c->lumMmxextFilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL,
-+                                                         NULL, NULL, 8);
-+            c->chrMmxextFilterCodeSize = initMMX2HScaler(c->chrDstW, c->chrXInc,
-+                                                         NULL, NULL, NULL, 4);
- 
- #if USE_MMAP
--            c->lumMmx2FilterCode = mmap(NULL, c->lumMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
--            c->chrMmx2FilterCode = mmap(NULL, c->chrMmx2FilterCodeSize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
-+            c->lumMmxextFilterCode = mmap(NULL, c->lumMmxextFilterCodeSize,
-+                                          PROT_READ | PROT_WRITE,
-+                                          MAP_PRIVATE | MAP_ANONYMOUS,
-+                                          -1, 0);
-+            c->chrMmxextFilterCode = mmap(NULL, c->chrMmxextFilterCodeSize,
-+                                          PROT_READ | PROT_WRITE,
-+                                          MAP_PRIVATE | MAP_ANONYMOUS,
-+                                          -1, 0);
- #elif HAVE_VIRTUALALLOC
--            c->lumMmx2FilterCode = VirtualAlloc(NULL, c->lumMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
--            c->chrMmx2FilterCode = VirtualAlloc(NULL, c->chrMmx2FilterCodeSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
-+            c->lumMmxextFilterCode = VirtualAlloc(NULL,
-+                                                  c->lumMmxextFilterCodeSize,
-+                                                  MEM_COMMIT,
-+                                                  PAGE_EXECUTE_READWRITE);
-+            c->chrMmxextFilterCode = VirtualAlloc(NULL,
-+                                                  c->chrMmxextFilterCodeSize,
-+                                                  MEM_COMMIT,
-+                                                  PAGE_EXECUTE_READWRITE);
- #else
--            c->lumMmx2FilterCode = av_malloc(c->lumMmx2FilterCodeSize);
--            c->chrMmx2FilterCode = av_malloc(c->chrMmx2FilterCodeSize);
-+            c->lumMmxextFilterCode = av_malloc(c->lumMmxextFilterCodeSize);
-+            c->chrMmxextFilterCode = av_malloc(c->chrMmxextFilterCodeSize);
- #endif
- 
--            if (!c->lumMmx2FilterCode || !c->chrMmx2FilterCode)
-+            if (!c->lumMmxextFilterCode || !c->chrMmxextFilterCode)
-                 return AVERROR(ENOMEM);
-             FF_ALLOCZ_OR_GOTO(c, c->hLumFilter,    (dstW           / 8 + 8) * sizeof(int16_t), fail);
-             FF_ALLOCZ_OR_GOTO(c, c->hChrFilter,    (c->chrDstW     / 4 + 8) * sizeof(int16_t), fail);
-             FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW       / 2 / 8 + 8) * sizeof(int32_t), fail);
-             FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW / 2 / 4 + 8) * sizeof(int32_t), fail);
- 
--            initMMX2HScaler(dstW, c->lumXInc, c->lumMmx2FilterCode,
-+            initMMX2HScaler(dstW, c->lumXInc, c->lumMmxextFilterCode,
-                             c->hLumFilter, c->hLumFilterPos, 8);
--            initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmx2FilterCode,
-+            initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmxextFilterCode,
-                             c->hChrFilter, c->hChrFilterPos, 4);
- 
- #if USE_MMAP
--            mprotect(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
--            mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
-+            mprotect(c->lumMmxextFilterCode, c->lumMmxextFilterCodeSize, PROT_EXEC | PROT_READ);
-+            mprotect(c->chrMmxextFilterCode, c->chrMmxextFilterCodeSize, PROT_EXEC | PROT_READ);
- #endif
-         } else
- #endif /* HAVE_MMXEXT_INLINE */
-@@ -1651,21 +1663,21 @@ void sws_freeContext(SwsContext *c)
- 
- #if HAVE_MMX_INLINE
- #if USE_MMAP
--    if (c->lumMmx2FilterCode)
--        munmap(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize);
--    if (c->chrMmx2FilterCode)
--        munmap(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize);
-+    if (c->lumMmxextFilterCode)
-+        munmap(c->lumMmxextFilterCode, c->lumMmxextFilterCodeSize);
-+    if (c->chrMmxextFilterCode)
-+        munmap(c->chrMmxextFilterCode, c->chrMmxextFilterCodeSize);
- #elif HAVE_VIRTUALALLOC
--    if (c->lumMmx2FilterCode)
--        VirtualFree(c->lumMmx2FilterCode, 0, MEM_RELEASE);
--    if (c->chrMmx2FilterCode)
--        VirtualFree(c->chrMmx2FilterCode, 0, MEM_RELEASE);
-+    if (c->lumMmxextFilterCode)
-+        VirtualFree(c->lumMmxextFilterCode, 0, MEM_RELEASE);
-+    if (c->chrMmxextFilterCode)
-+        VirtualFree(c->chrMmxextFilterCode, 0, MEM_RELEASE);
- #else
--    av_free(c->lumMmx2FilterCode);
--    av_free(c->chrMmx2FilterCode);
-+    av_free(c->lumMmxextFilterCode);
-+    av_free(c->chrMmxextFilterCode);
- #endif
--    c->lumMmx2FilterCode = NULL;
--    c->chrMmx2FilterCode = NULL;
-+    c->lumMmxextFilterCode = NULL;
-+    c->chrMmxextFilterCode = NULL;
- #endif /* HAVE_MMX_INLINE */
- 
-     av_freep(&c->yuvTable);
-diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
-index 8be6398..d7a2fdb 100644
---- a/libswscale/x86/swscale_template.c
-+++ b/libswscale/x86/swscale_template.c
-@@ -1378,7 +1378,7 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
- {
-     int32_t *filterPos = c->hLumFilterPos;
-     int16_t *filter    = c->hLumFilter;
--    void    *mmx2FilterCode= c->lumMmx2FilterCode;
-+    void    *mmxextFilterCode = c->lumMmxextFilterCode;
-     int i;
- #if defined(PIC)
-     uint64_t ebxsave;
-@@ -1451,7 +1451,7 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
- #endif
- #endif
-         :: "m" (src), "m" (dst), "m" (filter), "m" (filterPos),
--           "m" (mmx2FilterCode)
-+           "m" (mmxextFilterCode)
- #if defined(PIC)
-           ,"m" (ebxsave)
- #endif
-@@ -1474,7 +1474,7 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
- {
-     int32_t *filterPos = c->hChrFilterPos;
-     int16_t *filter    = c->hChrFilter;
--    void    *mmx2FilterCode= c->chrMmx2FilterCode;
-+    void    *mmxextFilterCode = c->chrMmxextFilterCode;
-     int i;
- #if defined(PIC)
-     DECLARE_ALIGNED(8, uint64_t, ebxsave);
-@@ -1535,7 +1535,7 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
- #endif
- #endif
-         :: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),
--           "m" (mmx2FilterCode), "m" (src2), "m"(dst2)
-+           "m" (mmxextFilterCode), "m" (src2), "m"(dst2)
- #if defined(PIC)
-           ,"m" (ebxsave)
- #endif
-@@ -1617,8 +1617,7 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c)
-     if (c->srcBpc == 8 && c->dstBpc <= 10) {
-     // Use the new MMX scaler if the MMXEXT one can't be used (it is faster than the x86 ASM one).
- #if COMPILE_TEMPLATE_MMXEXT
--    if (c->flags & SWS_FAST_BILINEAR && c->canMMX2BeUsed)
--    {
-+    if (c->flags & SWS_FAST_BILINEAR && c->canMMXEXTBeUsed) {
-         c->hyscale_fast = RENAME(hyscale_fast);
-         c->hcscale_fast = RENAME(hcscale_fast);
-     } else {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0094-x86-MMX2-MMXEXT-in-macro-names.patch b/debian/patches/post-9beta2/0094-x86-MMX2-MMXEXT-in-macro-names.patch
deleted file mode 100644
index c0844d5..0000000
--- a/debian/patches/post-9beta2/0094-x86-MMX2-MMXEXT-in-macro-names.patch
+++ /dev/null
@@ -1,490 +0,0 @@
-From 588fafe7f3bdce1b7265b74320e9bdfad3e25960 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 19:28:57 +0200
-Subject: [PATCH 094/278] x86: MMX2 ---> MMXEXT in macro names
-
----
- libavcodec/x86/ac3dsp.asm         |    2 +-
- libavcodec/x86/cavsdsp.c          |    4 ++--
- libavcodec/x86/dsputil_mmx.c      |   14 ++++++-------
- libavcodec/x86/dsputilenc.asm     |    8 ++++----
- libavcodec/x86/dsputilenc_mmx.c   |    8 ++++----
- libavcodec/x86/h264_idct.asm      |   40 ++++++++++++++++++-------------------
- libavcodec/x86/h264_qpel.c        |   12 +++++------
- libavcodec/x86/vc1dsp.asm         |    2 +-
- libavutil/x86/x86util.asm         |    6 +++---
- libswscale/x86/swscale_template.c |   40 ++++++++++++++++++-------------------
- 10 files changed, 68 insertions(+), 68 deletions(-)
-
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 724b0dc..0c00759 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -156,7 +156,7 @@ INIT_MMX mmx
- %define ABS2 ABS2_MMX
- AC3_MAX_MSB_ABS_INT16 or_abs
- INIT_MMX mmx2
--%define ABS2 ABS2_MMX2
-+%define ABS2 ABS2_MMXEXT
- AC3_MAX_MSB_ABS_INT16 min_max
- INIT_XMM sse2
- AC3_MAX_MSB_ABS_INT16 min_max
-diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
-index 5350f7e..b628f08 100644
---- a/libavcodec/x86/cavsdsp.c
-+++ b/libavcodec/x86/cavsdsp.c
-@@ -430,7 +430,7 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
- "mov" #size " " #b ", " #temp "   \n\t"\
- "pavgusb " #temp ", " #a "        \n\t"\
- "mov" #size " " #a ", " #b "      \n\t"
--#define AVG_MMX2_OP(a,b,temp, size) \
-+#define AVG_MMXEXT_OP(a, b, temp, size) \
- "mov" #size " " #b ", " #temp "   \n\t"\
- "pavgb " #temp ", " #a "          \n\t"\
- "mov" #size " " #a ", " #b "      \n\t"
-@@ -439,7 +439,7 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
- 
- #if HAVE_MMXEXT_INLINE
- QPEL_CAVS(put_,       PUT_OP, mmx2)
--QPEL_CAVS(avg_,  AVG_MMX2_OP, mmx2)
-+QPEL_CAVS(avg_,AVG_MMXEXT_OP, mmx2)
- 
- CAVS_MC(put_, 8, mmx2)
- CAVS_MC(put_, 16,mmx2)
-diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
-index ef843b5..1e78c20 100644
---- a/libavcodec/x86/dsputil_mmx.c
-+++ b/libavcodec/x86/dsputil_mmx.c
-@@ -923,7 +923,7 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
-     "packuswb            %%mm5, %%mm5   \n\t"                             \
-     OP(%%mm5, out, %%mm7, d)
- 
--#define QPEL_BASE(OPNAME, ROUNDER, RND, OP_MMX2, OP_3DNOW)                \
-+#define QPEL_BASE(OPNAME, ROUNDER, RND, OP_MMXEXT, OP_3DNOW)              \
- static void OPNAME ## mpeg4_qpel16_h_lowpass_mmx2(uint8_t *dst,           \
-                                                   uint8_t *src,           \
-                                                   int dstStride,          \
-@@ -991,7 +991,7 @@ static void OPNAME ## mpeg4_qpel16_h_lowpass_mmx2(uint8_t *dst,           \
-         "psraw        $5, %%mm3             \n\t"                         \
-         "movq         %5, %%mm1             \n\t"                         \
-         "packuswb  %%mm3, %%mm1             \n\t"                         \
--        OP_MMX2(%%mm1, (%1), %%mm4, q)                                    \
-+        OP_MMXEXT(%%mm1, (%1), %%mm4, q)                                  \
-         /* mm0 = GHIJ, mm2 = FGHI, mm5 = HIJK, mm6 = IJKL, mm7 = 0 */     \
-                                                                           \
-         "movq      9(%0), %%mm1             \n\t" /* JKLMNOPQ */          \
-@@ -1038,7 +1038,7 @@ static void OPNAME ## mpeg4_qpel16_h_lowpass_mmx2(uint8_t *dst,           \
-         "paddw    %%mm3, %%mm4              \n\t" /* 20a - 6b + 3c - d */ \
-         "psraw       $5, %%mm4              \n\t"                         \
-         "packuswb %%mm4, %%mm0              \n\t"                         \
--        OP_MMX2(%%mm0, 8(%1), %%mm4, q)                                   \
-+        OP_MMXEXT(%%mm0, 8(%1), %%mm4, q)                                 \
-                                                                           \
-         "add         %3, %0                 \n\t"                         \
-         "add         %4, %1                 \n\t"                         \
-@@ -1175,7 +1175,7 @@ static void OPNAME ## mpeg4_qpel8_h_lowpass_mmx2(uint8_t *dst,            \
-         "paddw     %%mm1, %%mm3             \n\t" /* 20a - 6b + 3c - d */ \
-         "psraw        $5, %%mm3             \n\t"                         \
-         "packuswb  %%mm3, %%mm0             \n\t"                         \
--        OP_MMX2(%%mm0, (%1), %%mm4, q)                                    \
-+        OP_MMXEXT(%%mm0, (%1), %%mm4, q)                                  \
-                                                                           \
-         "add          %3, %0                \n\t"                         \
-         "add          %4, %1                \n\t"                         \
-@@ -1744,19 +1744,19 @@ static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src,   \
-     "pavgusb        "#temp", "#a"       \n\t"   \
-     "mov"#size"        "#a", "#b"       \n\t"
- 
--#define AVG_MMX2_OP(a, b, temp, size)           \
-+#define AVG_MMXEXT_OP(a, b, temp, size)         \
-     "mov"#size"        "#b", "#temp"    \n\t"   \
-     "pavgb          "#temp", "#a"       \n\t"   \
-     "mov"#size"        "#a", "#b"       \n\t"
- 
- QPEL_BASE(put_,        ff_pw_16, _,        PUT_OP,       PUT_OP)
--QPEL_BASE(avg_,        ff_pw_16, _,        AVG_MMX2_OP,  AVG_3DNOW_OP)
-+QPEL_BASE(avg_,        ff_pw_16, _,        AVG_MMXEXT_OP, AVG_3DNOW_OP)
- QPEL_BASE(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP,       PUT_OP)
- QPEL_OP(put_,          ff_pw_16, _,        PUT_OP,       3dnow)
- QPEL_OP(avg_,          ff_pw_16, _,        AVG_3DNOW_OP, 3dnow)
- QPEL_OP(put_no_rnd_,   ff_pw_15, _no_rnd_, PUT_OP,       3dnow)
- QPEL_OP(put_,          ff_pw_16, _,        PUT_OP,       mmx2)
--QPEL_OP(avg_,          ff_pw_16, _,        AVG_MMX2_OP,  mmx2)
-+QPEL_OP(avg_,          ff_pw_16, _,        AVG_MMXEXT_OP, mmx2)
- QPEL_OP(put_no_rnd_,   ff_pw_15, _no_rnd_, PUT_OP,       mmx2)
- 
- /***********************************/
-diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm
-index 597f894..6c4fb50 100644
---- a/libavcodec/x86/dsputilenc.asm
-+++ b/libavcodec/x86/dsputilenc.asm
-@@ -112,7 +112,7 @@ SECTION .text
-     movd            %3, %1
- %endmacro
- 
--%macro HSUM_MMX2 3
-+%macro HSUM_MMXEXT 3
-     pshufw          %2, %1, 0xE
-     paddusw         %1, %2
-     pshufw          %2, %1, 0x1
-@@ -263,12 +263,12 @@ INIT_MMX
- %define HSUM HSUM_MMX
- HADAMARD8_DIFF_MMX mmx
- 
--%define ABS1 ABS1_MMX2
--%define HSUM HSUM_MMX2
-+%define ABS1 ABS1_MMXEXT
-+%define HSUM HSUM_MMXEXT
- HADAMARD8_DIFF_MMX mmx2
- 
- INIT_XMM
--%define ABS2 ABS2_MMX2
-+%define ABS2 ABS2_MMXEXT
- %if ARCH_X86_64
- %define ABS_SUM_8x8 ABS_SUM_8x8_64
- %else
-diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
-index b7d88f0..43940bd 100644
---- a/libavcodec/x86/dsputilenc_mmx.c
-+++ b/libavcodec/x86/dsputilenc_mmx.c
-@@ -888,7 +888,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *src1, c
-     "pxor " #z ", " #a "              \n\t"\
-     "psubw " #z ", " #a "             \n\t"
- 
--#define MMABS_MMX2(a,z)\
-+#define MMABS_MMXEXT(a, z)                 \
-     "pxor " #z ", " #z "              \n\t"\
-     "psubw " #a ", " #z "             \n\t"\
-     "pmaxsw " #z ", " #a "            \n\t"
-@@ -912,7 +912,7 @@ static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *src1, c
-     "paddusw "#t", "#a"               \n\t"\
-     "movd "#a", "#dst"                \n\t"\
- 
--#define HSUM_MMX2(a, t, dst)\
-+#define HSUM_MMXEXT(a, t, dst)             \
-     "pshufw $0x0E, "#a", "#t"         \n\t"\
-     "paddusw "#t", "#a"               \n\t"\
-     "pshufw $0x01, "#a", "#t"         \n\t"\
-@@ -974,8 +974,8 @@ DCT_SAD_FUNC(mmx)
- #undef MMABS
- #undef HSUM
- 
--#define HSUM(a,t,dst) HSUM_MMX2(a,t,dst)
--#define MMABS(a,z)    MMABS_MMX2(a,z)
-+#define HSUM(a,t,dst) HSUM_MMXEXT(a,t,dst)
-+#define MMABS(a,z)    MMABS_MMXEXT(a,z)
- DCT_SAD_FUNC(mmx2)
- #undef HSUM
- #undef DCT_SAD
-diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
-index 5d861d3..5e779cb 100644
---- a/libavcodec/x86/h264_idct.asm
-+++ b/libavcodec/x86/h264_idct.asm
-@@ -246,7 +246,7 @@ cglobal h264_idct8_add_8_sse2, 3, 4, 10
-     IDCT8_ADD_SSE r0, r1, r2, r3
-     RET
- 
--%macro DC_ADD_MMX2_INIT 2-3
-+%macro DC_ADD_MMXEXT_INIT 2-3
- %if %0 == 2
-     movsx        %1, word [%1]
-     add          %1, 32
-@@ -266,7 +266,7 @@ cglobal h264_idct8_add_8_sse2, 3, 4, 10
-     packuswb     m1, m1
- %endmacro
- 
--%macro DC_ADD_MMX2_OP 4
-+%macro DC_ADD_MMXEXT_OP 4
-     %1           m2, [%2     ]
-     %1           m3, [%2+%3  ]
-     %1           m4, [%2+%3*2]
-@@ -288,16 +288,16 @@ cglobal h264_idct8_add_8_sse2, 3, 4, 10
- INIT_MMX
- ; ff_h264_idct_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
- cglobal h264_idct_dc_add_8_mmx2, 3, 3, 0
--    DC_ADD_MMX2_INIT r1, r2
--    DC_ADD_MMX2_OP movh, r0, r2, r1
-+    DC_ADD_MMXEXT_INIT r1, r2
-+    DC_ADD_MMXEXT_OP movh, r0, r2, r1
-     RET
- 
- ; ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
- cglobal h264_idct8_dc_add_8_mmx2, 3, 3, 0
--    DC_ADD_MMX2_INIT r1, r2
--    DC_ADD_MMX2_OP mova, r0, r2, r1
-+    DC_ADD_MMXEXT_INIT r1, r2
-+    DC_ADD_MMXEXT_OP mova, r0, r2, r1
-     lea          r0, [r0+r2*4]
--    DC_ADD_MMX2_OP mova, r0, r2, r1
-+    DC_ADD_MMXEXT_OP mova, r0, r2, r1
-     RET
- 
- ; ff_h264_idct_add16_mmx(uint8_t *dst, const int *block_offset,
-@@ -371,14 +371,14 @@ cglobal h264_idct_add16_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, s
-     movsx        r6, word [r2]
-     test         r6, r6
-     jz .no_dc
--    DC_ADD_MMX2_INIT r2, r3, r6
-+    DC_ADD_MMXEXT_INIT r2, r3, r6
- %if ARCH_X86_64 == 0
- %define dst2q r1
- %define dst2d r1d
- %endif
-     mov       dst2d, dword [r1+r5*4]
-     lea       dst2q, [r0+dst2q]
--    DC_ADD_MMX2_OP movh, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP movh, dst2q, r3, r6
- %if ARCH_X86_64 == 0
-     mov          r1, r1m
- %endif
-@@ -445,14 +445,14 @@ cglobal h264_idct_add16intra_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, blo
-     movsx        r6, word [r2]
-     test         r6, r6
-     jz .skipblock
--    DC_ADD_MMX2_INIT r2, r3, r6
-+    DC_ADD_MMXEXT_INIT r2, r3, r6
- %if ARCH_X86_64 == 0
- %define dst2q r1
- %define dst2d r1d
- %endif
-     mov       dst2d, dword [r1+r5*4]
-     add       dst2q, r0
--    DC_ADD_MMX2_OP movh, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP movh, dst2q, r3, r6
- %if ARCH_X86_64 == 0
-     mov          r1, r1m
- %endif
-@@ -483,16 +483,16 @@ cglobal h264_idct8_add4_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, s
-     movsx        r6, word [r2]
-     test         r6, r6
-     jz .no_dc
--    DC_ADD_MMX2_INIT r2, r3, r6
-+    DC_ADD_MMXEXT_INIT r2, r3, r6
- %if ARCH_X86_64 == 0
- %define dst2q r1
- %define dst2d r1d
- %endif
-     mov       dst2d, dword [r1+r5*4]
-     lea       dst2q, [r0+dst2q]
--    DC_ADD_MMX2_OP mova, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP mova, dst2q, r3, r6
-     lea       dst2q, [dst2q+r3*4]
--    DC_ADD_MMX2_OP mova, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP mova, dst2q, r3, r6
- %if ARCH_X86_64 == 0
-     mov          r1, r1m
- %endif
-@@ -541,16 +541,16 @@ cglobal h264_idct8_add4_8_sse2, 5, 8 + npicregs, 10, dst1, block_offset, block,
-     test         r6, r6
-     jz .no_dc
- INIT_MMX
--    DC_ADD_MMX2_INIT r2, r3, r6
-+    DC_ADD_MMXEXT_INIT r2, r3, r6
- %if ARCH_X86_64 == 0
- %define dst2q r1
- %define dst2d r1d
- %endif
-     mov       dst2d, dword [r1+r5*4]
-     add       dst2q, r0
--    DC_ADD_MMX2_OP mova, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP mova, dst2q, r3, r6
-     lea       dst2q, [dst2q+r3*4]
--    DC_ADD_MMX2_OP mova, dst2q, r3, r6
-+    DC_ADD_MMXEXT_OP mova, dst2q, r3, r6
- %if ARCH_X86_64 == 0
-     mov          r1, r1m
- %endif
-@@ -644,7 +644,7 @@ h264_idct_add8_mmx2_plane:
-     movsx        r6, word [r2]
-     test         r6, r6
-     jz .skipblock
--    DC_ADD_MMX2_INIT r2, r3, r6
-+    DC_ADD_MMXEXT_INIT r2, r3, r6
- %if ARCH_X86_64
-     mov         r0d, dword [r1+r5*4]
-     add          r0, [dst2q]
-@@ -653,7 +653,7 @@ h264_idct_add8_mmx2_plane:
-     mov          r0, [r0]
-     add          r0, dword [r1+r5*4]
- %endif
--    DC_ADD_MMX2_OP movh, r0, r3, r6
-+    DC_ADD_MMXEXT_OP movh, r0, r3, r6
- .skipblock:
-     inc          r5
-     add          r2, 32
-@@ -697,7 +697,7 @@ h264_idct_dc_add8_mmx2:
-     pshufw       m1, m0, 0xFA         ; -d-d-d-d-D-D-D-D
-     punpcklwd    m0, m0               ;  d d d d D D D D
-     lea          r6, [r3*3]
--    DC_ADD_MMX2_OP movq, r0, r3, r6
-+    DC_ADD_MMXEXT_OP movq, r0, r3, r6
-     ret
- 
- ALIGN 16
-diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
-index 284c85a..5a2db78 100644
---- a/libavcodec/x86/h264_qpel.c
-+++ b/libavcodec/x86/h264_qpel.c
-@@ -1169,18 +1169,18 @@ QPEL_H264(avg_, AVG_3DNOW_OP, 3dnow)
- #undef PAVGB
- #define PAVGB "pavgb"
- QPEL_H264(put_,       PUT_OP, mmx2)
--QPEL_H264(avg_,  AVG_MMX2_OP, mmx2)
-+QPEL_H264(avg_,AVG_MMXEXT_OP, mmx2)
- QPEL_H264_V_XMM(put_,       PUT_OP, sse2)
--QPEL_H264_V_XMM(avg_,  AVG_MMX2_OP, sse2)
-+QPEL_H264_V_XMM(avg_,AVG_MMXEXT_OP, sse2)
- QPEL_H264_HV_XMM(put_,       PUT_OP, sse2)
--QPEL_H264_HV_XMM(avg_,  AVG_MMX2_OP, sse2)
-+QPEL_H264_HV_XMM(avg_,AVG_MMXEXT_OP, sse2)
- #if HAVE_SSSE3_INLINE
- QPEL_H264_H_XMM(put_,       PUT_OP, ssse3)
--QPEL_H264_H_XMM(avg_,  AVG_MMX2_OP, ssse3)
-+QPEL_H264_H_XMM(avg_,AVG_MMXEXT_OP, ssse3)
- QPEL_H264_HV2_XMM(put_,       PUT_OP, ssse3)
--QPEL_H264_HV2_XMM(avg_,  AVG_MMX2_OP, ssse3)
-+QPEL_H264_HV2_XMM(avg_,AVG_MMXEXT_OP, ssse3)
- QPEL_H264_HV_XMM(put_,       PUT_OP, ssse3)
--QPEL_H264_HV_XMM(avg_,  AVG_MMX2_OP, ssse3)
-+QPEL_H264_HV_XMM(avg_,AVG_MMXEXT_OP, ssse3)
- #endif
- #undef PAVGB
- 
-diff --git a/libavcodec/x86/vc1dsp.asm b/libavcodec/x86/vc1dsp.asm
-index e759cf5..ab15f7b 100644
---- a/libavcodec/x86/vc1dsp.asm
-+++ b/libavcodec/x86/vc1dsp.asm
-@@ -268,7 +268,7 @@ cglobal vc1_h_loop_filter8_%1, 3,5,0
-     RET
- %endmacro
- 
--%define PABSW PABSW_MMX2
-+%define PABSW PABSW_MMXEXT
- VC1_LF_MMX mmx2
- 
- INIT_XMM
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index 3aac639..d7ec594 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -157,7 +157,7 @@
-     psubw      %1, %2
- %endmacro
- 
--%macro PABSW_MMX2 2
-+%macro PABSW_MMXEXT 2
-     pxor    %1, %1
-     psubw   %1, %2
-     pmaxsw  %1, %2
-@@ -189,13 +189,13 @@
-     psubw      %2, %4
- %endmacro
- 
--%macro ABS1_MMX2 2   ; a, tmp
-+%macro ABS1_MMXEXT 2 ; a, tmp
-     pxor    %2, %2
-     psubw   %2, %1
-     pmaxsw  %1, %2
- %endmacro
- 
--%macro ABS2_MMX2 4   ; a, b, tmp0, tmp1
-+%macro ABS2_MMXEXT 4 ; a, b, tmp0, tmp1
-     pxor    %3, %3
-     pxor    %4, %4
-     psubw   %3, %1
-diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
-index d7a2fdb..d89a26f 100644
---- a/libswscale/x86/swscale_template.c
-+++ b/libswscale/x86/swscale_template.c
-@@ -519,7 +519,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter,
-     "cmp     "#dstw", "#index"  \n\t"\
-     " jb          1b            \n\t"
- 
--#define WRITEBGR24MMX2(dst, dstw, index) \
-+#define WRITEBGR24MMXEXT(dst, dstw, index) \
-     /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */\
-     "movq "MANGLE(ff_M24A)", %%mm0 \n\t"\
-     "movq "MANGLE(ff_M24C)", %%mm7 \n\t"\
-@@ -569,7 +569,7 @@ static void RENAME(yuv2rgb555_X)(SwsContext *c, const int16_t *lumFilter,
- 
- #if COMPILE_TEMPLATE_MMXEXT
- #undef WRITEBGR24
--#define WRITEBGR24(dst, dstw, index)  WRITEBGR24MMX2(dst, dstw, index)
-+#define WRITEBGR24(dst, dstw, index)  WRITEBGR24MMXEXT(dst, dstw, index)
- #else
- #undef WRITEBGR24
- #define WRITEBGR24(dst, dstw, index)  WRITEBGR24MMX(dst, dstw, index)
-@@ -1411,7 +1411,7 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
-         PREFETCH"      64(%%"REG_c")            \n\t"
- 
- #if ARCH_X86_64
--#define CALL_MMX2_FILTER_CODE \
-+#define CALL_MMXEXT_FILTER_CODE \
-         "movl            (%%"REG_b"), %%esi     \n\t"\
-         "call                    *%4            \n\t"\
-         "movl (%%"REG_b", %%"REG_a"), %%esi     \n\t"\
-@@ -1420,7 +1420,7 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
-         "xor               %%"REG_a", %%"REG_a" \n\t"\
- 
- #else
--#define CALL_MMX2_FILTER_CODE \
-+#define CALL_MMXEXT_FILTER_CODE \
-         "movl (%%"REG_b"), %%esi        \n\t"\
-         "call         *%4                       \n\t"\
-         "addl (%%"REG_b", %%"REG_a"), %%"REG_c" \n\t"\
-@@ -1429,14 +1429,14 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
- 
- #endif /* ARCH_X86_64 */
- 
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
- 
- #if defined(PIC)
-         "mov                      %5, %%"REG_b" \n\t"
-@@ -1506,10 +1506,10 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
-         PREFETCH" 32(%%"REG_c")             \n\t"
-         PREFETCH" 64(%%"REG_c")             \n\t"
- 
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-         "xor          %%"REG_a", %%"REG_a"  \n\t" // i
-         "mov                 %5, %%"REG_c"  \n\t" // src
-         "mov                 %6, %%"REG_D"  \n\t" // buf2
-@@ -1517,10 +1517,10 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
-         PREFETCH" 32(%%"REG_c")             \n\t"
-         PREFETCH" 64(%%"REG_c")             \n\t"
- 
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
--        CALL_MMX2_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
-+        CALL_MMXEXT_FILTER_CODE
- 
- #if defined(PIC)
-         "mov %7, %%"REG_b"    \n\t"
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0095-x86-fmtconvert-port-to-cpuflags.patch b/debian/patches/post-9beta2/0095-x86-fmtconvert-port-to-cpuflags.patch
deleted file mode 100644
index c87ae8d..0000000
--- a/debian/patches/post-9beta2/0095-x86-fmtconvert-port-to-cpuflags.patch
+++ /dev/null
@@ -1,326 +0,0 @@
-From be923ed659016350592acb9b3346f706f8170ac5 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 15:42:17 +0200
-Subject: [PATCH 095/278] x86: fmtconvert: port to cpuflags
-
----
- libavcodec/x86/fmtconvert.asm |  141 +++++++++++++++++++++--------------------
- 1 file changed, 71 insertions(+), 70 deletions(-)
-
-diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
-index 2951b16..969f9ab 100644
---- a/libavcodec/x86/fmtconvert.asm
-+++ b/libavcodec/x86/fmtconvert.asm
-@@ -26,11 +26,11 @@ SECTION_TEXT
- ;---------------------------------------------------------------------------------
- ; void int32_to_float_fmul_scalar(float *dst, const int *src, float mul, int len);
- ;---------------------------------------------------------------------------------
--%macro INT32_TO_FLOAT_FMUL_SCALAR 2
-+%macro INT32_TO_FLOAT_FMUL_SCALAR 1
- %if UNIX64
--cglobal int32_to_float_fmul_scalar_%1, 3,3,%2, dst, src, len
-+cglobal int32_to_float_fmul_scalar, 3, 3, %1, dst, src, len
- %else
--cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, mul, len
-+cglobal int32_to_float_fmul_scalar, 4, 4, %1, dst, src, mul, len
- %endif
- %if WIN64
-     SWAP 0, 2
-@@ -43,7 +43,7 @@ cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, mul, len
-     add     dstq, lenq
-     neg     lenq
- .loop:
--%ifidn %1, sse2
-+%if cpuflag(sse2)
-     cvtdq2ps  m1, [srcq+lenq   ]
-     cvtdq2ps  m2, [srcq+lenq+16]
- %else
-@@ -63,27 +63,26 @@ cglobal int32_to_float_fmul_scalar_%1, 4,4,%2, dst, src, mul, len
-     REP_RET
- %endmacro
- 
--INIT_XMM
-+INIT_XMM sse
- %define SPLATD SPLATD_SSE
--%define movdqa movaps
--INT32_TO_FLOAT_FMUL_SCALAR sse, 5
--%undef movdqa
-+INT32_TO_FLOAT_FMUL_SCALAR 5
-+INIT_XMM sse2
- %define SPLATD SPLATD_SSE2
--INT32_TO_FLOAT_FMUL_SCALAR sse2, 3
-+INT32_TO_FLOAT_FMUL_SCALAR 3
- %undef SPLATD
- 
- 
- ;------------------------------------------------------------------------------
- ; void ff_float_to_int16(int16_t *dst, const float *src, long len);
- ;------------------------------------------------------------------------------
--%macro FLOAT_TO_INT16 2
--cglobal float_to_int16_%1, 3,3,%2, dst, src, len
-+%macro FLOAT_TO_INT16 1
-+cglobal float_to_int16, 3, 3, %1, dst, src, len
-     add       lenq, lenq
-     lea       srcq, [srcq+2*lenq]
-     add       dstq, lenq
-     neg       lenq
- .loop:
--%ifidn %1, sse2
-+%if cpuflag(sse2)
-     cvtps2dq    m0, [srcq+2*lenq   ]
-     cvtps2dq    m1, [srcq+2*lenq+16]
-     packssdw    m0, m1
-@@ -100,31 +99,32 @@ cglobal float_to_int16_%1, 3,3,%2, dst, src, len
- %endif
-     add       lenq, 16
-     js .loop
--%ifnidn %1, sse2
-+%if mmsize == 8
-     emms
- %endif
-     REP_RET
- %endmacro
- 
--INIT_XMM
--FLOAT_TO_INT16 sse2, 2
--INIT_MMX
--FLOAT_TO_INT16 sse, 0
-+INIT_XMM sse2
-+FLOAT_TO_INT16 2
-+INIT_MMX sse
-+FLOAT_TO_INT16 0
- %define cvtps2pi pf2id
--FLOAT_TO_INT16 3dnow, 0
-+INIT_MMX 3dnow
-+FLOAT_TO_INT16 0
- %undef cvtps2pi
- 
- ;------------------------------------------------------------------------------
- ; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long step);
- ;------------------------------------------------------------------------------
--%macro FLOAT_TO_INT16_STEP 2
--cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2
-+%macro FLOAT_TO_INT16_STEP 1
-+cglobal float_to_int16_step, 4, 7, %1, dst, src, len, step, step3, v1, v2
-     add       lenq, lenq
-     lea       srcq, [srcq+2*lenq]
-     lea     step3q, [stepq*3]
-     neg       lenq
- .loop:
--%ifidn %1, sse2
-+%if cpuflag(sse2)
-     cvtps2dq    m0, [srcq+2*lenq   ]
-     cvtps2dq    m1, [srcq+2*lenq+16]
-     packssdw    m0, m1
-@@ -179,25 +179,26 @@ cglobal float_to_int16_step_%1, 4,7,%2, dst, src, len, step, step3, v1, v2
- %endif
-     add       lenq, 16
-     js .loop
--%ifnidn %1, sse2
-+%if mmsize == 8
-     emms
- %endif
-     REP_RET
- %endmacro
- 
--INIT_XMM
--FLOAT_TO_INT16_STEP sse2, 2
--INIT_MMX
--FLOAT_TO_INT16_STEP sse, 0
-+INIT_XMM sse2
-+FLOAT_TO_INT16_STEP 2
-+INIT_MMX sse
-+FLOAT_TO_INT16_STEP 0
- %define cvtps2pi pf2id
--FLOAT_TO_INT16_STEP 3dnow, 0
-+INIT_MMX 3dnow
-+FLOAT_TO_INT16_STEP 0
- %undef cvtps2pi
- 
- ;-------------------------------------------------------------------------------
- ; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long len);
- ;-------------------------------------------------------------------------------
--%macro FLOAT_TO_INT16_INTERLEAVE2 1
--cglobal float_to_int16_interleave2_%1, 3,4,2, dst, src0, src1, len
-+%macro FLOAT_TO_INT16_INTERLEAVE2 0
-+cglobal float_to_int16_interleave2, 3, 4, 2, dst, src0, src1, len
-     lea      lenq, [4*r2q]
-     mov     src1q, [src0q+gprsize]
-     mov     src0q, [src0q]
-@@ -206,7 +207,7 @@ cglobal float_to_int16_interleave2_%1, 3,4,2, dst, src0, src1, len
-     add     src1q, lenq
-     neg      lenq
- .loop:
--%ifidn %1, sse2
-+%if cpuflag(sse2)
-     cvtps2dq   m0, [src0q+lenq]
-     cvtps2dq   m1, [src1q+lenq]
-     packssdw   m0, m1
-@@ -228,21 +229,20 @@ cglobal float_to_int16_interleave2_%1, 3,4,2, dst, src0, src1, len
- %endif
-     add      lenq, 16
-     js .loop
--%ifnidn %1, sse2
-+%if mmsize == 8
-     emms
- %endif
-     REP_RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX 3dnow
- %define cvtps2pi pf2id
--FLOAT_TO_INT16_INTERLEAVE2 3dnow
-+FLOAT_TO_INT16_INTERLEAVE2
- %undef cvtps2pi
--%define movdqa movaps
--FLOAT_TO_INT16_INTERLEAVE2 sse
--%undef movdqa
--INIT_XMM
--FLOAT_TO_INT16_INTERLEAVE2 sse2
-+INIT_MMX sse
-+FLOAT_TO_INT16_INTERLEAVE2
-+INIT_XMM sse2
-+FLOAT_TO_INT16_INTERLEAVE2
- 
- 
- %macro PSWAPD_SSE 2
-@@ -254,9 +254,9 @@ FLOAT_TO_INT16_INTERLEAVE2 sse2
-     punpckldq %1, %2
- %endmacro
- 
--%macro FLOAT_TO_INT16_INTERLEAVE6 1
-+%macro FLOAT_TO_INT16_INTERLEAVE6 0
- ; void float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len)
--cglobal float_to_int16_interleave6_%1, 2,8,0, dst, src, src1, src2, src3, src4, src5, len
-+cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, src5, len
- %if ARCH_X86_64
-     mov     lend, r2d
- %else
-@@ -302,21 +302,24 @@ cglobal float_to_int16_interleave6_%1, 2,8,0, dst, src, src1, src2, src3, src4,
-     RET
- %endmacro ; FLOAT_TO_INT16_INTERLEAVE6
- 
-+INIT_MMX sse
- %define pswapd PSWAPD_SSE
--FLOAT_TO_INT16_INTERLEAVE6 sse
-+FLOAT_TO_INT16_INTERLEAVE6
-+INIT_MMX 3dnow
- %define cvtps2pi pf2id
- %define pswapd PSWAPD_3DNOW
--FLOAT_TO_INT16_INTERLEAVE6 3dnow
-+FLOAT_TO_INT16_INTERLEAVE6
- %undef pswapd
--FLOAT_TO_INT16_INTERLEAVE6 3dnowext
-+INIT_MMX 3dnowext
-+FLOAT_TO_INT16_INTERLEAVE6
- %undef cvtps2pi
- 
- ;-----------------------------------------------------------------------------
- ; void ff_float_interleave6(float *dst, const float **src, unsigned int len);
- ;-----------------------------------------------------------------------------
- 
--%macro FLOAT_INTERLEAVE6 2
--cglobal float_interleave6_%1, 2,8,%2, dst, src, src1, src2, src3, src4, src5, len
-+%macro FLOAT_INTERLEAVE6 1
-+cglobal float_interleave6, 2, 8, %1, dst, src, src1, src2, src3, src4, src5, len
- %if ARCH_X86_64
-     mov     lend, r2d
- %else
-@@ -334,7 +337,7 @@ cglobal float_interleave6_%1, 2,8,%2, dst, src, src1, src2, src3, src4, src5, le
-     sub    src4q, srcq
-     sub    src5q, srcq
- .loop:
--%ifidn %1, sse
-+%if cpuflag(sse)
-     movaps    m0, [srcq]
-     movaps    m1, [srcq+src1q]
-     movaps    m2, [srcq+src2q]
-@@ -383,62 +386,60 @@ cglobal float_interleave6_%1, 2,8,%2, dst, src, src1, src2, src3, src4, src5, le
-     add      dstq, mmsize*6
-     sub      lend, mmsize/4
-     jg .loop
--%ifidn %1, mmx
-+%if mmsize == 8
-     emms
- %endif
-     REP_RET
- %endmacro
- 
--INIT_MMX
--FLOAT_INTERLEAVE6 mmx, 0
--INIT_XMM
--FLOAT_INTERLEAVE6 sse, 7
-+INIT_MMX mmx
-+FLOAT_INTERLEAVE6 0
-+INIT_XMM sse
-+FLOAT_INTERLEAVE6 7
- 
- ;-----------------------------------------------------------------------------
- ; void ff_float_interleave2(float *dst, const float **src, unsigned int len);
- ;-----------------------------------------------------------------------------
- 
--%macro FLOAT_INTERLEAVE2 2
--cglobal float_interleave2_%1, 3,4,%2, dst, src, len, src1
-+%macro FLOAT_INTERLEAVE2 1
-+cglobal float_interleave2, 3, 4, %1, dst, src, len, src1
-     mov     src1q, [srcq+gprsize]
-     mov      srcq, [srcq        ]
-     sub     src1q, srcq
- .loop:
--    MOVPS      m0, [srcq             ]
--    MOVPS      m1, [srcq+src1q       ]
--    MOVPS      m3, [srcq      +mmsize]
--    MOVPS      m4, [srcq+src1q+mmsize]
-+    mova       m0, [srcq             ]
-+    mova       m1, [srcq+src1q       ]
-+    mova       m3, [srcq      +mmsize]
-+    mova       m4, [srcq+src1q+mmsize]
- 
--    MOVPS      m2, m0
-+    mova       m2, m0
-     PUNPCKLDQ  m0, m1
-     PUNPCKHDQ  m2, m1
- 
--    MOVPS      m1, m3
-+    mova       m1, m3
-     PUNPCKLDQ  m3, m4
-     PUNPCKHDQ  m1, m4
- 
--    MOVPS [dstq         ], m0
--    MOVPS [dstq+1*mmsize], m2
--    MOVPS [dstq+2*mmsize], m3
--    MOVPS [dstq+3*mmsize], m1
-+    mova  [dstq         ], m0
-+    mova  [dstq+1*mmsize], m2
-+    mova  [dstq+2*mmsize], m3
-+    mova  [dstq+3*mmsize], m1
- 
-     add      srcq, mmsize*2
-     add      dstq, mmsize*4
-     sub      lend, mmsize/2
-     jg .loop
--%ifidn %1, mmx
-+%if mmsize == 8
-     emms
- %endif
-     REP_RET
- %endmacro
- 
--INIT_MMX
--%define MOVPS     movq
-+INIT_MMX mmx
- %define PUNPCKLDQ punpckldq
- %define PUNPCKHDQ punpckhdq
--FLOAT_INTERLEAVE2 mmx, 0
--INIT_XMM
--%define MOVPS     movaps
-+FLOAT_INTERLEAVE2 0
-+INIT_XMM sse
- %define PUNPCKLDQ unpcklps
- %define PUNPCKHDQ unpckhps
--FLOAT_INTERLEAVE2 sse, 5
-+FLOAT_INTERLEAVE2 5
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0096-x86-fmtconvert-Refactor-cvtps2pi-emulation-through-c.patch b/debian/patches/post-9beta2/0096-x86-fmtconvert-Refactor-cvtps2pi-emulation-through-c.patch
deleted file mode 100644
index 6cc1fb4..0000000
--- a/debian/patches/post-9beta2/0096-x86-fmtconvert-Refactor-cvtps2pi-emulation-through-c.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From be2c456e962ab0a748164e0e43d0d74cc0d704fa Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 19:55:21 +0200
-Subject: [PATCH 096/278] x86: fmtconvert: Refactor cvtps2pi emulation through
- cpuflags
-
----
- libavcodec/x86/fmtconvert.asm |   52 ++++++++++++++++++++---------------------
- 1 file changed, 26 insertions(+), 26 deletions(-)
-
-diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
-index 969f9ab..fb183ce 100644
---- a/libavcodec/x86/fmtconvert.asm
-+++ b/libavcodec/x86/fmtconvert.asm
-@@ -23,6 +23,14 @@
- 
- SECTION_TEXT
- 
-+%macro CVTPS2PI 2
-+%if cpuflag(sse)
-+    cvtps2pi %1, %2
-+%elif cpuflag(3dnow)
-+    pf2id %1, %2
-+%endif
-+%endmacro
-+
- ;---------------------------------------------------------------------------------
- ; void int32_to_float_fmul_scalar(float *dst, const int *src, float mul, int len);
- ;---------------------------------------------------------------------------------
-@@ -88,10 +96,10 @@ cglobal float_to_int16, 3, 3, %1, dst, src, len
-     packssdw    m0, m1
-     mova  [dstq+lenq], m0
- %else
--    cvtps2pi    m0, [srcq+2*lenq   ]
--    cvtps2pi    m1, [srcq+2*lenq+ 8]
--    cvtps2pi    m2, [srcq+2*lenq+16]
--    cvtps2pi    m3, [srcq+2*lenq+24]
-+    CVTPS2PI    m0, [srcq+2*lenq   ]
-+    CVTPS2PI    m1, [srcq+2*lenq+ 8]
-+    CVTPS2PI    m2, [srcq+2*lenq+16]
-+    CVTPS2PI    m3, [srcq+2*lenq+24]
-     packssdw    m0, m1
-     packssdw    m2, m3
-     mova  [dstq+lenq  ], m0
-@@ -109,10 +117,8 @@ INIT_XMM sse2
- FLOAT_TO_INT16 2
- INIT_MMX sse
- FLOAT_TO_INT16 0
--%define cvtps2pi pf2id
- INIT_MMX 3dnow
- FLOAT_TO_INT16 0
--%undef cvtps2pi
- 
- ;------------------------------------------------------------------------------
- ; void ff_float_to_int16_step(int16_t *dst, const float *src, long len, long step);
-@@ -150,10 +156,10 @@ cglobal float_to_int16_step, 4, 7, %1, dst, src, len, step, step3, v1, v2
-     mov  [dstq+step3q*2], v2w
-     lea       dstq, [dstq+stepq*8]
- %else
--    cvtps2pi    m0, [srcq+2*lenq   ]
--    cvtps2pi    m1, [srcq+2*lenq+ 8]
--    cvtps2pi    m2, [srcq+2*lenq+16]
--    cvtps2pi    m3, [srcq+2*lenq+24]
-+    CVTPS2PI    m0, [srcq+2*lenq   ]
-+    CVTPS2PI    m1, [srcq+2*lenq+ 8]
-+    CVTPS2PI    m2, [srcq+2*lenq+16]
-+    CVTPS2PI    m3, [srcq+2*lenq+24]
-     packssdw    m0, m1
-     packssdw    m2, m3
-     movd       v1d, m0
-@@ -189,10 +195,8 @@ INIT_XMM sse2
- FLOAT_TO_INT16_STEP 2
- INIT_MMX sse
- FLOAT_TO_INT16_STEP 0
--%define cvtps2pi pf2id
- INIT_MMX 3dnow
- FLOAT_TO_INT16_STEP 0
--%undef cvtps2pi
- 
- ;-------------------------------------------------------------------------------
- ; void ff_float_to_int16_interleave2(int16_t *dst, const float **src, long len);
-@@ -215,10 +219,10 @@ cglobal float_to_int16_interleave2, 3, 4, 2, dst, src0, src1, len
-     punpcklwd  m0, m1
-     mova  [dstq+lenq], m0
- %else
--    cvtps2pi   m0, [src0q+lenq  ]
--    cvtps2pi   m1, [src0q+lenq+8]
--    cvtps2pi   m2, [src1q+lenq  ]
--    cvtps2pi   m3, [src1q+lenq+8]
-+    CVTPS2PI   m0, [src0q+lenq  ]
-+    CVTPS2PI   m1, [src0q+lenq+8]
-+    CVTPS2PI   m2, [src1q+lenq  ]
-+    CVTPS2PI   m3, [src1q+lenq+8]
-     packssdw   m0, m1
-     packssdw   m2, m3
-     mova       m1, m0
-@@ -236,9 +240,7 @@ cglobal float_to_int16_interleave2, 3, 4, 2, dst, src0, src1, len
- %endmacro
- 
- INIT_MMX 3dnow
--%define cvtps2pi pf2id
- FLOAT_TO_INT16_INTERLEAVE2
--%undef cvtps2pi
- INIT_MMX sse
- FLOAT_TO_INT16_INTERLEAVE2
- INIT_XMM sse2
-@@ -274,12 +276,12 @@ cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, s
-     sub src4q, srcq
-     sub src5q, srcq
- .loop:
--    cvtps2pi   mm0, [srcq]
--    cvtps2pi   mm1, [srcq+src1q]
--    cvtps2pi   mm2, [srcq+src2q]
--    cvtps2pi   mm3, [srcq+src3q]
--    cvtps2pi   mm4, [srcq+src4q]
--    cvtps2pi   mm5, [srcq+src5q]
-+    CVTPS2PI   mm0, [srcq]
-+    CVTPS2PI   mm1, [srcq+src1q]
-+    CVTPS2PI   mm2, [srcq+src2q]
-+    CVTPS2PI   mm3, [srcq+src3q]
-+    CVTPS2PI   mm4, [srcq+src4q]
-+    CVTPS2PI   mm5, [srcq+src5q]
-     packssdw   mm0, mm3
-     packssdw   mm1, mm4
-     packssdw   mm2, mm5
-@@ -306,13 +308,11 @@ INIT_MMX sse
- %define pswapd PSWAPD_SSE
- FLOAT_TO_INT16_INTERLEAVE6
- INIT_MMX 3dnow
--%define cvtps2pi pf2id
- %define pswapd PSWAPD_3DNOW
- FLOAT_TO_INT16_INTERLEAVE6
- %undef pswapd
- INIT_MMX 3dnowext
- FLOAT_TO_INT16_INTERLEAVE6
--%undef cvtps2pi
- 
- ;-----------------------------------------------------------------------------
- ; void ff_float_interleave6(float *dst, const float **src, unsigned int len);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0097-x86-Fix-assembly-with-NASM.patch b/debian/patches/post-9beta2/0097-x86-Fix-assembly-with-NASM.patch
deleted file mode 100644
index 796e242..0000000
--- a/debian/patches/post-9beta2/0097-x86-Fix-assembly-with-NASM.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 9c167914a1d88192882fe09dfce430a299580a8a Mon Sep 17 00:00:00 2001
-From: Dave Yeo <dave.r.yeo at gmail.com>
-Date: Tue, 30 Oct 2012 23:48:26 -0700
-Subject: [PATCH 097/278] x86: Fix assembly with NASM
-
-Unlike YASM, NASM only looks for include files in the current
-directory, not in the directory that included files reside in.
-
-Signed-off-by: Diego Biurrun <diego at biurrun.de>
----
- libavutil/x86/x86util.asm |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index d7ec594..4c6f4c6 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -23,7 +23,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
--%include "x86inc.asm"
-+%include "libavutil/x86/x86inc.asm"
- 
- %macro SBUTTERFLY 4
- %if avx_enabled == 0
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0098-aacdec-Drop-some-unused-function-arguments.patch b/debian/patches/post-9beta2/0098-aacdec-Drop-some-unused-function-arguments.patch
deleted file mode 100644
index 13c1f9e..0000000
--- a/debian/patches/post-9beta2/0098-aacdec-Drop-some-unused-function-arguments.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 5707af8d0b9c5a7e8a742a11798e406f99d78cea Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 19:15:54 +0200
-Subject: [PATCH 098/278] aacdec: Drop some unused function arguments
-
----
- libavcodec/aacdec.c |   44 ++++++++++++++++++++------------------------
- 1 file changed, 20 insertions(+), 24 deletions(-)
-
-diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
-index b7caecb..59f39fd 100644
---- a/libavcodec/aacdec.c
-+++ b/libavcodec/aacdec.c
-@@ -171,7 +171,7 @@ struct elem_to_channel {
- };
- 
- static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID],
--    uint8_t (*layout_map)[3], int offset, int tags, uint64_t left,
-+                       uint8_t (*layout_map)[3], int offset, uint64_t left,
-     uint64_t right, int pos)
- {
-     if (layout_map[offset][0] == TYPE_CPE) {
-@@ -253,21 +253,21 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
-         num_front_channels--;
-     }
-     if (num_front_channels >= 4) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          AV_CH_FRONT_LEFT_OF_CENTER,
-                          AV_CH_FRONT_RIGHT_OF_CENTER,
-                          AAC_CHANNEL_FRONT);
-         num_front_channels -= 2;
-     }
-     if (num_front_channels >= 2) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          AV_CH_FRONT_LEFT,
-                          AV_CH_FRONT_RIGHT,
-                          AAC_CHANNEL_FRONT);
-         num_front_channels -= 2;
-     }
-     while (num_front_channels >= 2) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          UINT64_MAX,
-                          UINT64_MAX,
-                          AAC_CHANNEL_FRONT);
-@@ -275,14 +275,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
-     }
- 
-     if (num_side_channels >= 2) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          AV_CH_SIDE_LEFT,
-                          AV_CH_SIDE_RIGHT,
-                          AAC_CHANNEL_FRONT);
-         num_side_channels -= 2;
-     }
-     while (num_side_channels >= 2) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          UINT64_MAX,
-                          UINT64_MAX,
-                          AAC_CHANNEL_SIDE);
-@@ -290,14 +290,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
-     }
- 
-     while (num_back_channels >= 4) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          UINT64_MAX,
-                          UINT64_MAX,
-                          AAC_CHANNEL_BACK);
-         num_back_channels -= 2;
-     }
-     if (num_back_channels >= 2) {
--        i += assign_pair(e2c_vec, layout_map, i, tags,
-+        i += assign_pair(e2c_vec, layout_map, i,
-                          AV_CH_BACK_LEFT,
-                          AV_CH_BACK_RIGHT,
-                          AAC_CHANNEL_BACK);
-@@ -379,7 +379,7 @@ static void pop_output_configuration(AACContext *ac) {
-  */
- static int output_configure(AACContext *ac,
-                                     uint8_t layout_map[MAX_ELEM_ID*4][3], int tags,
--                                    int channel_config, enum OCStatus oc_type)
-+                            enum OCStatus oc_type)
- {
-     AVCodecContext *avctx = ac->avctx;
-     int i, channels = 0, ret;
-@@ -457,7 +457,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
-                                        2) < 0)
-             return NULL;
-         if (output_configure(ac, layout_map, layout_map_tags,
--                             2, OC_TRIAL_FRAME) < 0)
-+                             OC_TRIAL_FRAME) < 0)
-             return NULL;
- 
-         ac->oc[1].m4ac.chan_config = 2;
-@@ -473,7 +473,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
-                                        1) < 0)
-             return NULL;
-         if (output_configure(ac, layout_map, layout_map_tags,
--                             1, OC_TRIAL_FRAME) < 0)
-+                             OC_TRIAL_FRAME) < 0)
-             return NULL;
- 
-         ac->oc[1].m4ac.chan_config = 1;
-@@ -660,8 +660,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
-     } else if (m4ac->sbr == 1 && m4ac->ps == -1)
-         m4ac->ps = 1;
- 
--    if (ac && (ret = output_configure(ac, layout_map, tags,
--                                      channel_config, OC_GLOBAL_HDR)))
-+    if (ac && (ret = output_configure(ac, layout_map, tags, OC_GLOBAL_HDR)))
-         return ret;
- 
-     if (extension_flag) {
-@@ -837,7 +836,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
-                 &layout_map_tags, ac->oc[1].m4ac.chan_config);
-             if (!ret)
-                 output_configure(ac, layout_map, layout_map_tags,
--                                 ac->oc[1].m4ac.chan_config, OC_GLOBAL_HDR);
-+                                 OC_GLOBAL_HDR);
-             else if (avctx->err_recognition & AV_EF_EXPLODE)
-                 return AVERROR_INVALIDDATA;
-         }
-@@ -935,7 +934,7 @@ static int decode_prediction(AACContext *ac, IndividualChannelStream *ics,
- /**
-  * Decode Long Term Prediction data; reference: table 4.xx.
-  */
--static void decode_ltp(AACContext *ac, LongTermPrediction *ltp,
-+static void decode_ltp(LongTermPrediction *ltp,
-                        GetBitContext *gb, uint8_t max_sfb)
- {
-     int sfb;
-@@ -996,7 +995,7 @@ static int decode_ics_info(AACContext *ac, IndividualChannelStream *ics,
-                 return AVERROR_INVALIDDATA;
-             } else {
-                 if ((ics->ltp.present = get_bits(gb, 1)))
--                    decode_ltp(ac, &ics->ltp, gb, ics->max_sfb);
-+                    decode_ltp(&ics->ltp, gb, ics->max_sfb);
-             }
-         }
-     }
-@@ -1734,7 +1733,7 @@ static int decode_cpe(AACContext *ac, GetBitContext *gb, ChannelElement *cpe)
-         cpe->ch[1].ics.use_kb_window[1] = i;
-         if (cpe->ch[1].ics.predictor_present && (ac->oc[1].m4ac.object_type != AOT_AAC_MAIN))
-             if ((cpe->ch[1].ics.ltp.present = get_bits(gb, 1)))
--                decode_ltp(ac, &cpe->ch[1].ics.ltp, gb, cpe->ch[1].ics.max_sfb);
-+                decode_ltp(&cpe->ch[1].ics.ltp, gb, cpe->ch[1].ics.max_sfb);
-         ms_present = get_bits(gb, 2);
-         if (ms_present == 3) {
-             av_log(ac->avctx, AV_LOG_ERROR, "ms_present = 3 is reserved.\n");
-@@ -1861,12 +1860,10 @@ static int decode_drc_channel_exclusions(DynamicRangeControl *che_drc,
- /**
-  * Decode dynamic range information; reference: table 4.52.
-  *
-- * @param   cnt length of TYPE_FIL syntactic element in bytes
-- *
-  * @return  Returns number of bytes consumed.
-  */
- static int decode_dynamic_range(DynamicRangeControl *che_drc,
--                                GetBitContext *gb, int cnt)
-+                                GetBitContext *gb)
- {
-     int n             = 1;
-     int drc_num_bands = 1;
-@@ -1943,14 +1940,14 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt,
-             ac->oc[1].m4ac.sbr = 1;
-             ac->oc[1].m4ac.ps = 1;
-             output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
--                             ac->oc[1].m4ac.chan_config, ac->oc[1].status);
-+                             ac->oc[1].status);
-         } else {
-             ac->oc[1].m4ac.sbr = 1;
-         }
-         res = ff_decode_sbr_extension(ac, &che->sbr, gb, crc_flag, cnt, elem_type);
-         break;
-     case EXT_DYNAMIC_RANGE:
--        res = decode_dynamic_range(&ac->che_drc, gb, cnt);
-+        res = decode_dynamic_range(&ac->che_drc, gb);
-         break;
-     case EXT_FILL:
-     case EXT_FILL_DATA:
-@@ -2333,7 +2330,6 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
-                     &layout_map_tags, hdr_info.chan_config))
-                 return -7;
-             if (output_configure(ac, layout_map, layout_map_tags,
--                                 hdr_info.chan_config,
-                                  FFMAX(ac->oc[1].status, OC_TRIAL_FRAME)))
-                 return -7;
-         } else {
-@@ -2430,7 +2426,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
-                        "Not evaluating a further program_config_element as this construct is dubious at best.\n");
-                 pop_output_configuration(ac);
-             } else {
--                err = output_configure(ac, layout_map, tags, 0, OC_TRIAL_PCE);
-+                err = output_configure(ac, layout_map, tags, OC_TRIAL_PCE);
-                 pce_found = 1;
-             }
-             break;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0099-swscale-do-not-forget-to-swap-data-in-formats-with-d.patch b/debian/patches/post-9beta2/0099-swscale-do-not-forget-to-swap-data-in-formats-with-d.patch
deleted file mode 100644
index 4287ab1..0000000
--- a/debian/patches/post-9beta2/0099-swscale-do-not-forget-to-swap-data-in-formats-with-d.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 38fdf7258035eb520ca152e9bea6d95cdfaca424 Mon Sep 17 00:00:00 2001
-From: Kostya Shishkov <kostya.shishkov at gmail.com>
-Date: Wed, 31 Oct 2012 11:26:32 +0100
-Subject: [PATCH 099/278] swscale: do not forget to swap data in formats with
- different endianness
-
-Otherwise during scaling it will try to interpret input in the wrong way and
-that leads to the test results disagreeing on different platforms and with
-different optimizations.
-
-Signed-off-by: Diego Biurrun <diego at biurrun.de>
----
- libswscale/input.c            |   42 +++++++++++++++++++++++++++++++++++++++++
- tests/ref/lavfi/pixfmts_scale |   16 ++++++++--------
- 2 files changed, 50 insertions(+), 8 deletions(-)
-
-diff --git a/libswscale/input.c b/libswscale/input.c
-index 142cc29..2e8d43f 100644
---- a/libswscale/input.c
-+++ b/libswscale/input.c
-@@ -724,6 +724,15 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
-     case AV_PIX_FMT_YUV420P16LE:
-     case AV_PIX_FMT_YUV422P16LE:
-     case AV_PIX_FMT_YUV444P16LE:
-+    case AV_PIX_FMT_YUVA444P9LE:
-+    case AV_PIX_FMT_YUVA422P9LE:
-+    case AV_PIX_FMT_YUVA420P9LE:
-+    case AV_PIX_FMT_YUVA422P10LE:
-+    case AV_PIX_FMT_YUVA444P10LE:
-+    case AV_PIX_FMT_YUVA420P10LE:
-+    case AV_PIX_FMT_YUVA420P16LE:
-+    case AV_PIX_FMT_YUVA422P16LE:
-+    case AV_PIX_FMT_YUVA444P16LE:
-         c->chrToYV12 = bswap16UV_c;
-         break;
- #else
-@@ -736,6 +745,15 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
-     case AV_PIX_FMT_YUV420P16BE:
-     case AV_PIX_FMT_YUV422P16BE:
-     case AV_PIX_FMT_YUV444P16BE:
-+    case AV_PIX_FMT_YUVA444P9BE:
-+    case AV_PIX_FMT_YUVA422P9BE:
-+    case AV_PIX_FMT_YUVA420P9BE:
-+    case AV_PIX_FMT_YUVA422P10BE:
-+    case AV_PIX_FMT_YUVA444P10BE:
-+    case AV_PIX_FMT_YUVA420P10BE:
-+    case AV_PIX_FMT_YUVA420P16BE:
-+    case AV_PIX_FMT_YUVA422P16BE:
-+    case AV_PIX_FMT_YUVA444P16BE:
-         c->chrToYV12 = bswap16UV_c;
-         break;
- #endif
-@@ -917,6 +935,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
-     case AV_PIX_FMT_GRAY16LE:
-         c->lumToYV12 = bswap16Y_c;
-         break;
-+    case AV_PIX_FMT_YUVA444P9LE:
-+    case AV_PIX_FMT_YUVA422P9LE:
-+    case AV_PIX_FMT_YUVA420P9LE:
-+    case AV_PIX_FMT_YUVA444P10LE:
-+    case AV_PIX_FMT_YUVA422P10LE:
-+    case AV_PIX_FMT_YUVA420P10LE:
-+    case AV_PIX_FMT_YUVA420P16LE:
-+    case AV_PIX_FMT_YUVA422P16LE:
-+    case AV_PIX_FMT_YUVA444P16LE:
-+        c->lumToYV12 = bswap16Y_c;
-+        c->alpToYV12 = bswap16Y_c;
-+        break;
- #else
-     case AV_PIX_FMT_YUV444P9BE:
-     case AV_PIX_FMT_YUV422P9BE:
-@@ -930,6 +960,18 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c)
-     case AV_PIX_FMT_GRAY16BE:
-         c->lumToYV12 = bswap16Y_c;
-         break;
-+    case AV_PIX_FMT_YUVA444P9BE:
-+    case AV_PIX_FMT_YUVA422P9BE:
-+    case AV_PIX_FMT_YUVA420P9BE:
-+    case AV_PIX_FMT_YUVA444P10BE:
-+    case AV_PIX_FMT_YUVA422P10BE:
-+    case AV_PIX_FMT_YUVA420P10BE:
-+    case AV_PIX_FMT_YUVA420P16BE:
-+    case AV_PIX_FMT_YUVA422P16BE:
-+    case AV_PIX_FMT_YUVA444P16BE:
-+        c->lumToYV12 = bswap16Y_c;
-+        c->alpToYV12 = bswap16Y_c;
-+        break;
- #endif
-     case AV_PIX_FMT_YUYV422:
-     case AV_PIX_FMT_Y400A:
-diff --git a/tests/ref/lavfi/pixfmts_scale b/tests/ref/lavfi/pixfmts_scale
-index d8ae09c..7be8af4 100644
---- a/tests/ref/lavfi/pixfmts_scale
-+++ b/tests/ref/lavfi/pixfmts_scale
-@@ -57,25 +57,25 @@ yuv444p16le         a0c5d3c7bf3f181db503cf8e450d1335
- yuv444p9be          9ac2643ce7f7e5c4e17c8c9fd8494d4a
- yuv444p9le          896a1cc9cccca1ba410dd53942d33cc4
- yuva420p            8673a9131fb47de69788863f93a50eb7
--yuva420p10be        cf397b35db9407496093b2ad64f3106c
-+yuva420p10be        d92a95061809f251175f5d5e3074930e
- yuva420p10le        8a06c377b8aa2b2979054e074582a5b5
- yuva420p16be        a61d8ddb646e2d26020fc7ed2a48c1a9
- yuva420p16le        90ef774f86ad3177ec57eca8744b4e09
--yuva420p9be         b43d5d88a474c80abad8e887eb5a3317
-+yuva420p9be         f7655546446bfdc875243d7cdeb13b30
- yuva420p9le         ada2b719827059d70ebc57e2a3f9da92
- yuva422p            3c76ebeca0a7d3aa5f8e31ef80a86ffe
--yuva422p10be        c12a427d2b8fc84f93fd3cf9fd5bcb14
-+yuva422p10be        9a21b2f566c0761c8338edaa88006bee
- yuva422p10le        aefcda062e7e3463c887faa9d926aca7
--yuva422p16be        a31bd04c58c22690f2a7c745f34cf48f
-+yuva422p16be        c21afa31ac18bd92e8e596b81552b52b
- yuva422p16le        0bc3720dba6076dcce3b74b1d3c6c4b7
--yuva422p9be         b21d2aa97ff643c86bbc08b578729c39
-+yuva422p9be         a60ac5b8026e9621724c033fbf79dbda
- yuva422p9le         c3eda8831e9b9c94a3eb487d33114103
- yuva444p            3268c6abe5e3cdbd16552a1eddced816
--yuva444p10be        4f6eaf2bbe8a083773b9f061fec20e41
-+yuva444p10be        3fbd1ece625c7aa7284b9ca3724d6abb
- yuva444p10le        2eeda83856df77760cd30e477e8ba00b
--yuva444p16be        3587f05da58a8435aad648506562d39b
-+yuva444p16be        ed5b07fe4d5b1137604568786777af1d
- yuva444p16le        3a3df23feb60d8832b566fd9765983d0
--yuva444p9be         d5342be0074975ea65907f5b65c7a335
-+yuva444p9be         4fc479c5b1044ad37b4e6fc6488b4f7f
- yuva444p9le         c41849b0134670d6f6253c337defbb04
- yuvj420p            30427bd6caf5bda93a173dbebe759e09
- yuvj422p            fc8288f64fd149573f73cf8da05d8e6d
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0100-x86-mmx2-mmxext-in-function-names.patch b/debian/patches/post-9beta2/0100-x86-mmx2-mmxext-in-function-names.patch
deleted file mode 100644
index 1f8f584..0000000
--- a/debian/patches/post-9beta2/0100-x86-mmx2-mmxext-in-function-names.patch
+++ /dev/null
@@ -1,1102 +0,0 @@
-From d8eda3708023db388d80027a79d5df7ee25a5a3f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 19:56:10 +0200
-Subject: [PATCH 100/278] x86: mmx2 ---> mmxext in function names
-
----
- libavcodec/dct-test.c           |    4 +-
- libavcodec/dsputil.h            |    2 +-
- libavcodec/x86/cavsdsp.c        |   29 ++++----
- libavcodec/x86/dsputil_mmx.c    |  144 +++++++++++++++++++--------------------
- libavcodec/x86/dsputil_mmx.h    |   10 +--
- libavcodec/x86/dsputilenc_mmx.c |   25 ++++---
- libavcodec/x86/fdct.c           |    7 +-
- libavcodec/x86/h264_qpel.c      |   54 +++++++--------
- libavcodec/x86/h264dsp_init.c   |   13 ++--
- libavcodec/x86/idct_mmx_xvid.c  |   11 +--
- libavcodec/x86/idct_xvid.h      |    6 +-
- libavcodec/x86/motion_est.c     |   36 +++++-----
- libavcodec/x86/mpegvideoenc.c   |    6 +-
- libavcodec/x86/vc1dsp_mmx.c     |   65 ++++++++++--------
- libavfilter/x86/gradfun.c       |    6 +-
- libavfilter/x86/yadif.c         |    4 +-
- libswscale/utils.c              |   21 +++---
- libswscale/x86/rgb2rgb.c        |    4 +-
- libswscale/x86/swscale.c        |    4 +-
- libswscale/x86/yuv2rgb.c        |    8 ++-
- 20 files changed, 242 insertions(+), 217 deletions(-)
-
-diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
-index 848ba8a..c480aec 100644
---- a/libavcodec/dct-test.c
-+++ b/libavcodec/dct-test.c
-@@ -83,7 +83,7 @@ static const struct algo fdct_tab[] = {
- 
- #if HAVE_MMX_INLINE
-     { "MMX",            ff_fdct_mmx,           NO_PERM,   AV_CPU_FLAG_MMX     },
--    { "MMXEXT",         ff_fdct_mmx2,          NO_PERM,   AV_CPU_FLAG_MMXEXT  },
-+    { "MMXEXT",         ff_fdct_mmxext,        NO_PERM,   AV_CPU_FLAG_MMXEXT  },
-     { "SSE2",           ff_fdct_sse2,          NO_PERM,   AV_CPU_FLAG_SSE2    },
- #endif
- 
-@@ -107,7 +107,7 @@ static const struct algo idct_tab[] = {
- #if HAVE_MMX_INLINE
-     { "SIMPLE-MMX",     ff_simple_idct_mmx,  MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX },
-     { "XVID-MMX",       ff_idct_xvid_mmx,      NO_PERM,   AV_CPU_FLAG_MMX,  1 },
--    { "XVID-MMXEXT",    ff_idct_xvid_mmx2,     NO_PERM,   AV_CPU_FLAG_MMXEXT, 1 },
-+    { "XVID-MMXEXT",    ff_idct_xvid_mmxext,   NO_PERM,   AV_CPU_FLAG_MMXEXT, 1 },
-     { "XVID-SSE2",      ff_idct_xvid_sse2,     SSE2_PERM, AV_CPU_FLAG_SSE2, 1 },
- #endif
- 
-diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
-index e38f7a7..f48aa96 100644
---- a/libavcodec/dsputil.h
-+++ b/libavcodec/dsputil.h
-@@ -49,7 +49,7 @@ void ff_j_rev_dct (DCTELEM *data);
- void ff_wmv2_idct_c(DCTELEM *data);
- 
- void ff_fdct_mmx(DCTELEM *block);
--void ff_fdct_mmx2(DCTELEM *block);
-+void ff_fdct_mmxext(DCTELEM *block);
- void ff_fdct_sse2(DCTELEM *block);
- 
- #define H264_IDCT(depth) \
-diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
-index b628f08..f94e2f3 100644
---- a/libavcodec/x86/cavsdsp.c
-+++ b/libavcodec/x86/cavsdsp.c
-@@ -438,21 +438,22 @@ static void ff_ ## OPNAME ## cavs_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, ui
- #endif /* (HAVE_MMXEXT_INLINE || HAVE_AMD3DNOW_INLINE) */
- 
- #if HAVE_MMXEXT_INLINE
--QPEL_CAVS(put_,       PUT_OP, mmx2)
--QPEL_CAVS(avg_,AVG_MMXEXT_OP, mmx2)
-+QPEL_CAVS(put_,        PUT_OP, mmxext)
-+QPEL_CAVS(avg_, AVG_MMXEXT_OP, mmxext)
- 
--CAVS_MC(put_, 8, mmx2)
--CAVS_MC(put_, 16,mmx2)
--CAVS_MC(avg_, 8, mmx2)
--CAVS_MC(avg_, 16,mmx2)
-+CAVS_MC(put_,  8, mmxext)
-+CAVS_MC(put_, 16, mmxext)
-+CAVS_MC(avg_,  8, mmxext)
-+CAVS_MC(avg_, 16, mmxext)
- 
--static void ff_cavsdsp_init_mmx2(CAVSDSPContext* c, AVCodecContext *avctx) {
-+static void ff_cavsdsp_init_mmxext(CAVSDSPContext *c, AVCodecContext *avctx)
-+{
- #define dspfunc(PFX, IDX, NUM) \
--    c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \
--    c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_mmx2; \
--    c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_mmx2; \
--    c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_mmx2; \
--    c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_mmx2; \
-+    c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmxext; \
-+    c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_mmxext; \
-+    c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_mmxext; \
-+    c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_mmxext; \
-+    c->PFX ## _pixels_tab[IDX][12] = ff_ ## PFX ## NUM ## _mc03_mmxext; \
- 
-     dspfunc(put_cavs_qpel, 0, 16);
-     dspfunc(put_cavs_qpel, 1, 8);
-@@ -475,7 +476,7 @@ CAVS_MC(avg_, 16,3dnow)
- 
- static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
- #define dspfunc(PFX, IDX, NUM) \
--    c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmx2; \
-+    c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmxext; \
-     c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_3dnow; \
-     c->PFX ## _pixels_tab[IDX][ 4] = ff_ ## PFX ## NUM ## _mc01_3dnow; \
-     c->PFX ## _pixels_tab[IDX][ 8] = ff_ ## PFX ## NUM ## _mc02_3dnow; \
-@@ -496,7 +497,7 @@ av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
-     int mm_flags = av_get_cpu_flags();
- 
- #if HAVE_MMXEXT_INLINE
--    if (mm_flags & AV_CPU_FLAG_MMXEXT) ff_cavsdsp_init_mmx2(c, avctx);
-+    if (mm_flags & AV_CPU_FLAG_MMXEXT) ff_cavsdsp_init_mmxext(c, avctx);
- #endif /* HAVE_MMXEXT_INLINE */
- #if HAVE_AMD3DNOW_INLINE
-     if (mm_flags & AV_CPU_FLAG_3DNOW) ff_cavsdsp_init_3dnow(c, avctx);
-diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
-index 1e78c20..d23279b 100644
---- a/libavcodec/x86/dsputil_mmx.c
-+++ b/libavcodec/x86/dsputil_mmx.c
-@@ -207,7 +207,7 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
- /***********************************/
- /* MMXEXT specific */
- 
--#define DEF(x) x ## _mmx2
-+#define DEF(x) x ## _mmxext
- 
- /* Introduced only in MMXEXT set */
- #define PAVGB "pavgb"
-@@ -221,11 +221,11 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 };
- 
- #define put_no_rnd_pixels16_mmx put_pixels16_mmx
- #define put_no_rnd_pixels8_mmx put_pixels8_mmx
--#define put_pixels16_mmx2 put_pixels16_mmx
--#define put_pixels8_mmx2 put_pixels8_mmx
--#define put_pixels4_mmx2 put_pixels4_mmx
--#define put_no_rnd_pixels16_mmx2 put_no_rnd_pixels16_mmx
--#define put_no_rnd_pixels8_mmx2 put_no_rnd_pixels8_mmx
-+#define put_pixels16_mmxext put_pixels16_mmx
-+#define put_pixels8_mmxext put_pixels8_mmx
-+#define put_pixels4_mmxext put_pixels4_mmx
-+#define put_no_rnd_pixels16_mmxext put_no_rnd_pixels16_mmx
-+#define put_no_rnd_pixels8_mmxext put_no_rnd_pixels8_mmx
- #define put_pixels16_3dnow put_pixels16_mmx
- #define put_pixels8_3dnow put_pixels8_mmx
- #define put_pixels4_3dnow put_pixels4_mmx
-@@ -924,11 +924,11 @@ static void draw_edges_mmx(uint8_t *buf, int wrap, int width, int height,
-     OP(%%mm5, out, %%mm7, d)
- 
- #define QPEL_BASE(OPNAME, ROUNDER, RND, OP_MMXEXT, OP_3DNOW)              \
--static void OPNAME ## mpeg4_qpel16_h_lowpass_mmx2(uint8_t *dst,           \
--                                                  uint8_t *src,           \
--                                                  int dstStride,          \
--                                                  int srcStride,          \
--                                                  int h)                  \
-+static void OPNAME ## mpeg4_qpel16_h_lowpass_mmxext(uint8_t *dst,         \
-+                                                    uint8_t *src,         \
-+                                                    int dstStride,        \
-+                                                    int srcStride,        \
-+                                                    int h)                \
- {                                                                         \
-     uint64_t temp;                                                        \
-                                                                           \
-@@ -1118,11 +1118,11 @@ static void OPNAME ## mpeg4_qpel16_h_lowpass_3dnow(uint8_t *dst,          \
-     }                                                                     \
- }                                                                         \
-                                                                           \
--static void OPNAME ## mpeg4_qpel8_h_lowpass_mmx2(uint8_t *dst,            \
--                                                 uint8_t *src,            \
--                                                 int dstStride,           \
--                                                 int srcStride,           \
--                                                 int h)                   \
-+static void OPNAME ## mpeg4_qpel8_h_lowpass_mmxext(uint8_t *dst,          \
-+                                                   uint8_t *src,          \
-+                                                   int dstStride,         \
-+                                                   int srcStride,         \
-+                                                   int h)                 \
- {                                                                         \
-     __asm__ volatile (                                                    \
-         "pxor      %%mm7, %%mm7             \n\t"                         \
-@@ -1755,9 +1755,9 @@ QPEL_BASE(put_no_rnd_, ff_pw_15, _no_rnd_, PUT_OP,       PUT_OP)
- QPEL_OP(put_,          ff_pw_16, _,        PUT_OP,       3dnow)
- QPEL_OP(avg_,          ff_pw_16, _,        AVG_3DNOW_OP, 3dnow)
- QPEL_OP(put_no_rnd_,   ff_pw_15, _no_rnd_, PUT_OP,       3dnow)
--QPEL_OP(put_,          ff_pw_16, _,        PUT_OP,       mmx2)
--QPEL_OP(avg_,          ff_pw_16, _,        AVG_MMXEXT_OP, mmx2)
--QPEL_OP(put_no_rnd_,   ff_pw_15, _no_rnd_, PUT_OP,       mmx2)
-+QPEL_OP(put_,          ff_pw_16, _,        PUT_OP,        mmxext)
-+QPEL_OP(avg_,          ff_pw_16, _,        AVG_MMXEXT_OP, mmxext)
-+QPEL_OP(put_no_rnd_,   ff_pw_15, _no_rnd_, PUT_OP,        mmxext)
- 
- /***********************************/
- /* bilinear qpel: not compliant to any spec, only for -lavdopts fast */
-@@ -1811,10 +1811,10 @@ QPEL_2TAP_L3(OPNAME, SIZE, MMX, 31, 1,           stride, -1)                \
- QPEL_2TAP_L3(OPNAME, SIZE, MMX, 13, stride,     -stride,  1)                \
- QPEL_2TAP_L3(OPNAME, SIZE, MMX, 33, stride + 1, -stride, -1)                \
- 
--QPEL_2TAP(put_, 16, mmx2)
--QPEL_2TAP(avg_, 16, mmx2)
--QPEL_2TAP(put_,  8, mmx2)
--QPEL_2TAP(avg_,  8, mmx2)
-+QPEL_2TAP(put_, 16, mmxext)
-+QPEL_2TAP(avg_, 16, mmxext)
-+QPEL_2TAP(put_,  8, mmxext)
-+QPEL_2TAP(avg_,  8, mmxext)
- QPEL_2TAP(put_, 16, 3dnow)
- QPEL_2TAP(avg_, 16, 3dnow)
- QPEL_2TAP(put_,  8, 3dnow)
-@@ -2035,7 +2035,7 @@ static void name(void *mem, int stride, int h)  \
-     } while (--h);                              \
- }
- 
--PREFETCH(prefetch_mmx2,  prefetcht0)
-+PREFETCH(prefetch_mmxext, prefetcht0)
- PREFETCH(prefetch_3dnow, prefetch)
- #undef PREFETCH
- 
-@@ -2089,22 +2089,22 @@ CHROMA_MC(avg, 8, 10, avx)
- #if HAVE_INLINE_ASM
- 
- /* CAVS-specific */
--void ff_put_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride)
-+void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride)
- {
-     put_pixels8_mmx(dst, src, stride, 8);
- }
- 
--void ff_avg_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride)
-+void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride)
- {
-     avg_pixels8_mmx(dst, src, stride, 8);
- }
- 
--void ff_put_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride)
-+void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride)
- {
-     put_pixels16_mmx(dst, src, stride, 16);
- }
- 
--void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride)
-+void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride)
- {
-     avg_pixels16_mmx(dst, src, stride, 16);
- }
-@@ -2116,10 +2116,10 @@ void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src,
-     put_pixels8_mmx(dst, src, stride, 8);
- }
- 
--void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src,
--                                int stride, int rnd)
-+void ff_avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src,
-+                                  int stride, int rnd)
- {
--    avg_pixels8_mmx2(dst, src, stride, 8);
-+    avg_pixels8_mmxext(dst, src, stride, 8);
- }
- 
- static void vorbis_inverse_coupling_3dnow(float *mag, float *ang, int blocksize)
-@@ -2456,74 +2456,74 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
- 
- }
- 
--static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx,
--                              int mm_flags)
-+static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
-+                                int mm_flags)
- {
-     const int bit_depth      = avctx->bits_per_raw_sample;
-     const int high_bit_depth = bit_depth > 8;
- 
- #if HAVE_INLINE_ASM
--    c->prefetch = prefetch_mmx2;
-+    c->prefetch = prefetch_mmxext;
- 
-     if (!high_bit_depth) {
--        c->put_pixels_tab[0][1] = put_pixels16_x2_mmx2;
--        c->put_pixels_tab[0][2] = put_pixels16_y2_mmx2;
-+        c->put_pixels_tab[0][1] = put_pixels16_x2_mmxext;
-+        c->put_pixels_tab[0][2] = put_pixels16_y2_mmxext;
- 
--        c->avg_pixels_tab[0][0] = avg_pixels16_mmx2;
--        c->avg_pixels_tab[0][1] = avg_pixels16_x2_mmx2;
--        c->avg_pixels_tab[0][2] = avg_pixels16_y2_mmx2;
-+        c->avg_pixels_tab[0][0] = avg_pixels16_mmxext;
-+        c->avg_pixels_tab[0][1] = avg_pixels16_x2_mmxext;
-+        c->avg_pixels_tab[0][2] = avg_pixels16_y2_mmxext;
- 
--        c->put_pixels_tab[1][1] = put_pixels8_x2_mmx2;
--        c->put_pixels_tab[1][2] = put_pixels8_y2_mmx2;
-+        c->put_pixels_tab[1][1] = put_pixels8_x2_mmxext;
-+        c->put_pixels_tab[1][2] = put_pixels8_y2_mmxext;
- 
--        c->avg_pixels_tab[1][0] = avg_pixels8_mmx2;
--        c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmx2;
--        c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmx2;
-+        c->avg_pixels_tab[1][0] = avg_pixels8_mmxext;
-+        c->avg_pixels_tab[1][1] = avg_pixels8_x2_mmxext;
-+        c->avg_pixels_tab[1][2] = avg_pixels8_y2_mmxext;
-     }
- 
-     if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
-         if (!high_bit_depth) {
--            c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmx2;
--            c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmx2;
--            c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmx2;
--            c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmx2;
-+            c->put_no_rnd_pixels_tab[0][1] = put_no_rnd_pixels16_x2_mmxext;
-+            c->put_no_rnd_pixels_tab[0][2] = put_no_rnd_pixels16_y2_mmxext;
-+            c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_mmxext;
-+            c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_mmxext;
- 
--            c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmx2;
--            c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmx2;
-+            c->avg_pixels_tab[0][3] = avg_pixels16_xy2_mmxext;
-+            c->avg_pixels_tab[1][3] = avg_pixels8_xy2_mmxext;
-         }
-     }
- 
-     if (!high_bit_depth && avctx->idct_algo == FF_IDCT_XVIDMMX) {
--        c->idct_put = ff_idct_xvid_mmx2_put;
--        c->idct_add = ff_idct_xvid_mmx2_add;
--        c->idct     = ff_idct_xvid_mmx2;
-+        c->idct_put = ff_idct_xvid_mmxext_put;
-+        c->idct_add = ff_idct_xvid_mmxext_add;
-+        c->idct     = ff_idct_xvid_mmxext;
-     }
- 
-     if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
-                                avctx->codec_id == AV_CODEC_ID_THEORA)) {
--        c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2;
--        c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2;
-+        c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmxext;
-+        c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmxext;
-     }
- #endif /* HAVE_INLINE_ASM */
- 
-     if (CONFIG_H264QPEL) {
- #if HAVE_INLINE_ASM
--        SET_QPEL_FUNCS(put_qpel,        0, 16, mmx2, );
--        SET_QPEL_FUNCS(put_qpel,        1,  8, mmx2, );
--        SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmx2, );
--        SET_QPEL_FUNCS(put_no_rnd_qpel, 1,  8, mmx2, );
--        SET_QPEL_FUNCS(avg_qpel,        0, 16, mmx2, );
--        SET_QPEL_FUNCS(avg_qpel,        1,  8, mmx2, );
-+        SET_QPEL_FUNCS(put_qpel,        0, 16, mmxext, );
-+        SET_QPEL_FUNCS(put_qpel,        1,  8, mmxext, );
-+        SET_QPEL_FUNCS(put_no_rnd_qpel, 0, 16, mmxext, );
-+        SET_QPEL_FUNCS(put_no_rnd_qpel, 1,  8, mmxext, );
-+        SET_QPEL_FUNCS(avg_qpel,        0, 16, mmxext, );
-+        SET_QPEL_FUNCS(avg_qpel,        1,  8, mmxext, );
- #endif /* HAVE_INLINE_ASM */
- 
-         if (!high_bit_depth) {
- #if HAVE_INLINE_ASM
--            SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmx2, );
--            SET_QPEL_FUNCS(put_h264_qpel, 1,  8, mmx2, );
--            SET_QPEL_FUNCS(put_h264_qpel, 2,  4, mmx2, );
--            SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmx2, );
--            SET_QPEL_FUNCS(avg_h264_qpel, 1,  8, mmx2, );
--            SET_QPEL_FUNCS(avg_h264_qpel, 2,  4, mmx2, );
-+            SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, );
-+            SET_QPEL_FUNCS(put_h264_qpel, 1,  8, mmxext, );
-+            SET_QPEL_FUNCS(put_h264_qpel, 2,  4, mmxext, );
-+            SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, );
-+            SET_QPEL_FUNCS(avg_h264_qpel, 1,  8, mmxext, );
-+            SET_QPEL_FUNCS(avg_h264_qpel, 2,  4, mmxext, );
- #endif /* HAVE_INLINE_ASM */
-         } else if (bit_depth == 10) {
- #if HAVE_YASM
-@@ -2539,10 +2539,10 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx,
-         }
- 
- #if HAVE_INLINE_ASM
--        SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmx2, );
--        SET_QPEL_FUNCS(put_2tap_qpel, 1,  8, mmx2, );
--        SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmx2, );
--        SET_QPEL_FUNCS(avg_2tap_qpel, 1,  8, mmx2, );
-+        SET_QPEL_FUNCS(put_2tap_qpel, 0, 16, mmxext, );
-+        SET_QPEL_FUNCS(put_2tap_qpel, 1,  8, mmxext, );
-+        SET_QPEL_FUNCS(avg_2tap_qpel, 0, 16, mmxext, );
-+        SET_QPEL_FUNCS(avg_2tap_qpel, 1,  8, mmxext, );
- #endif /* HAVE_INLINE_ASM */
-     }
- 
-@@ -2861,7 +2861,7 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
-         dsputil_init_mmx(c, avctx, mm_flags);
- 
-     if (mm_flags & AV_CPU_FLAG_MMXEXT)
--        dsputil_init_mmx2(c, avctx, mm_flags);
-+        dsputil_init_mmxext(c, avctx, mm_flags);
- 
-     if (mm_flags & AV_CPU_FLAG_3DNOW)
-         dsputil_init_3dnow(c, avctx, mm_flags);
-diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h
-index bd14c5a..a142406 100644
---- a/libavcodec/x86/dsputil_mmx.h
-+++ b/libavcodec/x86/dsputil_mmx.h
-@@ -89,13 +89,13 @@ void ff_add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_s
- void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);
- void ff_put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size);
- 
--void ff_put_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
--void ff_avg_cavs_qpel8_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
--void ff_put_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
--void ff_avg_cavs_qpel16_mc00_mmx2(uint8_t *dst, uint8_t *src, int stride);
-+void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride);
-+void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride);
-+void ff_put_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride);
-+void ff_avg_cavs_qpel16_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride);
- 
- void ff_put_vc1_mspel_mc00_mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd);
--void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd);
-+void ff_avg_vc1_mspel_mc00_mmxext(uint8_t *dst, const uint8_t *src, int stride, int rnd);
- 
- void ff_put_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
- void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size);
-diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
-index 43940bd..883d965 100644
---- a/libavcodec/x86/dsputilenc_mmx.c
-+++ b/libavcodec/x86/dsputilenc_mmx.c
-@@ -647,7 +647,9 @@ static int vsad_intra16_mmx(void *v, uint8_t * pix, uint8_t * dummy, int line_si
- }
- #undef SUM
- 
--static int vsad_intra16_mmx2(void *v, uint8_t * pix, uint8_t * dummy, int line_size, int h) {
-+static int vsad_intra16_mmxext(void *v, uint8_t *pix, uint8_t *dummy,
-+                               int line_size, int h)
-+{
-     int tmp;
- 
-     assert( (((int)pix) & 7) == 0);
-@@ -765,7 +767,9 @@ static int vsad16_mmx(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, in
- }
- #undef SUM
- 
--static int vsad16_mmx2(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
-+static int vsad16_mmxext(void *v, uint8_t *pix1, uint8_t *pix2,
-+                         int line_size, int h)
-+{
-     int tmp;
- 
-     assert( (((int)pix1) & 7) == 0);
-@@ -844,7 +848,10 @@ static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
-         dst[i+0] = src1[i+0]-src2[i+0];
- }
- 
--static void sub_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w, int *left, int *left_top){
-+static void sub_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *src1,
-+                                              const uint8_t *src2, int w,
-+                                              int *left, int *left_top)
-+{
-     x86_reg i=0;
-     uint8_t l, lt;
- 
-@@ -976,7 +983,7 @@ DCT_SAD_FUNC(mmx)
- 
- #define HSUM(a,t,dst) HSUM_MMXEXT(a,t,dst)
- #define MMABS(a,z)    MMABS_MMXEXT(a,z)
--DCT_SAD_FUNC(mmx2)
-+DCT_SAD_FUNC(mmxext)
- #undef HSUM
- #undef DCT_SAD
- 
-@@ -1115,7 +1122,7 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
-             if(mm_flags & AV_CPU_FLAG_SSE2){
-                 c->fdct = ff_fdct_sse2;
-             } else if (mm_flags & AV_CPU_FLAG_MMXEXT) {
--                c->fdct = ff_fdct_mmx2;
-+                c->fdct = ff_fdct_mmxext;
-             }else{
-                 c->fdct = ff_fdct_mmx;
-             }
-@@ -1148,14 +1155,14 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
-         c->ssd_int8_vs_int16 = ssd_int8_vs_int16_mmx;
- 
-         if (mm_flags & AV_CPU_FLAG_MMXEXT) {
--            c->sum_abs_dctelem= sum_abs_dctelem_mmx2;
--            c->vsad[4]= vsad_intra16_mmx2;
-+            c->sum_abs_dctelem = sum_abs_dctelem_mmxext;
-+            c->vsad[4]         = vsad_intra16_mmxext;
- 
-             if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
--                c->vsad[0] = vsad16_mmx2;
-+                c->vsad[0] = vsad16_mmxext;
-             }
- 
--            c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_mmx2;
-+            c->sub_hfyu_median_prediction = sub_hfyu_median_prediction_mmxext;
-         }
- 
-         if(mm_flags & AV_CPU_FLAG_SSE2){
-diff --git a/libavcodec/x86/fdct.c b/libavcodec/x86/fdct.c
-index f9bd3f2..b37238d 100644
---- a/libavcodec/x86/fdct.c
-+++ b/libavcodec/x86/fdct.c
-@@ -440,7 +440,8 @@ static av_always_inline void fdct_row_sse2(const int16_t *in, int16_t *out)
-     );
- }
- 
--static av_always_inline void fdct_row_mmx2(const int16_t *in, int16_t *out, const int16_t *table)
-+static av_always_inline void fdct_row_mmxext(const int16_t *in, int16_t *out,
-+                                             const int16_t *table)
- {
-     __asm__ volatile (
-         "pshufw    $0x1B, 8(%0), %%mm5 \n\t"
-@@ -555,7 +556,7 @@ void ff_fdct_mmx(int16_t *block)
-     }
- }
- 
--void ff_fdct_mmx2(int16_t *block)
-+void ff_fdct_mmxext(int16_t *block)
- {
-     DECLARE_ALIGNED(8, int64_t, align_tmp)[16];
-     int16_t *block1= (int16_t*)align_tmp;
-@@ -566,7 +567,7 @@ void ff_fdct_mmx2(int16_t *block)
-     fdct_col_mmx(block, block1, 4);
- 
-     for(i=8;i>0;i--) {
--        fdct_row_mmx2(block1, block, table);
-+        fdct_row_mmxext(block1, block, table);
-         block1 += 8;
-         table += 32;
-         block += 8;
-diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
-index 5a2db78..f978520 100644
---- a/libavcodec/x86/h264_qpel.c
-+++ b/libavcodec/x86/h264_qpel.c
-@@ -1002,36 +1002,36 @@ static void OPNAME ## h264_qpel16_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp,
-     OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(dst, tmp, src, dstStride, tmpStride, srcStride, 16);\
- }\
- 
--#define put_pixels8_l2_sse2 put_pixels8_l2_mmx2
--#define avg_pixels8_l2_sse2 avg_pixels8_l2_mmx2
--#define put_pixels16_l2_sse2 put_pixels16_l2_mmx2
--#define avg_pixels16_l2_sse2 avg_pixels16_l2_mmx2
--#define put_pixels8_l2_ssse3 put_pixels8_l2_mmx2
--#define avg_pixels8_l2_ssse3 avg_pixels8_l2_mmx2
--#define put_pixels16_l2_ssse3 put_pixels16_l2_mmx2
--#define avg_pixels16_l2_ssse3 avg_pixels16_l2_mmx2
-+#define put_pixels8_l2_sse2 put_pixels8_l2_mmxext
-+#define avg_pixels8_l2_sse2 avg_pixels8_l2_mmxext
-+#define put_pixels16_l2_sse2 put_pixels16_l2_mmxext
-+#define avg_pixels16_l2_sse2 avg_pixels16_l2_mmxext
-+#define put_pixels8_l2_ssse3 put_pixels8_l2_mmxext
-+#define avg_pixels8_l2_ssse3 avg_pixels8_l2_mmxext
-+#define put_pixels16_l2_ssse3 put_pixels16_l2_mmxext
-+#define avg_pixels16_l2_ssse3 avg_pixels16_l2_mmxext
- 
--#define put_pixels8_l2_shift5_sse2 put_pixels8_l2_shift5_mmx2
--#define avg_pixels8_l2_shift5_sse2 avg_pixels8_l2_shift5_mmx2
--#define put_pixels16_l2_shift5_sse2 put_pixels16_l2_shift5_mmx2
--#define avg_pixels16_l2_shift5_sse2 avg_pixels16_l2_shift5_mmx2
--#define put_pixels8_l2_shift5_ssse3 put_pixels8_l2_shift5_mmx2
--#define avg_pixels8_l2_shift5_ssse3 avg_pixels8_l2_shift5_mmx2
--#define put_pixels16_l2_shift5_ssse3 put_pixels16_l2_shift5_mmx2
--#define avg_pixels16_l2_shift5_ssse3 avg_pixels16_l2_shift5_mmx2
-+#define put_pixels8_l2_shift5_sse2 put_pixels8_l2_shift5_mmxext
-+#define avg_pixels8_l2_shift5_sse2 avg_pixels8_l2_shift5_mmxext
-+#define put_pixels16_l2_shift5_sse2 put_pixels16_l2_shift5_mmxext
-+#define avg_pixels16_l2_shift5_sse2 avg_pixels16_l2_shift5_mmxext
-+#define put_pixels8_l2_shift5_ssse3 put_pixels8_l2_shift5_mmxext
-+#define avg_pixels8_l2_shift5_ssse3 avg_pixels8_l2_shift5_mmxext
-+#define put_pixels16_l2_shift5_ssse3 put_pixels16_l2_shift5_mmxext
-+#define avg_pixels16_l2_shift5_ssse3 avg_pixels16_l2_shift5_mmxext
- 
--#define put_h264_qpel8_h_lowpass_l2_sse2 put_h264_qpel8_h_lowpass_l2_mmx2
--#define avg_h264_qpel8_h_lowpass_l2_sse2 avg_h264_qpel8_h_lowpass_l2_mmx2
--#define put_h264_qpel16_h_lowpass_l2_sse2 put_h264_qpel16_h_lowpass_l2_mmx2
--#define avg_h264_qpel16_h_lowpass_l2_sse2 avg_h264_qpel16_h_lowpass_l2_mmx2
-+#define put_h264_qpel8_h_lowpass_l2_sse2 put_h264_qpel8_h_lowpass_l2_mmxext
-+#define avg_h264_qpel8_h_lowpass_l2_sse2 avg_h264_qpel8_h_lowpass_l2_mmxext
-+#define put_h264_qpel16_h_lowpass_l2_sse2 put_h264_qpel16_h_lowpass_l2_mmxext
-+#define avg_h264_qpel16_h_lowpass_l2_sse2 avg_h264_qpel16_h_lowpass_l2_mmxext
- 
- #define put_h264_qpel8_v_lowpass_ssse3 put_h264_qpel8_v_lowpass_sse2
- #define avg_h264_qpel8_v_lowpass_ssse3 avg_h264_qpel8_v_lowpass_sse2
- #define put_h264_qpel16_v_lowpass_ssse3 put_h264_qpel16_v_lowpass_sse2
- #define avg_h264_qpel16_v_lowpass_ssse3 avg_h264_qpel16_v_lowpass_sse2
- 
--#define put_h264_qpel8or16_hv2_lowpass_sse2 put_h264_qpel8or16_hv2_lowpass_mmx2
--#define avg_h264_qpel8or16_hv2_lowpass_sse2 avg_h264_qpel8or16_hv2_lowpass_mmx2
-+#define put_h264_qpel8or16_hv2_lowpass_sse2 put_h264_qpel8or16_hv2_lowpass_mmxext
-+#define avg_h264_qpel8or16_hv2_lowpass_sse2 avg_h264_qpel8or16_hv2_lowpass_mmxext
- 
- #define H264_MC(OPNAME, SIZE, MMX, ALIGN) \
- H264_MC_C(OPNAME, SIZE, MMX, ALIGN)\
-@@ -1045,8 +1045,8 @@ static void put_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, int stride){
- static void avg_h264_qpel16_mc00_sse2 (uint8_t *dst, uint8_t *src, int stride){
-     avg_pixels16_sse2(dst, src, stride, 16);
- }
--#define put_h264_qpel8_mc00_sse2 put_h264_qpel8_mc00_mmx2
--#define avg_h264_qpel8_mc00_sse2 avg_h264_qpel8_mc00_mmx2
-+#define put_h264_qpel8_mc00_sse2 put_h264_qpel8_mc00_mmxext
-+#define avg_h264_qpel8_mc00_sse2 avg_h264_qpel8_mc00_mmxext
- 
- #define H264_MC_C(OPNAME, SIZE, MMX, ALIGN) \
- static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## MMX (uint8_t *dst, uint8_t *src, int stride){\
-@@ -1168,8 +1168,8 @@ QPEL_H264(put_,       PUT_OP, 3dnow)
- QPEL_H264(avg_, AVG_3DNOW_OP, 3dnow)
- #undef PAVGB
- #define PAVGB "pavgb"
--QPEL_H264(put_,       PUT_OP, mmx2)
--QPEL_H264(avg_,AVG_MMXEXT_OP, mmx2)
-+QPEL_H264(put_,        PUT_OP, mmxext)
-+QPEL_H264(avg_, AVG_MMXEXT_OP, mmxext)
- QPEL_H264_V_XMM(put_,       PUT_OP, sse2)
- QPEL_H264_V_XMM(avg_,AVG_MMXEXT_OP, sse2)
- QPEL_H264_HV_XMM(put_,       PUT_OP, sse2)
-@@ -1185,7 +1185,7 @@ QPEL_H264_HV_XMM(avg_,AVG_MMXEXT_OP, ssse3)
- #undef PAVGB
- 
- H264_MC_4816(3dnow)
--H264_MC_4816(mmx2)
-+H264_MC_4816(mmxext)
- H264_MC_816(H264_MC_V, sse2)
- H264_MC_816(H264_MC_HV, sse2)
- #if HAVE_SSSE3_INLINE
-diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
-index 3f6ded4..913c362 100644
---- a/libavcodec/x86/h264dsp_init.c
-+++ b/libavcodec/x86/h264dsp_init.c
-@@ -130,18 +130,17 @@ LF_FUNCS(uint16_t, 10)
- 
- #if ARCH_X86_32
- LF_FUNC(v8, luma, 8, mmx2)
--static void ff_deblock_v_luma_8_mmx2(uint8_t *pix, int stride, int alpha,
--                                     int beta, int8_t *tc0)
-+static void ff_deblock_v_luma_8_mmxext(uint8_t *pix, int stride, int alpha,
-+                                       int beta, int8_t *tc0)
- {
-     if ((tc0[0] & tc0[1]) >= 0)
-         ff_deblock_v8_luma_8_mmx2(pix + 0, stride, alpha, beta, tc0);
-     if ((tc0[2] & tc0[3]) >= 0)
-         ff_deblock_v8_luma_8_mmx2(pix + 8, stride, alpha, beta, tc0 + 2);
- }
--
- LF_IFUNC(v8, luma_intra, 8, mmx2)
--static void ff_deblock_v_luma_intra_8_mmx2(uint8_t *pix, int stride,
--                                           int alpha, int beta)
-+static void ff_deblock_v_luma_intra_8_mmxext(uint8_t *pix, int stride,
-+                                             int alpha, int beta)
- {
-     ff_deblock_v8_luma_intra_8_mmx2(pix + 0, stride, alpha, beta);
-     ff_deblock_v8_luma_intra_8_mmx2(pix + 8, stride, alpha, beta);
-@@ -246,9 +245,9 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
-                     c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmx2;
-                 }
- #if ARCH_X86_32
--                c->h264_v_loop_filter_luma       = ff_deblock_v_luma_8_mmx2;
-+                c->h264_v_loop_filter_luma       = ff_deblock_v_luma_8_mmxext;
-                 c->h264_h_loop_filter_luma       = ff_deblock_h_luma_8_mmx2;
--                c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmx2;
-+                c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmxext;
-                 c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmx2;
- #endif /* ARCH_X86_32 */
-                 c->weight_h264_pixels_tab[0] = ff_h264_weight_16_mmx2;
-diff --git a/libavcodec/x86/idct_mmx_xvid.c b/libavcodec/x86/idct_mmx_xvid.c
-index 08a627d..2cf8b47 100644
---- a/libavcodec/x86/idct_mmx_xvid.c
-+++ b/libavcodec/x86/idct_mmx_xvid.c
-@@ -512,7 +512,8 @@ __asm__ volatile(
- //-----------------------------------------------------------------------------
- 
- 
--void ff_idct_xvid_mmx2(short *block){
-+void ff_idct_xvid_mmxext(short *block)
-+{
- __asm__ volatile(
-             //# Process each row
-     DCT_8_INV_ROW_XMM(0*16(%0), 0*16(%0), 64*0(%2), 8*0(%1))
-@@ -542,15 +543,15 @@ void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, DCTELEM *block)
-     ff_add_pixels_clamped_mmx(block, dest, line_size);
- }
- 
--void ff_idct_xvid_mmx2_put(uint8_t *dest, int line_size, DCTELEM *block)
-+void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, DCTELEM *block)
- {
--    ff_idct_xvid_mmx2(block);
-+    ff_idct_xvid_mmxext(block);
-     ff_put_pixels_clamped_mmx(block, dest, line_size);
- }
- 
--void ff_idct_xvid_mmx2_add(uint8_t *dest, int line_size, DCTELEM *block)
-+void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, DCTELEM *block)
- {
--    ff_idct_xvid_mmx2(block);
-+    ff_idct_xvid_mmxext(block);
-     ff_add_pixels_clamped_mmx(block, dest, line_size);
- }
- 
-diff --git a/libavcodec/x86/idct_xvid.h b/libavcodec/x86/idct_xvid.h
-index 82fa990..79d5bf9 100644
---- a/libavcodec/x86/idct_xvid.h
-+++ b/libavcodec/x86/idct_xvid.h
-@@ -34,9 +34,9 @@ void ff_idct_xvid_mmx(short *block);
- void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, DCTELEM *block);
- void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, DCTELEM *block);
- 
--void ff_idct_xvid_mmx2(short *block);
--void ff_idct_xvid_mmx2_put(uint8_t *dest, int line_size, DCTELEM *block);
--void ff_idct_xvid_mmx2_add(uint8_t *dest, int line_size, DCTELEM *block);
-+void ff_idct_xvid_mmxext(short *block);
-+void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, DCTELEM *block);
-+void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, DCTELEM *block);
- 
- void ff_idct_xvid_sse2(short *block);
- void ff_idct_xvid_sse2_put(uint8_t *dest, int line_size, short *block);
-diff --git a/libavcodec/x86/motion_est.c b/libavcodec/x86/motion_est.c
-index 6eb44d4..0a0cab9 100644
---- a/libavcodec/x86/motion_est.c
-+++ b/libavcodec/x86/motion_est.c
-@@ -74,7 +74,8 @@ static inline void sad8_1_mmx(uint8_t *blk1, uint8_t *blk2, int stride, int h)
-     );
- }
- 
--static inline void sad8_1_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
-+static inline void sad8_1_mmxext(uint8_t *blk1, uint8_t *blk2,
-+                                 int stride, int h)
- {
-     __asm__ volatile(
-         ".p2align 4                     \n\t"
-@@ -120,7 +121,8 @@ static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h)
-     return ret;
- }
- 
--static inline void sad8_x2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
-+static inline void sad8_x2a_mmxext(uint8_t *blk1, uint8_t *blk2,
-+                                   int stride, int h)
- {
-     __asm__ volatile(
-         ".p2align 4                     \n\t"
-@@ -142,7 +144,8 @@ static inline void sad8_x2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h
-     );
- }
- 
--static inline void sad8_y2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
-+static inline void sad8_y2a_mmxext(uint8_t *blk1, uint8_t *blk2,
-+                                   int stride, int h)
- {
-     __asm__ volatile(
-         "movq (%1), %%mm0               \n\t"
-@@ -167,7 +170,8 @@ static inline void sad8_y2a_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h
-     );
- }
- 
--static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h)
-+static inline void sad8_4_mmxext(uint8_t *blk1, uint8_t *blk2,
-+                                 int stride, int h)
- {
-     __asm__ volatile(
-         "movq "MANGLE(bone)", %%mm5     \n\t"
-@@ -304,7 +308,7 @@ static inline int sum_mmx(void)
-     return ret&0xFFFF;
- }
- 
--static inline int sum_mmx2(void)
-+static inline int sum_mmxext(void)
- {
-     int ret;
-     __asm__ volatile(
-@@ -424,7 +428,7 @@ static int sad16_xy2_ ## suf(void *v, uint8_t *blk2, uint8_t *blk1, int stride,
- }\
- 
- PIX_SAD(mmx)
--PIX_SAD(mmx2)
-+PIX_SAD(mmxext)
- 
- #endif /* HAVE_INLINE_ASM */
- 
-@@ -447,19 +451,19 @@ void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
-         c->sad[1]= sad8_mmx;
-     }
-     if (mm_flags & AV_CPU_FLAG_MMXEXT) {
--        c->pix_abs[0][0] = sad16_mmx2;
--        c->pix_abs[1][0] = sad8_mmx2;
-+        c->pix_abs[0][0] = sad16_mmxext;
-+        c->pix_abs[1][0] = sad8_mmxext;
- 
--        c->sad[0]= sad16_mmx2;
--        c->sad[1]= sad8_mmx2;
-+        c->sad[0]        = sad16_mmxext;
-+        c->sad[1]        = sad8_mmxext;
- 
-         if(!(avctx->flags & CODEC_FLAG_BITEXACT)){
--            c->pix_abs[0][1] = sad16_x2_mmx2;
--            c->pix_abs[0][2] = sad16_y2_mmx2;
--            c->pix_abs[0][3] = sad16_xy2_mmx2;
--            c->pix_abs[1][1] = sad8_x2_mmx2;
--            c->pix_abs[1][2] = sad8_y2_mmx2;
--            c->pix_abs[1][3] = sad8_xy2_mmx2;
-+            c->pix_abs[0][1] = sad16_x2_mmxext;
-+            c->pix_abs[0][2] = sad16_y2_mmxext;
-+            c->pix_abs[0][3] = sad16_xy2_mmxext;
-+            c->pix_abs[1][1] = sad8_x2_mmxext;
-+            c->pix_abs[1][2] = sad8_y2_mmxext;
-+            c->pix_abs[1][3] = sad8_xy2_mmxext;
-         }
-     }
-     if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) {
-diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
-index 59e3580..8f7c2e4 100644
---- a/libavcodec/x86/mpegvideoenc.c
-+++ b/libavcodec/x86/mpegvideoenc.c
-@@ -47,8 +47,8 @@ extern uint16_t ff_inv_zigzag_direct16[64];
- #define COMPILE_TEMPLATE_SSSE3  0
- #undef RENAME
- #undef RENAMEl
--#define RENAME(a) a ## _MMX2
--#define RENAMEl(a) a ## _mmx2
-+#define RENAME(a) a ## _MMXEXT
-+#define RENAMEl(a) a ## _mmxext
- #include "mpegvideoenc_template.c"
- #endif /* HAVE_MMXEXT_INLINE */
- 
-@@ -92,7 +92,7 @@ void ff_MPV_encode_init_x86(MpegEncContext *s)
- #endif
- #if HAVE_MMXEXT_INLINE
-         if (INLINE_MMXEXT(mm_flags))
--            s->dct_quantize = dct_quantize_MMX2;
-+            s->dct_quantize = dct_quantize_MMXEXT;
- #endif
- #if HAVE_SSE2_INLINE
-         if (INLINE_SSE2(mm_flags))
-diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c
-index 6b1ae37..b02582f 100644
---- a/libavcodec/x86/vc1dsp_mmx.c
-+++ b/libavcodec/x86/vc1dsp_mmx.c
-@@ -467,7 +467,10 @@ VC1_MSPEL_MC(avg_)
- static void put_vc1_mspel_mc ## a ## b ## _mmx(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \
-      put_vc1_mspel_mc(dst, src, stride, a, b, rnd);                     \
- }\
--static void avg_vc1_mspel_mc ## a ## b ## _mmx2(uint8_t *dst, const uint8_t *src, int stride, int rnd) { \
-+static void avg_vc1_mspel_mc ## a ## b ## _mmxext(uint8_t *dst,         \
-+                                                  const uint8_t *src,   \
-+                                                  int stride, int rnd)  \
-+{                                                                       \
-      avg_vc1_mspel_mc(dst, src, stride, a, b, rnd);                     \
- }
- 
-@@ -490,7 +493,8 @@ DECLARE_FUNCTION(3, 1)
- DECLARE_FUNCTION(3, 2)
- DECLARE_FUNCTION(3, 3)
- 
--static void vc1_inv_trans_4x4_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *block)
-+static void vc1_inv_trans_4x4_dc_mmxext(uint8_t *dest, int linesize,
-+                                        DCTELEM *block)
- {
-     int dc = block[0];
-     dc = (17 * dc +  4) >> 3;
-@@ -528,7 +532,8 @@ static void vc1_inv_trans_4x4_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *bloc
-     );
- }
- 
--static void vc1_inv_trans_4x8_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *block)
-+static void vc1_inv_trans_4x8_dc_mmxext(uint8_t *dest, int linesize,
-+                                        DCTELEM *block)
- {
-     int dc = block[0];
-     dc = (17 * dc +  4) >> 3;
-@@ -589,7 +594,8 @@ static void vc1_inv_trans_4x8_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *bloc
-     );
- }
- 
--static void vc1_inv_trans_8x4_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *block)
-+static void vc1_inv_trans_8x4_dc_mmxext(uint8_t *dest, int linesize,
-+                                        DCTELEM *block)
- {
-     int dc = block[0];
-     dc = ( 3 * dc +  1) >> 1;
-@@ -627,7 +633,8 @@ static void vc1_inv_trans_8x4_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *bloc
-     );
- }
- 
--static void vc1_inv_trans_8x8_dc_mmx2(uint8_t *dest, int linesize, DCTELEM *block)
-+static void vc1_inv_trans_8x8_dc_mmxext(uint8_t *dest, int linesize,
-+                                        DCTELEM *block)
- {
-     int dc = block[0];
-     dc = (3 * dc +  1) >> 1;
-@@ -713,29 +720,29 @@ av_cold void ff_vc1dsp_init_mmx(VC1DSPContext *dsp)
- 
- av_cold void ff_vc1dsp_init_mmxext(VC1DSPContext *dsp)
- {
--        dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[12] = avg_vc1_mspel_mc03_mmx2;
--
--        dsp->avg_vc1_mspel_pixels_tab[ 1] = avg_vc1_mspel_mc10_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 5] = avg_vc1_mspel_mc11_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 9] = avg_vc1_mspel_mc12_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[13] = avg_vc1_mspel_mc13_mmx2;
--
--        dsp->avg_vc1_mspel_pixels_tab[ 2] = avg_vc1_mspel_mc20_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 6] = avg_vc1_mspel_mc21_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[10] = avg_vc1_mspel_mc22_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[14] = avg_vc1_mspel_mc23_mmx2;
--
--        dsp->avg_vc1_mspel_pixels_tab[ 3] = avg_vc1_mspel_mc30_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[ 7] = avg_vc1_mspel_mc31_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[11] = avg_vc1_mspel_mc32_mmx2;
--        dsp->avg_vc1_mspel_pixels_tab[15] = avg_vc1_mspel_mc33_mmx2;
--
--        dsp->vc1_inv_trans_8x8_dc = vc1_inv_trans_8x8_dc_mmx2;
--        dsp->vc1_inv_trans_4x8_dc = vc1_inv_trans_4x8_dc_mmx2;
--        dsp->vc1_inv_trans_8x4_dc = vc1_inv_trans_8x4_dc_mmx2;
--        dsp->vc1_inv_trans_4x4_dc = vc1_inv_trans_4x4_dc_mmx2;
-+        dsp->avg_vc1_mspel_pixels_tab[ 0] = ff_avg_vc1_mspel_mc00_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 4] = avg_vc1_mspel_mc01_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 8] = avg_vc1_mspel_mc02_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[12] = avg_vc1_mspel_mc03_mmxext;
-+
-+        dsp->avg_vc1_mspel_pixels_tab[ 1] = avg_vc1_mspel_mc10_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 5] = avg_vc1_mspel_mc11_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 9] = avg_vc1_mspel_mc12_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[13] = avg_vc1_mspel_mc13_mmxext;
-+
-+        dsp->avg_vc1_mspel_pixels_tab[ 2] = avg_vc1_mspel_mc20_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 6] = avg_vc1_mspel_mc21_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[10] = avg_vc1_mspel_mc22_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[14] = avg_vc1_mspel_mc23_mmxext;
-+
-+        dsp->avg_vc1_mspel_pixels_tab[ 3] = avg_vc1_mspel_mc30_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[ 7] = avg_vc1_mspel_mc31_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[11] = avg_vc1_mspel_mc32_mmxext;
-+        dsp->avg_vc1_mspel_pixels_tab[15] = avg_vc1_mspel_mc33_mmxext;
-+
-+        dsp->vc1_inv_trans_8x8_dc = vc1_inv_trans_8x8_dc_mmxext;
-+        dsp->vc1_inv_trans_4x8_dc = vc1_inv_trans_4x8_dc_mmxext;
-+        dsp->vc1_inv_trans_8x4_dc = vc1_inv_trans_8x4_dc_mmxext;
-+        dsp->vc1_inv_trans_4x4_dc = vc1_inv_trans_4x4_dc_mmxext;
- }
- #endif /* HAVE_INLINE_ASM */
-diff --git a/libavfilter/x86/gradfun.c b/libavfilter/x86/gradfun.c
-index 424a031..b4ca86c 100644
---- a/libavfilter/x86/gradfun.c
-+++ b/libavfilter/x86/gradfun.c
-@@ -30,7 +30,9 @@ DECLARE_ALIGNED(16, static const uint16_t, pw_7f)[8] = {0x7F,0x7F,0x7F,0x7F,0x7F
- DECLARE_ALIGNED(16, static const uint16_t, pw_ff)[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
- 
- #if HAVE_MMXEXT_INLINE
--static void gradfun_filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers)
-+static void gradfun_filter_line_mmxext(uint8_t *dst, uint8_t *src, uint16_t *dc,
-+                                       int width, int thresh,
-+                                       const uint16_t *dithers)
- {
-     intptr_t x;
-     if (width & 3) {
-@@ -175,7 +177,7 @@ av_cold void ff_gradfun_init_x86(GradFunContext *gf)
- 
- #if HAVE_MMXEXT_INLINE
-     if (cpu_flags & AV_CPU_FLAG_MMXEXT)
--        gf->filter_line = gradfun_filter_line_mmx2;
-+        gf->filter_line = gradfun_filter_line_mmxext;
- #endif
- #if HAVE_SSSE3_INLINE
-     if (cpu_flags & AV_CPU_FLAG_SSSE3)
-diff --git a/libavfilter/x86/yadif.c b/libavfilter/x86/yadif.c
-index f178b32..ab1d282 100644
---- a/libavfilter/x86/yadif.c
-+++ b/libavfilter/x86/yadif.c
-@@ -49,7 +49,7 @@ DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x000100010
- 
- #if HAVE_MMXEXT_INLINE
- #undef RENAME
--#define RENAME(a) a ## _mmx2
-+#define RENAME(a) a ## _mmxext
- #include "yadif_template.c"
- #endif
- 
-@@ -61,7 +61,7 @@ av_cold void ff_yadif_init_x86(YADIFContext *yadif)
- 
- #if HAVE_MMXEXT_INLINE
-     if (cpu_flags & AV_CPU_FLAG_MMXEXT)
--        yadif->filter_line = yadif_filter_line_mmx2;
-+        yadif->filter_line = yadif_filter_line_mmxext;
- #endif
- #if HAVE_SSE2_INLINE
-     if (cpu_flags & AV_CPU_FLAG_SSE2)
-diff --git a/libswscale/utils.c b/libswscale/utils.c
-index 64a3a58..e5e4d60 100644
---- a/libswscale/utils.c
-+++ b/libswscale/utils.c
-@@ -600,8 +600,9 @@ fail:
- }
- 
- #if HAVE_MMXEXT_INLINE
--static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode,
--                           int16_t *filter, int32_t *filterPos, int numSplits)
-+static int init_hscaler_mmxext(int dstW, int xInc, uint8_t *filterCode,
-+                               int16_t *filter, int32_t *filterPos,
-+                               int numSplits)
- {
-     uint8_t *fragmentA;
-     x86_reg imm8OfPShufW1A;
-@@ -1043,10 +1044,10 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
- #if HAVE_MMXEXT_INLINE
- // can't downscale !!!
-         if (c->canMMXEXTBeUsed && (flags & SWS_FAST_BILINEAR)) {
--            c->lumMmxextFilterCodeSize = initMMX2HScaler(dstW, c->lumXInc, NULL,
--                                                         NULL, NULL, 8);
--            c->chrMmxextFilterCodeSize = initMMX2HScaler(c->chrDstW, c->chrXInc,
--                                                         NULL, NULL, NULL, 4);
-+            c->lumMmxextFilterCodeSize = init_hscaler_mmxext(dstW, c->lumXInc, NULL,
-+                                                             NULL, NULL, 8);
-+            c->chrMmxextFilterCodeSize = init_hscaler_mmxext(c->chrDstW, c->chrXInc,
-+                                                             NULL, NULL, NULL, 4);
- 
- #if USE_MMAP
-             c->lumMmxextFilterCode = mmap(NULL, c->lumMmxextFilterCodeSize,
-@@ -1078,10 +1079,10 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
-             FF_ALLOCZ_OR_GOTO(c, c->hLumFilterPos, (dstW       / 2 / 8 + 8) * sizeof(int32_t), fail);
-             FF_ALLOCZ_OR_GOTO(c, c->hChrFilterPos, (c->chrDstW / 2 / 4 + 8) * sizeof(int32_t), fail);
- 
--            initMMX2HScaler(dstW, c->lumXInc, c->lumMmxextFilterCode,
--                            c->hLumFilter, c->hLumFilterPos, 8);
--            initMMX2HScaler(c->chrDstW, c->chrXInc, c->chrMmxextFilterCode,
--                            c->hChrFilter, c->hChrFilterPos, 4);
-+            init_hscaler_mmxext(dstW, c->lumXInc, c->lumMmxextFilterCode,
-+                                c->hLumFilter, c->hLumFilterPos, 8);
-+            init_hscaler_mmxext(c->chrDstW, c->chrXInc, c->chrMmxextFilterCode,
-+                                c->hChrFilter, c->hChrFilterPos, 4);
- 
- #if USE_MMAP
-             mprotect(c->lumMmxextFilterCode, c->lumMmxextFilterCodeSize, PROT_EXEC | PROT_READ);
-diff --git a/libswscale/x86/rgb2rgb.c b/libswscale/x86/rgb2rgb.c
-index 486f436..d4f2580 100644
---- a/libswscale/x86/rgb2rgb.c
-+++ b/libswscale/x86/rgb2rgb.c
-@@ -99,7 +99,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask)  = 0x0000001f0000001fULL;
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
- #define COMPILE_TEMPLATE_MMXEXT 1
--#define RENAME(a) a ## _MMX2
-+#define RENAME(a) a ## _MMXEXT
- #include "rgb2rgb_template.c"
- 
- //SSE2 versions
-@@ -139,7 +139,7 @@ av_cold void rgb2rgb_init_x86(void)
-     if (INLINE_AMD3DNOW(cpu_flags))
-         rgb2rgb_init_3DNOW();
-     if (INLINE_MMXEXT(cpu_flags))
--        rgb2rgb_init_MMX2();
-+        rgb2rgb_init_MMXEXT();
-     if (INLINE_SSE2(cpu_flags))
-         rgb2rgb_init_SSE2();
- #endif /* HAVE_INLINE_ASM */
-diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
-index fc74d97..571510a 100644
---- a/libswscale/x86/swscale.c
-+++ b/libswscale/x86/swscale.c
-@@ -83,7 +83,7 @@ DECLARE_ALIGNED(8, const uint64_t, ff_w1111)        = 0x0001000100010001ULL;
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
- #define COMPILE_TEMPLATE_MMXEXT 1
--#define RENAME(a) a ## _MMX2
-+#define RENAME(a) a ## _MMXEXT
- #include "swscale_template.c"
- #endif
- 
-@@ -311,7 +311,7 @@ av_cold void ff_sws_init_swScale_mmx(SwsContext *c)
-         sws_init_swScale_MMX(c);
- #if HAVE_MMXEXT_INLINE
-     if (cpu_flags & AV_CPU_FLAG_MMXEXT)
--        sws_init_swScale_MMX2(c);
-+        sws_init_swScale_MMXEXT(c);
- #endif
- #endif /* HAVE_INLINE_ASM */
- 
-diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
-index 17ac3e2..419d513 100644
---- a/libswscale/x86/yuv2rgb.c
-+++ b/libswscale/x86/yuv2rgb.c
-@@ -63,7 +63,7 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
- #undef RENAME
- #undef COMPILE_TEMPLATE_MMXEXT
- #define COMPILE_TEMPLATE_MMXEXT 1
--#define RENAME(a) a ## _MMX2
-+#define RENAME(a) a ## _MMXEXT
- #include "yuv2rgb_template.c"
- #endif /* HAVE_MMXEXT_INLINE */
- 
-@@ -81,8 +81,10 @@ av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
- #if HAVE_MMXEXT_INLINE
-     if (cpu_flags & AV_CPU_FLAG_MMXEXT) {
-         switch (c->dstFormat) {
--        case AV_PIX_FMT_RGB24:  return yuv420_rgb24_MMX2;
--        case AV_PIX_FMT_BGR24:  return yuv420_bgr24_MMX2;
-+        case AV_PIX_FMT_RGB24:
-+            return yuv420_rgb24_MMXEXT;
-+        case AV_PIX_FMT_BGR24:
-+            return yuv420_bgr24_MMXEXT;
-         }
-     }
- #endif
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0101-x86-h264_chromamc_10bit-drop-pointless-PAVG-define.patch b/debian/patches/post-9beta2/0101-x86-h264_chromamc_10bit-drop-pointless-PAVG-define.patch
deleted file mode 100644
index eff8bfe..0000000
--- a/debian/patches/post-9beta2/0101-x86-h264_chromamc_10bit-drop-pointless-PAVG-define.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fa8fcab1e0d31074c0644c4ac5194474c6c26415 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 27 Jul 2012 13:43:33 +0200
-Subject: [PATCH 101/278] x86: h264_chromamc_10bit: drop pointless PAVG
- %define
-
-It is only used in one place so there is no need for the abstraction.
----
- libavcodec/x86/h264_chromamc_10bit.asm |    3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
-index 4481efe..d24308d 100644
---- a/libavcodec/x86/h264_chromamc_10bit.asm
-+++ b/libavcodec/x86/h264_chromamc_10bit.asm
-@@ -245,7 +245,7 @@ cglobal %1_h264_chroma_mc2_10, 6,7
- %if %0==3
-     movq          %2, %3
- %endif
--    PAVG          %1, %2
-+    pavgw         %1, %2
- %endmacro
- 
- %define CHROMAMC_AVG  NOTHING
-@@ -260,7 +260,6 @@ CHROMA_MC4 put
- CHROMA_MC2 put
- 
- %define CHROMAMC_AVG  AVG
--%define PAVG          pavgw
- INIT_XMM sse2
- CHROMA_MC8 avg
- %if HAVE_AVX_EXTERNAL
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0102-x86-Move-optimization-suffix-to-end-of-function-name.patch b/debian/patches/post-9beta2/0102-x86-Move-optimization-suffix-to-end-of-function-name.patch
deleted file mode 100644
index d17e18d..0000000
--- a/debian/patches/post-9beta2/0102-x86-Move-optimization-suffix-to-end-of-function-name.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From c37322e68c528717930575ed55fc0e819a8ee215 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 27 Jul 2012 14:09:52 +0200
-Subject: [PATCH 102/278] x86: Move optimization suffix to end of function
- names
-
-This simplifies cpuflags porting.
----
- libavcodec/x86/dsputil_mmx.c     |   20 ++++++++++----------
- libavcodec/x86/h264_chromamc.asm |   20 ++++++++++----------
- libavcodec/x86/vc1dsp_init.c     |   20 ++++++++++----------
- 3 files changed, 30 insertions(+), 30 deletions(-)
-
-diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
-index d23279b..74559f4 100644
---- a/libavcodec/x86/dsputil_mmx.c
-+++ b/libavcodec/x86/dsputil_mmx.c
-@@ -2043,11 +2043,11 @@ PREFETCH(prefetch_3dnow, prefetch)
- 
- #include "h264_qpel.c"
- 
--void ff_put_h264_chroma_mc8_mmx_rnd  (uint8_t *dst, uint8_t *src,
-+void ff_put_h264_chroma_mc8_rnd_mmx  (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
--void ff_avg_h264_chroma_mc8_mmx2_rnd (uint8_t *dst, uint8_t *src,
-+void ff_avg_h264_chroma_mc8_rnd_mmx2 (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
--void ff_avg_h264_chroma_mc8_3dnow_rnd(uint8_t *dst, uint8_t *src,
-+void ff_avg_h264_chroma_mc8_rnd_3dnow(uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
- void ff_put_h264_chroma_mc4_mmx      (uint8_t *dst, uint8_t *src,
-@@ -2062,12 +2062,12 @@ void ff_put_h264_chroma_mc2_mmx2     (uint8_t *dst, uint8_t *src,
- void ff_avg_h264_chroma_mc2_mmx2     (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
--void ff_put_h264_chroma_mc8_ssse3_rnd(uint8_t *dst, uint8_t *src,
-+void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- void ff_put_h264_chroma_mc4_ssse3    (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
--void ff_avg_h264_chroma_mc8_ssse3_rnd(uint8_t *dst, uint8_t *src,
-+void ff_avg_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- void ff_avg_h264_chroma_mc4_ssse3    (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
-@@ -2447,7 +2447,7 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
- #endif
- 
-     if (!high_bit_depth && CONFIG_H264CHROMA) {
--        c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_mmx_rnd;
-+        c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_mmx;
-         c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_mmx;
-     }
- 
-@@ -2548,7 +2548,7 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
- 
- #if HAVE_YASM
-     if (!high_bit_depth && CONFIG_H264CHROMA) {
--        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_mmx2_rnd;
-+        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmx2;
-         c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmx2;
-         c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmx2;
-         c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmx2;
-@@ -2643,7 +2643,7 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
- 
- #if HAVE_YASM
-     if (!high_bit_depth && CONFIG_H264CHROMA) {
--        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_3dnow_rnd;
-+        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_3dnow;
-         c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_3dnow;
-     }
- #endif /* HAVE_YASM */
-@@ -2796,8 +2796,8 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
-         H264_QPEL_FUNCS_10(3, 0, ssse3_cache64);
-     }
-     if (!high_bit_depth && CONFIG_H264CHROMA) {
--        c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_ssse3_rnd;
--        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_ssse3_rnd;
-+        c->put_h264_chroma_pixels_tab[0] = ff_put_h264_chroma_mc8_rnd_ssse3;
-+        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_ssse3;
-         c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_ssse3;
-         c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_ssse3;
-     }
-diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
-index e3aff0b..dc427d7 100644
---- a/libavcodec/x86/h264_chromamc.asm
-+++ b/libavcodec/x86/h264_chromamc.asm
-@@ -437,8 +437,8 @@ cglobal %1_%2_chroma_mc2_%3, 6, 7, 0
- INIT_MMX
- %define CHROMAMC_AVG  NOTHING
- %define CHROMAMC_AVG4 NOTHING
--chroma_mc8_mmx_func put, h264, mmx_rnd
--chroma_mc8_mmx_func put, vc1,  mmx_nornd
-+chroma_mc8_mmx_func put, h264, rnd_mmx
-+chroma_mc8_mmx_func put, vc1,  nornd_mmx
- chroma_mc8_mmx_func put, rv40, mmx
- chroma_mc4_mmx_func put, h264, mmx
- chroma_mc4_mmx_func put, rv40, mmx
-@@ -447,16 +447,16 @@ chroma_mc2_mmx_func put, h264, mmx2
- %define CHROMAMC_AVG  DIRECT_AVG
- %define CHROMAMC_AVG4 COPY_AVG
- %define PAVG          pavgb
--chroma_mc8_mmx_func avg, h264, mmx2_rnd
--chroma_mc8_mmx_func avg, vc1,  mmx2_nornd
-+chroma_mc8_mmx_func avg, h264, rnd_mmx2
-+chroma_mc8_mmx_func avg, vc1,  nornd_mmx2
- chroma_mc8_mmx_func avg, rv40, mmx2
- chroma_mc4_mmx_func avg, h264, mmx2
- chroma_mc4_mmx_func avg, rv40, mmx2
- chroma_mc2_mmx_func avg, h264, mmx2
- 
- %define PAVG          pavgusb
--chroma_mc8_mmx_func avg, h264, 3dnow_rnd
--chroma_mc8_mmx_func avg, vc1,  3dnow_nornd
-+chroma_mc8_mmx_func avg, h264, rnd_3dnow
-+chroma_mc8_mmx_func avg, vc1,  nornd_3dnow
- chroma_mc8_mmx_func avg, rv40, 3dnow
- chroma_mc4_mmx_func avg, h264, 3dnow
- chroma_mc4_mmx_func avg, rv40, 3dnow
-@@ -664,15 +664,15 @@ cglobal %1_%2_chroma_mc4_%3, 6, 7, 0
- 
- %define CHROMAMC_AVG NOTHING
- INIT_XMM
--chroma_mc8_ssse3_func put, h264, ssse3_rnd
--chroma_mc8_ssse3_func put, vc1,  ssse3_nornd
-+chroma_mc8_ssse3_func put, h264, rnd_ssse3
-+chroma_mc8_ssse3_func put, vc1,  nornd_ssse3
- INIT_MMX
- chroma_mc4_ssse3_func put, h264, ssse3
- 
- %define CHROMAMC_AVG DIRECT_AVG
- %define PAVG         pavgb
- INIT_XMM
--chroma_mc8_ssse3_func avg, h264, ssse3_rnd
--chroma_mc8_ssse3_func avg, vc1,  ssse3_nornd
-+chroma_mc8_ssse3_func avg, h264, rnd_ssse3
-+chroma_mc8_ssse3_func avg, vc1,  nornd_ssse3
- INIT_MMX
- chroma_mc4_ssse3_func avg, h264, ssse3
-diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c
-index d2548fc..6d868e8 100644
---- a/libavcodec/x86/vc1dsp_init.c
-+++ b/libavcodec/x86/vc1dsp_init.c
-@@ -62,15 +62,15 @@ static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq)
- }
- #endif /* HAVE_YASM */
- 
--void ff_put_vc1_chroma_mc8_mmx_nornd  (uint8_t *dst, uint8_t *src,
-+void ff_put_vc1_chroma_mc8_nornd_mmx  (uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
--void ff_avg_vc1_chroma_mc8_mmx2_nornd (uint8_t *dst, uint8_t *src,
-+void ff_avg_vc1_chroma_mc8_nornd_mmx2 (uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
--void ff_avg_vc1_chroma_mc8_3dnow_nornd(uint8_t *dst, uint8_t *src,
-+void ff_avg_vc1_chroma_mc8_nornd_3dnow(uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
--void ff_put_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
-+void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
--void ff_avg_vc1_chroma_mc8_ssse3_nornd(uint8_t *dst, uint8_t *src,
-+void ff_avg_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
- 
- 
-@@ -94,14 +94,14 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
- 
- #if HAVE_YASM
-     if (mm_flags & AV_CPU_FLAG_MMX) {
--        dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_mmx_nornd;
-+        dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_mmx;
-     }
- 
-     if (mm_flags & AV_CPU_FLAG_MMXEXT) {
-         ASSIGN_LF(mmx2);
--        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_mmx2_nornd;
-+        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmx2;
-     } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
--        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_3dnow_nornd;
-+        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow;
-     }
- 
-     if (mm_flags & AV_CPU_FLAG_SSE2) {
-@@ -112,8 +112,8 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
-     }
-     if (mm_flags & AV_CPU_FLAG_SSSE3) {
-         ASSIGN_LF(ssse3);
--        dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= ff_put_vc1_chroma_mc8_ssse3_nornd;
--        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= ff_avg_vc1_chroma_mc8_ssse3_nornd;
-+        dsp->put_no_rnd_vc1_chroma_pixels_tab[0] = ff_put_vc1_chroma_mc8_nornd_ssse3;
-+        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_ssse3;
-     }
-     if (mm_flags & AV_CPU_FLAG_SSE4) {
-         dsp->vc1_h_loop_filter8  = ff_vc1_h_loop_filter8_sse4;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0103-avconv_opt-cmdutils-Add-missing-function-parameter-D.patch b/debian/patches/post-9beta2/0103-avconv_opt-cmdutils-Add-missing-function-parameter-D.patch
deleted file mode 100644
index b08ae32..0000000
--- a/debian/patches/post-9beta2/0103-avconv_opt-cmdutils-Add-missing-function-parameter-D.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 02e4275180866acc0f42281d1c5ef5a46552da84 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Wed, 24 Oct 2012 19:20:13 +0200
-Subject: [PATCH 103/278] avconv_opt, cmdutils: Add missing function parameter
- Doxygen
-
----
- avconv_opt.c |    1 +
- cmdutils.h   |    8 ++++++++
- 2 files changed, 9 insertions(+)
-
-diff --git a/avconv_opt.c b/avconv_opt.c
-index 0eb601b..ffb6c65 100644
---- a/avconv_opt.c
-+++ b/avconv_opt.c
-@@ -276,6 +276,7 @@ static int opt_attach(void *optctx, const char *opt, const char *arg)
- 
- /**
-  * Parse a metadata specifier passed as 'arg' parameter.
-+ * @param arg  metadata string to parse
-  * @param type metadata type is written here -- g(lobal)/s(tream)/c(hapter)/p(rogram)
-  * @param index for type c/p, chapter/program index is written here
-  * @param stream_spec for type s, the stream specifier is written here
-diff --git a/cmdutils.h b/cmdutils.h
-index dd86235..4cb5b83 100644
---- a/cmdutils.h
-+++ b/cmdutils.h
-@@ -186,6 +186,8 @@ int show_help(void *optctx, const char *opt, const char *arg);
-  * Parse the command line arguments.
-  *
-  * @param optctx an opaque options context
-+ * @param argc   number of command line arguments
-+ * @param argv   values of command line arguments
-  * @param options Array with the definitions required to interpret every
-  * option of the form: -option_name [argument]
-  * @param parse_arg_function Name of the function called to process every
-@@ -231,6 +233,8 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
-  * Create a new options dictionary containing only the options from
-  * opts which apply to the codec with ID codec_id.
-  *
-+ * @param opts     dictionary to place options in
-+ * @param codec_id ID of the codec that should be filtered for
-  * @param s Corresponding format context.
-  * @param st A stream from s for which the options should be filtered.
-  * @param codec The particular codec for which the options should be filtered.
-@@ -349,6 +353,7 @@ int read_yesno(void);
-  * Read the file with name filename, and put its content in a newly
-  * allocated 0-terminated buffer.
-  *
-+ * @param filename file to read from
-  * @param bufptr location where pointer to buffer is returned
-  * @param size   location where size of buffer is returned
-  * @return 0 in case of success, a negative value corresponding to an
-@@ -373,6 +378,7 @@ void init_pts_correction(PtsCorrectionContext *ctx);
-  * which might have incorrect times. Input timestamps may wrap around, in
-  * which case the output will as well.
-  *
-+ * @param ctx the PtsCorrectionContext carrying stream pts information
-  * @param pts the pts field of the decoded AVPacket, as passed through
-  * AVCodecContext.reordered_opaque
-  * @param dts the dts field of the decoded AVPacket
-@@ -404,8 +410,10 @@ FILE *get_preset_file(char *filename, size_t filename_size,
-  * Realloc array to hold new_size elements of elem_size.
-  * Calls exit() on failure.
-  *
-+ * @param array array to reallocate
-  * @param elem_size size in bytes of each element
-  * @param size new element count will be written here
-+ * @param new_size number of elements to place in reallocated array
-  * @return reallocated array
-  */
- void *grow_array(void *array, int elem_size, int *size, int new_size);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0104-fate-add-ac3-eac3-tests-to-FATE_SAMPLES_AVCONV.patch b/debian/patches/post-9beta2/0104-fate-add-ac3-eac3-tests-to-FATE_SAMPLES_AVCONV.patch
deleted file mode 100644
index 7e321fa..0000000
--- a/debian/patches/post-9beta2/0104-fate-add-ac3-eac3-tests-to-FATE_SAMPLES_AVCONV.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 6b07830a77729fe25c30026feabd53e8c4c5eb9e Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Wed, 31 Oct 2012 19:56:02 +0100
-Subject: [PATCH 104/278] fate: add ac3/eac3 tests to FATE_SAMPLES_AVCONV
-
-Fixes typo in 2cbdd7c92958cb8226491d8eb23ed2d57d4b841e.
----
- tests/fate/ac3.mak |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak
-index 59d0780..46e7a38 100644
---- a/tests/fate/ac3.mak
-+++ b/tests/fate/ac3.mak
-@@ -71,6 +71,6 @@ fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -b 128k -f ac3 -flags bi
- fate-ac3-fixed-encode: CMP = oneline
- fate-ac3-fixed-encode: REF = a1d1fc116463b771abf5aef7ed37d7b1
- 
--FATE_SAMPLES_AVCONV- += $(FATE_AC3-yes) $(FATE_EAC3-yes)
-+FATE_SAMPLES_AVCONV += $(FATE_AC3-yes) $(FATE_EAC3-yes)
- 
- fate-ac3: $(FATE_AC3-yes) $(FATE_EAC3-yes)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0105-lavc-move-SANE_NB_CHANNELS-to-internal.h-and-use-it-.patch b/debian/patches/post-9beta2/0105-lavc-move-SANE_NB_CHANNELS-to-internal.h-and-use-it-.patch
deleted file mode 100644
index fa3e6f6..0000000
--- a/debian/patches/post-9beta2/0105-lavc-move-SANE_NB_CHANNELS-to-internal.h-and-use-it-.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From bb6941af2afd057c3897afb78d034de2c355b8a0 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 13:40:10 -0400
-Subject: [PATCH 105/278] lavc: move SANE_NB_CHANNELS to internal.h and use it
- in the PCM decoders
-
----
- libavcodec/internal.h |    2 ++
- libavcodec/pcm.c      |    6 ++----
- libavcodec/utils.c    |    3 +--
- 3 files changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/internal.h b/libavcodec/internal.h
-index e5b1958..231d4b6 100644
---- a/libavcodec/internal.h
-+++ b/libavcodec/internal.h
-@@ -30,6 +30,8 @@
- #include "libavutil/pixfmt.h"
- #include "avcodec.h"
- 
-+#define FF_SANE_NB_CHANNELS 128U
-+
- typedef struct InternalBuffer {
-     uint8_t *base[AV_NUM_DATA_POINTERS];
-     uint8_t *data[AV_NUM_DATA_POINTERS];
-diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
-index 1f8f22d..832cb43 100644
---- a/libavcodec/pcm.c
-+++ b/libavcodec/pcm.c
-@@ -31,8 +31,6 @@
- #include "mathops.h"
- #include "pcm_tablegen.h"
- 
--#define MAX_CHANNELS 64
--
- static av_cold int pcm_encode_init(AVCodecContext *avctx)
- {
-     avctx->frame_size = 0;
-@@ -210,7 +208,7 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx)
-     PCMDecode *s = avctx->priv_data;
-     int i;
- 
--    if (avctx->channels <= 0 || avctx->channels > MAX_CHANNELS) {
-+    if (avctx->channels <= 0) {
-         av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n");
-         return AVERROR(EINVAL);
-     }
-@@ -340,7 +338,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
-         break;
-     case AV_CODEC_ID_PCM_S16LE_PLANAR:
-     {
--        const uint8_t *src2[MAX_CHANNELS];
-+        const uint8_t *src2[FF_SANE_NB_CHANNELS];
-         n /= avctx->channels;
-         for (c = 0; c < avctx->channels; c++)
-             src2[c] = &src[c * n * 2];
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 8daacbe..b4e7ed6 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -758,8 +758,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
-     if (av_codec_is_decoder(codec))
-         av_freep(&avctx->subtitle_header);
- 
--#define SANE_NB_CHANNELS 128U
--    if (avctx->channels > SANE_NB_CHANNELS) {
-+    if (avctx->channels > FF_SANE_NB_CHANNELS) {
-         ret = AVERROR(EINVAL);
-         goto free_and_end;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0106-lavc-check-channel-count-after-decoder-init.patch b/debian/patches/post-9beta2/0106-lavc-check-channel-count-after-decoder-init.patch
deleted file mode 100644
index c33e75f..0000000
--- a/debian/patches/post-9beta2/0106-lavc-check-channel-count-after-decoder-init.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0366664ef9af85ee052925f9a1a853d14d2f47a7 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 00:56:00 -0400
-Subject: [PATCH 106/278] lavc: check channel count after decoder init
-
-Ensures the decoder did not set channel count to an insanely high value
-during initialization, which could cause large memory usage when it tries to
-get a buffer during decoding.
----
- libavcodec/utils.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index b4e7ed6..58dfe97 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -881,6 +881,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
-                 avctx->channel_layout = 0;
-             }
-         }
-+        if (avctx->channels && avctx->channels < 0 ||
-+            avctx->channels > FF_SANE_NB_CHANNELS) {
-+            ret = AVERROR(EINVAL);
-+            goto free_and_end;
-+        }
-     }
- end:
-     entangled_thread_counter--;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0107-dca_parser-allow-the-parser-to-change-the-sample-rat.patch b/debian/patches/post-9beta2/0107-dca_parser-allow-the-parser-to-change-the-sample-rat.patch
deleted file mode 100644
index 5158008..0000000
--- a/debian/patches/post-9beta2/0107-dca_parser-allow-the-parser-to-change-the-sample-rat.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From a4202003b21ee88c82eec909a0ad086b4c328903 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 7 Oct 2012 20:52:35 -0400
-Subject: [PATCH 107/278] dca_parser: allow the parser to change the sample
- rate
-
----
- libavcodec/dca_parser.c |    3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
-index 7e65d0b..ab235cf 100644
---- a/libavcodec/dca_parser.c
-+++ b/libavcodec/dca_parser.c
-@@ -192,8 +192,7 @@ static int dca_parse(AVCodecParserContext * s,
-     /* read the duration and sample rate from the frame header */
-     if (!dca_parse_params(buf, buf_size, &duration, &sample_rate)) {
-         s->duration = duration;
--        if (!avctx->sample_rate)
--            avctx->sample_rate = sample_rate;
-+        avctx->sample_rate = sample_rate;
-     } else
-         s->duration = 0;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0108-amrnbdec-set-channels-channel_layout-and-sample_rate.patch b/debian/patches/post-9beta2/0108-amrnbdec-set-channels-channel_layout-and-sample_rate.patch
deleted file mode 100644
index 2b14799..0000000
--- a/debian/patches/post-9beta2/0108-amrnbdec-set-channels-channel_layout-and-sample_rate.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b24a4449a5ae84fc73e12c47e35d19c06a8bfdf3 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 7 Oct 2012 21:17:45 -0400
-Subject: [PATCH 108/278] amrnbdec: set channels, channel_layout, and
- sample_rate
-
-Only mono 8kHz is supported.
----
- libavcodec/amrnbdec.c |   11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
-index 2cb06a6..2196645 100644
---- a/libavcodec/amrnbdec.c
-+++ b/libavcodec/amrnbdec.c
-@@ -43,6 +43,7 @@
- #include <string.h>
- #include <math.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "dsputil.h"
- #include "libavutil/common.h"
-@@ -154,7 +155,15 @@ static av_cold int amrnb_decode_init(AVCodecContext *avctx)
-     AMRContext *p = avctx->priv_data;
-     int i;
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-+    if (avctx->channels > 1) {
-+        av_log_missing_feature(avctx, "multi-channel AMR", 0);
-+        return AVERROR_PATCHWELCOME;
-+    }
-+
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_rate    = 8000;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
- 
-     // p->excitation always points to the same position in p->excitation_buf
-     p->excitation = &p->excitation_buf[PITCH_DELAY_MAX + LP_FILTER_ORDER + 1];
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0109-amrwbdec-set-channels-channel_layout-and-sample_rate.patch b/debian/patches/post-9beta2/0109-amrwbdec-set-channels-channel_layout-and-sample_rate.patch
deleted file mode 100644
index 32982e1..0000000
--- a/debian/patches/post-9beta2/0109-amrwbdec-set-channels-channel_layout-and-sample_rate.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ee0e9678e761e8a41cfffcb163de42967e5a1758 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 7 Oct 2012 21:19:28 -0400
-Subject: [PATCH 109/278] amrwbdec: set channels, channel_layout, and
- sample_rate
-
-Only mono 16kHz is supported.
----
- libavcodec/amrwbdec.c |   11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
-index c9c793f..9b0fe25 100644
---- a/libavcodec/amrwbdec.c
-+++ b/libavcodec/amrwbdec.c
-@@ -24,6 +24,7 @@
-  * AMR wideband decoder
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/common.h"
- #include "libavutil/lfg.h"
- 
-@@ -90,7 +91,15 @@ static av_cold int amrwb_decode_init(AVCodecContext *avctx)
-     AMRWBContext *ctx = avctx->priv_data;
-     int i;
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-+    if (avctx->channels > 1) {
-+        av_log_missing_feature(avctx, "multi-channel AMR", 0);
-+        return AVERROR_PATCHWELCOME;
-+    }
-+
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_rate    = 16000;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
- 
-     av_lfg_init(&ctx->prng, 1);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0110-g722dec-set-channel-layout-at-initialization-instead.patch b/debian/patches/post-9beta2/0110-g722dec-set-channel-layout-at-initialization-instead.patch
deleted file mode 100644
index dc78605..0000000
--- a/debian/patches/post-9beta2/0110-g722dec-set-channel-layout-at-initialization-instead.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From ec2694d25905c217e5815947cda896aa25398388 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 15 Oct 2012 16:40:44 -0400
-Subject: [PATCH 110/278] g722dec: set channel layout at initialization
- instead of validating it
-
----
- libavcodec/g722dec.c |    9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
-index ea06ce0..3364850 100644
---- a/libavcodec/g722dec.c
-+++ b/libavcodec/g722dec.c
-@@ -34,6 +34,7 @@
-  *       respectively of each byte are ignored.
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "g722.h"
-@@ -57,11 +58,9 @@ static av_cold int g722_decode_init(AVCodecContext * avctx)
- {
-     G722Context *c = avctx->priv_data;
- 
--    if (avctx->channels != 1) {
--        av_log(avctx, AV_LOG_ERROR, "Only mono tracks are allowed.\n");
--        return AVERROR_INVALIDDATA;
--    }
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     c->band[0].scale_factor = 8;
-     c->band[1].scale_factor = 2;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0111-dsicinaudio-set-channels-and-channel-layout.patch b/debian/patches/post-9beta2/0111-dsicinaudio-set-channels-and-channel-layout.patch
deleted file mode 100644
index 87bb407..0000000
--- a/debian/patches/post-9beta2/0111-dsicinaudio-set-channels-and-channel-layout.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4f56f9c48f40db7f84819fc923b79ddaac678ae7 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Wed, 17 Oct 2012 11:29:04 -0400
-Subject: [PATCH 111/278] dsicinaudio: set channels and channel layout
-
----
- libavcodec/dsicinav.c |   12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
-index 1492717..2dcbf74 100644
---- a/libavcodec/dsicinav.c
-+++ b/libavcodec/dsicinav.c
-@@ -24,6 +24,7 @@
-  * Delphine Software International CIN audio/video decoders
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "bytestream.h"
- #include "mathops.h"
-@@ -319,14 +320,11 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
- {
-     CinAudioContext *cin = avctx->priv_data;
- 
--    if (avctx->channels != 1) {
--        av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
--        return AVERROR_PATCHWELCOME;
--    }
--
-     cin->initial_decode_frame = 1;
--    cin->delta = 0;
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    cin->delta                = 0;
-+    avctx->sample_fmt         = AV_SAMPLE_FMT_S16;
-+    avctx->channels           = 1;
-+    avctx->channel_layout     = AV_CH_LAYOUT_MONO;
- 
-     avcodec_get_frame_defaults(&cin->frame);
-     avctx->coded_frame = &cin->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0112-atrac1-do-not-keep-a-copy-of-channel-count-in-the-pr.patch b/debian/patches/post-9beta2/0112-atrac1-do-not-keep-a-copy-of-channel-count-in-the-pr.patch
deleted file mode 100644
index 5634a88..0000000
--- a/debian/patches/post-9beta2/0112-atrac1-do-not-keep-a-copy-of-channel-count-in-the-pr.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From a38eadf7ed08293667c9f81780f7c081f278f19a Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Wed, 17 Oct 2012 11:45:49 -0400
-Subject: [PATCH 112/278] atrac1: do not keep a copy of channel count in the
- private context
-
----
- libavcodec/atrac1.c |    6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
-index 7e78c73..b746a54 100644
---- a/libavcodec/atrac1.c
-+++ b/libavcodec/atrac1.c
-@@ -80,7 +80,6 @@ typedef struct {
-     DECLARE_ALIGNED(32, float, high)[512];
-     float*              bands[3];
-     FFTContext          mdct_ctx[3];
--    int                 channels;
-     DSPContext          dsp;
- } AT1Ctx;
- 
-@@ -280,7 +279,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
-     GetBitContext gb;
- 
- 
--    if (buf_size < 212 * q->channels) {
-+    if (buf_size < 212 * avctx->channels) {
-         av_log(avctx, AV_LOG_ERROR, "Not enough data to decode!\n");
-         return AVERROR_INVALIDDATA;
-     }
-@@ -292,7 +291,7 @@ static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
-         return ret;
-     }
- 
--    for (ch = 0; ch < q->channels; ch++) {
-+    for (ch = 0; ch < avctx->channels; ch++) {
-         AT1SUCtx* su = &q->SUs[ch];
- 
-         init_get_bits(&gb, &buf[212 * ch], 212 * 8);
-@@ -343,7 +342,6 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
-                avctx->channels);
-         return AVERROR(EINVAL);
-     }
--    q->channels = avctx->channels;
- 
-     /* Init the mdct transforms */
-     if ((ret = ff_mdct_init(&q->mdct_ctx[0], 6, 1, -1.0/ (1 << 15))) ||
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0113-bmvaudio-set-channel-layout-at-init-rather-than-vali.patch b/debian/patches/post-9beta2/0113-bmvaudio-set-channel-layout-at-init-rather-than-vali.patch
deleted file mode 100644
index 35026cb..0000000
--- a/debian/patches/post-9beta2/0113-bmvaudio-set-channel-layout-at-init-rather-than-vali.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From a3145d0335b04d143c26832c91dcc7242c758206 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 13:48:50 -0400
-Subject: [PATCH 113/278] bmvaudio: set channel layout at init() rather than
- validating it
-
----
- libavcodec/bmv.c |   10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
-index 4611119..53781e7 100644
---- a/libavcodec/bmv.c
-+++ b/libavcodec/bmv.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "bytestream.h"
- 
-@@ -304,12 +305,9 @@ static av_cold int bmv_aud_decode_init(AVCodecContext *avctx)
- {
-     BMVAudioDecContext *c = avctx->priv_data;
- 
--    if (avctx->channels != 2) {
--        av_log(avctx, AV_LOG_INFO, "invalid number of channels\n");
--        return AVERROR(EINVAL);
--    }
--
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 2;
-+    avctx->channel_layout = AV_CH_LAYOUT_STEREO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     avcodec_get_frame_defaults(&c->frame);
-     avctx->coded_frame = &c->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0114-cook-use-AVCodecContext.channels-instead-of-keeping-.patch b/debian/patches/post-9beta2/0114-cook-use-AVCodecContext.channels-instead-of-keeping-.patch
deleted file mode 100644
index d76ef67..0000000
--- a/debian/patches/post-9beta2/0114-cook-use-AVCodecContext.channels-instead-of-keeping-.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 3509eee19c03c23a14c6f226e6cc90072f323025 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:24:04 -0400
-Subject: [PATCH 114/278] cook: use AVCodecContext.channels instead of keeping
- a private copy
-
----
- libavcodec/cook.c |   14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index a45bd80..8323bbe 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -126,7 +126,6 @@ typedef struct cook {
-     AVFrame             frame;
-     GetBitContext       gb;
-     /* stream data */
--    int                 nb_channels;
-     int                 bit_rate;
-     int                 sample_rate;
-     int                 num_vectors;
-@@ -1024,7 +1023,7 @@ static void dump_cook_context(COOKContext *q)
-         PRINT("js_vlc_bits", q->subpacket[0].js_vlc_bits);
-     }
-     av_log(q->avctx, AV_LOG_ERROR, "COOKContext\n");
--    PRINT("nb_channels", q->nb_channels);
-+    PRINT("nb_channels", q->avctx->channels);
-     PRINT("bit_rate", q->bit_rate);
-     PRINT("sample_rate", q->sample_rate);
-     PRINT("samples_per_channel", q->subpacket[0].samples_per_channel);
-@@ -1072,9 +1071,8 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
- 
-     /* Take data from the AVCodecContext (RM container). */
-     q->sample_rate = avctx->sample_rate;
--    q->nb_channels = avctx->channels;
-     q->bit_rate = avctx->bit_rate;
--    if (!q->nb_channels) {
-+    if (!avctx->channels) {
-         av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
-         return AVERROR_INVALIDDATA;
-     }
-@@ -1101,7 +1099,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-         }
- 
-         /* Initialize extradata related variables. */
--        q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame / q->nb_channels;
-+        q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame / avctx->channels;
-         q->subpacket[s].bits_per_subpacket = avctx->block_align * 8;
- 
-         /* Initialize default data states. */
-@@ -1116,21 +1114,21 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-         q->subpacket[s].joint_stereo = 0;
-         switch (q->subpacket[s].cookversion) {
-         case MONO:
--            if (q->nb_channels != 1) {
-+            if (avctx->channels != 1) {
-                 av_log_ask_for_sample(avctx, "Container channels != 1.\n");
-                 return AVERROR_PATCHWELCOME;
-             }
-             av_log(avctx, AV_LOG_DEBUG, "MONO\n");
-             break;
-         case STEREO:
--            if (q->nb_channels != 1) {
-+            if (avctx->channels != 1) {
-                 q->subpacket[s].bits_per_subpdiv = 1;
-                 q->subpacket[s].num_channels = 2;
-             }
-             av_log(avctx, AV_LOG_DEBUG, "STEREO\n");
-             break;
-         case JOINT_STEREO:
--            if (q->nb_channels != 2) {
-+            if (avctx->channels != 2) {
-                 av_log_ask_for_sample(avctx, "Container channels != 2.\n");
-                 return AVERROR_PATCHWELCOME;
-             }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0115-cook-remove-unneeded-COOKContext-variable-bit_rate.patch b/debian/patches/post-9beta2/0115-cook-remove-unneeded-COOKContext-variable-bit_rate.patch
deleted file mode 100644
index 1ff8e38..0000000
--- a/debian/patches/post-9beta2/0115-cook-remove-unneeded-COOKContext-variable-bit_rate.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8aa5b8c5c825a86449774f6023400b4775c25027 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:25:18 -0400
-Subject: [PATCH 115/278] cook: remove unneeded COOKContext variable, bit_rate
-
----
- libavcodec/cook.c |    4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 8323bbe..7467749 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -126,7 +126,6 @@ typedef struct cook {
-     AVFrame             frame;
-     GetBitContext       gb;
-     /* stream data */
--    int                 bit_rate;
-     int                 sample_rate;
-     int                 num_vectors;
-     int                 samples_per_channel;
-@@ -1024,7 +1023,7 @@ static void dump_cook_context(COOKContext *q)
-     }
-     av_log(q->avctx, AV_LOG_ERROR, "COOKContext\n");
-     PRINT("nb_channels", q->avctx->channels);
--    PRINT("bit_rate", q->bit_rate);
-+    PRINT("bit_rate", q->avctx->bit_rate);
-     PRINT("sample_rate", q->sample_rate);
-     PRINT("samples_per_channel", q->subpacket[0].samples_per_channel);
-     PRINT("samples_per_frame", q->subpacket[0].samples_per_frame);
-@@ -1071,7 +1070,6 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
- 
-     /* Take data from the AVCodecContext (RM container). */
-     q->sample_rate = avctx->sample_rate;
--    q->bit_rate = avctx->bit_rate;
-     if (!avctx->channels) {
-         av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
-         return AVERROR_INVALIDDATA;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0116-cook-remove-unneeded-COOKContext-variable-sample_rat.patch b/debian/patches/post-9beta2/0116-cook-remove-unneeded-COOKContext-variable-sample_rat.patch
deleted file mode 100644
index 3c61ae0..0000000
--- a/debian/patches/post-9beta2/0116-cook-remove-unneeded-COOKContext-variable-sample_rat.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 926e9d28f1a85898545706a26b27c24672c9c716 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:26:29 -0400
-Subject: [PATCH 116/278] cook: remove unneeded COOKContext variable,
- sample_rate
-
----
- libavcodec/cook.c |    4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 7467749..f6d2e66 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -126,7 +126,6 @@ typedef struct cook {
-     AVFrame             frame;
-     GetBitContext       gb;
-     /* stream data */
--    int                 sample_rate;
-     int                 num_vectors;
-     int                 samples_per_channel;
-     /* states */
-@@ -1024,7 +1023,7 @@ static void dump_cook_context(COOKContext *q)
-     av_log(q->avctx, AV_LOG_ERROR, "COOKContext\n");
-     PRINT("nb_channels", q->avctx->channels);
-     PRINT("bit_rate", q->avctx->bit_rate);
--    PRINT("sample_rate", q->sample_rate);
-+    PRINT("sample_rate", q->avctx->sample_rate);
-     PRINT("samples_per_channel", q->subpacket[0].samples_per_channel);
-     PRINT("samples_per_frame", q->subpacket[0].samples_per_frame);
-     PRINT("subbands", q->subpacket[0].subbands);
-@@ -1069,7 +1068,6 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-     av_log(avctx, AV_LOG_DEBUG, "codecdata_length=%d\n", avctx->extradata_size);
- 
-     /* Take data from the AVCodecContext (RM container). */
--    q->sample_rate = avctx->sample_rate;
-     if (!avctx->channels) {
-         av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
-         return AVERROR_INVALIDDATA;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0117-cook-reverse-a-condition-so-that-the-code-makes-more.patch b/debian/patches/post-9beta2/0117-cook-reverse-a-condition-so-that-the-code-makes-more.patch
deleted file mode 100644
index e480ac7..0000000
--- a/debian/patches/post-9beta2/0117-cook-reverse-a-condition-so-that-the-code-makes-more.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d21b2e4726822ec1c604e2b9010a1a2cc0d88aec Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:33:11 -0400
-Subject: [PATCH 117/278] cook: reverse a condition so that the code makes
- more sense
-
----
- libavcodec/cook.c |    5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index f6d2e66..211fe12 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -1244,9 +1244,8 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-     }
- 
-     /* Try to catch some obviously faulty streams, othervise it might be exploitable */
--    if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512)
--                || (q->samples_per_channel == 1024)) {
--    } else {
-+    if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&
-+        q->samples_per_channel != 1024) {
-         av_log_ask_for_sample(avctx,
-                               "unknown amount of samples_per_channel = %d\n",
-                               q->samples_per_channel);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0118-cook-use-av_get_channel_layout_nb_channels-instead-o.patch b/debian/patches/post-9beta2/0118-cook-use-av_get_channel_layout_nb_channels-instead-o.patch
deleted file mode 100644
index 9819eb1..0000000
--- a/debian/patches/post-9beta2/0118-cook-use-av_get_channel_layout_nb_channels-instead-o.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 7efbba2e3665285207bf769b8f0d712cedf1bfd9 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:36:38 -0400
-Subject: [PATCH 118/278] cook: use av_get_channel_layout_nb_channels()
- instead of cook_count_channels()
-
----
- libavcodec/cook.c |   12 +-----------
- 1 file changed, 1 insertion(+), 11 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 211fe12..1524719 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -1034,16 +1034,6 @@ static void dump_cook_context(COOKContext *q)
- }
- #endif
- 
--static av_cold int cook_count_channels(unsigned int mask)
--{
--    int i;
--    int channels = 0;
--    for (i = 0; i < 32; i++)
--        if (mask & (1 << i))
--            ++channels;
--    return channels;
--}
--
- /**
-  * Cook initialization
-  *
-@@ -1147,7 +1137,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-             if (extradata_size >= 4)
-                 channel_mask |= q->subpacket[s].channel_mask = bytestream_get_be32(&edata_ptr);
- 
--            if (cook_count_channels(q->subpacket[s].channel_mask) > 1) {
-+            if (av_get_channel_layout_nb_channels(q->subpacket[s].channel_mask) > 1) {
-                 q->subpacket[s].total_subbands = q->subpacket[s].subbands +
-                                                  q->subpacket[s].js_subband_start;
-                 q->subpacket[s].joint_stereo = 1;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0119-cook-move-samples_per_frame-from-COOKSubpacket-to-wh.patch b/debian/patches/post-9beta2/0119-cook-move-samples_per_frame-from-COOKSubpacket-to-wh.patch
deleted file mode 100644
index 5ecc650..0000000
--- a/debian/patches/post-9beta2/0119-cook-move-samples_per_frame-from-COOKSubpacket-to-wh.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 8f173ef019d7e8921ab2cb094718f14e8c016a59 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:43:02 -0400
-Subject: [PATCH 119/278] cook: move samples_per_frame from COOKSubpacket to
- where it is used
-
----
- libavcodec/cook.c |   11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 1524719..ed8eaf3 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -72,7 +72,6 @@ typedef struct {
-     int                 size;
-     int                 num_channels;
-     int                 cookversion;
--    int                 samples_per_frame;
-     int                 subbands;
-     int                 js_subband_start;
-     int                 js_vlc_bits;
-@@ -1025,7 +1024,6 @@ static void dump_cook_context(COOKContext *q)
-     PRINT("bit_rate", q->avctx->bit_rate);
-     PRINT("sample_rate", q->avctx->sample_rate);
-     PRINT("samples_per_channel", q->subpacket[0].samples_per_channel);
--    PRINT("samples_per_frame", q->subpacket[0].samples_per_frame);
-     PRINT("subbands", q->subpacket[0].subbands);
-     PRINT("js_subband_start", q->subpacket[0].js_subband_start);
-     PRINT("log2_numvector_size", q->subpacket[0].log2_numvector_size);
-@@ -1047,6 +1045,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-     int extradata_size = avctx->extradata_size;
-     int s = 0;
-     unsigned int channel_mask = 0;
-+    int samples_per_frame;
-     int ret;
-     q->avctx = avctx;
- 
-@@ -1073,7 +1072,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-            Swap to right endianness so we don't need to care later on. */
-         if (extradata_size >= 8) {
-             q->subpacket[s].cookversion = bytestream_get_be32(&edata_ptr);
--            q->subpacket[s].samples_per_frame = bytestream_get_be16(&edata_ptr);
-+            samples_per_frame           = bytestream_get_be16(&edata_ptr);
-             q->subpacket[s].subbands = bytestream_get_be16(&edata_ptr);
-             extradata_size -= 8;
-         }
-@@ -1085,7 +1084,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-         }
- 
-         /* Initialize extradata related variables. */
--        q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame / avctx->channels;
-+        q->subpacket[s].samples_per_channel = samples_per_frame / avctx->channels;
-         q->subpacket[s].bits_per_subpacket = avctx->block_align * 8;
- 
-         /* Initialize default data states. */
-@@ -1142,7 +1141,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-                                                  q->subpacket[s].js_subband_start;
-                 q->subpacket[s].joint_stereo = 1;
-                 q->subpacket[s].num_channels = 2;
--                q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame >> 1;
-+                q->subpacket[s].samples_per_channel = samples_per_frame >> 1;
- 
-                 if (q->subpacket[s].samples_per_channel > 256) {
-                     q->subpacket[s].log2_numvector_size = 6;
-@@ -1151,7 +1150,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
-                     q->subpacket[s].log2_numvector_size = 7;
-                 }
-             } else
--                q->subpacket[s].samples_per_channel = q->subpacket[s].samples_per_frame;
-+                q->subpacket[s].samples_per_channel = samples_per_frame;
- 
-             break;
-         default:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0120-cook-use-av_dlog-for-debug-logging-instead-of-av_log.patch b/debian/patches/post-9beta2/0120-cook-use-av_dlog-for-debug-logging-instead-of-av_log.patch
deleted file mode 100644
index 1aafdc1..0000000
--- a/debian/patches/post-9beta2/0120-cook-use-av_dlog-for-debug-logging-instead-of-av_log.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 93e27f86f161ca5ed811be3570289a4f972862dc Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 14:47:10 -0400
-Subject: [PATCH 120/278] cook: use av_dlog() for debug logging instead of
- av_log() with AV_LOG_ERROR
-
----
- libavcodec/cook.c |    8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index ed8eaf3..201b44c 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -1012,14 +1012,14 @@ static int cook_decode_frame(AVCodecContext *avctx, void *data,
- static void dump_cook_context(COOKContext *q)
- {
-     //int i=0;
--#define PRINT(a, b) av_log(q->avctx, AV_LOG_ERROR, " %s = %d\n", a, b);
--    av_log(q->avctx, AV_LOG_ERROR, "COOKextradata\n");
--    av_log(q->avctx, AV_LOG_ERROR, "cookversion=%x\n", q->subpacket[0].cookversion);
-+#define PRINT(a, b) av_dlog(q->avctx, " %s = %d\n", a, b);
-+    av_dlog(q->avctx, "COOKextradata\n");
-+    av_dlog(q->avctx, "cookversion=%x\n", q->subpacket[0].cookversion);
-     if (q->subpacket[0].cookversion > STEREO) {
-         PRINT("js_subband_start", q->subpacket[0].js_subband_start);
-         PRINT("js_vlc_bits", q->subpacket[0].js_vlc_bits);
-     }
--    av_log(q->avctx, AV_LOG_ERROR, "COOKContext\n");
-+    av_dlog(q->avctx, "COOKContext\n");
-     PRINT("nb_channels", q->avctx->channels);
-     PRINT("bit_rate", q->avctx->bit_rate);
-     PRINT("sample_rate", q->avctx->sample_rate);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0121-dcadec-allow-the-decoder-to-change-the-channel-layou.patch b/debian/patches/post-9beta2/0121-dcadec-allow-the-decoder-to-change-the-channel-layou.patch
deleted file mode 100644
index eee51c8..0000000
--- a/debian/patches/post-9beta2/0121-dcadec-allow-the-decoder-to-change-the-channel-layou.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 8ac0f6767bf63d3e6b308ee6648ff02598b81e03 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 15:12:36 -0400
-Subject: [PATCH 121/278] dcadec: allow the decoder to change the channel
- layout mid-stream
-
----
- libavcodec/dcadec.c |   18 +-----------------
- 1 file changed, 1 insertion(+), 17 deletions(-)
-
-diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
-index eb12eb2..026c572 100644
---- a/libavcodec/dcadec.c
-+++ b/libavcodec/dcadec.c
-@@ -317,7 +317,6 @@ typedef struct {
- 
-     /* Primary audio coding header */
-     int subframes;              ///< number of subframes
--    int is_channels_set;        ///< check for if the channel number is already set
-     int total_channels;         ///< number of channels including extensions
-     int prim_channels;          ///< number of primary audio channels
-     int subband_activity[DCA_PRIM_CHANNELS_MAX];    ///< subband activity count
-@@ -1831,22 +1830,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
-         av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n", s->amode);
-         return AVERROR_INVALIDDATA;
-     }
--
--
--    /* There is nothing that prevents a dts frame to change channel configuration
--       but Libav doesn't support that so only set the channels if it is previously
--       unset. Ideally during the first probe for channels the crc should be checked
--       and only set avctx->channels when the crc is ok. Right now the decoder could
--       set the channels based on a broken first frame.*/
--    if (s->is_channels_set == 0) {
--        s->is_channels_set = 1;
--        avctx->channels = channels;
--    }
--    if (avctx->channels != channels) {
--        av_log(avctx, AV_LOG_ERROR, "DCA decoder does not support number of "
--               "channels changing in stream. Skipping frame.\n");
--        return AVERROR_PATCHWELCOME;
--    }
-+    avctx->channels = channels;
- 
-     /* get output buffer */
-     s->frame.nb_samples = 256 * (s->sample_blocks / 8);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0122-flacdec-use-av_samples_-functions-for-sample-buffer-.patch b/debian/patches/post-9beta2/0122-flacdec-use-av_samples_-functions-for-sample-buffer-.patch
deleted file mode 100644
index 20891c5..0000000
--- a/debian/patches/post-9beta2/0122-flacdec-use-av_samples_-functions-for-sample-buffer-.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 268f8ba112570956f1d7be8f4f2f0bea86c61461 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 16:15:34 -0400
-Subject: [PATCH 122/278] flacdec: use av_samples_* functions for sample
- buffer allocation
-
-Also, return an error on allocation failure.
----
- libavcodec/flacdec.c |   43 +++++++++++++++++++++++++++++--------------
- 1 file changed, 29 insertions(+), 14 deletions(-)
-
-diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
-index a1fdc35..4ecf5f2 100644
---- a/libavcodec/flacdec.c
-+++ b/libavcodec/flacdec.c
-@@ -60,6 +60,8 @@ typedef struct FLACContext {
-     int got_streaminfo;                     ///< indicates if the STREAMINFO has been read
- 
-     int32_t *decoded[FLAC_MAX_CHANNELS];    ///< decoded samples
-+    uint8_t *decoded_buffer;
-+    unsigned int decoded_buffer_size;
- 
-     FLACDSPContext dsp;
- } FLACContext;
-@@ -73,7 +75,7 @@ static const int64_t flac_channel_layouts[6] = {
-     AV_CH_LAYOUT_5POINT1
- };
- 
--static void allocate_buffers(FLACContext *s);
-+static int allocate_buffers(FLACContext *s);
- 
- static void flac_set_bps(FLACContext *s)
- {
-@@ -101,6 +103,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
- {
-     enum FLACExtradataFormat format;
-     uint8_t *streaminfo;
-+    int ret;
-     FLACContext *s = avctx->priv_data;
-     s->avctx = avctx;
- 
-@@ -114,7 +117,9 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
- 
-     /* initialize based on the demuxer-supplied streamdata header */
-     avpriv_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo);
--    allocate_buffers(s);
-+    ret = allocate_buffers(s);
-+    if (ret < 0)
-+        return ret;
-     flac_set_bps(s);
-     ff_flacdsp_init(&s->dsp, avctx->sample_fmt, s->bps);
-     s->got_streaminfo = 1;
-@@ -137,15 +142,24 @@ static void dump_headers(AVCodecContext *avctx, FLACStreaminfo *s)
-     av_log(avctx, AV_LOG_DEBUG, "  Bits: %d\n", s->bps);
- }
- 
--static void allocate_buffers(FLACContext *s)
-+static int allocate_buffers(FLACContext *s)
- {
--    int i;
-+    int buf_size;
- 
-     assert(s->max_blocksize);
- 
--    for (i = 0; i < s->channels; i++) {
--        s->decoded[i] = av_malloc(sizeof(int32_t)*s->max_blocksize);
--    }
-+    buf_size = av_samples_get_buffer_size(NULL, s->channels, s->max_blocksize,
-+                                          AV_SAMPLE_FMT_S32P, 0);
-+    if (buf_size < 0)
-+        return buf_size;
-+
-+    av_fast_malloc(&s->decoded_buffer, &s->decoded_buffer_size, buf_size);
-+    if (!s->decoded_buffer)
-+        return AVERROR(ENOMEM);
-+
-+    return av_samples_fill_arrays((uint8_t **)s->decoded, NULL,
-+                                  s->decoded_buffer, s->channels,
-+                                  s->max_blocksize, AV_SAMPLE_FMT_S32P, 0);
- }
- 
- /**
-@@ -157,7 +171,7 @@ static void allocate_buffers(FLACContext *s)
-  */
- static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size)
- {
--    int metadata_type, metadata_size;
-+    int metadata_type, metadata_size, ret;
- 
-     if (buf_size < FLAC_STREAMINFO_SIZE+8) {
-         /* need more data */
-@@ -169,7 +183,9 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size)
-         return AVERROR_INVALIDDATA;
-     }
-     avpriv_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s, &buf[8]);
--    allocate_buffers(s);
-+    ret = allocate_buffers(s);
-+    if (ret < 0)
-+        return ret;
-     flac_set_bps(s);
-     ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
-     s->got_streaminfo = 1;
-@@ -462,7 +478,9 @@ static int decode_frame(FLACContext *s)
-     s->samplerate = s->avctx->sample_rate = fi.samplerate;
- 
-     if (!s->got_streaminfo) {
--        allocate_buffers(s);
-+        int ret = allocate_buffers(s);
-+        if (ret < 0)
-+            return ret;
-         ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
-         s->got_streaminfo = 1;
-         dump_headers(s->avctx, (FLACStreaminfo *)s);
-@@ -552,11 +570,8 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
- static av_cold int flac_decode_close(AVCodecContext *avctx)
- {
-     FLACContext *s = avctx->priv_data;
--    int i;
- 
--    for (i = 0; i < s->channels; i++) {
--        av_freep(&s->decoded[i]);
--    }
-+    av_freep(&s->decoded_buffer);
- 
-     return 0;
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0123-flacdec-allow-mid-stream-channel-layout-change.patch b/debian/patches/post-9beta2/0123-flacdec-allow-mid-stream-channel-layout-change.patch
deleted file mode 100644
index 3b18b0c..0000000
--- a/debian/patches/post-9beta2/0123-flacdec-allow-mid-stream-channel-layout-change.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 90fcac0e95b7d266c148a86506f301a2072d9de3 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 17:02:28 -0400
-Subject: [PATCH 123/278] flacdec: allow mid-stream channel layout change
-
-Although the libFLAC decoder cannot handle such a change, it is allowed by the
-spec and could potentially occur with live streams.
----
- libavcodec/flac.c        |   19 +++++++++++++++++++
- libavcodec/flac.h        |    3 +++
- libavcodec/flac_parser.c |    1 +
- libavcodec/flacdec.c     |   27 +++++++++------------------
- 4 files changed, 32 insertions(+), 18 deletions(-)
-
-diff --git a/libavcodec/flac.c b/libavcodec/flac.c
-index d624beb..07da702 100644
---- a/libavcodec/flac.c
-+++ b/libavcodec/flac.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/crc.h"
- #include "libavutil/log.h"
- #include "bytestream.h"
-@@ -28,6 +29,15 @@
- 
- static const int8_t sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 };
- 
-+static const int64_t flac_channel_layouts[6] = {
-+    AV_CH_LAYOUT_MONO,
-+    AV_CH_LAYOUT_STEREO,
-+    AV_CH_LAYOUT_SURROUND,
-+    AV_CH_LAYOUT_QUAD,
-+    AV_CH_LAYOUT_5POINT0,
-+    AV_CH_LAYOUT_5POINT1
-+};
-+
- static int64_t get_utf8(GetBitContext *gb)
- {
-     int64_t val;
-@@ -181,6 +191,14 @@ int avpriv_flac_is_extradata_valid(AVCodecContext *avctx,
-     return 1;
- }
- 
-+void ff_flac_set_channel_layout(AVCodecContext *avctx)
-+{
-+    if (avctx->channels <= FF_ARRAY_ELEMS(flac_channel_layouts))
-+        avctx->channel_layout = flac_channel_layouts[avctx->channels - 1];
-+    else
-+        avctx->channel_layout = 0;
-+}
-+
- void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
-                               const uint8_t *buffer)
- {
-@@ -205,6 +223,7 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
-     avctx->channels = s->channels;
-     avctx->sample_rate = s->samplerate;
-     avctx->bits_per_raw_sample = s->bps;
-+    ff_flac_set_channel_layout(avctx);
- 
-     s->samples  = get_bits_long(&gb, 32) << 4;
-     s->samples |= get_bits(&gb, 4);
-diff --git a/libavcodec/flac.h b/libavcodec/flac.h
-index 55bacea..63f41c2 100644
---- a/libavcodec/flac.h
-+++ b/libavcodec/flac.h
-@@ -137,4 +137,7 @@ int ff_flac_get_max_frame_size(int blocksize, int ch, int bps);
-  */
- int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
-                                 FLACFrameInfo *fi, int log_level_offset);
-+
-+void ff_flac_set_channel_layout(AVCodecContext *avctx);
-+
- #endif /* AVCODEC_FLAC_H */
-diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
-index 6c8c046..f0a37f3 100644
---- a/libavcodec/flac_parser.c
-+++ b/libavcodec/flac_parser.c
-@@ -459,6 +459,7 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
- 
-     fpc->avctx->sample_rate = header->fi.samplerate;
-     fpc->avctx->channels    = header->fi.channels;
-+    ff_flac_set_channel_layout(fpc->avctx);
-     fpc->pc->duration       = header->fi.blocksize;
-     *poutbuf = flac_fifo_read_wrap(fpc, header->offset, *poutbuf_size,
-                                         &fpc->wrap_buf,
-diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
-index 4ecf5f2..20af820 100644
---- a/libavcodec/flacdec.c
-+++ b/libavcodec/flacdec.c
-@@ -66,15 +66,6 @@ typedef struct FLACContext {
-     FLACDSPContext dsp;
- } FLACContext;
- 
--static const int64_t flac_channel_layouts[6] = {
--    AV_CH_LAYOUT_MONO,
--    AV_CH_LAYOUT_STEREO,
--    AV_CH_LAYOUT_SURROUND,
--    AV_CH_LAYOUT_QUAD,
--    AV_CH_LAYOUT_5POINT0,
--    AV_CH_LAYOUT_5POINT1
--};
--
- static int allocate_buffers(FLACContext *s);
- 
- static void flac_set_bps(FLACContext *s)
-@@ -127,9 +118,6 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
-     avcodec_get_frame_defaults(&s->frame);
-     avctx->coded_frame = &s->frame;
- 
--    if (avctx->channels <= FF_ARRAY_ELEMS(flac_channel_layouts))
--        avctx->channel_layout = flac_channel_layouts[avctx->channels - 1];
--
-     return 0;
- }
- 
-@@ -421,7 +409,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
- 
- static int decode_frame(FLACContext *s)
- {
--    int i;
-+    int i, ret;
-     GetBitContext *gb = &s->gb;
-     FLACFrameInfo fi;
- 
-@@ -430,12 +418,15 @@ static int decode_frame(FLACContext *s)
-         return -1;
-     }
- 
--    if (s->channels && fi.channels != s->channels) {
--        av_log(s->avctx, AV_LOG_ERROR, "switching channel layout mid-stream "
--                                       "is not supported\n");
--        return -1;
-+    if (s->channels && fi.channels != s->channels && s->got_streaminfo) {
-+        s->channels = s->avctx->channels = fi.channels;
-+        ff_flac_set_channel_layout(s->avctx);
-+        ret = allocate_buffers(s);
-+        if (ret < 0)
-+            return ret;
-     }
-     s->channels = s->avctx->channels = fi.channels;
-+    ff_flac_set_channel_layout(s->avctx);
-     s->ch_mode = fi.ch_mode;
- 
-     if (!s->bps && !fi.bps) {
-@@ -478,7 +469,7 @@ static int decode_frame(FLACContext *s)
-     s->samplerate = s->avctx->sample_rate = fi.samplerate;
- 
-     if (!s->got_streaminfo) {
--        int ret = allocate_buffers(s);
-+        ret = allocate_buffers(s);
-         if (ret < 0)
-             return ret;
-         ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0124-flacdec-do-not-warn-on-sample-rate-change.patch b/debian/patches/post-9beta2/0124-flacdec-do-not-warn-on-sample-rate-change.patch
deleted file mode 100644
index 4fe18c5..0000000
--- a/debian/patches/post-9beta2/0124-flacdec-do-not-warn-on-sample-rate-change.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 99d868635725e3b85a5c549e6bb0e97e10cf5248 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sun, 21 Oct 2012 17:04:58 -0400
-Subject: [PATCH 124/278] flacdec: do not warn on sample rate change
-
----
- libavcodec/flacdec.c |    6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
-index 20af820..10e33f2 100644
---- a/libavcodec/flacdec.c
-+++ b/libavcodec/flacdec.c
-@@ -460,12 +460,8 @@ static int decode_frame(FLACContext *s)
-                                         " or frame header\n");
-         return -1;
-     }
--    if (fi.samplerate == 0) {
-+    if (fi.samplerate == 0)
-         fi.samplerate = s->samplerate;
--    } else if (s->samplerate && fi.samplerate != s->samplerate) {
--        av_log(s->avctx, AV_LOG_WARNING, "sample rate changed from %d to %d\n",
--               s->samplerate, fi.samplerate);
--    }
-     s->samplerate = s->avctx->sample_rate = fi.samplerate;
- 
-     if (!s->got_streaminfo) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0125-g726dec-set-channel-layout-at-initialization-instead.patch b/debian/patches/post-9beta2/0125-g726dec-set-channel-layout-at-initialization-instead.patch
deleted file mode 100644
index 71a11ca..0000000
--- a/debian/patches/post-9beta2/0125-g726dec-set-channel-layout-at-initialization-instead.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e00eb03cd8bfb6993d33c30ccd560947b5f6bad5 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 13:26:14 -0400
-Subject: [PATCH 125/278] g726dec: set channel layout at initialization
- instead of validating it
-
----
- libavcodec/g726.c |    8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/g726.c b/libavcodec/g726.c
-index 7fa2be3..ed4bd26 100644
---- a/libavcodec/g726.c
-+++ b/libavcodec/g726.c
-@@ -22,6 +22,8 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- #include <limits.h>
-+
-+#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-@@ -428,10 +430,8 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
-         return AVERROR(EINVAL);
-     }
- 
--    if(avctx->channels != 1){
--        av_log(avctx, AV_LOG_ERROR, "Only mono is supported\n");
--        return AVERROR(EINVAL);
--    }
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
- 
-     c->code_size = avctx->bits_per_coded_sample;
-     if (c->code_size < 2 || c->code_size > 5) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0126-g726dec-do-not-validate-sample-rate.patch b/debian/patches/post-9beta2/0126-g726dec-do-not-validate-sample-rate.patch
deleted file mode 100644
index a8f924b..0000000
--- a/debian/patches/post-9beta2/0126-g726dec-do-not-validate-sample-rate.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a346aaf148dc2ce53da30e2f67223834495c0fd6 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 13:26:46 -0400
-Subject: [PATCH 126/278] g726dec: do not validate sample rate
-
-For decoding it does not really matter what the sample rate is.
----
- libavcodec/g726.c |    8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/libavcodec/g726.c b/libavcodec/g726.c
-index ed4bd26..91b5e54 100644
---- a/libavcodec/g726.c
-+++ b/libavcodec/g726.c
-@@ -422,14 +422,6 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
- {
-     G726Context* c = avctx->priv_data;
- 
--    if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT &&
--        avctx->sample_rate != 8000) {
--        av_log(avctx, AV_LOG_ERROR, "Only 8kHz sample rate is allowed when "
--               "the compliance level is strict. Reduce the compliance level "
--               "if you wish to decode the stream anyway.\n");
--        return AVERROR(EINVAL);
--    }
--
-     avctx->channels       = 1;
-     avctx->channel_layout = AV_CH_LAYOUT_MONO;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0127-libgsmdec-always-set-channel-layout-and-sample-rate-.patch b/debian/patches/post-9beta2/0127-libgsmdec-always-set-channel-layout-and-sample-rate-.patch
deleted file mode 100644
index 133fa48..0000000
--- a/debian/patches/post-9beta2/0127-libgsmdec-always-set-channel-layout-and-sample-rate-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From c5b8acad731c06389b98df8248b6a536e1b7e58d Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 15:43:59 -0400
-Subject: [PATCH 127/278] libgsmdec: always set channel layout and sample rate
- at initialization
-
-Only mono 8kHz is supported.
----
- libavcodec/libgsm.c |   18 +++++-------------
- 1 file changed, 5 insertions(+), 13 deletions(-)
-
-diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
-index e6d435b..afed710 100644
---- a/libavcodec/libgsm.c
-+++ b/libavcodec/libgsm.c
-@@ -29,6 +29,7 @@
- 
- #include <gsm/gsm.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "internal.h"
- #include "gsm.h"
-@@ -149,19 +150,10 @@ typedef struct LibGSMDecodeContext {
- static av_cold int libgsm_decode_init(AVCodecContext *avctx) {
-     LibGSMDecodeContext *s = avctx->priv_data;
- 
--    if (avctx->channels > 1) {
--        av_log(avctx, AV_LOG_ERROR, "Mono required for GSM, got %d channels\n",
--               avctx->channels);
--        return -1;
--    }
--
--    if (!avctx->channels)
--        avctx->channels = 1;
--
--    if (!avctx->sample_rate)
--        avctx->sample_rate = 8000;
--
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_rate    = 8000;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     s->state = gsm_create();
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0128-gsmdec-always-set-channel-layout-and-sample-rate-at-.patch b/debian/patches/post-9beta2/0128-gsmdec-always-set-channel-layout-and-sample-rate-at-.patch
deleted file mode 100644
index a26f015..0000000
--- a/debian/patches/post-9beta2/0128-gsmdec-always-set-channel-layout-and-sample-rate-at-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 32c7769e5c851ff7b47a83113b97a325dde7b442 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 15:45:38 -0400
-Subject: [PATCH 128/278] gsmdec: always set channel layout and sample rate at
- initialization
-
-Only mono 8kHz is supported.
----
- libavcodec/gsmdec.c |    9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
-index a5e0d7d..14b7e03 100644
---- a/libavcodec/gsmdec.c
-+++ b/libavcodec/gsmdec.c
-@@ -24,6 +24,7 @@
-  * GSM decoder
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "msgsmdec.h"
-@@ -34,10 +35,10 @@ static av_cold int gsm_init(AVCodecContext *avctx)
- {
-     GSMContext *s = avctx->priv_data;
- 
--    avctx->channels = 1;
--    if (!avctx->sample_rate)
--        avctx->sample_rate = 8000;
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_rate    = 8000;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     switch (avctx->codec_id) {
-     case AV_CODEC_ID_GSM:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0129-imc-set-channels-to-1-instead-of-validating-it.patch b/debian/patches/post-9beta2/0129-imc-set-channels-to-1-instead-of-validating-it.patch
deleted file mode 100644
index 0031465..0000000
--- a/debian/patches/post-9beta2/0129-imc-set-channels-to-1-instead-of-validating-it.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1c7a0161538a9e8417086759a5d6d3295337c433 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 15:54:29 -0400
-Subject: [PATCH 129/278] imc: set channels to 1 instead of validating it
-
----
- libavcodec/imc.c |    6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/imc.c b/libavcodec/imc.c
-index 1156e8a..4c2d01d 100644
---- a/libavcodec/imc.c
-+++ b/libavcodec/imc.c
-@@ -175,8 +175,10 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
-     IMCContext *q = avctx->priv_data;
-     double r1, r2;
- 
--    if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1)
--        || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) {
-+    if (avctx->codec_id == AV_CODEC_ID_IMC)
-+        avctx->channels = 1;
-+
-+    if (avctx->channels > 2) {
-         av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
-         return AVERROR_PATCHWELCOME;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0130-dpcm-use-AVCodecContext.channels-instead-of-keeping-.patch b/debian/patches/post-9beta2/0130-dpcm-use-AVCodecContext.channels-instead-of-keeping-.patch
deleted file mode 100644
index 9ab8230..0000000
--- a/debian/patches/post-9beta2/0130-dpcm-use-AVCodecContext.channels-instead-of-keeping-.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 0fd1ddf15545a7bac1e8d2622d070fdf4bad95d8 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 16:03:20 -0400
-Subject: [PATCH 130/278] dpcm: use AVCodecContext.channels instead of keeping
- a private copy
-
----
- libavcodec/dpcm.c |   14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
-index f9aff98..fb1c7ce 100644
---- a/libavcodec/dpcm.c
-+++ b/libavcodec/dpcm.c
-@@ -44,7 +44,6 @@
- 
- typedef struct DPCMContext {
-     AVFrame frame;
--    int channels;
-     int16_t roq_square_array[256];
-     int sample[2];                  ///< previous sample (for SOL_DPCM)
-     const int8_t *sol_table;        ///< delta table for SOL_DPCM
-@@ -123,7 +122,6 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
-         return AVERROR(EINVAL);
-     }
- 
--    s->channels = avctx->channels;
-     s->sample[0] = s->sample[1] = 0;
- 
-     switch(avctx->codec->id) {
-@@ -179,7 +177,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
-     int out = 0, ret;
-     int predictor[2];
-     int ch = 0;
--    int stereo = s->channels - 1;
-+    int stereo = avctx->channels - 1;
-     int16_t *output_samples, *samples_end;
-     GetByteContext gb;
- 
-@@ -193,10 +191,10 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
-         out = buf_size - 8;
-         break;
-     case AV_CODEC_ID_INTERPLAY_DPCM:
--        out = buf_size - 6 - s->channels;
-+        out = buf_size - 6 - avctx->channels;
-         break;
-     case AV_CODEC_ID_XAN_DPCM:
--        out = buf_size - 2 * s->channels;
-+        out = buf_size - 2 * avctx->channels;
-         break;
-     case AV_CODEC_ID_SOL_DPCM:
-         if (avctx->codec_tag != 3)
-@@ -211,7 +209,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
-     }
- 
-     /* get output buffer */
--    s->frame.nb_samples = out / s->channels;
-+    s->frame.nb_samples = out / avctx->channels;
-     if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
-         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
-         return ret;
-@@ -245,7 +243,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
-     case AV_CODEC_ID_INTERPLAY_DPCM:
-         bytestream2_skipu(&gb, 6);  /* skip over the stream mask and stream length */
- 
--        for (ch = 0; ch < s->channels; ch++) {
-+        for (ch = 0; ch < avctx->channels; ch++) {
-             predictor[ch] = sign_extend(bytestream2_get_le16u(&gb), 16);
-             *output_samples++ = predictor[ch];
-         }
-@@ -265,7 +263,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
-     {
-         int shift[2] = { 4, 4 };
- 
--        for (ch = 0; ch < s->channels; ch++)
-+        for (ch = 0; ch < avctx->channels; ch++)
-             predictor[ch] = sign_extend(bytestream2_get_le16u(&gb), 16);
- 
-         ch = 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0131-libilbc-set-channel-layout.patch b/debian/patches/post-9beta2/0131-libilbc-set-channel-layout.patch
deleted file mode 100644
index 1d49d86..0000000
--- a/debian/patches/post-9beta2/0131-libilbc-set-channel-layout.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 30f8da29bf609d741bbebd33b2a5003c426ab919 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 17:41:47 -0400
-Subject: [PATCH 131/278] libilbc: set channel layout
-
----
- libavcodec/libilbc.c |    8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
-index a93285c..2812061 100644
---- a/libavcodec/libilbc.c
-+++ b/libavcodec/libilbc.c
-@@ -21,6 +21,7 @@
- 
- #include <ilbc.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
-@@ -68,9 +69,10 @@ static av_cold int ilbc_decode_init(AVCodecContext *avctx)
-     avcodec_get_frame_defaults(&s->frame);
-     avctx->coded_frame = &s->frame;
- 
--    avctx->channels = 1;
--    avctx->sample_rate = 8000;
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_rate    = 8000;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     return 0;
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0132-libopencore-amr-set-channel-layout-for-amr-nb-or-if-.patch b/debian/patches/post-9beta2/0132-libopencore-amr-set-channel-layout-for-amr-nb-or-if-.patch
deleted file mode 100644
index 1b63a2d..0000000
--- a/debian/patches/post-9beta2/0132-libopencore-amr-set-channel-layout-for-amr-nb-or-if-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From d40dab907aad684885988552a84da76488f298c0 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 17:49:59 -0400
-Subject: [PATCH 132/278] libopencore-amr: set channel layout for amr-nb or if
- not set by the user
-
----
- libavcodec/libopencore-amr.c |   14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
-index 9a543b4..a754d52 100644
---- a/libavcodec/libopencore-amr.c
-+++ b/libavcodec/libopencore-amr.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "libavutil/avstring.h"
- #include "libavutil/common.h"
-@@ -30,13 +31,16 @@ static void amr_decode_fix_avctx(AVCodecContext *avctx)
- {
-     const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB);
- 
--    if (!avctx->sample_rate)
--        avctx->sample_rate = 8000 * is_amr_wb;
-+    avctx->sample_rate = 8000 * is_amr_wb;
- 
--    if (!avctx->channels)
--        avctx->channels = 1;
-+    if (avctx->channels > 1) {
-+        av_log_missing_feature(avctx, "multi-channel AMR", 0);
-+        return AVERROR_PATCHWELCOME;
-+    }
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- }
- 
- #if CONFIG_LIBOPENCORE_AMRNB
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0133-nellymoserdec-set-channels-to-1.patch b/debian/patches/post-9beta2/0133-nellymoserdec-set-channels-to-1.patch
deleted file mode 100644
index 1df9964..0000000
--- a/debian/patches/post-9beta2/0133-nellymoserdec-set-channels-to-1.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From d26701ce2f3504e2ee341251448db3af6328a69b Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 17:58:24 -0400
-Subject: [PATCH 133/278] nellymoserdec: set channels to 1
-
----
- libavcodec/nellymoserdec.c |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
-index fce184a..f17e9fd 100644
---- a/libavcodec/nellymoserdec.c
-+++ b/libavcodec/nellymoserdec.c
-@@ -129,6 +129,7 @@ static av_cold int decode_init(AVCodecContext * avctx) {
-     if (!ff_sine_128[127])
-         ff_init_ff_sine_windows(7);
- 
-+    avctx->channels       = 1;
-     avctx->channel_layout = AV_CH_LAYOUT_MONO;
- 
-     avcodec_get_frame_defaults(&s->frame);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0134-qcelpdec-set-channel-layout.patch b/debian/patches/post-9beta2/0134-qcelpdec-set-channel-layout.patch
deleted file mode 100644
index c1e66a8..0000000
--- a/debian/patches/post-9beta2/0134-qcelpdec-set-channel-layout.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e3d6ab57042ef7b35f24bf154fba39369034a665 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 18:25:46 -0400
-Subject: [PATCH 134/278] qcelpdec: set channel layout
-
----
- libavcodec/qcelpdec.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
-index edb1d24..9c2b354 100644
---- a/libavcodec/qcelpdec.c
-+++ b/libavcodec/qcelpdec.c
-@@ -29,6 +29,7 @@
- 
- #include <stddef.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "internal.h"
- #include "get_bits.h"
-@@ -89,7 +90,9 @@ static av_cold int qcelp_decode_init(AVCodecContext *avctx)
-     QCELPContext *q = avctx->priv_data;
-     int i;
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
- 
-     for (i = 0; i < 10; i++)
-         q->prev_lspf[i] = (i + 1) / 11.;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0135-qdm2-make-sure-channels-is-not-0-and-set-channel-lay.patch b/debian/patches/post-9beta2/0135-qdm2-make-sure-channels-is-not-0-and-set-channel-lay.patch
deleted file mode 100644
index 737ecc1..0000000
--- a/debian/patches/post-9beta2/0135-qdm2-make-sure-channels-is-not-0-and-set-channel-lay.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From be2ab8b75a634a686a5ced1544c0c9a4ebeab0dc Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 18:53:19 -0400
-Subject: [PATCH 135/278] qdm2: make sure channels is not <= 0 and set channel
- layout
-
----
- libavcodec/qdm2.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
-index 4d3b391..8e93886 100644
---- a/libavcodec/qdm2.c
-+++ b/libavcodec/qdm2.c
-@@ -36,6 +36,7 @@
- #include <stdio.h>
- 
- #define BITSTREAM_READER_LE
-+#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
-@@ -1768,8 +1769,10 @@ static av_cold int qdm2_decode_init(AVCodecContext *avctx)
- 
-     avctx->channels = s->nb_channels = s->channels = AV_RB32(extradata);
-     extradata += 4;
--    if (s->channels > MPA_MAX_CHANNELS)
-+    if (s->channels <= 0 || s->channels > MPA_MAX_CHANNELS)
-         return AVERROR_INVALIDDATA;
-+    avctx->channel_layout = avctx->channels == 2 ? AV_CH_LAYOUT_STEREO :
-+                                                   AV_CH_LAYOUT_MONO;
- 
-     avctx->sample_rate = AV_RB32(extradata);
-     extradata += 4;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0136-qdm2-remove-unneeded-checks-for-channel-count.patch b/debian/patches/post-9beta2/0136-qdm2-remove-unneeded-checks-for-channel-count.patch
deleted file mode 100644
index e534470..0000000
--- a/debian/patches/post-9beta2/0136-qdm2-remove-unneeded-checks-for-channel-count.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From eb38d8fe926bdce8110fa4be4fddf6598a079a20 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 18:54:29 -0400
-Subject: [PATCH 136/278] qdm2: remove unneeded checks for channel count
-
----
- libavcodec/qdm2.c |    8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
-index 8e93886..a094e6c 100644
---- a/libavcodec/qdm2.c
-+++ b/libavcodec/qdm2.c
-@@ -544,10 +544,6 @@ static void fill_tone_level_array (QDM2Context *q, int flag)
-     int i, sb, ch, sb_used;
-     int tmp, tab;
- 
--    // This should never happen
--    if (q->nb_channels <= 0)
--        return;
--
-     for (ch = 0; ch < q->nb_channels; ch++)
-         for (sb = 0; sb < 30; sb++)
-             for (i = 0; i < 8; i++) {
-@@ -643,10 +639,6 @@ static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_arra
-     int add1, add2, add3, add4;
-     int64_t multres;
- 
--    // This should never happen
--    if (nb_channels <= 0)
--        return;
--
-     if (!superblocktype_2_3) {
-         /* This case is untested, no samples available */
-         SAMPLES_NEEDED
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0137-ra144dec-set-channel-layout.patch b/debian/patches/post-9beta2/0137-ra144dec-set-channel-layout.patch
deleted file mode 100644
index ecf7dfa..0000000
--- a/debian/patches/post-9beta2/0137-ra144dec-set-channel-layout.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 6159f6436495ed8859fe9d32c4c2c1a2eb4c1e91 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 22 Oct 2012 18:57:39 -0400
-Subject: [PATCH 137/278] ra144dec: set channel layout
-
----
- libavcodec/ra144dec.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
-index 0cb4f86..cee3892 100644
---- a/libavcodec/ra144dec.c
-+++ b/libavcodec/ra144dec.c
-@@ -22,6 +22,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/intmath.h"
- #include "avcodec.h"
- #include "get_bits.h"
-@@ -37,7 +38,9 @@ static av_cold int ra144_decode_init(AVCodecContext * avctx)
-     ractx->lpc_coef[0] = ractx->lpc_tables[0];
-     ractx->lpc_coef[1] = ractx->lpc_tables[1];
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     avcodec_get_frame_defaults(&ractx->frame);
-     avctx->coded_frame = &ractx->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0138-ra288dec-set-channel-layout.patch b/debian/patches/post-9beta2/0138-ra288dec-set-channel-layout.patch
deleted file mode 100644
index 7231e54..0000000
--- a/debian/patches/post-9beta2/0138-ra288dec-set-channel-layout.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 4e13e50432bd1c1a89f626f8196b55a0302c8f19 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 00:35:50 -0400
-Subject: [PATCH 138/278] ra288dec: set channel layout
-
----
- libavcodec/ra288.c |    7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
-index 1d02c7b..e080d2b 100644
---- a/libavcodec/ra288.c
-+++ b/libavcodec/ra288.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/float_dsp.h"
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
-@@ -61,7 +62,11 @@ typedef struct {
- static av_cold int ra288_decode_init(AVCodecContext *avctx)
- {
-     RA288Context *ractx = avctx->priv_data;
--    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-+
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
-+
-     avpriv_float_dsp_init(&ractx->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
- 
-     avcodec_get_frame_defaults(&ractx->frame);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0139-shorten-validate-that-the-channel-count-in-the-heade.patch b/debian/patches/post-9beta2/0139-shorten-validate-that-the-channel-count-in-the-heade.patch
deleted file mode 100644
index 62f6c53..0000000
--- a/debian/patches/post-9beta2/0139-shorten-validate-that-the-channel-count-in-the-heade.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 4c53f4aed3edfa58360c7a2a468782eae31d3176 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 00:40:51 -0400
-Subject: [PATCH 139/278] shorten: validate that the channel count in the
- header is not <= 0
-
----
- libavcodec/shorten.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
-index 1664a90..be2b8e2 100644
---- a/libavcodec/shorten.c
-+++ b/libavcodec/shorten.c
-@@ -342,7 +342,7 @@ static int read_header(ShortenContext *s)
-     s->internal_ftype = get_uint(s, TYPESIZE);
- 
-     s->channels = get_uint(s, CHANSIZE);
--    if (s->channels > MAX_CHANNELS) {
-+    if (s->channels <= 0 || s->channels > MAX_CHANNELS) {
-         av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
-         return -1;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0140-sipr-set-channel-layout.patch b/debian/patches/post-9beta2/0140-sipr-set-channel-layout.patch
deleted file mode 100644
index 68a7945..0000000
--- a/debian/patches/post-9beta2/0140-sipr-set-channel-layout.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 523734eb6a904c43cf73d801f1c885829380f0de Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 00:51:26 -0400
-Subject: [PATCH 140/278] sipr: set channel layout
-
----
- libavcodec/sipr.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
-index 1e9168a..9db0923 100644
---- a/libavcodec/sipr.c
-+++ b/libavcodec/sipr.c
-@@ -25,6 +25,7 @@
- #include <stdint.h>
- #include <string.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/mathematics.h"
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
-@@ -509,7 +510,9 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx)
-     for (i = 0; i < 4; i++)
-         ctx->energy_history[i] = -14;
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_FLT;
- 
-     avcodec_get_frame_defaults(&ctx->frame);
-     avctx->coded_frame = &ctx->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0141-truespeech-set-channel-layout.patch b/debian/patches/post-9beta2/0141-truespeech-set-channel-layout.patch
deleted file mode 100644
index 6848bb7..0000000
--- a/debian/patches/post-9beta2/0141-truespeech-set-channel-layout.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From cebea00c8abac0817d3ae8bdd9573a603c655b75 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 00:53:16 -0400
-Subject: [PATCH 141/278] truespeech: set channel layout
-
----
- libavcodec/truespeech.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
-index bbee146..efe5f45 100644
---- a/libavcodec/truespeech.c
-+++ b/libavcodec/truespeech.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
- #include "dsputil.h"
-@@ -66,7 +67,8 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
-         return AVERROR(EINVAL);
-     }
- 
--    avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
- 
-     ff_dsputil_init(&c->dsp, avctx);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0142-twinvq-validate-that-channels-is-not-0.patch b/debian/patches/post-9beta2/0142-twinvq-validate-that-channels-is-not-0.patch
deleted file mode 100644
index e8ac125..0000000
--- a/debian/patches/post-9beta2/0142-twinvq-validate-that-channels-is-not-0.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 8cc72ce5a0d8ab6bc88d28cf55cd62674240121d Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 13:15:24 -0400
-Subject: [PATCH 142/278] twinvq: validate that channels is not <= 0
-
-This could occur due to integer overflow when reading the channel count from
-the extradata.
----
- libavcodec/twinvq.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
-index d009196..50ee626 100644
---- a/libavcodec/twinvq.c
-+++ b/libavcodec/twinvq.c
-@@ -1126,7 +1126,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
-     default: avctx->sample_rate = isampf * 1000; break;
-     }
- 
--    if (avctx->channels > CHANNELS_MAX) {
-+    if (avctx->channels <= 0 || avctx->channels > CHANNELS_MAX) {
-         av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %i\n",
-                avctx->channels);
-         return -1;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0143-twinvq-set-channel-layout.patch b/debian/patches/post-9beta2/0143-twinvq-set-channel-layout.patch
deleted file mode 100644
index 5c5ee5a..0000000
--- a/debian/patches/post-9beta2/0143-twinvq-set-channel-layout.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 335826cf5f7169199ed0a8d3a61f697ec0438d30 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 13:17:17 -0400
-Subject: [PATCH 143/278] twinvq: set channel layout
-
----
- libavcodec/twinvq.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
-index 50ee626..3159e49 100644
---- a/libavcodec/twinvq.c
-+++ b/libavcodec/twinvq.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/float_dsp.h"
- #include "avcodec.h"
- #include "get_bits.h"
-@@ -1131,6 +1132,9 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
-                avctx->channels);
-         return -1;
-     }
-+    avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                   AV_CH_LAYOUT_STEREO;
-+
-     ibps = avctx->bit_rate / (1000 * avctx->channels);
- 
-     switch ((isampf << 8) +  ibps) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0144-twinvq-validate-sample-rate-code.patch b/debian/patches/post-9beta2/0144-twinvq-validate-sample-rate-code.patch
deleted file mode 100644
index 78c6aec..0000000
--- a/debian/patches/post-9beta2/0144-twinvq-validate-sample-rate-code.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b5f628e227743fc1725a28b5b21f538a40efca82 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 13:17:50 -0400
-Subject: [PATCH 144/278] twinvq: validate sample rate code
-
-A large invalid value could cause undefined behavior when left-shifted
-by 8 later in the function.
----
- libavcodec/twinvq.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
-index 3159e49..7af370e 100644
---- a/libavcodec/twinvq.c
-+++ b/libavcodec/twinvq.c
-@@ -1120,6 +1120,11 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
-     avctx->channels = AV_RB32(avctx->extradata    ) + 1;
-     avctx->bit_rate = AV_RB32(avctx->extradata + 4) * 1000;
-     isampf          = AV_RB32(avctx->extradata + 8);
-+
-+    if (isampf < 8 || isampf > 44) {
-+        av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate\n");
-+        return AVERROR_INVALIDDATA;
-+    }
-     switch (isampf) {
-     case 44: avctx->sample_rate = 44100;         break;
-     case 22: avctx->sample_rate = 22050;         break;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0145-vmdaudio-set-channel-layout.patch b/debian/patches/post-9beta2/0145-vmdaudio-set-channel-layout.patch
deleted file mode 100644
index e287c85..0000000
--- a/debian/patches/post-9beta2/0145-vmdaudio-set-channel-layout.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 50a65e7a540ce6747f81d6dbf6a602ad35be77ff Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 15:27:44 -0400
-Subject: [PATCH 145/278] vmdaudio: set channel layout
-
----
- libavcodec/vmdav.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
-index 5776d92..6efc9e7 100644
---- a/libavcodec/vmdav.c
-+++ b/libavcodec/vmdav.c
-@@ -43,6 +43,7 @@
- #include <stdlib.h>
- #include <string.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
-@@ -508,6 +509,9 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
-         return AVERROR(EINVAL);
-     }
- 
-+    avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                   AV_CH_LAYOUT_STEREO;
-+
-     if (avctx->bits_per_coded_sample == 16)
-         avctx->sample_fmt = AV_SAMPLE_FMT_S16;
-     else
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0146-wma-do-not-keep-private-copies-of-some-AVCodecContex.patch b/debian/patches/post-9beta2/0146-wma-do-not-keep-private-copies-of-some-AVCodecContex.patch
deleted file mode 100644
index aab36e2..0000000
--- a/debian/patches/post-9beta2/0146-wma-do-not-keep-private-copies-of-some-AVCodecContex.patch
+++ /dev/null
@@ -1,419 +0,0 @@
-From 2ed40608e9499de7ed6bd4bd61cc50645ec6d8a4 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 16:30:59 -0400
-Subject: [PATCH 146/278] wma: do not keep private copies of some
- AVCodecContext fields
-
-channels, sample_rate, bit_rate, and block_align can be used directly from
-the AVCodecContext
----
- libavcodec/wma.c    |   36 ++++++++++++++++--------------------
- libavcodec/wma.h    |    4 ----
- libavcodec/wmadec.c |   34 +++++++++++++++++-----------------
- libavcodec/wmaenc.c |   30 +++++++++++++++---------------
- 4 files changed, 48 insertions(+), 56 deletions(-)
-
-diff --git a/libavcodec/wma.c b/libavcodec/wma.c
-index f9ba9c3..9808a16 100644
---- a/libavcodec/wma.c
-+++ b/libavcodec/wma.c
-@@ -82,11 +82,6 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-         || avctx->bit_rate    <= 0)
-         return -1;
- 
--    s->sample_rate = avctx->sample_rate;
--    s->nb_channels = avctx->channels;
--    s->bit_rate    = avctx->bit_rate;
--    s->block_align = avctx->block_align;
--
-     ff_dsputil_init(&s->dsp, avctx);
-     ff_fmt_convert_init(&s->fmt_conv, avctx);
-     avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
-@@ -98,7 +93,8 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-     }
- 
-     /* compute MDCT block size */
--    s->frame_len_bits = ff_wma_get_frame_len_bits(s->sample_rate, s->version, 0);
-+    s->frame_len_bits = ff_wma_get_frame_len_bits(avctx->sample_rate,
-+                                                  s->version, 0);
-     s->next_block_len_bits = s->frame_len_bits;
-     s->prev_block_len_bits = s->frame_len_bits;
-     s->block_len_bits      = s->frame_len_bits;
-@@ -107,7 +103,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-     if (s->use_variable_block_len) {
-         int nb_max, nb;
-         nb = ((flags2 >> 3) & 3) + 1;
--        if ((s->bit_rate / s->nb_channels) >= 32000)
-+        if ((avctx->bit_rate / avctx->channels) >= 32000)
-             nb += 2;
-         nb_max = s->frame_len_bits - BLOCK_MIN_BITS;
-         if (nb > nb_max)
-@@ -119,10 +115,10 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
- 
-     /* init rate dependent parameters */
-     s->use_noise_coding = 1;
--    high_freq = s->sample_rate * 0.5;
-+    high_freq = avctx->sample_rate * 0.5;
- 
-     /* if version 2, then the rates are normalized */
--    sample_rate1 = s->sample_rate;
-+    sample_rate1 = avctx->sample_rate;
-     if (s->version == 2) {
-         if (sample_rate1 >= 44100) {
-             sample_rate1 = 44100;
-@@ -137,13 +133,13 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-         }
-     }
- 
--    bps = (float)s->bit_rate / (float)(s->nb_channels * s->sample_rate);
-+    bps = (float)avctx->bit_rate / (float)(avctx->channels * avctx->sample_rate);
-     s->byte_offset_bits = av_log2((int)(bps * s->frame_len / 8.0 + 0.5)) + 2;
- 
-     /* compute high frequency value and choose if noise coding should
-        be activated */
-     bps1 = bps;
--    if (s->nb_channels == 2)
-+    if (avctx->channels == 2)
-         bps1 = bps * 1.6;
-     if (sample_rate1 == 44100) {
-         if (bps1 >= 0.61) {
-@@ -186,8 +182,8 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-     }
-     av_dlog(s->avctx, "flags2=0x%x\n", flags2);
-     av_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n",
--            s->version, s->nb_channels, s->sample_rate, s->bit_rate,
--            s->block_align);
-+            s->version, avctx->channels, avctx->sample_rate, avctx->bit_rate,
-+            avctx->block_align);
-     av_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n",
-             bps, bps1, high_freq, s->byte_offset_bits);
-     av_dlog(s->avctx, "use_noise_coding=%d use_exp_vlc=%d nb_block_sizes=%d\n",
-@@ -210,7 +206,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-                 lpos = 0;
-                 for (i = 0; i < 25; i++) {
-                     a = ff_wma_critical_freqs[i];
--                    b = s->sample_rate;
-+                    b = avctx->sample_rate;
-                     pos = ((block_len * 2 * a) + (b >> 1)) / b;
-                     if (pos > block_len)
-                         pos = block_len;
-@@ -227,11 +223,11 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-                 table = NULL;
-                 a = s->frame_len_bits - BLOCK_MIN_BITS - k;
-                 if (a < 3) {
--                    if (s->sample_rate >= 44100) {
-+                    if (avctx->sample_rate >= 44100) {
-                         table = exponent_band_44100[a];
--                    } else if (s->sample_rate >= 32000) {
-+                    } else if (avctx->sample_rate >= 32000) {
-                         table = exponent_band_32000[a];
--                    } else if (s->sample_rate >= 22050) {
-+                    } else if (avctx->sample_rate >= 22050) {
-                         table = exponent_band_22050[a];
-                     }
-                 }
-@@ -245,7 +241,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-                     lpos = 0;
-                     for (i = 0; i < 25; i++) {
-                         a = ff_wma_critical_freqs[i];
--                        b = s->sample_rate;
-+                        b = avctx->sample_rate;
-                         pos = ((block_len * 2 * a) + (b << 1)) / (4 * b);
-                         pos <<= 2;
-                         if (pos > block_len)
-@@ -264,7 +260,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
-             s->coefs_end[k] = (s->frame_len - ((s->frame_len * 9) / 100)) >> k;
-             /* high freq computation */
-             s->high_band_start[k] = (int)((block_len * 2 * high_freq) /
--                                          s->sample_rate + 0.5);
-+                                          avctx->sample_rate + 0.5);
-             n = s->exponent_sizes[k];
-             j = 0;
-             pos = 0;
-@@ -344,7 +340,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
- 
-     /* choose the VLC tables for the coefficients */
-     coef_vlc_table = 2;
--    if (s->sample_rate >= 32000) {
-+    if (avctx->sample_rate >= 32000) {
-         if (bps1 < 0.72) {
-             coef_vlc_table = 0;
-         } else if (bps1 < 1.16) {
-diff --git a/libavcodec/wma.h b/libavcodec/wma.h
-index f81e095..fb2aa8b 100644
---- a/libavcodec/wma.h
-+++ b/libavcodec/wma.h
-@@ -69,11 +69,7 @@ typedef struct WMACodecContext {
-     AVFrame frame;
-     GetBitContext gb;
-     PutBitContext pb;
--    int sample_rate;
--    int nb_channels;
--    int bit_rate;
-     int version;                            ///< 1 = 0x160 (WMAV1), 2 = 0x161 (WMAV2)
--    int block_align;
-     int use_bit_reservoir;
-     int use_variable_block_len;
-     int use_exp_vlc;                        ///< exponent coding: 0 = lsp, 1 = vlc + delta
-diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
-index bbb8402..eb7fe7c 100644
---- a/libavcodec/wmadec.c
-+++ b/libavcodec/wmadec.c
-@@ -475,11 +475,11 @@ static int wma_decode_block(WMACodecContext *s)
-         return -1;
-     }
- 
--    if (s->nb_channels == 2) {
-+    if (s->avctx->channels == 2) {
-         s->ms_stereo = get_bits1(&s->gb);
-     }
-     v = 0;
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for(ch = 0; ch < s->avctx->channels; ch++) {
-         a = get_bits1(&s->gb);
-         s->channel_coded[ch] = a;
-         v |= a;
-@@ -506,13 +506,13 @@ static int wma_decode_block(WMACodecContext *s)
- 
-     /* compute number of coefficients */
-     n = s->coefs_end[bsize] - s->coefs_start;
--    for(ch = 0; ch < s->nb_channels; ch++)
-+    for(ch = 0; ch < s->avctx->channels; ch++)
-         nb_coefs[ch] = n;
- 
-     /* complex coding */
-     if (s->use_noise_coding) {
- 
--        for(ch = 0; ch < s->nb_channels; ch++) {
-+        for(ch = 0; ch < s->avctx->channels; ch++) {
-             if (s->channel_coded[ch]) {
-                 int i, n, a;
-                 n = s->exponent_high_sizes[bsize];
-@@ -525,7 +525,7 @@ static int wma_decode_block(WMACodecContext *s)
-                 }
-             }
-         }
--        for(ch = 0; ch < s->nb_channels; ch++) {
-+        for(ch = 0; ch < s->avctx->channels; ch++) {
-             if (s->channel_coded[ch]) {
-                 int i, n, val, code;
- 
-@@ -553,7 +553,7 @@ static int wma_decode_block(WMACodecContext *s)
-     /* exponents can be reused in short blocks. */
-     if ((s->block_len_bits == s->frame_len_bits) ||
-         get_bits1(&s->gb)) {
--        for(ch = 0; ch < s->nb_channels; ch++) {
-+        for(ch = 0; ch < s->avctx->channels; ch++) {
-             if (s->channel_coded[ch]) {
-                 if (s->use_exp_vlc) {
-                     if (decode_exp_vlc(s, ch) < 0)
-@@ -567,7 +567,7 @@ static int wma_decode_block(WMACodecContext *s)
-     }
- 
-     /* parse spectral coefficients : just RLE encoding */
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         if (s->channel_coded[ch]) {
-             int tindex;
-             WMACoef* ptr = &s->coefs1[ch][0];
-@@ -581,7 +581,7 @@ static int wma_decode_block(WMACodecContext *s)
-                   0, ptr, 0, nb_coefs[ch],
-                   s->block_len, s->frame_len_bits, coef_nb_bits);
-         }
--        if (s->version == 1 && s->nb_channels >= 2) {
-+        if (s->version == 1 && s->avctx->channels >= 2) {
-             align_get_bits(&s->gb);
-         }
-     }
-@@ -596,7 +596,7 @@ static int wma_decode_block(WMACodecContext *s)
-     }
- 
-     /* finally compute the MDCT coefficients */
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         if (s->channel_coded[ch]) {
-             WMACoef *coefs1;
-             float *coefs, *exponents, mult, mult1, noise;
-@@ -700,7 +700,7 @@ static int wma_decode_block(WMACodecContext *s)
-     }
- 
- #ifdef TRACE
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         if (s->channel_coded[ch]) {
-             dump_floats(s, "exponents", 3, s->exponents[ch], s->block_len);
-             dump_floats(s, "coefs", 1, s->coefs[ch], s->block_len);
-@@ -724,7 +724,7 @@ static int wma_decode_block(WMACodecContext *s)
- next:
-     mdct = &s->mdct_ctx[bsize];
- 
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         int n4, index;
- 
-         n4 = s->block_len / 2;
-@@ -768,7 +768,7 @@ static int wma_decode_frame(WMACodecContext *s, float **samples,
-             break;
-     }
- 
--    for (ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         /* copy current block to output */
-         memcpy(samples[ch] + samples_offset, s->frame_out[ch],
-                s->frame_len * sizeof(*s->frame_out[ch]));
-@@ -801,13 +801,13 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
-         s->last_superframe_len = 0;
-         return 0;
-     }
--    if (buf_size < s->block_align) {
-+    if (buf_size < avctx->block_align) {
-         av_log(avctx, AV_LOG_ERROR,
-                "Input packet size too small (%d < %d)\n",
--               buf_size, s->block_align);
-+               buf_size, avctx->block_align);
-         return AVERROR_INVALIDDATA;
-     }
--    buf_size = s->block_align;
-+    buf_size = avctx->block_align;
- 
-     init_get_bits(&s->gb, buf, buf_size*8);
- 
-@@ -902,12 +902,12 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
- 
-     av_dlog(s->avctx, "%d %d %d %d outbytes:%td eaten:%d\n",
-             s->frame_len_bits, s->block_len_bits, s->frame_len, s->block_len,
--            (int8_t *)samples - (int8_t *)data, s->block_align);
-+            (int8_t *)samples - (int8_t *)data, avctx->block_align);
- 
-     *got_frame_ptr   = 1;
-     *(AVFrame *)data = s->frame;
- 
--    return s->block_align;
-+    return avctx->block_align;
-  fail:
-     /* when error, we reset the bit reservoir */
-     s->last_superframe_len = 0;
-diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
-index 8abb55b..13d8a1c 100644
---- a/libavcodec/wmaenc.c
-+++ b/libavcodec/wmaenc.c
-@@ -29,7 +29,7 @@
- 
- static int encode_init(AVCodecContext * avctx){
-     WMACodecContext *s = avctx->priv_data;
--    int i, flags1, flags2;
-+    int i, flags1, flags2, block_align;
-     uint8_t *extradata;
- 
-     s->avctx = avctx;
-@@ -80,10 +80,10 @@ static int encode_init(AVCodecContext * avctx){
-     for(i = 0; i < s->nb_block_sizes; i++)
-         ff_mdct_init(&s->mdct_ctx[i], s->frame_len_bits - i + 1, 0, 1.0);
- 
--    s->block_align     = avctx->bit_rate * (int64_t)s->frame_len /
-+    block_align        = avctx->bit_rate * (int64_t)s->frame_len /
-                          (avctx->sample_rate * 8);
--    s->block_align     = FFMIN(s->block_align, MAX_CODED_SUPERFRAME_SIZE);
--    avctx->block_align = s->block_align;
-+    block_align        = FFMIN(block_align, MAX_CODED_SUPERFRAME_SIZE);
-+    avctx->block_align = block_align;
-     avctx->bit_rate    = avctx->block_align * 8LL * avctx->sample_rate /
-                          s->frame_len;
-     avctx->frame_size = avctx->delay = s->frame_len;
-@@ -188,7 +188,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
- 
-     //FIXME factor
-     v = s->coefs_end[bsize] - s->coefs_start;
--    for(ch = 0; ch < s->nb_channels; ch++)
-+    for (ch = 0; ch < s->avctx->channels; ch++)
-         nb_coefs[ch] = v;
-     {
-         int n4 = s->block_len / 2;
-@@ -198,18 +198,18 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-         }
-     }
- 
--    if (s->nb_channels == 2) {
-+    if (s->avctx->channels == 2) {
-         put_bits(&s->pb, 1, !!s->ms_stereo);
-     }
- 
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         s->channel_coded[ch] = 1; //FIXME only set channel_coded when needed, instead of always
-         if (s->channel_coded[ch]) {
-             init_exp(s, ch, fixed_exp);
-         }
-     }
- 
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         if (s->channel_coded[ch]) {
-             WMACoef *coefs1;
-             float *coefs, *exponents, mult;
-@@ -237,7 +237,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-     }
- 
-     v = 0;
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         int a = s->channel_coded[ch];
-         put_bits(&s->pb, 1, a);
-         v |= a;
-@@ -253,7 +253,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-     coef_nb_bits= ff_wma_total_gain_to_bits(total_gain);
- 
-     if (s->use_noise_coding) {
--        for(ch = 0; ch < s->nb_channels; ch++) {
-+        for (ch = 0; ch < s->avctx->channels; ch++) {
-             if (s->channel_coded[ch]) {
-                 int i, n;
-                 n = s->exponent_high_sizes[bsize];
-@@ -272,7 +272,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-     }
- 
-     if (parse_exponents) {
--        for(ch = 0; ch < s->nb_channels; ch++) {
-+        for (ch = 0; ch < s->avctx->channels; ch++) {
-             if (s->channel_coded[ch]) {
-                 if (s->use_exp_vlc) {
-                     encode_exp_vlc(s, ch, fixed_exp);
-@@ -286,7 +286,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-         assert(0); //FIXME not implemented
-     }
- 
--    for(ch = 0; ch < s->nb_channels; ch++) {
-+    for (ch = 0; ch < s->avctx->channels; ch++) {
-         if (s->channel_coded[ch]) {
-             int run, tindex;
-             WMACoef *ptr, *eptr;
-@@ -324,7 +324,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
-             if(run)
-                 put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1], s->coef_vlcs[tindex]->huffcodes[1]);
-         }
--        if (s->version == 1 && s->nb_channels >= 2) {
-+        if (s->version == 1 && s->avctx->channels >= 2) {
-             avpriv_align_put_bits(&s->pb);
-         }
-     }
-@@ -343,7 +343,7 @@ static int encode_frame(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
- 
-     avpriv_align_put_bits(&s->pb);
- 
--    return put_bits_count(&s->pb)/8 - s->block_align;
-+    return put_bits_count(&s->pb) / 8 - s->avctx->block_align;
- }
- 
- static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
-@@ -413,7 +413,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
-     if (frame->pts != AV_NOPTS_VALUE)
-         avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->delay);
- 
--    avpkt->size = s->block_align;
-+    avpkt->size = avctx->block_align;
-     *got_packet_ptr = 1;
-     return 0;
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0147-wmapro-use-AVCodecContext.channels-instead-of-keepin.patch b/debian/patches/post-9beta2/0147-wmapro-use-AVCodecContext.channels-instead-of-keepin.patch
deleted file mode 100644
index 1f8e305..0000000
--- a/debian/patches/post-9beta2/0147-wmapro-use-AVCodecContext.channels-instead-of-keepin.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-From 002097a00bb93718c171c0c0abcc122475dac838 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 17:10:37 -0400
-Subject: [PATCH 147/278] wmapro: use AVCodecContext.channels instead of
- keeping a private copy
-
----
- libavcodec/wmaprodec.c |   52 +++++++++++++++++++++++-------------------------
- 1 file changed, 25 insertions(+), 27 deletions(-)
-
-diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
-index d172895..43fdbc0 100644
---- a/libavcodec/wmaprodec.c
-+++ b/libavcodec/wmaprodec.c
-@@ -184,7 +184,6 @@ typedef struct WMAProDecodeCtx {
-     uint8_t          bits_per_sample;               ///< integer audio sample size for the unscaled IMDCT output (used to scale to [-1.0, 1.0])
-     uint16_t         samples_per_frame;             ///< number of samples to output
-     uint16_t         log2_frame_size;
--    int8_t           num_channels;                  ///< number of channels in the stream (same as AVCodecContext.num_channels)
-     int8_t           lfe_channel;                   ///< lfe channel index
-     uint8_t          max_num_subframes;
-     uint8_t          subframe_len_bits;             ///< number of bits used for the subframe length
-@@ -246,7 +245,7 @@ static av_cold void dump_context(WMAProDecodeCtx *s)
-     PRINT("log2 frame size",     s->log2_frame_size);
-     PRINT("max num subframes",   s->max_num_subframes);
-     PRINT("len prefix",          s->len_prefix);
--    PRINT("num channels",        s->num_channels);
-+    PRINT("num channels",        s->avctx->channels);
- }
- 
- /**
-@@ -337,18 +336,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
-         return AVERROR_INVALIDDATA;
-     }
- 
--    s->num_channels = avctx->channels;
--
--    if (s->num_channels < 0) {
--        av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n", s->num_channels);
-+    if (avctx->channels < 0) {
-+        av_log(avctx, AV_LOG_ERROR, "invalid number of channels %d\n",
-+               avctx->channels);
-         return AVERROR_INVALIDDATA;
--    } else if (s->num_channels > WMAPRO_MAX_CHANNELS) {
-+    } else if (avctx->channels > WMAPRO_MAX_CHANNELS) {
-         av_log_ask_for_sample(avctx, "unsupported number of channels\n");
-         return AVERROR_PATCHWELCOME;
-     }
- 
-     /** init previous block len */
--    for (i = 0; i < s->num_channels; i++)
-+    for (i = 0; i < avctx->channels; i++)
-         s->channel[i].prev_block_len = s->samples_per_frame;
- 
-     /** extract lfe channel position */
-@@ -525,7 +523,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
- {
-     uint16_t num_samples[WMAPRO_MAX_CHANNELS] = { 0 };/**< sum of samples for all currently known subframes of a channel */
-     uint8_t  contains_subframe[WMAPRO_MAX_CHANNELS];  /**< flag indicating if a channel contains the current subframe */
--    int channels_for_cur_subframe = s->num_channels;  /**< number of channels that contain the current subframe */
-+    int channels_for_cur_subframe = s->avctx->channels; /**< number of channels that contain the current subframe */
-     int fixed_channel_layout = 0;                     /**< flag indicating that all channels use the same subframe offsets and sizes */
-     int min_channel_len = 0;                          /**< smallest sum of samples (channels with this length will be processed first) */
-     int c;
-@@ -537,7 +535,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
-      */
- 
-     /** reset tiling information */
--    for (c = 0; c < s->num_channels; c++)
-+    for (c = 0; c < s->avctx->channels; c++)
-         s->channel[c].num_subframes = 0;
- 
-     if (s->max_num_subframes == 1 || get_bits1(&s->gb))
-@@ -548,7 +546,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
-         int subframe_len;
- 
-         /** check which channels contain the subframe */
--        for (c = 0; c < s->num_channels; c++) {
-+        for (c = 0; c < s->avctx->channels; c++) {
-             if (num_samples[c] == min_channel_len) {
-                 if (fixed_channel_layout || channels_for_cur_subframe == 1 ||
-                    (min_channel_len == s->samples_per_frame - s->min_samples_per_subframe))
-@@ -565,7 +563,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
- 
-         /** add subframes to the individual channels and find new min_channel_len */
-         min_channel_len += subframe_len;
--        for (c = 0; c < s->num_channels; c++) {
-+        for (c = 0; c < s->avctx->channels; c++) {
-             WMAProChannelCtx* chan = &s->channel[c];
- 
-             if (contains_subframe[c]) {
-@@ -592,7 +590,7 @@ static int decode_tilehdr(WMAProDecodeCtx *s)
-         }
-     } while (min_channel_len < s->samples_per_frame);
- 
--    for (c = 0; c < s->num_channels; c++) {
-+    for (c = 0; c < s->avctx->channels; c++) {
-         int i;
-         int offset = 0;
-         for (i = 0; i < s->channel[c].num_subframes; i++) {
-@@ -618,8 +616,8 @@ static void decode_decorrelation_matrix(WMAProDecodeCtx *s,
-     int i;
-     int offset = 0;
-     int8_t rotation_offset[WMAPRO_MAX_CHANNELS * WMAPRO_MAX_CHANNELS];
--    memset(chgroup->decorrelation_matrix, 0, s->num_channels *
--           s->num_channels * sizeof(*chgroup->decorrelation_matrix));
-+    memset(chgroup->decorrelation_matrix, 0, s->avctx->channels *
-+           s->avctx->channels * sizeof(*chgroup->decorrelation_matrix));
- 
-     for (i = 0; i < chgroup->num_channels * (chgroup->num_channels - 1) >> 1; i++)
-         rotation_offset[i] = get_bits(&s->gb, 6);
-@@ -672,7 +670,7 @@ static int decode_channel_transform(WMAProDecodeCtx* s)
- 
-     /** in the one channel case channel transforms are pointless */
-     s->num_chgroups = 0;
--    if (s->num_channels > 1) {
-+    if (s->avctx->channels > 1) {
-         int remaining_channels = s->channels_for_cur_subframe;
- 
-         if (get_bits1(&s->gb)) {
-@@ -718,7 +716,7 @@ static int decode_channel_transform(WMAProDecodeCtx* s)
-                     }
-                 } else {
-                     chgroup->transform = 1;
--                    if (s->num_channels == 2) {
-+                    if (s->avctx->channels == 2) {
-                         chgroup->decorrelation_matrix[0] =  1.0;
-                         chgroup->decorrelation_matrix[1] = -1.0;
-                         chgroup->decorrelation_matrix[2] =  1.0;
-@@ -1008,7 +1006,7 @@ static void inverse_channel_transform(WMAProDecodeCtx *s)
-                             (*ch)[y] = sum;
-                         }
-                     }
--                } else if (s->num_channels == 2) {
-+                } else if (s->avctx->channels == 2) {
-                     int len = FFMIN(sfb[1], s->subframe_len) - sfb[0];
-                     s->dsp.vector_fmul_scalar(ch_data[0] + sfb[0],
-                                               ch_data[0] + sfb[0],
-@@ -1061,7 +1059,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
-     int offset = s->samples_per_frame;
-     int subframe_len = s->samples_per_frame;
-     int i;
--    int total_samples   = s->samples_per_frame * s->num_channels;
-+    int total_samples   = s->samples_per_frame * s->avctx->channels;
-     int transmit_coeffs = 0;
-     int cur_subwoofer_cutoff;
- 
-@@ -1071,7 +1069,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
-         == the next block of the channel with the smallest number of
-         decoded samples
-     */
--    for (i = 0; i < s->num_channels; i++) {
-+    for (i = 0; i < s->avctx->channels; i++) {
-         s->channel[i].grouped = 0;
-         if (offset > s->channel[i].decoded_samples) {
-             offset = s->channel[i].decoded_samples;
-@@ -1085,7 +1083,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
- 
-     /** get a list of all channels that contain the estimated block */
-     s->channels_for_cur_subframe = 0;
--    for (i = 0; i < s->num_channels; i++) {
-+    for (i = 0; i < s->avctx->channels; i++) {
-         const int cur_subframe = s->channel[i].cur_subframe;
-         /** substract already processed samples */
-         total_samples -= s->channel[i].decoded_samples;
-@@ -1314,9 +1312,9 @@ static int decode_frame(WMAProDecodeCtx *s, int *got_frame_ptr)
-     }
- 
-     /** read postproc transform */
--    if (s->num_channels > 1 && get_bits1(gb)) {
-+    if (s->avctx->channels > 1 && get_bits1(gb)) {
-         if (get_bits1(gb)) {
--            for (i = 0; i < s->num_channels * s->num_channels; i++)
-+            for (i = 0; i < avctx->channels * avctx->channels; i++)
-                 skip_bits(gb, 4);
-         }
-     }
-@@ -1351,7 +1349,7 @@ static int decode_frame(WMAProDecodeCtx *s, int *got_frame_ptr)
- 
-     /** reset subframe states */
-     s->parsed_all_subframes = 0;
--    for (i = 0; i < s->num_channels; i++) {
-+    for (i = 0; i < avctx->channels; i++) {
-         s->channel[i].decoded_samples = 0;
-         s->channel[i].cur_subframe    = 0;
-         s->channel[i].reuse_sf        = 0;
-@@ -1374,11 +1372,11 @@ static int decode_frame(WMAProDecodeCtx *s, int *got_frame_ptr)
-     }
- 
-     /** copy samples to the output buffer */
--    for (i = 0; i < s->num_channels; i++)
-+    for (i = 0; i < avctx->channels; i++)
-         memcpy(s->frame.extended_data[i], s->channel[i].out,
-                s->samples_per_frame * sizeof(*s->channel[i].out));
- 
--    for (i = 0; i < s->num_channels; i++) {
-+    for (i = 0; i < avctx->channels; i++) {
-         /** reuse second half of the IMDCT output for the next frame */
-         memcpy(&s->channel[i].out[0],
-                &s->channel[i].out[s->samples_per_frame],
-@@ -1608,7 +1606,7 @@ static void flush(AVCodecContext *avctx)
-     int i;
-     /** reset output buffer as a part of it is used during the windowing of a
-         new frame */
--    for (i = 0; i < s->num_channels; i++)
-+    for (i = 0; i < avctx->channels; i++)
-         memset(s->channel[i].out, 0, s->samples_per_frame *
-                sizeof(*s->channel[i].out));
-     s->packet_loss = 1;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0148-wmavoice-set-channel-layout.patch b/debian/patches/post-9beta2/0148-wmavoice-set-channel-layout.patch
deleted file mode 100644
index e1dde4a..0000000
--- a/debian/patches/post-9beta2/0148-wmavoice-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f7b8506573f28204d39cedc47d03bc5cda3be027 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 17:19:25 -0400
-Subject: [PATCH 148/278] wmavoice: set channel layout
-
----
- libavcodec/wmavoice.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
-index 466d1ec..df98167 100644
---- a/libavcodec/wmavoice.c
-+++ b/libavcodec/wmavoice.c
-@@ -29,6 +29,7 @@
- 
- #include <math.h>
- 
-+#include "libavutil/audioconvert.h"
- #include "libavutil/mem.h"
- #include "dsputil.h"
- #include "avcodec.h"
-@@ -439,6 +440,8 @@ static av_cold int wmavoice_decode_init(AVCodecContext *ctx)
-                                   2 * (s->block_conv_table[1] - 2 * s->min_pitch_val);
-     s->block_pitch_nbits        = av_ceil_log2(s->block_pitch_range);
- 
-+    ctx->channels               = 1;
-+    ctx->channel_layout         = AV_CH_LAYOUT_MONO;
-     ctx->sample_fmt             = AV_SAMPLE_FMT_FLT;
- 
-     avcodec_get_frame_defaults(&s->frame);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0149-ws-snd1-set-channel-layout.patch b/debian/patches/post-9beta2/0149-ws-snd1-set-channel-layout.patch
deleted file mode 100644
index 3a2a0ef..0000000
--- a/debian/patches/post-9beta2/0149-ws-snd1-set-channel-layout.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5459848b146f34defe894129ba1fc0d0572754f5 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 23 Oct 2012 17:22:53 -0400
-Subject: [PATCH 149/278] ws-snd1: set channel layout
-
----
- libavcodec/ws-snd1.c |   11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
-index 880ae85..05cb31c 100644
---- a/libavcodec/ws-snd1.c
-+++ b/libavcodec/ws-snd1.c
-@@ -20,6 +20,8 @@
-  */
- 
- #include <stdint.h>
-+
-+#include "libavutil/audioconvert.h"
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
-@@ -46,12 +48,9 @@ static av_cold int ws_snd_decode_init(AVCodecContext *avctx)
- {
-     WSSndContext *s = avctx->priv_data;
- 
--    if (avctx->channels != 1) {
--        av_log_ask_for_sample(avctx, "unsupported number of channels\n");
--        return AVERROR(EINVAL);
--    }
--
--    avctx->sample_fmt = AV_SAMPLE_FMT_U8;
-+    avctx->channels       = 1;
-+    avctx->channel_layout = AV_CH_LAYOUT_MONO;
-+    avctx->sample_fmt     = AV_SAMPLE_FMT_U8;
- 
-     avcodec_get_frame_defaults(&s->frame);
-     avctx->coded_frame = &s->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0150-decode_audio3-initialize-AVFrame.patch b/debian/patches/post-9beta2/0150-decode_audio3-initialize-AVFrame.patch
deleted file mode 100644
index 9ee5739..0000000
--- a/debian/patches/post-9beta2/0150-decode_audio3-initialize-AVFrame.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 6d1270a0f9ededd37ed14bde52b8ee69b99e8a7f Mon Sep 17 00:00:00 2001
-From: Ilkka Ollakka <ileoo at videolan.org>
-Date: Wed, 31 Oct 2012 11:24:36 +0200
-Subject: [PATCH 150/278] decode_audio3: initialize AVFrame
-
-Same fix and issue as in a25d912dca9cd553440167e0476c47581359c0fc
-
-Signed-off-by: Anton Khirnov <anton at khirnov.net>
----
- libavcodec/utils.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 58dfe97..78726ae 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -1344,7 +1344,7 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
-                                               int *frame_size_ptr,
-                                               AVPacket *avpkt)
- {
--    AVFrame frame;
-+    AVFrame frame = {0};
-     int ret, got_frame = 0;
- 
-     if (avctx->get_buffer != avcodec_default_get_buffer) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0151-doc-Point-to-the-new-location-of-the-c99-to-c89-tool.patch b/debian/patches/post-9beta2/0151-doc-Point-to-the-new-location-of-the-c99-to-c89-tool.patch
deleted file mode 100644
index 4ce529d..0000000
--- a/debian/patches/post-9beta2/0151-doc-Point-to-the-new-location-of-the-c99-to-c89-tool.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c19e9d00a70616b86ae73111a7579a984c5fa585 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Thu, 1 Nov 2012 15:27:18 +0200
-Subject: [PATCH 151/278] doc: Point to the new location of the c99-to-c89
- tool
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This location contains prebuilt binaries as well.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- doc/platform.texi |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/doc/platform.texi b/doc/platform.texi
-index 6bb7136..999a5f1 100644
---- a/doc/platform.texi
-+++ b/doc/platform.texi
-@@ -109,7 +109,7 @@ wrapper.
- You will need the following prerequisites:
- 
- @itemize
-- at item @uref{https://github.com/rbultje/c99-to-c89/, C99-to-C89 Converter & Wrapper}
-+ at item @uref{https://github.com/libav/c99-to-c89/, C99-to-C89 Converter & Wrapper}
- @item @uref{http://code.google.com/p/msinttypes/, msinttypes}
- @item @uref{http://www.mingw.org/, MSYS}
- @item @uref{http://yasm.tortall.net/, YASM}
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0152-a64-remove-interleaved-mode.patch b/debian/patches/post-9beta2/0152-a64-remove-interleaved-mode.patch
deleted file mode 100644
index ff7be13..0000000
--- a/debian/patches/post-9beta2/0152-a64-remove-interleaved-mode.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From f70381ab9d53132be2d009d6db9649b3cad8288b Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 22:32:36 +0100
-Subject: [PATCH 152/278] a64: remove interleaved mode.
-
-It has been disabled since it was added two years ago.
----
- libavformat/a64.c |  116 +----------------------------------------------------
- 1 file changed, 2 insertions(+), 114 deletions(-)
-
-diff --git a/libavformat/a64.c b/libavformat/a64.c
-index 56b9a44..15a0475 100644
---- a/libavformat/a64.c
-+++ b/libavformat/a64.c
-@@ -23,17 +23,11 @@
- #include "libavcodec/a64enc.h"
- #include "libavcodec/bytestream.h"
- #include "avformat.h"
--
--typedef struct A64MuxerContext {
--    int interleaved;
--    AVPacket prev_pkt;
--    int prev_frame_count;
--} A64MuxerContext;
-+#include "rawenc.h"
- 
- static int a64_write_header(struct AVFormatContext *s)
- {
-     AVCodecContext *avctx = s->streams[0]->codec;
--    A64MuxerContext *c = s->priv_data;
-     uint8_t header[5] = {
-         0x00, //load
-         0x40, //address
-@@ -41,7 +35,6 @@ static int a64_write_header(struct AVFormatContext *s)
-         0x00, //charset_lifetime (multi only)
-         0x00  //fps in 50/fps;
-     };
--    c->interleaved = 0;
-     switch (avctx->codec->id) {
-     case AV_CODEC_ID_A64_MULTI:
-         header[2] = 0x00;
-@@ -57,109 +50,6 @@ static int a64_write_header(struct AVFormatContext *s)
-         return AVERROR(EINVAL);
-     }
-     avio_write(s->pb, header, 2);
--    c->prev_pkt.size = 0;
--    c->prev_frame_count = 0;
--    return 0;
--}
--
--static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt)
--{
--    AVCodecContext *avctx = s->streams[0]->codec;
--    A64MuxerContext *c = s->priv_data;
--    int i, j;
--    int ch_chunksize;
--    int lifetime;
--    int frame_count;
--    int charset_size;
--    int frame_size;
--    int num_frames;
--
--    /* fetch values from extradata */
--    switch (avctx->codec->id) {
--    case AV_CODEC_ID_A64_MULTI:
--    case AV_CODEC_ID_A64_MULTI5:
--        if(c->interleaved) {
--            /* Write interleaved, means we insert chunks of the future charset before each current frame.
--             * Reason: if we load 1 charset + corresponding frames in one block on c64, we need to store
--             * them first and then display frame by frame to keep in sync. Thus we would read and write
--             * the data for colram from/to ram first and waste too much time. If we interleave and send the
--             * charset beforehand, we assemble a new charset chunk by chunk, write current screen data to
--             * screen-ram to be displayed and decode the colram directly to colram-location $d800 during
--             * the overscan, while reading directly from source.
--             * This is the only way so far, to achieve 25fps on c64 */
--            if(avctx->extradata) {
--                /* fetch values from extradata */
--                lifetime     = AV_RB32(avctx->extradata + 0);
--                frame_count  = AV_RB32(avctx->extradata + 4);
--                charset_size = AV_RB32(avctx->extradata + 8);
--                frame_size   = AV_RB32(avctx->extradata + 12);
--
--                /* TODO: sanity checks? */
--            } else {
--                av_log(avctx, AV_LOG_ERROR, "extradata not set\n");
--                return AVERROR(EINVAL);
--            }
--
--            ch_chunksize=charset_size/lifetime;
--            /* TODO: check if charset/size is % lifetime, but maybe check in codec */
--
--            if(pkt->data) num_frames = lifetime;
--            else num_frames = c->prev_frame_count;
--
--            for(i = 0; i < num_frames; i++) {
--                if(pkt->data) {
--                    /* if available, put newest charset chunk into buffer */
--                    avio_write(s->pb, pkt->data + ch_chunksize * i, ch_chunksize);
--                } else {
--                    /* a bit ugly, but is there an alternative to put many zeros? */
--                    for(j = 0; j < ch_chunksize; j++) avio_w8(s->pb, 0);
--                }
--
--                if(c->prev_pkt.data) {
--                    /* put frame (screen + colram) from last packet into buffer */
--                    avio_write(s->pb, c->prev_pkt.data + charset_size + frame_size * i, frame_size);
--                } else {
--                    /* a bit ugly, but is there an alternative to put many zeros? */
--                    for(j = 0; j < frame_size; j++) avio_w8(s->pb, 0);
--                }
--            }
--
--            /* backup current packet for next turn */
--            if(pkt->data) {
--                /* no backup packet yet? create one! */
--                if(!c->prev_pkt.data) av_new_packet(&c->prev_pkt, pkt->size);
--                /* we have a packet and data is big enough, reuse it */
--                if(c->prev_pkt.data && c->prev_pkt.size >= pkt->size) {
--                    memcpy(c->prev_pkt.data, pkt->data, pkt->size);
--                    c->prev_pkt.size = pkt->size;
--                } else {
--                    av_log(avctx, AV_LOG_ERROR, "Too less memory for prev_pkt.\n");
--                    return AVERROR(ENOMEM);
--                }
--            }
--
--            c->prev_frame_count = frame_count;
--            break;
--        }
--        default:
--            /* Write things as is. Nice for self-contained frames from non-multicolor modes or if played
--             * directly from ram and not from a streaming device (rrnet/mmc) */
--            if(pkt) avio_write(s->pb, pkt->data, pkt->size);
--        break;
--    }
--
--    avio_flush(s->pb);
--    return 0;
--}
--
--static int a64_write_trailer(struct AVFormatContext *s)
--{
--    A64MuxerContext *c = s->priv_data;
--    AVPacket pkt = {0};
--    /* need to flush last packet? */
--    if(c->interleaved) a64_write_packet(s, &pkt);
--    /* discard backed up packet */
--    if(c->prev_pkt.data) av_destruct_packet(&c->prev_pkt);
-     return 0;
- }
- 
-@@ -167,9 +57,7 @@ AVOutputFormat ff_a64_muxer = {
-     .name           = "a64",
-     .long_name      = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
-     .extensions     = "a64, A64",
--    .priv_data_size = sizeof (A64Context),
-     .video_codec    = AV_CODEC_ID_A64_MULTI,
-     .write_header   = a64_write_header,
--    .write_packet   = a64_write_packet,
--    .write_trailer  = a64_write_trailer,
-+    .write_packet   = ff_raw_write_packet,
- };
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0153-rtpdec-factorize-identical-code-used-in-several-hand.patch b/debian/patches/post-9beta2/0153-rtpdec-factorize-identical-code-used-in-several-hand.patch
deleted file mode 100644
index f0d98c8..0000000
--- a/debian/patches/post-9beta2/0153-rtpdec-factorize-identical-code-used-in-several-hand.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-From 179a5c37e070f619f14289bdc0fa66a08219eed9 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Thu, 1 Nov 2012 14:03:04 +0100
-Subject: [PATCH 153/278] rtpdec: factorize identical code used in several
- handlers
-
----
- libavformat/rtpdec.c              |   11 +++++++++++
- libavformat/rtpdec.h              |    5 +++++
- libavformat/rtpdec_h263_rfc2190.c |   12 +++++-------
- libavformat/rtpdec_jpeg.c         |   13 +++----------
- libavformat/rtpdec_svq3.c         |    9 ++++-----
- libavformat/rtpdec_vp8.c          |   13 +++----------
- libavformat/rtpdec_xiph.c         |   13 +++----------
- 7 files changed, 34 insertions(+), 42 deletions(-)
-
-diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
-index d16122d..a305dd6 100644
---- a/libavformat/rtpdec.c
-+++ b/libavformat/rtpdec.c
-@@ -803,3 +803,14 @@ int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p,
-     av_free(value);
-     return 0;
- }
-+
-+int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx)
-+{
-+    av_init_packet(pkt);
-+
-+    pkt->size = avio_close_dyn_buf(*dyn_buf, &pkt->data);
-+    pkt->stream_index = stream_idx;
-+    pkt->destruct     = av_destruct_packet;
-+    *dyn_buf = NULL;
-+    return pkt->size;
-+}
-diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
-index 7f14aa2..da3680d 100644
---- a/libavformat/rtpdec.h
-+++ b/libavformat/rtpdec.h
-@@ -202,4 +202,9 @@ int ff_parse_fmtp(AVStream *stream, PayloadContext *data, const char *p,
- 
- void av_register_rtp_dynamic_payload_handlers(void);
- 
-+/**
-+ * Close the dynamic buffer and make a packet from it.
-+ */
-+int ff_rtp_finalize_packet(AVPacket *pkt, AVIOContext **dyn_buf, int stream_idx);
-+
- #endif /* AVFORMAT_RTPDEC_H */
-diff --git a/libavformat/rtpdec_h263_rfc2190.c b/libavformat/rtpdec_h263_rfc2190.c
-index 163d4ea..4957b33 100644
---- a/libavformat/rtpdec_h263_rfc2190.c
-+++ b/libavformat/rtpdec_h263_rfc2190.c
-@@ -61,7 +61,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
- {
-     /* Corresponding to header fields in the RFC */
-     int f, p, i, sbit, ebit, src, r;
--    int header_size;
-+    int header_size, ret;
- 
-     if (data->newformat)
-         return ff_h263_handle_packet(ctx, data, st, pkt, timestamp, buf, len,
-@@ -133,7 +133,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
-         /* Check the picture start code, only start buffering a new frame
-          * if this is correct */
-         if (len > 4 && AV_RB32(buf) >> 10 == 0x20) {
--            int ret = avio_open_dyn_buf(&data->buf);
-+            ret = avio_open_dyn_buf(&data->buf);
-             if (ret < 0)
-                 return ret;
-             data->timestamp = *timestamp;
-@@ -185,13 +185,11 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
-         avio_w8(data->buf, data->endbyte);
-     data->endbyte_bits = 0;
- 
--    av_init_packet(pkt);
--    pkt->size         = avio_close_dyn_buf(data->buf, &pkt->data);
--    pkt->destruct     = av_destruct_packet;
--    pkt->stream_index = st->index;
-+    ret = ff_rtp_finalize_packet(pkt, &data->buf, st->index);
-+    if (ret < 0)
-+        return ret;
-     if (!i)
-         pkt->flags   |= AV_PKT_FLAG_KEY;
--    data->buf = NULL;
- 
-     return 0;
- }
-diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
-index 944758d..9f73f7d 100644
---- a/libavformat/rtpdec_jpeg.c
-+++ b/libavformat/rtpdec_jpeg.c
-@@ -20,6 +20,7 @@
-  */
- 
- #include "avformat.h"
-+#include "rtpdec.h"
- #include "rtpdec_formats.h"
- #include "libavutil/intreadwrite.h"
- #include "libavcodec/mjpeg.h"
-@@ -367,19 +368,11 @@ static int jpeg_parse_packet(AVFormatContext *ctx, PayloadContext *jpeg,
-         avio_write(jpeg->frame, buf, sizeof(buf));
- 
-         /* Prepare the JPEG packet. */
--        av_init_packet(pkt);
--        pkt->size = avio_close_dyn_buf(jpeg->frame, &pkt->data);
--        if (pkt->size < 0) {
-+        if ((ret = ff_rtp_finalize_packet(pkt, &jpeg->frame, st->index)) < 0) {
-             av_log(ctx, AV_LOG_ERROR,
-                    "Error occured when getting frame buffer.\n");
--            jpeg->frame = NULL;
--            return pkt->size;
-+            return ret;
-         }
--        pkt->stream_index = st->index;
--        pkt->destruct     = av_destruct_packet;
--
--        /* Re-init the frame buffer. */
--        jpeg->frame = NULL;
- 
-         return 0;
-     }
-diff --git a/libavformat/rtpdec_svq3.c b/libavformat/rtpdec_svq3.c
-index bfc602e..087a1e3 100644
---- a/libavformat/rtpdec_svq3.c
-+++ b/libavformat/rtpdec_svq3.c
-@@ -97,12 +97,11 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv,
-     avio_write(sv->pktbuf, buf, len);
- 
-     if (end_packet) {
--        av_init_packet(pkt);
--        pkt->stream_index = st->index;
-+        int ret = ff_rtp_finalize_packet(pkt, &sv->pktbuf, st->index);
-+        if (ret < 0)
-+            return ret;
-+
-         *timestamp        = sv->timestamp;
--        pkt->size         = avio_close_dyn_buf(sv->pktbuf, &pkt->data);
--        pkt->destruct     = av_destruct_packet;
--        sv->pktbuf        = NULL;
-         return 0;
-     }
- 
-diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
-index a52be4b..541a1bc 100644
---- a/libavformat/rtpdec_vp8.c
-+++ b/libavformat/rtpdec_vp8.c
-@@ -36,15 +36,6 @@ struct PayloadContext {
-     uint32_t       timestamp;
- };
- 
--static void prepare_packet(AVPacket *pkt, PayloadContext *vp8, int stream)
--{
--    av_init_packet(pkt);
--    pkt->stream_index = stream;
--    pkt->size         = avio_close_dyn_buf(vp8->data, &pkt->data);
--    pkt->destruct     = av_destruct_packet;
--    vp8->data         = NULL;
--}
--
- static int vp8_handle_packet(AVFormatContext *ctx,
-                              PayloadContext *vp8,
-                              AVStream *st,
-@@ -133,7 +124,9 @@ static int vp8_handle_packet(AVFormatContext *ctx,
-     avio_write(vp8->data, buf, len);
- 
-     if (end_packet) {
--        prepare_packet(pkt, vp8, st->index);
-+        int ret = ff_rtp_finalize_packet(pkt, &vp8->data, st->index);
-+        if (ret < 0)
-+            return ret;
-         return 0;
-     }
- 
-diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
-index 38f12bb..40415d8 100644
---- a/libavformat/rtpdec_xiph.c
-+++ b/libavformat/rtpdec_xiph.c
-@@ -202,20 +202,13 @@ static int xiph_handle_packet(AVFormatContext * ctx,
- 
-         if (fragmented == 3) {
-             // end of xiph data packet
--            av_init_packet(pkt);
--            pkt->size = avio_close_dyn_buf(data->fragment, &pkt->data);
--
--            if (pkt->size < 0) {
-+            int ret = ff_rtp_finalize_packet(pkt, &data->fragment, st->index);
-+            if (ret < 0) {
-                 av_log(ctx, AV_LOG_ERROR,
-                        "Error occurred when getting fragment buffer.");
--                return pkt->size;
-+                return ret;
-             }
- 
--            pkt->stream_index = st->index;
--            pkt->destruct = av_destruct_packet;
--
--            data->fragment = NULL;
--
-             return 0;
-         }
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0154-audiointerleave-deobfuscate-a-function-call.patch b/debian/patches/post-9beta2/0154-audiointerleave-deobfuscate-a-function-call.patch
deleted file mode 100644
index 444506d..0000000
--- a/debian/patches/post-9beta2/0154-audiointerleave-deobfuscate-a-function-call.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From fdc867288697d8b052145e80911d2d338d7d02b7 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 22:10:41 +0100
-Subject: [PATCH 154/278] audiointerleave: deobfuscate a function call.
-
-right above there is if (pkt) {<do stuff>; pkt = NULL}, so pkt is just a
-fancy name for NULL at this point.
----
- libavformat/audiointerleave.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
-index e48f826..5df0bb0 100644
---- a/libavformat/audiointerleave.c
-+++ b/libavformat/audiointerleave.c
-@@ -130,5 +130,5 @@ int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt
-         }
-     }
- 
--    return get_packet(s, out, pkt, flush);
-+    return get_packet(s, out, NULL, flush);
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0155-lavc-add-some-AVPacket-doxy.patch b/debian/patches/post-9beta2/0155-lavc-add-some-AVPacket-doxy.patch
deleted file mode 100644
index 8176d87..0000000
--- a/debian/patches/post-9beta2/0155-lavc-add-some-AVPacket-doxy.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0876c28080750e0978ba77c3f72cdd2b0d069a6f Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 17:27:24 +0100
-Subject: [PATCH 155/278] lavc: add some AVPacket doxy.
-
----
- libavcodec/avcodec.h |   22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index d6a4e4d..73321b2 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -872,6 +872,28 @@ enum AVPacketSideDataType {
-     AV_PKT_DATA_H263_MB_INFO,
- };
- 
-+/**
-+ * This structure stores compressed data. It is typically exported by demuxers
-+ * and then passed as input to decoders, or received as output from encoders and
-+ * then passed to muxers.
-+ *
-+ * For video, it should typically contain one compressed frame. For audio it may
-+ * contain several compressed frames.
-+ *
-+ * AVPacket is one of the few structs in Libav, whose size is a part of public
-+ * ABI. Thus it may be allocated on stack and no new fields can be added to it
-+ * without libavcodec and libavformat major bump.
-+ *
-+ * The semantics of data ownership depends on the destruct field.
-+ * If it is set, the packet data is dynamically allocated and is valid
-+ * indefinitely until av_free_packet() is called (which in turn calls the
-+ * destruct callback to free the data). If destruct is not set, the packet data
-+ * is typically backed by some static buffer somewhere and is only valid for a
-+ * limited time (e.g. until the next read call when demuxing).
-+ *
-+ * The side data is always allocated with av_malloc() and is freed in
-+ * av_free_packet().
-+ */
- typedef struct AVPacket {
-     /**
-      * Presentation timestamp in AVStream->time_base units; the time at which
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0156-rtpdec_vp8-Don-t-parse-fields-that-aren-t-used.patch b/debian/patches/post-9beta2/0156-rtpdec_vp8-Don-t-parse-fields-that-aren-t-used.patch
deleted file mode 100644
index 2623f0f..0000000
--- a/debian/patches/post-9beta2/0156-rtpdec_vp8-Don-t-parse-fields-that-aren-t-used.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 2b831a59d9ea82ef5d906a58b11c41f51029b16e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 9 Oct 2012 01:17:45 +0300
-Subject: [PATCH 156/278] rtpdec_vp8: Don't parse fields that aren't used
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This avoids warnings about unused variables.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/rtpdec_vp8.c |   25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
-
-diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
-index 541a1bc..a364358 100644
---- a/libavformat/rtpdec_vp8.c
-+++ b/libavformat/rtpdec_vp8.c
-@@ -45,16 +45,14 @@ static int vp8_handle_packet(AVFormatContext *ctx,
-                              int len, int flags)
- {
-     int start_partition, end_packet;
--    int extended_bits, non_ref, part_id;
-+    int extended_bits, part_id;
-     int pictureid_present = 0, tl0picidx_present = 0, tid_present = 0,
-         keyidx_present = 0;
--    int pictureid = -1, keyidx = -1;
- 
-     if (len < 1)
-         return AVERROR_INVALIDDATA;
- 
-     extended_bits   = buf[0] & 0x80;
--    non_ref         = buf[0] & 0x20;
-     start_partition = buf[0] & 0x10;
-     part_id         = buf[0] & 0x0f;
-     end_packet      = flags & RTP_FLAG_MARKER;
-@@ -71,19 +69,12 @@ static int vp8_handle_packet(AVFormatContext *ctx,
-         len--;
-     }
-     if (pictureid_present) {
-+        int size;
-         if (len < 1)
-             return AVERROR_INVALIDDATA;
--        if (buf[0] & 0x80) {
--            if (len < 2)
--                return AVERROR_INVALIDDATA;
--            pictureid = AV_RB16(buf) & 0x7fff;
--            buf += 2;
--            len -= 2;
--        } else {
--            pictureid = buf[0] & 0x7f;
--            buf++;
--            len--;
--        }
-+        size = buf[0] & 0x80 ? 2 : 1;
-+        buf += size;
-+        len -= size;
-     }
-     if (tl0picidx_present) {
-         // Ignoring temporal level zero index
-@@ -91,11 +82,7 @@ static int vp8_handle_packet(AVFormatContext *ctx,
-         len--;
-     }
-     if (tid_present || keyidx_present) {
--        // Ignoring temporal layer index and layer sync bit
--        if (len < 1)
--            return AVERROR_INVALIDDATA;
--        if (keyidx_present)
--            keyidx = buf[0] & 0x1f;
-+        // Ignoring temporal layer index, layer sync bit and keyframe index
-         buf++;
-         len--;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0157-dv1394-Swap-the-min-and-max-values-of-the-standard-o.patch b/debian/patches/post-9beta2/0157-dv1394-Swap-the-min-and-max-values-of-the-standard-o.patch
deleted file mode 100644
index 0a1f925..0000000
--- a/debian/patches/post-9beta2/0157-dv1394-Swap-the-min-and-max-values-of-the-standard-o.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e1c804d883f3cca1b492147a2ac5d0aea7460076 Mon Sep 17 00:00:00 2001
-From: Michael Niedermayer <michaelni at gmx.at>
-Date: Fri, 2 Nov 2012 02:07:15 +0100
-Subject: [PATCH 157/278] dv1394: Swap the min and max values of the
- 'standard' option
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-DV1394_NTSC has a lower value than DV1394_PAL.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavdevice/dv1394.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavdevice/dv1394.c b/libavdevice/dv1394.c
-index 4a63768..ce8efa6 100644
---- a/libavdevice/dv1394.c
-+++ b/libavdevice/dv1394.c
-@@ -211,7 +211,7 @@ static int dv1394_close(AVFormatContext * context)
- }
- 
- static const AVOption options[] = {
--    { "standard", "", offsetof(struct dv1394_data, format), AV_OPT_TYPE_INT, {.i64 = DV1394_NTSC}, DV1394_PAL, DV1394_NTSC, AV_OPT_FLAG_DECODING_PARAM, "standard" },
-+    { "standard", "", offsetof(struct dv1394_data, format), AV_OPT_TYPE_INT, {.i64 = DV1394_NTSC}, DV1394_NTSC, DV1394_PAL, AV_OPT_FLAG_DECODING_PARAM, "standard" },
-     { "PAL",      "", 0, AV_OPT_TYPE_CONST, {.i64 = DV1394_PAL},   0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
-     { "NTSC",     "", 0, AV_OPT_TYPE_CONST, {.i64 = DV1394_NTSC},  0, 0, AV_OPT_FLAG_DECODING_PARAM, "standard" },
-     { "channel",  "", offsetof(struct dv1394_data, channel), AV_OPT_TYPE_INT, {.i64 = DV1394_DEFAULT_CHANNEL}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0158-x86inc-Only-define-program_name-if-the-macro-is-unse.patch b/debian/patches/post-9beta2/0158-x86inc-Only-define-program_name-if-the-macro-is-unse.patch
deleted file mode 100644
index e636556..0000000
--- a/debian/patches/post-9beta2/0158-x86inc-Only-define-program_name-if-the-macro-is-unse.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 012f73e271638430e035ca68f5803dc2356d6a3e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 30 Oct 2012 02:54:25 +0100
-Subject: [PATCH 158/278] x86inc: Only define program_name if the macro is
- unset
-
-This allows overriding the value from outside of the file.
----
- libavutil/x86/x86inc.asm |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
-index 1fe9f55..b0df2b2 100644
---- a/libavutil/x86/x86inc.asm
-+++ b/libavutil/x86/x86inc.asm
-@@ -34,7 +34,9 @@
- ; as this feature might be useful for others as well.  Send patches or ideas
- ; to x264-devel at videolan.org .
- 
--%define program_name ff
-+%ifndef program_name
-+    %define program_name ff
-+%endif
- 
- %define WIN64  0
- %define UNIX64 0
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0159-x86util-Add-cpuflags_mmxext-alias-for-cpuflags_mmx2.patch b/debian/patches/post-9beta2/0159-x86util-Add-cpuflags_mmxext-alias-for-cpuflags_mmx2.patch
deleted file mode 100644
index bfaa7ae..0000000
--- a/debian/patches/post-9beta2/0159-x86util-Add-cpuflags_mmxext-alias-for-cpuflags_mmx2.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 61bc2bc7d428cafe45f6d9ab40e6c05262d307e9 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 30 Oct 2012 01:11:14 +0100
-Subject: [PATCH 159/278] x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
-
-"mmxext" is a more sensible name and more common in outside projects.
----
- libavutil/x86/x86util.asm |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index 4c6f4c6..761cea0 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -23,6 +23,8 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
-+%define cpuflags_mmxext cpuflags_mmx2
-+
- %include "libavutil/x86/x86inc.asm"
- 
- %macro SBUTTERFLY 4
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0160-x86-ac3dsp-port-to-cpuflags.patch b/debian/patches/post-9beta2/0160-x86-ac3dsp-port-to-cpuflags.patch
deleted file mode 100644
index 154351e..0000000
--- a/debian/patches/post-9beta2/0160-x86-ac3dsp-port-to-cpuflags.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 9ce02e14f01de50fcc6f7f459544b140be66d615 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 15:41:30 +0200
-Subject: [PATCH 160/278] x86: ac3dsp: port to cpuflags
-
----
- libavcodec/x86/ac3dsp.asm |   84 ++++++++++++++++++++++-----------------------
- 1 file changed, 42 insertions(+), 42 deletions(-)
-
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 0c00759..9d66fda 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -41,8 +41,8 @@ SECTION .text
- ; void ff_ac3_exponent_min(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
- ;-----------------------------------------------------------------------------
- 
--%macro AC3_EXPONENT_MIN 1
--cglobal ac3_exponent_min_%1, 3,4,2, exp, reuse_blks, expn, offset
-+%macro AC3_EXPONENT_MIN 0
-+cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, offset
-     shl  reuse_blksq, 8
-     jz .end
-     LOOP_ALIGN
-@@ -65,16 +65,17 @@ cglobal ac3_exponent_min_%1, 3,4,2, exp, reuse_blks, expn, offset
- 
- %define PMINUB PMINUB_MMX
- %define LOOP_ALIGN
--INIT_MMX
--AC3_EXPONENT_MIN mmx
-+INIT_MMX mmx
-+AC3_EXPONENT_MIN
- %if HAVE_MMXEXT
- %define PMINUB PMINUB_MMXEXT
- %define LOOP_ALIGN ALIGN 16
--AC3_EXPONENT_MIN mmxext
-+INIT_MMX mmxext
-+AC3_EXPONENT_MIN
- %endif
- %if HAVE_SSE2_EXTERNAL
--INIT_XMM
--AC3_EXPONENT_MIN sse2
-+INIT_XMM sse2
-+AC3_EXPONENT_MIN
- %endif
- %undef PMINUB
- %undef LOOP_ALIGN
-@@ -168,8 +169,8 @@ AC3_MAX_MSB_ABS_INT16 or_abs
- ; macro used for ff_ac3_lshift_int16() and ff_ac3_rshift_int32()
- ;-----------------------------------------------------------------------------
- 
--%macro AC3_SHIFT 4 ; l/r, 16/32, shift instruction, instruction set
--cglobal ac3_%1shift_int%2_%4, 3,3,5, src, len, shift
-+%macro AC3_SHIFT 3 ; l/r, 16/32, shift instruction, instruction set
-+cglobal ac3_%1shift_int%2, 3, 3, 5, src, len, shift
-     movd      m0, shiftd
- .loop:
-     mova      m1, [srcq         ]
-@@ -195,19 +196,19 @@ cglobal ac3_%1shift_int%2_%4, 3,3,5, src, len, shift
- ; void ff_ac3_lshift_int16(int16_t *src, unsigned int len, unsigned int shift)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--AC3_SHIFT l, 16, psllw, mmx
--INIT_XMM
--AC3_SHIFT l, 16, psllw, sse2
-+INIT_MMX mmx
-+AC3_SHIFT l, 16, psllw
-+INIT_XMM sse2
-+AC3_SHIFT l, 16, psllw
- 
- ;-----------------------------------------------------------------------------
- ; void ff_ac3_rshift_int32(int32_t *src, unsigned int len, unsigned int shift)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--AC3_SHIFT r, 32, psrad, mmx
--INIT_XMM
--AC3_SHIFT r, 32, psrad, sse2
-+INIT_MMX mmx
-+AC3_SHIFT r, 32, psrad
-+INIT_XMM sse2
-+AC3_SHIFT r, 32, psrad
- 
- ;-----------------------------------------------------------------------------
- ; void ff_float_to_fixed24(int32_t *dst, const float *src, unsigned int len)
-@@ -215,8 +216,8 @@ AC3_SHIFT r, 32, psrad, sse2
- 
- ; The 3DNow! version is not bit-identical because pf2id uses truncation rather
- ; than round-to-nearest.
--INIT_MMX
--cglobal float_to_fixed24_3dnow, 3,3,0, dst, src, len
-+INIT_MMX 3dnow
-+cglobal float_to_fixed24, 3, 3, 0, dst, src, len
-     movq   m0, [pf_1_24]
- .loop:
-     movq   m1, [srcq   ]
-@@ -242,8 +243,8 @@ cglobal float_to_fixed24_3dnow, 3,3,0, dst, src, len
-     femms
-     RET
- 
--INIT_XMM
--cglobal float_to_fixed24_sse, 3,3,3, dst, src, len
-+INIT_XMM sse
-+cglobal float_to_fixed24, 3, 3, 3, dst, src, len
-     movaps     m0, [pf_1_24]
- .loop:
-     movaps     m1, [srcq   ]
-@@ -267,8 +268,8 @@ cglobal float_to_fixed24_sse, 3,3,3, dst, src, len
-     emms
-     RET
- 
--INIT_XMM
--cglobal float_to_fixed24_sse2, 3,3,9, dst, src, len
-+INIT_XMM sse2
-+cglobal float_to_fixed24, 3, 3, 9, dst, src, len
-     movaps     m0, [pf_1_24]
- .loop:
-     movaps     m1, [srcq    ]
-@@ -332,8 +333,8 @@ cglobal float_to_fixed24_sse2, 3,3,9, dst, src, len
-     paddd    %1, %2
- %endmacro
- 
--INIT_XMM
--cglobal ac3_compute_mantissa_size_sse2, 1,2,4, mant_cnt, sum
-+INIT_XMM sse2
-+cglobal ac3_compute_mantissa_size, 1, 2, 4, mant_cnt, sum
-     movdqa      m0, [mant_cntq      ]
-     movdqa      m1, [mant_cntq+ 1*16]
-     paddw       m0, [mant_cntq+ 2*16]
-@@ -373,20 +374,20 @@ cglobal ac3_compute_mantissa_size_sse2, 1,2,4, mant_cnt, sum
- ; void ff_ac3_extract_exponents(uint8_t *exp, int32_t *coef, int nb_coefs)
- ;------------------------------------------------------------------------------
- 
--%macro PABSD_MMX 2 ; src/dst, tmp
-+%macro PABSD 1-2 ; src/dst, unused
-+%if cpuflag(ssse3)
-+    pabsd    %1, %1
-+%else ; src/dst, tmp
-     pxor     %2, %2
-     pcmpgtd  %2, %1
-     pxor     %1, %2
-     psubd    %1, %2
--%endmacro
--
--%macro PABSD_SSSE3 1-2 ; src/dst, unused
--    pabsd    %1, %1
-+%endif
- %endmacro
- 
- %if HAVE_AMD3DNOW_EXTERNAL
--INIT_MMX
--cglobal ac3_extract_exponents_3dnow, 3,3,0, exp, coef, len
-+INIT_MMX 3dnow
-+cglobal ac3_extract_exponents, 3, 3, 0, exp, coef, len
-     add      expq, lenq
-     lea     coefq, [coefq+4*lenq]
-     neg      lenq
-@@ -395,8 +396,8 @@ cglobal ac3_extract_exponents_3dnow, 3,3,0, exp, coef, len
- .loop:
-     movq       m0, [coefq+4*lenq  ]
-     movq       m1, [coefq+4*lenq+8]
--    PABSD_MMX  m0, m2
--    PABSD_MMX  m1, m2
-+    PABSD      m0, m2
-+    PABSD      m1, m2
-     pslld      m0, 1
-     por        m0, m3
-     pi2fd      m2, m0
-@@ -420,8 +421,8 @@ cglobal ac3_extract_exponents_3dnow, 3,3,0, exp, coef, len
-     REP_RET
- %endif
- 
--%macro AC3_EXTRACT_EXPONENTS 1
--cglobal ac3_extract_exponents_%1, 3,3,4, exp, coef, len
-+%macro AC3_EXTRACT_EXPONENTS 0
-+cglobal ac3_extract_exponents, 3, 3, 4, exp, coef, len
-     add     expq, lenq
-     lea    coefq, [coefq+4*lenq]
-     neg     lenq
-@@ -453,11 +454,10 @@ cglobal ac3_extract_exponents_%1, 3,3,4, exp, coef, len
- %endmacro
- 
- %if HAVE_SSE2_EXTERNAL
--INIT_XMM
--%define PABSD PABSD_MMX
--AC3_EXTRACT_EXPONENTS sse2
--%if HAVE_SSSE3_EXTERNAL
--%define PABSD PABSD_SSSE3
--AC3_EXTRACT_EXPONENTS ssse3
-+INIT_XMM sse2
-+AC3_EXTRACT_EXPONENTS
- %endif
-+%if HAVE_SSSE3_EXTERNAL
-+INIT_XMM ssse3
-+AC3_EXTRACT_EXPONENTS
- %endif
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0161-x86-PMINUB-port-to-cpuflags.patch b/debian/patches/post-9beta2/0161-x86-PMINUB-port-to-cpuflags.patch
deleted file mode 100644
index e497f6b..0000000
--- a/debian/patches/post-9beta2/0161-x86-PMINUB-port-to-cpuflags.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 26f01bd106f62ffe501a9baf609c476051d919da Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 17:43:50 +0200
-Subject: [PATCH 161/278] x86: PMINUB: port to cpuflags
-
----
- libavcodec/x86/ac3dsp.asm |    3 ---
- libavutil/x86/x86util.asm |   10 +++++-----
- 2 files changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 9d66fda..2c453c5 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -63,12 +63,10 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, offset
-     REP_RET
- %endmacro
- 
--%define PMINUB PMINUB_MMX
- %define LOOP_ALIGN
- INIT_MMX mmx
- AC3_EXPONENT_MIN
- %if HAVE_MMXEXT
--%define PMINUB PMINUB_MMXEXT
- %define LOOP_ALIGN ALIGN 16
- INIT_MMX mmxext
- AC3_EXPONENT_MIN
-@@ -77,7 +75,6 @@ AC3_EXPONENT_MIN
- INIT_XMM sse2
- AC3_EXPONENT_MIN
- %endif
--%undef PMINUB
- %undef LOOP_ALIGN
- 
- ;-----------------------------------------------------------------------------
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index 761cea0..ca0041a 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -530,14 +530,14 @@
-     movh  [%7+%8], %4
- %endmacro
- 
--%macro PMINUB_MMX 3 ; dst, src, tmp
-+%macro PMINUB 3 ; dst, src, ignored
-+%if cpuflag(mmxext)
-+    pminub   %1, %2
-+%else ; dst, src, tmp
-     mova     %3, %1
-     psubusb  %3, %2
-     psubb    %1, %3
--%endmacro
--
--%macro PMINUB_MMXEXT 3 ; dst, src, ignored
--    pminub   %1, %2
-+%endif
- %endmacro
- 
- %macro SPLATW 2-3 0
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0162-PGS-subtitles-Expose-forced-flag.patch b/debian/patches/post-9beta2/0162-PGS-subtitles-Expose-forced-flag.patch
deleted file mode 100644
index 9657081..0000000
--- a/debian/patches/post-9beta2/0162-PGS-subtitles-Expose-forced-flag.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 85f67c4865d8014ded2aaa64b3cba6e2970342d7 Mon Sep 17 00:00:00 2001
-From: John Stebbins <jstebbins.hb at gmail.com>
-Date: Sat, 20 Oct 2012 09:56:11 -0700
-Subject: [PATCH 162/278] PGS subtitles: Expose forced flag
-
-Useful for detection of subtitles displayed during foreign language
-scenes.
-
-Signed-off-by: Diego Biurrun <diego at biurrun.de>
----
- libavcodec/avcodec.h   |    3 +++
- libavcodec/pgssubdec.c |   11 ++++++++---
- libavcodec/version.h   |    2 +-
- 3 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index 73321b2..43f7c87 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -3166,6 +3166,8 @@ enum AVSubtitleType {
-     SUBTITLE_ASS,
- };
- 
-+#define AV_SUBTITLE_FLAG_FORCED 0x00000001
-+
- typedef struct AVSubtitleRect {
-     int x;         ///< top left corner  of pict, undefined when pict is not set
-     int y;         ///< top left corner  of pict, undefined when pict is not set
-@@ -3188,6 +3190,7 @@ typedef struct AVSubtitleRect {
-      * struct.
-      */
-     char *ass;
-+    int flags;
- } AVSubtitleRect;
- 
- typedef struct AVSubtitle {
-diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
-index 9fd26d8..0326ea8 100644
---- a/libavcodec/pgssubdec.c
-+++ b/libavcodec/pgssubdec.c
-@@ -45,6 +45,7 @@ typedef struct PGSSubPresentation {
-     int y;
-     int id_number;
-     int object_number;
-+    uint8_t composition_flag;
- } PGSSubPresentation;
- 
- typedef struct PGSSubPicture {
-@@ -299,16 +300,17 @@ static void parse_presentation_segment(AVCodecContext *avctx,
-     buf += 3;
- 
-     ctx->presentation.object_number = bytestream_get_byte(&buf);
-+    ctx->presentation.composition_flag = 0;
-     if (!ctx->presentation.object_number)
-         return;
- 
-     /*
--     * Skip 4 bytes of unknown:
-+     * Skip 3 bytes of unknown:
-      *     object_id_ref (2 bytes),
-      *     window_id_ref,
--     *     composition_flag (0x80 - object cropped, 0x40 - object forced)
-      */
--    buf += 4;
-+    buf += 3;
-+    ctx->presentation.composition_flag = bytestream_get_byte(&buf);
- 
-     x = bytestream_get_be16(&buf);
-     y = bytestream_get_be16(&buf);
-@@ -368,6 +370,9 @@ static int display_end_segment(AVCodecContext *avctx, void *data,
-     sub->rects[0]  = av_mallocz(sizeof(*sub->rects[0]));
-     sub->num_rects = 1;
- 
-+    if (ctx->presentation.composition_flag & 0x40)
-+        sub->rects[0]->flags |= AV_SUBTITLE_FLAG_FORCED;
-+
-     sub->rects[0]->x    = ctx->presentation.x;
-     sub->rects[0]->y    = ctx->presentation.y;
-     sub->rects[0]->w    = ctx->picture.w;
-diff --git a/libavcodec/version.h b/libavcodec/version.h
-index 5ee7c7c..45ff507 100644
---- a/libavcodec/version.h
-+++ b/libavcodec/version.h
-@@ -27,7 +27,7 @@
-  */
- 
- #define LIBAVCODEC_VERSION_MAJOR 54
--#define LIBAVCODEC_VERSION_MINOR 32
-+#define LIBAVCODEC_VERSION_MINOR 33
- #define LIBAVCODEC_VERSION_MICRO  0
- 
- #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0163-parser-Move-Doxygen-documentation-to-the-header-file.patch b/debian/patches/post-9beta2/0163-parser-Move-Doxygen-documentation-to-the-header-file.patch
deleted file mode 100644
index ce2fcf7..0000000
--- a/debian/patches/post-9beta2/0163-parser-Move-Doxygen-documentation-to-the-header-file.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9a07c1332cfe092b57b5758f22b686ca58806c60 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 2 Nov 2012 12:04:16 +0100
-Subject: [PATCH 163/278] parser: Move Doxygen documentation to the header
- files
-
----
- libavcodec/avcodec.h |    4 ++++
- libavcodec/parser.c  |    9 ---------
- libavcodec/parser.h  |    5 +++++
- 3 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index 43f7c87..d5968f9 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -3890,6 +3890,10 @@ int av_parser_parse2(AVCodecParserContext *s,
-                      int64_t pts, int64_t dts,
-                      int64_t pos);
- 
-+/**
-+ * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
-+ * @deprecated use AVBitstreamFilter
-+ */
- int av_parser_change(AVCodecParserContext *s,
-                      AVCodecContext *avctx,
-                      uint8_t **poutbuf, int *poutbuf_size,
-diff --git a/libavcodec/parser.c b/libavcodec/parser.c
-index 03f327e..7ace766 100644
---- a/libavcodec/parser.c
-+++ b/libavcodec/parser.c
-@@ -167,11 +167,6 @@ int av_parser_parse2(AVCodecParserContext *s,
-     return index;
- }
- 
--/**
-- *
-- * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
-- * @deprecated use AVBitstreamFilter
-- */
- int av_parser_change(AVCodecParserContext *s,
-                      AVCodecContext *avctx,
-                      uint8_t **poutbuf, int *poutbuf_size,
-@@ -217,10 +212,6 @@ void av_parser_close(AVCodecParserContext *s)
- 
- /*****************************************************/
- 
--/**
-- * Combine the (truncated) bitstream to a complete frame.
-- * @return -1 if no complete frame could be created, AVERROR(ENOMEM) if there was a memory allocation error
-- */
- int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
- {
-     if(pc->overread){
-diff --git a/libavcodec/parser.h b/libavcodec/parser.h
-index 1d029e3..ea1cae2 100644
---- a/libavcodec/parser.h
-+++ b/libavcodec/parser.h
-@@ -39,6 +39,11 @@ typedef struct ParseContext{
- 
- #define END_NOT_FOUND (-100)
- 
-+/**
-+ * Combine the (truncated) bitstream to a complete frame.
-+ * @return -1 if no complete frame could be created,
-+ *         AVERROR(ENOMEM) if there was a memory allocation error
-+ */
- int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size);
- int ff_mpeg4video_split(AVCodecContext *avctx, const uint8_t *buf,
-                         int buf_size);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0164-x86-Refactor-PSWAPD-fallback-implementations-and-por.patch b/debian/patches/post-9beta2/0164-x86-Refactor-PSWAPD-fallback-implementations-and-por.patch
deleted file mode 100644
index 416ce91..0000000
--- a/debian/patches/post-9beta2/0164-x86-Refactor-PSWAPD-fallback-implementations-and-por.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 0a7a94f2e53bcdb8ac5857eb8c67c16f6f1d0f2f Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Thu, 2 Aug 2012 00:55:34 +0200
-Subject: [PATCH 164/278] x86: Refactor PSWAPD fallback implementations and
- port to cpuflags
-
----
- libavcodec/x86/fft.asm        |   16 ++--------------
- libavcodec/x86/fmtconvert.asm |   17 ++---------------
- libavutil/x86/x86util.asm     |   12 ++++++++++++
- 3 files changed, 16 insertions(+), 29 deletions(-)
-
-diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
-index 8c69f1f..111f322 100644
---- a/libavcodec/x86/fft.asm
-+++ b/libavcodec/x86/fft.asm
-@@ -105,7 +105,8 @@ SECTION_TEXT
-     pfadd    %5, %4 ; {t6,t5}
-     pxor     %3, [ps_m1p1] ; {t8,t7}
-     mova     %6, %1
--    PSWAPD   %3, %3
-+    movd [r0+12], %3
-+    punpckhdq %3, [r0+8]
-     pfadd    %1, %5 ; {r0,i0}
-     pfsub    %6, %5 ; {r2,i2}
-     mova     %4, %2
-@@ -498,19 +499,6 @@ fft8 %+ SUFFIX:
- %endmacro
- 
- %if ARCH_X86_32
--%macro PSWAPD 2
--%if cpuflag(3dnowext)
--    pswapd %1, %2
--%elifidn %1, %2
--    movd [r0+12], %1
--    punpckhdq %1, [r0+8]
--%else
--    movq  %1, %2
--    psrlq %1, 32
--    punpckldq %1, %2
--%endif
--%endmacro
--
- INIT_MMX 3dnowext
- FFT48_3DNOW
- 
-diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm
-index fb183ce..77b8bd7 100644
---- a/libavcodec/x86/fmtconvert.asm
-+++ b/libavcodec/x86/fmtconvert.asm
-@@ -246,16 +246,6 @@ FLOAT_TO_INT16_INTERLEAVE2
- INIT_XMM sse2
- FLOAT_TO_INT16_INTERLEAVE2
- 
--
--%macro PSWAPD_SSE 2
--    pshufw %1, %2, 0x4e
--%endmacro
--%macro PSWAPD_3DNOW 2
--    movq  %1, %2
--    psrlq %1, 32
--    punpckldq %1, %2
--%endmacro
--
- %macro FLOAT_TO_INT16_INTERLEAVE6 0
- ; void float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len)
- cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, src5, len
-@@ -285,11 +275,11 @@ cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, s
-     packssdw   mm0, mm3
-     packssdw   mm1, mm4
-     packssdw   mm2, mm5
--    pswapd     mm3, mm0
-+    PSWAPD     mm3, mm0
-     punpcklwd  mm0, mm1
-     punpckhwd  mm1, mm2
-     punpcklwd  mm2, mm3
--    pswapd     mm3, mm0
-+    PSWAPD     mm3, mm0
-     punpckldq  mm0, mm2
-     punpckhdq  mm2, mm1
-     punpckldq  mm1, mm3
-@@ -305,12 +295,9 @@ cglobal float_to_int16_interleave6, 2, 8, 0, dst, src, src1, src2, src3, src4, s
- %endmacro ; FLOAT_TO_INT16_INTERLEAVE6
- 
- INIT_MMX sse
--%define pswapd PSWAPD_SSE
- FLOAT_TO_INT16_INTERLEAVE6
- INIT_MMX 3dnow
--%define pswapd PSWAPD_3DNOW
- FLOAT_TO_INT16_INTERLEAVE6
--%undef pswapd
- INIT_MMX 3dnowext
- FLOAT_TO_INT16_INTERLEAVE6
- 
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index ca0041a..9183d38 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -319,6 +319,18 @@
-     %endif
- %endmacro
- 
-+%macro PSWAPD 2
-+%if cpuflag(mmxext)
-+    pshufw    %1, %2, q1032
-+%elif cpuflag(3dnowext)
-+    pswapd    %1, %2
-+%elif cpuflag(3dnow)
-+    movq      %1, %2
-+    psrlq     %1, 32
-+    punpckldq %1, %2
-+%endif
-+%endmacro
-+
- %macro DEINTB 5 ; mask, reg1, mask, reg2, optional src to fill masks from
- %ifnum %5
-     pand   m%3, m%5, m%4 ; src .. y6 .. y4
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0165-vf_drawtext-do-not-use-deprecated-av_tree_node_size.patch b/debian/patches/post-9beta2/0165-vf_drawtext-do-not-use-deprecated-av_tree_node_size.patch
deleted file mode 100644
index 1b00770..0000000
--- a/debian/patches/post-9beta2/0165-vf_drawtext-do-not-use-deprecated-av_tree_node_size.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From b68aac7ea34ec92321508f7365b5f2813766be79 Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Fri, 2 Nov 2012 10:56:30 +0100
-Subject: [PATCH 165/278] vf_drawtext: do not use deprecated av_tree_node_size
-
----
- libavfilter/vf_drawtext.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
-index ecc789c..43a42d8 100644
---- a/libavfilter/vf_drawtext.c
-+++ b/libavfilter/vf_drawtext.c
-@@ -263,7 +263,7 @@ static int load_glyph(AVFilterContext *ctx, Glyph **glyph_ptr, uint32_t code)
-     FT_Glyph_Get_CBox(*glyph->glyph, ft_glyph_bbox_pixels, &glyph->bbox);
- 
-     /* cache the newly created glyph */
--    if (!(node = av_mallocz(av_tree_node_size))) {
-+    if (!(node = av_tree_node_alloc())) {
-         ret = AVERROR(ENOMEM);
-         goto error;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0166-crc-move-doxy-to-the-header.patch b/debian/patches/post-9beta2/0166-crc-move-doxy-to-the-header.patch
deleted file mode 100644
index f3d613d..0000000
--- a/debian/patches/post-9beta2/0166-crc-move-doxy-to-the-header.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From b4dc6dccbaea08fc0d41e99b020ee1e0e9ff301b Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Fri, 2 Nov 2012 10:58:36 +0100
-Subject: [PATCH 166/278] crc: move doxy to the header
-
----
- libavutil/crc.c |   28 ----------------------------
- libavutil/crc.h |   30 ++++++++++++++++++++++++++++++
- 2 files changed, 30 insertions(+), 28 deletions(-)
-
-diff --git a/libavutil/crc.c b/libavutil/crc.c
-index ee925d6..47520e5 100644
---- a/libavutil/crc.c
-+++ b/libavutil/crc.c
-@@ -40,22 +40,6 @@ static struct {
- static AVCRC av_crc_table[AV_CRC_MAX][257];
- #endif
- 
--/**
-- * Initialize a CRC table.
-- * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024
-- * @param le If 1, the lowest bit represents the coefficient for the highest
-- *           exponent of the corresponding polynomial (both for poly and
-- *           actual CRC).
-- *           If 0, you must swap the CRC parameter and the result of av_crc
-- *           if you need the standard representation (can be simplified in
-- *           most cases to e.g. bswap16):
-- *           av_bswap32(crc << (32-bits))
-- * @param bits number of bits for the CRC
-- * @param poly generator polynomial without the x**bits coefficient, in the
-- *             representation as specified by le
-- * @param ctx_size size of ctx in bytes
-- * @return <0 on failure
-- */
- int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
- {
-     unsigned i, j;
-@@ -89,11 +73,6 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size)
-     return 0;
- }
- 
--/**
-- * Get an initialized standard CRC table.
-- * @param crc_id ID of a standard CRC
-- * @return a pointer to the CRC table or NULL on failure
-- */
- const AVCRC *av_crc_get_table(AVCRCId crc_id)
- {
- #if !CONFIG_HARDCODED_TABLES
-@@ -108,13 +87,6 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id)
-     return av_crc_table[crc_id];
- }
- 
--/**
-- * Calculate the CRC of a block.
-- * @param crc CRC of previous blocks if any or initial value for CRC
-- * @return CRC updated with the data from the given block
-- *
-- * @see av_crc_init() "le" parameter
-- */
- uint32_t av_crc(const AVCRC *ctx, uint32_t crc,
-                 const uint8_t *buffer, size_t length)
- {
-diff --git a/libavutil/crc.h b/libavutil/crc.h
-index 5c25607..142a5b5 100644
---- a/libavutil/crc.h
-+++ b/libavutil/crc.h
-@@ -36,8 +36,38 @@ typedef enum {
-     AV_CRC_MAX,         /*< Not part of public API! Do not use outside libavutil. */
- }AVCRCId;
- 
-+/**
-+ * Initialize a CRC table.
-+ * @param ctx must be an array of size sizeof(AVCRC)*257 or sizeof(AVCRC)*1024
-+ * @param le If 1, the lowest bit represents the coefficient for the highest
-+ *           exponent of the corresponding polynomial (both for poly and
-+ *           actual CRC).
-+ *           If 0, you must swap the CRC parameter and the result of av_crc
-+ *           if you need the standard representation (can be simplified in
-+ *           most cases to e.g. bswap16):
-+ *           av_bswap32(crc << (32-bits))
-+ * @param bits number of bits for the CRC
-+ * @param poly generator polynomial without the x**bits coefficient, in the
-+ *             representation as specified by le
-+ * @param ctx_size size of ctx in bytes
-+ * @return <0 on failure
-+ */
- int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
-+
-+/**
-+ * Get an initialized standard CRC table.
-+ * @param crc_id ID of a standard CRC
-+ * @return a pointer to the CRC table or NULL on failure
-+ */
- const AVCRC *av_crc_get_table(AVCRCId crc_id);
-+
-+/**
-+ * Calculate the CRC of a block.
-+ * @param crc CRC of previous blocks if any or initial value for CRC
-+ * @return CRC updated with the data from the given block
-+ *
-+ * @see av_crc_init() "le" parameter
-+ */
- uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length) av_pure;
- 
- #endif /* AVUTIL_CRC_H */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0167-avconv-do-not-free-muxed-packet-on-streamcopy.patch b/debian/patches/post-9beta2/0167-avconv-do-not-free-muxed-packet-on-streamcopy.patch
deleted file mode 100644
index 7ec92f2..0000000
--- a/debian/patches/post-9beta2/0167-avconv-do-not-free-muxed-packet-on-streamcopy.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From c8977f6d268462e237cee38be6159c7bb701c62e Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 21:15:41 +0100
-Subject: [PATCH 167/278] avconv: do not free muxed packet on streamcopy.
-
-The packet belongs to lavf, the caller must not free it or access it in
-any other way.
-No change in practice, since destruct is set to NULL anyway.
----
- avconv.c |    1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/avconv.c b/avconv.c
-index d0902a6..964847a 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -1045,7 +1045,6 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
- 
-     write_frame(of->ctx, &opkt, ost);
-     ost->st->codec->frame_number++;
--    av_free_packet(&opkt);
- }
- 
- static void rate_emu_sleep(InputStream *ist)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0168-lavf-clarify-the-lifetime-of-demuxed-packets.patch b/debian/patches/post-9beta2/0168-lavf-clarify-the-lifetime-of-demuxed-packets.patch
deleted file mode 100644
index 8834b18..0000000
--- a/debian/patches/post-9beta2/0168-lavf-clarify-the-lifetime-of-demuxed-packets.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 717a4509930854081deea54a3bfcdb547161fecf Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 19:59:53 +0100
-Subject: [PATCH 168/278] lavf: clarify the lifetime of demuxed packets.
-
----
- libavformat/avformat.h |   26 ++++++++++++++++----------
- 1 file changed, 16 insertions(+), 10 deletions(-)
-
-diff --git a/libavformat/avformat.h b/libavformat/avformat.h
-index 8af007e..0961308 100644
---- a/libavformat/avformat.h
-+++ b/libavformat/avformat.h
-@@ -158,9 +158,15 @@
-  * information will be in AVStream.time_base units, i.e. it has to be
-  * multiplied by the timebase to convert them to seconds.
-  *
-- * The packet data belongs to the demuxer and is invalid after the next call to
-- * av_read_frame(). The user must free the packet with av_free_packet() before
-- * calling av_read_frame() again or closing the file.
-+ * If AVPacket.destruct is set on the returned packet, then the packet is
-+ * allocated dynamically and the user may keep it indefinitely.
-+ * Otherwise, if AVPacket.destruct is NULL, the packet data is backed by a
-+ * static storage somewhere inside the demuxer and the packet is only valid
-+ * until the next av_read_frame() call or closing the file. If the caller
-+ * requires a longer lifetime, av_dup_packet() will make an av_malloc()ed copy
-+ * of it.
-+ * In both cases, the packet must be freed with av_free_packet() when it is no
-+ * longer needed.
-  *
-  * @section lavf_decoding_seek Seeking
-  * @}
-@@ -1307,13 +1313,13 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
-  * omit invalid data between valid frames so as to give the decoder the maximum
-  * information possible for decoding.
-  *
-- * The returned packet is valid
-- * until the next av_read_frame() or until av_close_input_file() and
-- * must be freed with av_free_packet. For video, the packet contains
-- * exactly one frame. For audio, it contains an integer number of
-- * frames if each frame has a known fixed size (e.g. PCM or ADPCM
-- * data). If the audio frames have a variable size (e.g. MPEG audio),
-- * then it contains one frame.
-+ * If pkt->destruct is NULL, then the packet is valid until the next
-+ * av_read_frame() or until av_close_input_file(). Otherwise the packet is valid
-+ * indefinitely. In both cases the packet must be freed with
-+ * av_free_packet when it is no longer needed. For video, the packet contains
-+ * exactly one frame. For audio, it contains an integer number of frames if each
-+ * frame has a known fixed size (e.g. PCM or ADPCM data). If the audio frames
-+ * have a variable size (e.g. MPEG audio), then it contains one frame.
-  *
-  * pkt->pts, pkt->dts and pkt->duration are always set to correct
-  * values in AVStream.time_base units (and guessed if the format cannot
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0169-lavf-fix-av_interleaved_write_frame-doxy.patch b/debian/patches/post-9beta2/0169-lavf-fix-av_interleaved_write_frame-doxy.patch
deleted file mode 100644
index 48271d6..0000000
--- a/debian/patches/post-9beta2/0169-lavf-fix-av_interleaved_write_frame-doxy.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9221efef7968463f3e3d9ce79ea72eaca082e73f Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Wed, 31 Oct 2012 16:54:16 +0100
-Subject: [PATCH 169/278] lavf: fix av_interleaved_write_frame() doxy.
-
-A sentence was mistakenly inserted in the middle of another sentence.
----
- libavformat/avformat.h |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/avformat.h b/libavformat/avformat.h
-index 0961308..3e10496 100644
---- a/libavformat/avformat.h
-+++ b/libavformat/avformat.h
-@@ -1463,10 +1463,10 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt);
-  * @param s media file handle
-  * @param pkt The packet containing the data to be written. Libavformat takes
-  * ownership of the data and will free it when it sees fit using the packet's
-- * This can be NULL (at any time, not just at the end), to flush the
-- * interleaving queues.
-  * @ref AVPacket.destruct "destruct" field. The caller must not access the data
-  * after this function returns, as it may already be freed.
-+ * This can be NULL (at any time, not just at the end), to flush the
-+ * interleaving queues.
-  * Packet's @ref AVPacket.stream_index "stream_index" field must be set to the
-  * index of the corresponding stream in @ref AVFormatContext.streams
-  * "s.streams".
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0170-matroskadec-do-not-use-avpacket-internals.patch b/debian/patches/post-9beta2/0170-matroskadec-do-not-use-avpacket-internals.patch
deleted file mode 100644
index 206118d..0000000
--- a/debian/patches/post-9beta2/0170-matroskadec-do-not-use-avpacket-internals.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 34871beb5eb6bc59f5e58326a214efd88a4c2ccd Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Thu, 1 Nov 2012 06:34:41 +0100
-Subject: [PATCH 170/278] matroskadec: do not use avpacket internals
-
----
- libavformat/matroskadec.c |   15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
-index 26f8707..bf67253 100644
---- a/libavformat/matroskadec.c
-+++ b/libavformat/matroskadec.c
-@@ -1137,13 +1137,14 @@ static void matroska_fix_ass_packet(MatroskaDemuxContext *matroska,
- 
- static int matroska_merge_packets(AVPacket *out, AVPacket *in)
- {
--    void *newdata = av_realloc(out->data, out->size+in->size);
--    if (!newdata)
--        return AVERROR(ENOMEM);
--    out->data = newdata;
--    memcpy(out->data+out->size, in->data, in->size);
--    out->size += in->size;
--    av_destruct_packet(in);
-+    int old_size = out->size;
-+    int ret = av_grow_packet(out, in->size);
-+    if (ret < 0)
-+        return ret;
-+
-+    memcpy(out->data + old_size, in->data, in->size);
-+
-+    av_free_packet(in);
-     av_free(in);
-     return 0;
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0171-doc-add-apidoc-target-for-doxygen-API-documentation.patch b/debian/patches/post-9beta2/0171-doc-add-apidoc-target-for-doxygen-API-documentation.patch
deleted file mode 100644
index 60034ea..0000000
--- a/debian/patches/post-9beta2/0171-doc-add-apidoc-target-for-doxygen-API-documentation.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From b3fab1f2cd22bfaee95831af57a65f803f03083c Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Mon, 29 Oct 2012 16:26:59 +0100
-Subject: [PATCH 171/278] doc: add apidoc target for doxygen API documentation
-
-Documentation includes only the externally visible API of the installed
-headers.
-
-Based on a patch by Anton Khirnov <anton at khirnov.net>.
-
-Signed-off-by: Anton Khirnov <anton at khirnov.net>
----
- doc/Makefile        |    9 +++++++--
- doc/doxy-wrapper.sh |   14 ++++++++++++++
- library.mak         |    2 ++
- 3 files changed, 23 insertions(+), 2 deletions(-)
- create mode 100755 doc/doxy-wrapper.sh
-
-diff --git a/doc/Makefile b/doc/Makefile
-index 6353034..d22de79 100644
---- a/doc/Makefile
-+++ b/doc/Makefile
-@@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
- 
- all-$(CONFIG_DOC): documentation
- 
-+apidoc: doc/doxy/html
- documentation: $(DOCS)
- 
- TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
-@@ -39,7 +40,10 @@ doc/%.1: TAG = MAN
- doc/%.1: doc/%.pod $(GENTEXI)
- 	$(M)pod2man --section=1 --center=" " --release=" " $< > $@
- 
--$(DOCS): | doc/
-+$(DOCS) doc/doxy/html: | doc/
-+
-+doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
-+	$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
- 
- install-progs-$(CONFIG_DOC): install-man
- 
-@@ -54,7 +58,8 @@ uninstall-man:
- 
- clean::
- 	$(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
-+	$(RM) -r doc/doxy/html
- 
- -include $(wildcard $(DOCS:%=%.d))
- 
--.PHONY: documentation
-+.PHONY: apidoc documentation
-diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh
-new file mode 100755
-index 0000000..6650e38
---- /dev/null
-+++ b/doc/doxy-wrapper.sh
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+
-+SRC_PATH="${1}"
-+DOXYFILE="${2}"
-+
-+shift 2
-+
-+doxygen - <<EOF
-+ at INCLUDE        = ${DOXYFILE}
-+INPUT           = $@
-+HTML_HEADER     = ${SRC_PATH}/doc/doxy/header.html
-+HTML_FOOTER     = ${SRC_PATH}/doc/doxy/footer.html
-+HTML_STYLESHEET = ${SRC_PATH}/doc/doxy/doxy_stylesheet.css
-+EOF
-diff --git a/library.mak b/library.mak
-index cbfa0d4..33ec37f 100644
---- a/library.mak
-+++ b/library.mak
-@@ -6,6 +6,8 @@ LIBVERSION := $(lib$(NAME)_VERSION)
- LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR)
- INCINSTDIR := $(INCDIR)/lib$(NAME)
- 
-+INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
-+
- all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
- all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0172-rtmp-Use-av_strlcat-instead-of-strncat.patch b/debian/patches/post-9beta2/0172-rtmp-Use-av_strlcat-instead-of-strncat.patch
deleted file mode 100644
index 5918140..0000000
--- a/debian/patches/post-9beta2/0172-rtmp-Use-av_strlcat-instead-of-strncat.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d578f94746dd85dd066abb8bc6bd3c5825a4f759 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Mon, 5 Nov 2012 11:01:24 +0200
-Subject: [PATCH 172/278] rtmp: Use av_strlcat instead of strncat
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/rtmpproto.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
-index 3ab2e57..8924fb3 100644
---- a/libavformat/rtmpproto.c
-+++ b/libavformat/rtmpproto.c
-@@ -2188,7 +2188,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
-         } else {
-             rt->playpath[0] = 0;
-         }
--        strncat(rt->playpath, fname, PLAYPATH_MAX_LENGTH - 5);
-+        av_strlcat(rt->playpath, fname, PLAYPATH_MAX_LENGTH);
-     }
- 
-     if (!rt->tcurl) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0173-x86-vc1dsp-port-to-cpuflags.patch b/debian/patches/post-9beta2/0173-x86-vc1dsp-port-to-cpuflags.patch
deleted file mode 100644
index 3017f3e..0000000
--- a/debian/patches/post-9beta2/0173-x86-vc1dsp-port-to-cpuflags.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-From 6c104826bd6e46ff5a02a3f1dcbd6e0b6bf8743a Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 18:49:44 +0200
-Subject: [PATCH 173/278] x86: vc1dsp: port to cpuflags
-
----
- libavcodec/x86/vc1dsp.asm    |   83 +++++++++++++++++++++---------------------
- libavcodec/x86/vc1dsp_init.c |    4 +-
- 2 files changed, 44 insertions(+), 43 deletions(-)
-
-diff --git a/libavcodec/x86/vc1dsp.asm b/libavcodec/x86/vc1dsp.asm
-index ab15f7b..4b56c31 100644
---- a/libavcodec/x86/vc1dsp.asm
-+++ b/libavcodec/x86/vc1dsp.asm
-@@ -34,7 +34,13 @@ section .text
-     punpckl%1 m%2, m%4
- %endmacro
- 
--%macro STORE_4_WORDS_MMX 6
-+%macro STORE_4_WORDS 6
-+%if cpuflag(sse4)
-+    pextrw %1, %5, %6+0
-+    pextrw %2, %5, %6+1
-+    pextrw %3, %5, %6+2
-+    pextrw %4, %5, %6+3
-+%else
-     movd  %6d, %5
- %if mmsize==16
-     psrldq %5, 4
-@@ -48,13 +54,7 @@ section .text
-     mov    %3, %6w
-     shr    %6, 16
-     mov    %4, %6w
--%endmacro
--
--%macro STORE_4_WORDS_SSE4 6
--    pextrw %1, %5, %6+0
--    pextrw %2, %5, %6+1
--    pextrw %3, %5, %6+2
--    pextrw %4, %5, %6+3
-+%endif
- %endmacro
- 
- ; in:  p1 p0 q0 q1, clobbers p0
-@@ -200,14 +200,14 @@ section .text
-     VC1_FILTER %1
-     punpcklbw m0, m1
- %if %0 > 1
--    STORE_4_WORDS_MMX [r0-1], [r0+r1-1], [r0+2*r1-1], [r0+r3-1], m0, %2
-+    STORE_4_WORDS [r0-1], [r0+r1-1], [r0+2*r1-1], [r0+r3-1], m0, %2
- %if %1 > 4
-     psrldq m0, 4
--    STORE_4_WORDS_MMX [r4-1], [r4+r1-1], [r4+2*r1-1], [r4+r3-1], m0, %2
-+    STORE_4_WORDS [r4-1], [r4+r1-1], [r4+2*r1-1], [r4+r3-1], m0, %2
- %endif
- %else
--    STORE_4_WORDS_SSE4 [r0-1], [r0+r1-1], [r0+2*r1-1], [r0+r3-1], m0, 0
--    STORE_4_WORDS_SSE4 [r4-1], [r4+r1-1], [r4+2*r1-1], [r4+r3-1], m0, 4
-+    STORE_4_WORDS [r0-1], [r0+r1-1], [r0+2*r1-1], [r0+r3-1], m0, 0
-+    STORE_4_WORDS [r4-1], [r4+r1-1], [r4+2*r1-1], [r4+r3-1], m0, 4
- %endif
- %endmacro
- 
-@@ -228,92 +228,93 @@ section .text
-     imul r2, 0x01010101
- %endmacro
- 
--%macro VC1_LF_MMX 1
--INIT_MMX
--cglobal vc1_v_loop_filter_internal_%1
-+%macro VC1_LF 0
-+cglobal vc1_v_loop_filter_internal
-     VC1_V_LOOP_FILTER 4, d
-     ret
- 
--cglobal vc1_h_loop_filter_internal_%1
-+cglobal vc1_h_loop_filter_internal
-     VC1_H_LOOP_FILTER 4, r4
-     ret
- 
--; void ff_vc1_v_loop_filter4_mmx2(uint8_t *src, int stride, int pq)
--cglobal vc1_v_loop_filter4_%1, 3,5,0
-+; void ff_vc1_v_loop_filter4_mmxext(uint8_t *src, int stride, int pq)
-+cglobal vc1_v_loop_filter4, 3,5,0
-     START_V_FILTER
--    call vc1_v_loop_filter_internal_%1
-+    call vc1_v_loop_filter_internal
-     RET
- 
--; void ff_vc1_h_loop_filter4_mmx2(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter4_%1, 3,5,0
-+; void ff_vc1_h_loop_filter4_mmxext(uint8_t *src, int stride, int pq)
-+cglobal vc1_h_loop_filter4, 3,5,0
-     START_H_FILTER 4
--    call vc1_h_loop_filter_internal_%1
-+    call vc1_h_loop_filter_internal
-     RET
- 
--; void ff_vc1_v_loop_filter8_mmx2(uint8_t *src, int stride, int pq)
--cglobal vc1_v_loop_filter8_%1, 3,5,0
-+; void ff_vc1_v_loop_filter8_mmxext(uint8_t *src, int stride, int pq)
-+cglobal vc1_v_loop_filter8, 3,5,0
-     START_V_FILTER
--    call vc1_v_loop_filter_internal_%1
-+    call vc1_v_loop_filter_internal
-     add  r4, 4
-     add  r0, 4
--    call vc1_v_loop_filter_internal_%1
-+    call vc1_v_loop_filter_internal
-     RET
- 
--; void ff_vc1_h_loop_filter8_mmx2(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter8_%1, 3,5,0
-+; void ff_vc1_h_loop_filter8_mmxext(uint8_t *src, int stride, int pq)
-+cglobal vc1_h_loop_filter8, 3,5,0
-     START_H_FILTER 4
--    call vc1_h_loop_filter_internal_%1
-+    call vc1_h_loop_filter_internal
-     lea  r0, [r0+4*r1]
--    call vc1_h_loop_filter_internal_%1
-+    call vc1_h_loop_filter_internal
-     RET
- %endmacro
- 
-+INIT_MMX mmxext
- %define PABSW PABSW_MMXEXT
--VC1_LF_MMX mmx2
-+VC1_LF
- 
--INIT_XMM
-+INIT_XMM sse2
- ; void ff_vc1_v_loop_filter8_sse2(uint8_t *src, int stride, int pq)
--cglobal vc1_v_loop_filter8_sse2, 3,5,8
-+cglobal vc1_v_loop_filter8, 3,5,8
-     START_V_FILTER
-     VC1_V_LOOP_FILTER 8, q
-     RET
- 
- ; void ff_vc1_h_loop_filter8_sse2(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter8_sse2, 3,6,8
-+cglobal vc1_h_loop_filter8, 3,6,8
-     START_H_FILTER 8
-     VC1_H_LOOP_FILTER 8, r5
-     RET
- 
- %define PABSW PABSW_SSSE3
- 
--INIT_MMX
-+INIT_MMX ssse3
- ; void ff_vc1_v_loop_filter4_ssse3(uint8_t *src, int stride, int pq)
--cglobal vc1_v_loop_filter4_ssse3, 3,5,0
-+cglobal vc1_v_loop_filter4, 3,5,0
-     START_V_FILTER
-     VC1_V_LOOP_FILTER 4, d
-     RET
- 
- ; void ff_vc1_h_loop_filter4_ssse3(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter4_ssse3, 3,5,0
-+cglobal vc1_h_loop_filter4, 3,5,0
-     START_H_FILTER 4
-     VC1_H_LOOP_FILTER 4, r4
-     RET
- 
--INIT_XMM
-+INIT_XMM ssse3
- ; void ff_vc1_v_loop_filter8_ssse3(uint8_t *src, int stride, int pq)
--cglobal vc1_v_loop_filter8_ssse3, 3,5,8
-+cglobal vc1_v_loop_filter8, 3,5,8
-     START_V_FILTER
-     VC1_V_LOOP_FILTER 8, q
-     RET
- 
- ; void ff_vc1_h_loop_filter8_ssse3(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter8_ssse3, 3,6,8
-+cglobal vc1_h_loop_filter8, 3,6,8
-     START_H_FILTER 8
-     VC1_H_LOOP_FILTER 8, r5
-     RET
- 
-+INIT_XMM sse4
- ; void ff_vc1_h_loop_filter8_sse4(uint8_t *src, int stride, int pq)
--cglobal vc1_h_loop_filter8_sse4, 3,5,8
-+cglobal vc1_h_loop_filter8, 3,5,8
-     START_H_FILTER 8
-     VC1_H_LOOP_FILTER 8
-     RET
-diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c
-index 6d868e8..c359c4a 100644
---- a/libavcodec/x86/vc1dsp_init.c
-+++ b/libavcodec/x86/vc1dsp_init.c
-@@ -49,7 +49,7 @@ static void vc1_h_loop_filter16_ ## EXT(uint8_t *src, int stride, int pq) \
- }
- 
- #if HAVE_YASM
--LOOP_FILTER(mmx2)
-+LOOP_FILTER(mmxext)
- LOOP_FILTER(sse2)
- LOOP_FILTER(ssse3)
- 
-@@ -98,7 +98,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
-     }
- 
-     if (mm_flags & AV_CPU_FLAG_MMXEXT) {
--        ASSIGN_LF(mmx2);
-+        ASSIGN_LF(mmxext);
-         dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmx2;
-     } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
-         dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0174-x86-PABSW-port-to-cpuflags.patch b/debian/patches/post-9beta2/0174-x86-PABSW-port-to-cpuflags.patch
deleted file mode 100644
index 8d30a6e..0000000
--- a/debian/patches/post-9beta2/0174-x86-PABSW-port-to-cpuflags.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From dbb37e77117466edfc146f9f0df4c70bef6239d6 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 17:59:26 +0200
-Subject: [PATCH 174/278] x86: PABSW: port to cpuflags
-
----
- libavcodec/x86/vc1dsp.asm |    3 ---
- libavutil/x86/x86util.asm |   22 ++++++++++------------
- 2 files changed, 10 insertions(+), 15 deletions(-)
-
-diff --git a/libavcodec/x86/vc1dsp.asm b/libavcodec/x86/vc1dsp.asm
-index 4b56c31..adf08d7 100644
---- a/libavcodec/x86/vc1dsp.asm
-+++ b/libavcodec/x86/vc1dsp.asm
-@@ -268,7 +268,6 @@ cglobal vc1_h_loop_filter8, 3,5,0
- %endmacro
- 
- INIT_MMX mmxext
--%define PABSW PABSW_MMXEXT
- VC1_LF
- 
- INIT_XMM sse2
-@@ -284,8 +283,6 @@ cglobal vc1_h_loop_filter8, 3,6,8
-     VC1_H_LOOP_FILTER 8, r5
-     RET
- 
--%define PABSW PABSW_SSSE3
--
- INIT_MMX ssse3
- ; void ff_vc1_v_loop_filter4_ssse3(uint8_t *src, int stride, int pq)
- cglobal vc1_v_loop_filter4, 3,5,0
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index 9183d38..b35d594 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -145,13 +145,21 @@
- %endif
- %endmacro
- 
--; PABSW macros assume %1 != %2, while ABS1/2 macros work in-place
--%macro PABSW_MMX 2
-+; PABSW macro assumes %1 != %2, while ABS1/2 macros work in-place
-+%macro PABSW 2
-+%if cpuflag(ssse3)
-+    pabsw      %1, %2
-+%elif cpuflag(mmxext)
-+    pxor    %1, %1
-+    psubw   %1, %2
-+    pmaxsw  %1, %2
-+%else
-     pxor       %1, %1
-     pcmpgtw    %1, %2
-     pxor       %2, %1
-     psubw      %2, %1
-     SWAP       %1, %2
-+%endif
- %endmacro
- 
- %macro PSIGNW_MMX 2
-@@ -159,16 +167,6 @@
-     psubw      %1, %2
- %endmacro
- 
--%macro PABSW_MMXEXT 2
--    pxor    %1, %1
--    psubw   %1, %2
--    pmaxsw  %1, %2
--%endmacro
--
--%macro PABSW_SSSE3 2
--    pabsw      %1, %2
--%endmacro
--
- %macro PSIGNW_SSSE3 2
-     psignw     %1, %2
- %endmacro
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0175-x86-h264qpel-Only-define-mmxext-QPEL-functions-if-H2.patch b/debian/patches/post-9beta2/0175-x86-h264qpel-Only-define-mmxext-QPEL-functions-if-H2.patch
deleted file mode 100644
index 99eb68e..0000000
--- a/debian/patches/post-9beta2/0175-x86-h264qpel-Only-define-mmxext-QPEL-functions-if-H2.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 930e26a3ea9d223e04bac4cdde13697cec770031 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 2 Nov 2012 18:25:08 +0100
-Subject: [PATCH 175/278] x86: h264qpel: Only define mmxext QPEL functions if
- H264QPEL is enabled
-
-This fixes compilation with --disable-everything and components enabled.
----
- libavcodec/x86/h264_qpel.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
-index f978520..cf944c1 100644
---- a/libavcodec/x86/h264_qpel.c
-+++ b/libavcodec/x86/h264_qpel.c
-@@ -1286,6 +1286,6 @@ QPEL16_OP(mc31, MMX)\
- QPEL16_OP(mc32, MMX)\
- QPEL16_OP(mc33, MMX)
- 
--#if ARCH_X86_32 && HAVE_YASM // ARCH_X86_64 implies sse2+
-+#if ARCH_X86_32 && HAVE_YASM && CONFIG_H264QPEL // ARCH_X86_64 implies SSE2+
- QPEL16(mmxext)
- #endif
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0176-build-The-A64-muxer-depends-on-rawenc.o-for-ff_raw_w.patch b/debian/patches/post-9beta2/0176-build-The-A64-muxer-depends-on-rawenc.o-for-ff_raw_w.patch
deleted file mode 100644
index 719359a..0000000
--- a/debian/patches/post-9beta2/0176-build-The-A64-muxer-depends-on-rawenc.o-for-ff_raw_w.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 92fec47d69d2c3187bea2f246984e03ec6ca3c3c Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 2 Nov 2012 22:49:04 +0100
-Subject: [PATCH 176/278] build: The A64 muxer depends on rawenc.o for
- ff_raw_write_packet()
-
----
- libavformat/Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/Makefile b/libavformat/Makefile
-index acf0500..ed030bd 100644
---- a/libavformat/Makefile
-+++ b/libavformat/Makefile
-@@ -24,7 +24,7 @@ OBJS = allformats.o         \
- OBJS-$(CONFIG_NETWORK)                   += network.o
- 
- # muxers/demuxers
--OBJS-$(CONFIG_A64_MUXER)                 += a64.o
-+OBJS-$(CONFIG_A64_MUXER)                 += a64.o rawenc.o
- OBJS-$(CONFIG_AAC_DEMUXER)               += aacdec.o rawdec.o
- OBJS-$(CONFIG_AC3_DEMUXER)               += ac3dec.o rawdec.o
- OBJS-$(CONFIG_AC3_MUXER)                 += rawenc.o
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0177-fate-aac-Place-LATM-tests-and-general-AAC-tests-in-d.patch b/debian/patches/post-9beta2/0177-fate-aac-Place-LATM-tests-and-general-AAC-tests-in-d.patch
deleted file mode 100644
index c56901f..0000000
--- a/debian/patches/post-9beta2/0177-fate-aac-Place-LATM-tests-and-general-AAC-tests-in-d.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2253df76c1913b5fcc71a9f4f254c78acd9be669 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 12:21:41 +0200
-Subject: [PATCH 177/278] fate: aac: Place LATM tests and general AAC tests in
- different groups
-
----
- tests/fate/aac.mak |   17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
-index 9d52dae..0368798 100644
---- a/tests/fate/aac.mak
-+++ b/tests/fate/aac.mak
-@@ -46,7 +46,7 @@ FATE_AAC += fate-aac-al_sbr_ps_06_ur
- fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4
- fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16
- 
--FATE_AAC += fate-aac-latm_000000001180bc60
-+FATE_AAC_LATM += fate-aac-latm_000000001180bc60
- fate-aac-latm_000000001180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_000000001180bc60.mpg
- fate-aac-latm_000000001180bc60: REF = $(SAMPLES)/aac/latm_000000001180bc60.s16
- 
-@@ -54,7 +54,7 @@ FATE_AAC += fate-aac-ap05_48
- fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4
- fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
- 
--FATE_AAC += fate-aac-latm_stereo_to_51
-+FATE_AAC_LATM += fate-aac-latm_stereo_to_51
- fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
- fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
- 
-@@ -71,7 +71,12 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp  \
- 
- FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%)
- 
--FATE_SAMPLES_AVCONV += $(FATE_AAC)
--fate-aac: $(FATE_AAC)
--$(FATE_AAC): CMP = oneoff
--$(FATE_AAC): FUZZ = 2
-+FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM)
-+
-+$(FATE_AAC_ALL): CMP  = oneoff
-+$(FATE_AAC_ALL): FUZZ = 2
-+
-+FATE_SAMPLES_AVCONV += $(FATE_AAC_ALL)
-+
-+fate-aac: $(FATE_AAC_ALL)
-+fate-aac-latm: $(FATE_AAC_LATM)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0178-flacenc-use-a-separate-buffer-for-byte-swapping-for-.patch b/debian/patches/post-9beta2/0178-flacenc-use-a-separate-buffer-for-byte-swapping-for-.patch
deleted file mode 100644
index 6d68716..0000000
--- a/debian/patches/post-9beta2/0178-flacenc-use-a-separate-buffer-for-byte-swapping-for-.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 6a744d261930f8101132bc6d207b6eac41d9cf18 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Thu, 25 Oct 2012 15:00:10 -0400
-Subject: [PATCH 178/278] flacenc: use a separate buffer for byte-swapping for
- MD5 checksum on big-endian
-
-This is much faster than calculating the MD5 one sample at a time.
----
- libavcodec/flacenc.c |   37 ++++++++++++++++++++++++++++---------
- 1 file changed, 28 insertions(+), 9 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index b135e4a..d321270 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -23,6 +23,7 @@
- #include "libavutil/md5.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-+#include "dsputil.h"
- #include "get_bits.h"
- #include "golomb.h"
- #include "internal.h"
-@@ -100,6 +101,9 @@ typedef struct FlacEncodeContext {
-     AVCodecContext *avctx;
-     LPCContext lpc_ctx;
-     struct AVMD5 *md5ctx;
-+    uint8_t *md5_buffer;
-+    unsigned int md5_buffer_size;
-+    DSPContext dsp;
- } FlacEncodeContext;
- 
- 
-@@ -378,6 +382,8 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
-     ret = ff_lpc_init(&s->lpc_ctx, avctx->frame_size,
-                       s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON);
- 
-+    ff_dsputil_init(&s->dsp, avctx);
-+
-     dprint_compression_options(s);
- 
-     return ret;
-@@ -1176,17 +1182,26 @@ static int write_frame(FlacEncodeContext *s, AVPacket *avpkt)
- }
- 
- 
--static void update_md5_sum(FlacEncodeContext *s, const int16_t *samples)
-+static int update_md5_sum(FlacEncodeContext *s, const int16_t *samples)
- {
--#if HAVE_BIGENDIAN
--    int i;
--    for (i = 0; i < s->frame.blocksize * s->channels; i++) {
--        int16_t smp = av_le2ne16(samples[i]);
--        av_md5_update(s->md5ctx, (uint8_t *)&smp, 2);
-+    const uint8_t *buf;
-+    int buf_size = s->frame.blocksize * s->channels * 2;
-+
-+    if (HAVE_BIGENDIAN) {
-+        av_fast_malloc(&s->md5_buffer, &s->md5_buffer_size, buf_size);
-+        if (!s->md5_buffer)
-+            return AVERROR(ENOMEM);
-     }
--#else
--    av_md5_update(s->md5ctx, (const uint8_t *)samples, s->frame.blocksize*s->channels*2);
-+
-+    buf = (const uint8_t *)samples;
-+#if HAVE_BIGENDIAN
-+    s->dsp.bswap16_buf((uint16_t *)s->md5_buffer,
-+                       (const uint16_t *)samples, buf_size / 2);
-+    buf = s->md5_buffer;
- #endif
-+    av_md5_update(s->md5ctx, buf, buf_size);
-+
-+    return 0;
- }
- 
- 
-@@ -1238,7 +1253,10 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
- 
-     s->frame_count++;
-     s->sample_count += frame->nb_samples;
--    update_md5_sum(s, samples);
-+    if ((ret = update_md5_sum(s, samples)) < 0) {
-+        av_log(avctx, AV_LOG_ERROR, "Error updating MD5 checksum\n");
-+        return ret;
-+    }
-     if (out_bytes > s->max_encoded_framesize)
-         s->max_encoded_framesize = out_bytes;
-     if (out_bytes < s->min_framesize)
-@@ -1257,6 +1275,7 @@ static av_cold int flac_encode_close(AVCodecContext *avctx)
-     if (avctx->priv_data) {
-         FlacEncodeContext *s = avctx->priv_data;
-         av_freep(&s->md5ctx);
-+        av_freep(&s->md5_buffer);
-         ff_lpc_end(&s->lpc_ctx);
-     }
-     av_freep(&avctx->extradata);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0179-lavu-add-av_ctz-for-trailing-zero-bit-count.patch b/debian/patches/post-9beta2/0179-lavu-add-av_ctz-for-trailing-zero-bit-count.patch
deleted file mode 100644
index 3a173f3..0000000
--- a/debian/patches/post-9beta2/0179-lavu-add-av_ctz-for-trailing-zero-bit-count.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-From dfde8a34e5419ac99265e3ecc2e82f378674128a Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Fri, 26 Oct 2012 14:48:40 -0400
-Subject: [PATCH 179/278] lavu: add av_ctz() for trailing zero bit count
-
----
- doc/APIchanges      |    3 +++
- libavutil/Makefile  |    2 +-
- libavutil/intmath.c |   39 ++++++++++++++++++++++++++++++++++++
- libavutil/intmath.h |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++
- libavutil/log2.c    |   34 -------------------------------
- libavutil/version.h |    2 +-
- 6 files changed, 99 insertions(+), 36 deletions(-)
- create mode 100644 libavutil/intmath.c
- delete mode 100644 libavutil/log2.c
-
-diff --git a/doc/APIchanges b/doc/APIchanges
-index 24defe4..c8b8fbf 100644
---- a/doc/APIchanges
-+++ b/doc/APIchanges
-@@ -13,6 +13,9 @@ libavutil:     2012-10-22
- 
- API changes, most recent first:
- 
-+2012-xx-xx - xxxxxxx - lavu 52.1.0 - intmath.h
-+  Add av_ctz() for trailing zero bit count
-+
- 2012-10-18 - xxxxxxx - lavu 51.45.0 - error.h
-   Add AVERROR_EXPERIMENTAL
- 
-diff --git a/libavutil/Makefile b/libavutil/Makefile
-index 45f8e90..d4ffd5e 100644
---- a/libavutil/Makefile
-+++ b/libavutil/Makefile
-@@ -67,10 +67,10 @@ OBJS = adler32.o                                                        \
-        float_dsp.o                                                      \
-        imgutils.o                                                       \
-        intfloat_readwrite.o                                             \
-+       intmath.o                                                        \
-        lfg.o                                                            \
-        lls.o                                                            \
-        log.o                                                            \
--       log2.o                                                           \
-        log2_tab.o                                                       \
-        mathematics.o                                                    \
-        md5.o                                                            \
-diff --git a/libavutil/intmath.c b/libavutil/intmath.c
-new file mode 100644
-index 0000000..8db425c
---- /dev/null
-+++ b/libavutil/intmath.c
-@@ -0,0 +1,39 @@
-+/*
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include "intmath.h"
-+
-+/* undef these to get the function prototypes from common.h */
-+#undef av_log2
-+#undef av_log2_16bit
-+#include "common.h"
-+
-+int av_log2(unsigned v)
-+{
-+    return ff_log2(v);
-+}
-+
-+int av_log2_16bit(unsigned v)
-+{
-+    return ff_log2_16bit(v);
-+}
-+
-+int av_ctz(int v)
-+{
-+    return ff_ctz(v);
-+}
-diff --git a/libavutil/intmath.h b/libavutil/intmath.h
-index 2cb3132..a5ee652 100644
---- a/libavutil/intmath.h
-+++ b/libavutil/intmath.h
-@@ -88,4 +88,59 @@ static av_always_inline av_const int ff_log2_16bit_c(unsigned int v)
- /**
-  * @}
-  */
-+
-+/**
-+ * @addtogroup lavu_math
-+ * @{
-+ */
-+
-+#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4)
-+#ifndef ff_ctz
-+#define ff_ctz(v) __builtin_ctz(v)
-+#endif
-+#endif
-+
-+#ifndef ff_ctz
-+#define ff_ctz ff_ctz_c
-+static av_always_inline av_const int ff_ctz_c(int v)
-+{
-+    int c;
-+
-+    if (v & 0x1)
-+        return 0;
-+
-+    c = 1;
-+    if (!(v & 0xffff)) {
-+        v >>= 16;
-+        c += 16;
-+    }
-+    if (!(v & 0xff)) {
-+        v >>= 8;
-+        c += 8;
-+    }
-+    if (!(v & 0xf)) {
-+        v >>= 4;
-+        c += 4;
-+    }
-+    if (!(v & 0x3)) {
-+        v >>= 2;
-+        c += 2;
-+    }
-+    c -= v & 0x1;
-+
-+    return c;
-+}
-+#endif
-+
-+/**
-+ * Trailing zero bit count.
-+ *
-+ * @param v  input value. If v is 0, the result is undefined.
-+ * @return   the number of trailing 0-bits
-+ */
-+int av_ctz(int v);
-+
-+/**
-+ * @}
-+ */
- #endif /* AVUTIL_INTMATH_H */
-diff --git a/libavutil/log2.c b/libavutil/log2.c
-deleted file mode 100644
-index 18c1b40..0000000
---- a/libavutil/log2.c
-+++ /dev/null
-@@ -1,34 +0,0 @@
--/*
-- * This file is part of Libav.
-- *
-- * Libav is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2.1 of the License, or (at your option) any later version.
-- *
-- * Libav is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with Libav; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-- */
--
--#include "intmath.h"
--
--/* undef these to get the function prototypes from common.h */
--#undef av_log2
--#undef av_log2_16bit
--#include "common.h"
--
--int av_log2(unsigned v)
--{
--    return ff_log2(v);
--}
--
--int av_log2_16bit(unsigned v)
--{
--    return ff_log2_16bit(v);
--}
-diff --git a/libavutil/version.h b/libavutil/version.h
-index ae7fa7a..1659dbd 100644
---- a/libavutil/version.h
-+++ b/libavutil/version.h
-@@ -37,7 +37,7 @@
-  */
- 
- #define LIBAVUTIL_VERSION_MAJOR 52
--#define LIBAVUTIL_VERSION_MINOR  0
-+#define LIBAVUTIL_VERSION_MINOR  1
- #define LIBAVUTIL_VERSION_MICRO  0
- 
- #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0180-flacenc-remove-wasted-trailing-0-bits.patch b/debian/patches/post-9beta2/0180-flacenc-remove-wasted-trailing-0-bits.patch
deleted file mode 100644
index 8060d4b..0000000
--- a/debian/patches/post-9beta2/0180-flacenc-remove-wasted-trailing-0-bits.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From e78331632208a23b285a70b3cdd487dd54617c46 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Thu, 25 Oct 2012 15:07:59 -0400
-Subject: [PATCH 180/278] flacenc: remove wasted trailing 0 bits
-
----
- libavcodec/flacenc.c |   39 +++++++++++++++++++++++++++++++++++++--
- 1 file changed, 37 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index d321270..a96fa3b 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -20,6 +20,7 @@
-  */
- 
- #include "libavutil/crc.h"
-+#include "libavutil/intmath.h"
- #include "libavutil/md5.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-@@ -66,6 +67,7 @@ typedef struct FlacSubframe {
-     int type;
-     int type_code;
-     int obits;
-+    int wasted;
-     int order;
-     int32_t coefs[MAX_LPC_ORDER];
-     int shift;
-@@ -416,8 +418,10 @@ static void init_frame(FlacEncodeContext *s, int nb_samples)
-         }
-     }
- 
--    for (ch = 0; ch < s->channels; ch++)
-+    for (ch = 0; ch < s->channels; ch++) {
-+        frame->subframes[ch].wasted = 0;
-         frame->subframes[ch].obits = 16;
-+    }
- 
-     frame->verbatim_only = 0;
- }
-@@ -972,6 +976,33 @@ static int encode_frame(FlacEncodeContext *s)
- }
- 
- 
-+static void remove_wasted_bits(FlacEncodeContext *s)
-+{
-+    int ch, i;
-+
-+    for (ch = 0; ch < s->channels; ch++) {
-+        FlacSubframe *sub = &s->frame.subframes[ch];
-+        int32_t v         = 0;
-+
-+        for (i = 0; i < s->frame.blocksize; i++) {
-+            v |= sub->samples[i];
-+            if (v & 1)
-+                break;
-+        }
-+
-+        if (v && !(v & 1)) {
-+            v = av_ctz(v);
-+
-+            for (i = 0; i < s->frame.blocksize; i++)
-+                sub->samples[i] >>= v;
-+
-+            sub->wasted = v;
-+            sub->obits -= v;
-+        }
-+    }
-+}
-+
-+
- static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n)
- {
-     int i, best;
-@@ -1117,7 +1148,9 @@ static void write_subframes(FlacEncodeContext *s)
-         /* subframe header */
-         put_bits(&s->pb, 1, 0);
-         put_bits(&s->pb, 6, sub->type_code);
--        put_bits(&s->pb, 1, 0); /* no wasted bits */
-+        put_bits(&s->pb, 1, !!sub->wasted);
-+        if (sub->wasted)
-+            put_bits(&s->pb, sub->wasted, 1);
- 
-         /* subframe */
-         if (sub->type == FLAC_SUBFRAME_CONSTANT) {
-@@ -1235,6 +1268,8 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
- 
-     channel_decorrelation(s);
- 
-+    remove_wasted_bits(s);
-+
-     frame_bytes = encode_frame(s);
- 
-     /* fallback to verbatim mode if the compressed frame is larger than it
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0181-flacenc-use-uint64_t-for-bit-counts.patch b/debian/patches/post-9beta2/0181-flacenc-use-uint64_t-for-bit-counts.patch
deleted file mode 100644
index a977004..0000000
--- a/debian/patches/post-9beta2/0181-flacenc-use-uint64_t-for-bit-counts.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From 5ff998a233d759d0de83ea6f95c383d03d25d88e Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Fri, 26 Oct 2012 23:22:38 -0400
-Subject: [PATCH 181/278] flacenc: use uint64_t for bit counts
-
-Needed to avoid integer overflows for 24-bit encoding.
----
- libavcodec/flacenc.c |   58 ++++++++++++++++++++++++++++----------------------
- 1 file changed, 33 insertions(+), 25 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index a96fa3b..115664a 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -442,10 +442,10 @@ static void copy_samples(FlacEncodeContext *s, const int16_t *samples)
- }
- 
- 
--static int rice_count_exact(int32_t *res, int n, int k)
-+static uint64_t rice_count_exact(int32_t *res, int n, int k)
- {
-     int i;
--    int count = 0;
-+    uint64_t count = 0;
- 
-     for (i = 0; i < n; i++) {
-         int32_t v = -2 * res[i] - 1;
-@@ -456,12 +456,12 @@ static int rice_count_exact(int32_t *res, int n, int k)
- }
- 
- 
--static int subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,
--                                int pred_order)
-+static uint64_t subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,
-+                                     int pred_order)
- {
-     int p, porder, psize;
-     int i, part_end;
--    int count = 0;
-+    uint64_t count = 0;
- 
-     /* subframe header */
-     count += 8;
-@@ -508,25 +508,25 @@ static int subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,
- /**
-  * Solve for d/dk(rice_encode_count) = n-((sum-(n>>1))>>(k+1)) = 0.
-  */
--static int find_optimal_param(uint32_t sum, int n)
-+static int find_optimal_param(uint64_t sum, int n)
- {
-     int k;
--    uint32_t sum2;
-+    uint64_t sum2;
- 
-     if (sum <= n >> 1)
-         return 0;
-     sum2 = sum - (n >> 1);
--    k    = av_log2(n < 256 ? FASTDIV(sum2, n) : sum2 / n);
-+    k    = av_log2(av_clipl_int32(sum2 / n));
-     return FFMIN(k, MAX_RICE_PARAM);
- }
- 
- 
--static uint32_t calc_optimal_rice_params(RiceContext *rc, int porder,
--                                         uint32_t *sums, int n, int pred_order)
-+static uint64_t calc_optimal_rice_params(RiceContext *rc, int porder,
-+                                         uint64_t *sums, int n, int pred_order)
- {
-     int i;
-     int k, cnt, part;
--    uint32_t all_bits;
-+    uint64_t all_bits;
- 
-     part     = (1 << porder);
-     all_bits = 4 * part;
-@@ -546,7 +546,7 @@ static uint32_t calc_optimal_rice_params(RiceContext *rc, int porder,
- 
- 
- static void calc_sums(int pmin, int pmax, uint32_t *data, int n, int pred_order,
--                      uint32_t sums[][MAX_PARTITIONS])
-+                      uint64_t sums[][MAX_PARTITIONS])
- {
-     int i, j;
-     int parts;
-@@ -557,7 +557,7 @@ static void calc_sums(int pmin, int pmax, uint32_t *data, int n, int pred_order,
-     res     = &data[pred_order];
-     res_end = &data[n >> pmax];
-     for (i = 0; i < parts; i++) {
--        uint32_t sum = 0;
-+        uint64_t sum = 0;
-         while (res < res_end)
-             sum += *(res++);
-         sums[pmax][i] = sum;
-@@ -572,15 +572,15 @@ static void calc_sums(int pmin, int pmax, uint32_t *data, int n, int pred_order,
- }
- 
- 
--static uint32_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
-+static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
-                                  int32_t *data, int n, int pred_order)
- {
-     int i;
--    uint32_t bits[MAX_PARTITION_ORDER+1];
-+    uint64_t bits[MAX_PARTITION_ORDER+1];
-     int opt_porder;
-     RiceContext tmp_rc;
-     uint32_t *udata;
--    uint32_t sums[MAX_PARTITION_ORDER+1][MAX_PARTITIONS];
-+    uint64_t sums[MAX_PARTITION_ORDER+1][MAX_PARTITIONS];
- 
-     assert(pmin >= 0 && pmin <= MAX_PARTITION_ORDER);
-     assert(pmax >= 0 && pmax <= MAX_PARTITION_ORDER);
-@@ -616,7 +616,7 @@ static int get_max_p_order(int max_porder, int n, int order)
- }
- 
- 
--static uint32_t find_subframe_rice_params(FlacEncodeContext *s,
-+static uint64_t find_subframe_rice_params(FlacEncodeContext *s,
-                                           FlacSubframe *sub, int pred_order)
- {
-     int pmin = get_max_p_order(s->options.min_partition_order,
-@@ -624,7 +624,7 @@ static uint32_t find_subframe_rice_params(FlacEncodeContext *s,
-     int pmax = get_max_p_order(s->options.max_partition_order,
-                                s->frame.blocksize, pred_order);
- 
--    uint32_t bits = 8 + pred_order * sub->obits + 2 + 4;
-+    uint64_t bits = 8 + pred_order * sub->obits + 2 + 4;
-     if (sub->type == FLAC_SUBFRAME_LPC)
-         bits += 4 + 5 + pred_order * s->options.lpc_coeff_precision;
-     bits += calc_rice_params(&sub->rc, pmin, pmax, sub->residual,
-@@ -829,7 +829,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-     sub->type = FLAC_SUBFRAME_FIXED;
-     if (s->options.lpc_type == FF_LPC_TYPE_NONE  ||
-         s->options.lpc_type == FF_LPC_TYPE_FIXED || n <= max_order) {
--        uint32_t bits[MAX_FIXED_ORDER+1];
-+        uint64_t bits[MAX_FIXED_ORDER+1];
-         if (max_order > MAX_FIXED_ORDER)
-             max_order = MAX_FIXED_ORDER;
-         opt_order = 0;
-@@ -860,7 +860,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-         omethod == ORDER_METHOD_4LEVEL ||
-         omethod == ORDER_METHOD_8LEVEL) {
-         int levels = 1 << omethod;
--        uint32_t bits[1 << ORDER_METHOD_8LEVEL];
-+        uint64_t bits[1 << ORDER_METHOD_8LEVEL];
-         int order;
-         int opt_index   = levels-1;
-         opt_order       = max_order-1;
-@@ -879,7 +879,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-         opt_order++;
-     } else if (omethod == ORDER_METHOD_SEARCH) {
-         // brute-force optimal order search
--        uint32_t bits[MAX_LPC_ORDER];
-+        uint64_t bits[MAX_LPC_ORDER];
-         opt_order = 0;
-         bits[0]   = UINT32_MAX;
-         for (i = min_order-1; i < max_order; i++) {
-@@ -890,7 +890,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-         }
-         opt_order++;
-     } else if (omethod == ORDER_METHOD_LOG) {
--        uint32_t bits[MAX_LPC_ORDER];
-+        uint64_t bits[MAX_LPC_ORDER];
-         int step;
- 
-         opt_order = min_order - 1 + (max_order-min_order)/3;
-@@ -962,7 +962,8 @@ static int count_frame_header(FlacEncodeContext *s)
- 
- static int encode_frame(FlacEncodeContext *s)
- {
--    int ch, count;
-+    int ch;
-+    uint64_t count;
- 
-     count = count_frame_header(s);
- 
-@@ -972,7 +973,10 @@ static int encode_frame(FlacEncodeContext *s)
-     count += (8 - (count & 7)) & 7; // byte alignment
-     count += 16;                    // CRC-16
- 
--    return count >> 3;
-+    count >>= 3;
-+    if (count > INT_MAX)
-+        return AVERROR_BUG;
-+    return count;
- }
- 
- 
-@@ -1274,9 +1278,13 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
- 
-     /* fallback to verbatim mode if the compressed frame is larger than it
-        would be if encoded uncompressed. */
--    if (frame_bytes > s->max_framesize) {
-+    if (frame_bytes < 0 || frame_bytes > s->max_framesize) {
-         s->frame.verbatim_only = 1;
-         frame_bytes = encode_frame(s);
-+        if (frame_bytes < 0) {
-+            av_log(avctx, AV_LOG_ERROR, "Bad frame count\n");
-+            return frame_bytes;
-+        }
-     }
- 
-     if ((ret = ff_alloc_packet(avpkt, frame_bytes))) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0182-flacdsp-move-lpc-encoding-from-FLAC-encoder-to-FLACD.patch b/debian/patches/post-9beta2/0182-flacdsp-move-lpc-encoding-from-FLAC-encoder-to-FLACD.patch
deleted file mode 100644
index dc7102e..0000000
--- a/debian/patches/post-9beta2/0182-flacdsp-move-lpc-encoding-from-FLAC-encoder-to-FLACD.patch
+++ /dev/null
@@ -1,391 +0,0 @@
-From 799e2324901c2a06e9a60ee281cd283475f1c4fa Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 27 Oct 2012 00:25:04 -0400
-Subject: [PATCH 182/278] flacdsp: move lpc encoding from FLAC encoder to
- FLACDSPContext
-
-Also, templatize the functions for 16-bit and 32-bit sample range. This will
-be used for 24-bit FLAC encoding.
----
- libavcodec/flacdsp.c              |    9 ++-
- libavcodec/flacdsp.h              |    2 +
- libavcodec/flacdsp_lpc_template.c |  141 +++++++++++++++++++++++++++++++++++++
- libavcodec/flacenc.c              |  116 +++---------------------------
- 4 files changed, 158 insertions(+), 110 deletions(-)
- create mode 100644 libavcodec/flacdsp_lpc_template.c
-
-diff --git a/libavcodec/flacdsp.c b/libavcodec/flacdsp.c
-index 3f4f710..b916869 100644
---- a/libavcodec/flacdsp.c
-+++ b/libavcodec/flacdsp.c
-@@ -26,6 +26,7 @@
- #define SAMPLE_SIZE 16
- #define PLANAR 0
- #include "flacdsp_template.c"
-+#include "flacdsp_lpc_template.c"
- 
- #undef  PLANAR
- #define PLANAR 1
-@@ -36,6 +37,7 @@
- #define SAMPLE_SIZE 32
- #define PLANAR 0
- #include "flacdsp_template.c"
-+#include "flacdsp_lpc_template.c"
- 
- #undef  PLANAR
- #define PLANAR 1
-@@ -86,10 +88,13 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32],
- av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt,
-                              int bps)
- {
--    if (bps > 16)
-+    if (bps > 16) {
-         c->lpc            = flac_lpc_32_c;
--    else
-+        c->lpc_encode     = flac_lpc_encode_c_32;
-+    } else {
-         c->lpc            = flac_lpc_16_c;
-+        c->lpc_encode     = flac_lpc_encode_c_16;
-+    }
- 
-     switch (fmt) {
-     case AV_SAMPLE_FMT_S32:
-diff --git a/libavcodec/flacdsp.h b/libavcodec/flacdsp.h
-index 429daab..33184b5 100644
---- a/libavcodec/flacdsp.h
-+++ b/libavcodec/flacdsp.h
-@@ -27,6 +27,8 @@ typedef struct FLACDSPContext {
-                            int len, int shift);
-     void (*lpc)(int32_t *samples, const int coeffs[32], int order,
-                 int qlevel, int len);
-+    void (*lpc_encode)(int32_t *res, const int32_t *smp, int len, int order,
-+                       const int32_t *coefs, int shift);
- } FLACDSPContext;
- 
- void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int bps);
-diff --git a/libavcodec/flacdsp_lpc_template.c b/libavcodec/flacdsp_lpc_template.c
-new file mode 100644
-index 0000000..269e64b
---- /dev/null
-+++ b/libavcodec/flacdsp_lpc_template.c
-@@ -0,0 +1,141 @@
-+/*
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include <stdint.h>
-+#include "libavutil/avutil.h"
-+#include "mathops.h"
-+
-+#undef FUNC
-+#undef sum_type
-+#undef MUL
-+#undef CLIP
-+#undef FSUF
-+
-+#define FUNC(n) AV_JOIN(n ## _, SAMPLE_SIZE)
-+
-+#if SAMPLE_SIZE == 32
-+#   define sum_type  int64_t
-+#   define MUL(a, b) MUL64(a, b)
-+#   define CLIP(x) av_clipl_int32(x)
-+#else
-+#   define sum_type  int32_t
-+#   define MUL(a, b) ((a) * (b))
-+#   define CLIP(x) (x)
-+#endif
-+
-+#define LPC1(x) {           \
-+    int c = coefs[(x)-1];   \
-+    p0   += MUL(c, s);      \
-+    s     = smp[i-(x)+1];   \
-+    p1   += MUL(c, s);      \
-+}
-+
-+static av_always_inline void FUNC(lpc_encode_unrolled)(int32_t *res,
-+                                  const int32_t *smp, int len, int order,
-+                                  const int32_t *coefs, int shift, int big)
-+{
-+    int i;
-+    for (i = order; i < len; i += 2) {
-+        int s  = smp[i-order];
-+        sum_type p0 = 0, p1 = 0;
-+        if (big) {
-+            switch (order) {
-+            case 32: LPC1(32)
-+            case 31: LPC1(31)
-+            case 30: LPC1(30)
-+            case 29: LPC1(29)
-+            case 28: LPC1(28)
-+            case 27: LPC1(27)
-+            case 26: LPC1(26)
-+            case 25: LPC1(25)
-+            case 24: LPC1(24)
-+            case 23: LPC1(23)
-+            case 22: LPC1(22)
-+            case 21: LPC1(21)
-+            case 20: LPC1(20)
-+            case 19: LPC1(19)
-+            case 18: LPC1(18)
-+            case 17: LPC1(17)
-+            case 16: LPC1(16)
-+            case 15: LPC1(15)
-+            case 14: LPC1(14)
-+            case 13: LPC1(13)
-+            case 12: LPC1(12)
-+            case 11: LPC1(11)
-+            case 10: LPC1(10)
-+            case  9: LPC1( 9)
-+                     LPC1( 8)
-+                     LPC1( 7)
-+                     LPC1( 6)
-+                     LPC1( 5)
-+                     LPC1( 4)
-+                     LPC1( 3)
-+                     LPC1( 2)
-+                     LPC1( 1)
-+            }
-+        } else {
-+            switch (order) {
-+            case  8: LPC1( 8)
-+            case  7: LPC1( 7)
-+            case  6: LPC1( 6)
-+            case  5: LPC1( 5)
-+            case  4: LPC1( 4)
-+            case  3: LPC1( 3)
-+            case  2: LPC1( 2)
-+            case  1: LPC1( 1)
-+            }
-+        }
-+        res[i  ] = smp[i  ] - CLIP(p0 >> shift);
-+        res[i+1] = smp[i+1] - CLIP(p1 >> shift);
-+    }
-+}
-+
-+static void FUNC(flac_lpc_encode_c)(int32_t *res, const int32_t *smp, int len,
-+                                    int order, const int32_t *coefs, int shift)
-+{
-+    int i;
-+    for (i = 0; i < order; i++)
-+        res[i] = smp[i];
-+#if CONFIG_SMALL
-+    for (i = order; i < len; i += 2) {
-+        int j;
-+        int s  = smp[i];
-+        sum_type p0 = 0, p1 = 0;
-+        for (j = 0; j < order; j++) {
-+            int c = coefs[j];
-+            p1   += MUL(c, s);
-+            s     = smp[i-j-1];
-+            p0   += MUL(c, s);
-+        }
-+        res[i  ] = smp[i  ] - CLIP(p0 >> shift);
-+        res[i+1] = smp[i+1] - CLIP(p1 >> shift);
-+    }
-+#else
-+    switch (order) {
-+    case  1: FUNC(lpc_encode_unrolled)(res, smp, len,     1, coefs, shift, 0); break;
-+    case  2: FUNC(lpc_encode_unrolled)(res, smp, len,     2, coefs, shift, 0); break;
-+    case  3: FUNC(lpc_encode_unrolled)(res, smp, len,     3, coefs, shift, 0); break;
-+    case  4: FUNC(lpc_encode_unrolled)(res, smp, len,     4, coefs, shift, 0); break;
-+    case  5: FUNC(lpc_encode_unrolled)(res, smp, len,     5, coefs, shift, 0); break;
-+    case  6: FUNC(lpc_encode_unrolled)(res, smp, len,     6, coefs, shift, 0); break;
-+    case  7: FUNC(lpc_encode_unrolled)(res, smp, len,     7, coefs, shift, 0); break;
-+    case  8: FUNC(lpc_encode_unrolled)(res, smp, len,     8, coefs, shift, 0); break;
-+    default: FUNC(lpc_encode_unrolled)(res, smp, len, order, coefs, shift, 1); break;
-+    }
-+#endif
-+}
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index 115664a..71024f2 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -31,6 +31,7 @@
- #include "lpc.h"
- #include "flac.h"
- #include "flacdata.h"
-+#include "flacdsp.h"
- 
- #define FLAC_SUBFRAME_CONSTANT  0
- #define FLAC_SUBFRAME_VERBATIM  1
-@@ -106,6 +107,7 @@ typedef struct FlacEncodeContext {
-     uint8_t *md5_buffer;
-     unsigned int md5_buffer_size;
-     DSPContext dsp;
-+    FLACDSPContext flac_dsp;
- } FlacEncodeContext;
- 
- 
-@@ -385,6 +387,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
-                       s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON);
- 
-     ff_dsputil_init(&s->dsp, avctx);
-+    ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, 16);
- 
-     dprint_compression_options(s);
- 
-@@ -684,110 +687,6 @@ static void encode_residual_fixed(int32_t *res, const int32_t *smp, int n,
- }
- 
- 
--#define LPC1(x) {\
--    int c = coefs[(x)-1];\
--    p0   += c * s;\
--    s     = smp[i-(x)+1];\
--    p1   += c * s;\
--}
--
--static av_always_inline void encode_residual_lpc_unrolled(int32_t *res,
--                                    const int32_t *smp, int n, int order,
--                                    const int32_t *coefs, int shift, int big)
--{
--    int i;
--    for (i = order; i < n; i += 2) {
--        int s  = smp[i-order];
--        int p0 = 0, p1 = 0;
--        if (big) {
--            switch (order) {
--            case 32: LPC1(32)
--            case 31: LPC1(31)
--            case 30: LPC1(30)
--            case 29: LPC1(29)
--            case 28: LPC1(28)
--            case 27: LPC1(27)
--            case 26: LPC1(26)
--            case 25: LPC1(25)
--            case 24: LPC1(24)
--            case 23: LPC1(23)
--            case 22: LPC1(22)
--            case 21: LPC1(21)
--            case 20: LPC1(20)
--            case 19: LPC1(19)
--            case 18: LPC1(18)
--            case 17: LPC1(17)
--            case 16: LPC1(16)
--            case 15: LPC1(15)
--            case 14: LPC1(14)
--            case 13: LPC1(13)
--            case 12: LPC1(12)
--            case 11: LPC1(11)
--            case 10: LPC1(10)
--            case  9: LPC1( 9)
--                     LPC1( 8)
--                     LPC1( 7)
--                     LPC1( 6)
--                     LPC1( 5)
--                     LPC1( 4)
--                     LPC1( 3)
--                     LPC1( 2)
--                     LPC1( 1)
--            }
--        } else {
--            switch (order) {
--            case  8: LPC1( 8)
--            case  7: LPC1( 7)
--            case  6: LPC1( 6)
--            case  5: LPC1( 5)
--            case  4: LPC1( 4)
--            case  3: LPC1( 3)
--            case  2: LPC1( 2)
--            case  1: LPC1( 1)
--            }
--        }
--        res[i  ] = smp[i  ] - (p0 >> shift);
--        res[i+1] = smp[i+1] - (p1 >> shift);
--    }
--}
--
--
--static void encode_residual_lpc(int32_t *res, const int32_t *smp, int n,
--                                int order, const int32_t *coefs, int shift)
--{
--    int i;
--    for (i = 0; i < order; i++)
--        res[i] = smp[i];
--#if CONFIG_SMALL
--    for (i = order; i < n; i += 2) {
--        int j;
--        int s  = smp[i];
--        int p0 = 0, p1 = 0;
--        for (j = 0; j < order; j++) {
--            int c = coefs[j];
--            p1   += c * s;
--            s     = smp[i-j-1];
--            p0   += c * s;
--        }
--        res[i  ] = smp[i  ] - (p0 >> shift);
--        res[i+1] = smp[i+1] - (p1 >> shift);
--    }
--#else
--    switch (order) {
--    case  1: encode_residual_lpc_unrolled(res, smp, n, 1, coefs, shift, 0); break;
--    case  2: encode_residual_lpc_unrolled(res, smp, n, 2, coefs, shift, 0); break;
--    case  3: encode_residual_lpc_unrolled(res, smp, n, 3, coefs, shift, 0); break;
--    case  4: encode_residual_lpc_unrolled(res, smp, n, 4, coefs, shift, 0); break;
--    case  5: encode_residual_lpc_unrolled(res, smp, n, 5, coefs, shift, 0); break;
--    case  6: encode_residual_lpc_unrolled(res, smp, n, 6, coefs, shift, 0); break;
--    case  7: encode_residual_lpc_unrolled(res, smp, n, 7, coefs, shift, 0); break;
--    case  8: encode_residual_lpc_unrolled(res, smp, n, 8, coefs, shift, 0); break;
--    default: encode_residual_lpc_unrolled(res, smp, n, order, coefs, shift, 1); break;
--    }
--#endif
--}
--
--
- static int encode_residual_ch(FlacEncodeContext *s, int ch)
- {
-     int i, n;
-@@ -869,7 +768,8 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-             order = min_order + (((max_order-min_order+1) * (i+1)) / levels)-1;
-             if (order < 0)
-                 order = 0;
--            encode_residual_lpc(res, smp, n, order+1, coefs[order], shift[order]);
-+            s->flac_dsp.lpc_encode(res, smp, n, order+1, coefs[order],
-+                                   shift[order]);
-             bits[i] = find_subframe_rice_params(s, sub, order+1);
-             if (bits[i] < bits[opt_index]) {
-                 opt_index = i;
-@@ -883,7 +783,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-         opt_order = 0;
-         bits[0]   = UINT32_MAX;
-         for (i = min_order-1; i < max_order; i++) {
--            encode_residual_lpc(res, smp, n, i+1, coefs[i], shift[i]);
-+            s->flac_dsp.lpc_encode(res, smp, n, i+1, coefs[i], shift[i]);
-             bits[i] = find_subframe_rice_params(s, sub, i+1);
-             if (bits[i] < bits[opt_order])
-                 opt_order = i;
-@@ -901,7 +801,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-             for (i = last-step; i <= last+step; i += step) {
-                 if (i < min_order-1 || i >= max_order || bits[i] < UINT32_MAX)
-                     continue;
--                encode_residual_lpc(res, smp, n, i+1, coefs[i], shift[i]);
-+                s->flac_dsp.lpc_encode(res, smp, n, i+1, coefs[i], shift[i]);
-                 bits[i] = find_subframe_rice_params(s, sub, i+1);
-                 if (bits[i] < bits[opt_order])
-                     opt_order = i;
-@@ -916,7 +816,7 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-     for (i = 0; i < sub->order; i++)
-         sub->coefs[i] = coefs[sub->order-1][i];
- 
--    encode_residual_lpc(res, smp, n, sub->order, sub->coefs, sub->shift);
-+    s->flac_dsp.lpc_encode(res, smp, n, sub->order, sub->coefs, sub->shift);
- 
-     find_subframe_rice_params(s, sub, sub->order);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0183-flacenc-add-24-bit-encoding.patch b/debian/patches/post-9beta2/0183-flacenc-add-24-bit-encoding.patch
deleted file mode 100644
index a61db9d..0000000
--- a/debian/patches/post-9beta2/0183-flacenc-add-24-bit-encoding.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 13e1ee6c84f095b052026b18611ce68c76666474 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 27 Oct 2012 00:26:02 -0400
-Subject: [PATCH 183/278] flacenc: add 24-bit encoding
-
----
- libavcodec/flacenc.c |   88 ++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 63 insertions(+), 25 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index 71024f2..b00df95 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -92,6 +92,7 @@ typedef struct FlacEncodeContext {
-     int channels;
-     int samplerate;
-     int sr_code[2];
-+    int bps_code;
-     int max_blocksize;
-     int min_framesize;
-     int max_framesize;
-@@ -128,7 +129,7 @@ static void write_streaminfo(FlacEncodeContext *s, uint8_t *header)
-     put_bits(&pb, 24, s->max_framesize);
-     put_bits(&pb, 20, s->samplerate);
-     put_bits(&pb, 3, s->channels-1);
--    put_bits(&pb, 5, 15);       /* bits per sample - 1 */
-+    put_bits(&pb,  5, s->avctx->bits_per_raw_sample - 1);
-     /* write 36-bit sample count in 2 put_bits() calls */
-     put_bits(&pb, 24, (s->sample_count & 0xFFFFFF000LL) >> 12);
-     put_bits(&pb, 12,  s->sample_count & 0x000000FFFLL);
-@@ -228,8 +229,18 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
- 
-     s->avctx = avctx;
- 
--    if (avctx->sample_fmt != AV_SAMPLE_FMT_S16)
--        return -1;
-+    switch (avctx->sample_fmt) {
-+    case AV_SAMPLE_FMT_S16:
-+        avctx->bits_per_raw_sample = 16;
-+        s->bps_code                = 4;
-+        break;
-+    case AV_SAMPLE_FMT_S32:
-+        if (avctx->bits_per_raw_sample != 24)
-+            av_log(avctx, AV_LOG_WARNING, "encoding as 24 bits-per-sample\n");
-+        avctx->bits_per_raw_sample = 24;
-+        s->bps_code                = 6;
-+        break;
-+    }
- 
-     if (channels < 1 || channels > FLAC_MAX_CHANNELS)
-         return -1;
-@@ -359,7 +370,8 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
- 
-     /* set maximum encoded frame size in verbatim mode */
-     s->max_framesize = ff_flac_get_max_frame_size(s->avctx->frame_size,
--                                                  s->channels, 16);
-+                                                  s->channels,
-+                                                  s->avctx->bits_per_raw_sample);
- 
-     /* initialize MD5 context */
-     s->md5ctx = av_md5_alloc();
-@@ -387,7 +399,8 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
-                       s->options.max_prediction_order, FF_LPC_TYPE_LEVINSON);
- 
-     ff_dsputil_init(&s->dsp, avctx);
--    ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt, 16);
-+    ff_flacdsp_init(&s->flac_dsp, avctx->sample_fmt,
-+                    avctx->bits_per_raw_sample);
- 
-     dprint_compression_options(s);
- 
-@@ -423,7 +436,7 @@ static void init_frame(FlacEncodeContext *s, int nb_samples)
- 
-     for (ch = 0; ch < s->channels; ch++) {
-         frame->subframes[ch].wasted = 0;
--        frame->subframes[ch].obits = 16;
-+        frame->subframes[ch].obits  = s->avctx->bits_per_raw_sample;
-     }
- 
-     frame->verbatim_only = 0;
-@@ -433,15 +446,25 @@ static void init_frame(FlacEncodeContext *s, int nb_samples)
- /**
-  * Copy channel-interleaved input samples into separate subframes.
-  */
--static void copy_samples(FlacEncodeContext *s, const int16_t *samples)
-+static void copy_samples(FlacEncodeContext *s, const void *samples)
- {
-     int i, j, ch;
-     FlacFrame *frame;
--
--    frame = &s->frame;
--    for (i = 0, j = 0; i < frame->blocksize; i++)
--        for (ch = 0; ch < s->channels; ch++, j++)
--            frame->subframes[ch].samples[i] = samples[j];
-+    int shift = av_get_bytes_per_sample(s->avctx->sample_fmt) * 8 -
-+                s->avctx->bits_per_raw_sample;
-+
-+#define COPY_SAMPLES(bits) do {                                     \
-+    const int ## bits ## _t *samples0 = samples;                    \
-+    frame = &s->frame;                                              \
-+    for (i = 0, j = 0; i < frame->blocksize; i++)                   \
-+        for (ch = 0; ch < s->channels; ch++, j++)                   \
-+            frame->subframes[ch].samples[i] = samples0[j] >> shift; \
-+} while (0)
-+
-+    if (s->avctx->sample_fmt == AV_SAMPLE_FMT_S16)
-+        COPY_SAMPLES(16);
-+    else
-+        COPY_SAMPLES(32);
- }
- 
- 
-@@ -1017,7 +1040,7 @@ static void write_frame_header(FlacEncodeContext *s)
-     else
-         put_bits(&s->pb, 4, frame->ch_mode + FLAC_MAX_CHANNELS - 1);
- 
--    put_bits(&s->pb, 3, 4); /* bits-per-sample code */
-+    put_bits(&s->pb, 3, s->bps_code);
-     put_bits(&s->pb, 1, 0);
-     write_utf8(&s->pb, s->frame_count);
- 
-@@ -1119,23 +1142,38 @@ static int write_frame(FlacEncodeContext *s, AVPacket *avpkt)
- }
- 
- 
--static int update_md5_sum(FlacEncodeContext *s, const int16_t *samples)
-+static int update_md5_sum(FlacEncodeContext *s, const void *samples)
- {
-     const uint8_t *buf;
--    int buf_size = s->frame.blocksize * s->channels * 2;
-+    int buf_size = s->frame.blocksize * s->channels *
-+                   ((s->avctx->bits_per_raw_sample + 7) / 8);
- 
--    if (HAVE_BIGENDIAN) {
-+    if (s->avctx->bits_per_raw_sample > 16 || HAVE_BIGENDIAN) {
-         av_fast_malloc(&s->md5_buffer, &s->md5_buffer_size, buf_size);
-         if (!s->md5_buffer)
-             return AVERROR(ENOMEM);
-     }
- 
--    buf = (const uint8_t *)samples;
-+    if (s->avctx->bits_per_raw_sample <= 16) {
-+        buf = (const uint8_t *)samples;
- #if HAVE_BIGENDIAN
--    s->dsp.bswap16_buf((uint16_t *)s->md5_buffer,
--                       (const uint16_t *)samples, buf_size / 2);
--    buf = s->md5_buffer;
-+        s->dsp.bswap16_buf((uint16_t *)s->md5_buffer,
-+                           (const uint16_t *)samples, buf_size / 2);
-+        buf = s->md5_buffer;
- #endif
-+    } else {
-+        int i;
-+        const int32_t *samples0 = samples;
-+        uint8_t *tmp            = s->md5_buffer;
-+
-+        for (i = 0; i < s->frame.blocksize * s->channels; i++) {
-+            int32_t v = samples0[i] >> 8;
-+            *tmp++    = (v      ) & 0xFF;
-+            *tmp++    = (v >>  8) & 0xFF;
-+            *tmp++    = (v >> 16) & 0xFF;
-+        }
-+        buf = s->md5_buffer;
-+    }
-     av_md5_update(s->md5ctx, buf, buf_size);
- 
-     return 0;
-@@ -1146,7 +1184,6 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-                              const AVFrame *frame, int *got_packet_ptr)
- {
-     FlacEncodeContext *s;
--    const int16_t *samples;
-     int frame_bytes, out_bytes, ret;
- 
-     s = avctx->priv_data;
-@@ -1158,17 +1195,17 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-         write_streaminfo(s, avctx->extradata);
-         return 0;
-     }
--    samples = (const int16_t *)frame->data[0];
- 
-     /* change max_framesize for small final frame */
-     if (frame->nb_samples < s->frame.blocksize) {
-         s->max_framesize = ff_flac_get_max_frame_size(frame->nb_samples,
--                                                      s->channels, 16);
-+                                                      s->channels,
-+                                                      avctx->bits_per_raw_sample);
-     }
- 
-     init_frame(s, frame->nb_samples);
- 
--    copy_samples(s, samples);
-+    copy_samples(s, frame->data[0]);
- 
-     channel_decorrelation(s);
- 
-@@ -1196,7 +1233,7 @@ static int flac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
- 
-     s->frame_count++;
-     s->sample_count += frame->nb_samples;
--    if ((ret = update_md5_sum(s, samples)) < 0) {
-+    if ((ret = update_md5_sum(s, frame->data[0])) < 0) {
-         av_log(avctx, AV_LOG_ERROR, "Error updating MD5 checksum\n");
-         return ret;
-     }
-@@ -1273,6 +1310,7 @@ AVCodec ff_flac_encoder = {
-     .close          = flac_encode_close,
-     .capabilities   = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
-     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
-+                                                     AV_SAMPLE_FMT_S32,
-                                                      AV_SAMPLE_FMT_NONE },
-     .long_name      = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"),
-     .priv_class     = &flac_encoder_class,
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0184-flacenc-use-RICE2-entropy-coding-mode-for-24-bit.patch b/debian/patches/post-9beta2/0184-flacenc-use-RICE2-entropy-coding-mode-for-24-bit.patch
deleted file mode 100644
index ff8a9a8..0000000
--- a/debian/patches/post-9beta2/0184-flacenc-use-RICE2-entropy-coding-mode-for-24-bit.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 2e76f34387762405b79d2f7f26659826089c7275 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 27 Oct 2012 00:46:43 -0400
-Subject: [PATCH 184/278] flacenc: use RICE2 entropy coding mode for 24-bit
-
----
- libavcodec/flacenc.c |   55 +++++++++++++++++++++++++++++++++++---------------
- 1 file changed, 39 insertions(+), 16 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index b00df95..93d4646 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -43,7 +43,11 @@
- #define MAX_PARTITIONS     (1 << MAX_PARTITION_ORDER)
- #define MAX_LPC_PRECISION  15
- #define MAX_LPC_SHIFT      15
--#define MAX_RICE_PARAM     14
-+
-+enum CodingMode {
-+    CODING_MODE_RICE  = 4,
-+    CODING_MODE_RICE2 = 5,
-+};
- 
- typedef struct CompressionOptions {
-     int compression_level;
-@@ -60,6 +64,7 @@ typedef struct CompressionOptions {
- } CompressionOptions;
- 
- typedef struct RiceContext {
-+    enum CodingMode coding_mode;
-     int porder;
-     int params[MAX_PARTITIONS];
- } RiceContext;
-@@ -435,8 +440,15 @@ static void init_frame(FlacEncodeContext *s, int nb_samples)
-     }
- 
-     for (ch = 0; ch < s->channels; ch++) {
--        frame->subframes[ch].wasted = 0;
--        frame->subframes[ch].obits  = s->avctx->bits_per_raw_sample;
-+        FlacSubframe *sub = &frame->subframes[ch];
-+
-+        sub->wasted = 0;
-+        sub->obits  = s->avctx->bits_per_raw_sample;
-+
-+        if (sub->obits > 16)
-+            sub->rc.coding_mode = CODING_MODE_RICE2;
-+        else
-+            sub->rc.coding_mode = CODING_MODE_RICE;
-     }
- 
-     frame->verbatim_only = 0;
-@@ -518,7 +530,7 @@ static uint64_t subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,
-         part_end = psize;
-         for (p = 0; p < 1 << porder; p++) {
-             int k = sub->rc.params[p];
--            count += 4;
-+            count += sub->rc.coding_mode;
-             count += rice_count_exact(&sub->residual[i], part_end - i, k);
-             i = part_end;
-             part_end = FFMIN(s->frame.blocksize, part_end + psize);
-@@ -534,7 +546,7 @@ static uint64_t subframe_count_exact(FlacEncodeContext *s, FlacSubframe *sub,
- /**
-  * Solve for d/dk(rice_encode_count) = n-((sum-(n>>1))>>(k+1)) = 0.
-  */
--static int find_optimal_param(uint64_t sum, int n)
-+static int find_optimal_param(uint64_t sum, int n, int max_param)
- {
-     int k;
-     uint64_t sum2;
-@@ -543,7 +555,7 @@ static int find_optimal_param(uint64_t sum, int n)
-         return 0;
-     sum2 = sum - (n >> 1);
-     k    = av_log2(av_clipl_int32(sum2 / n));
--    return FFMIN(k, MAX_RICE_PARAM);
-+    return FFMIN(k, max_param);
- }
- 
- 
-@@ -551,15 +563,17 @@ static uint64_t calc_optimal_rice_params(RiceContext *rc, int porder,
-                                          uint64_t *sums, int n, int pred_order)
- {
-     int i;
--    int k, cnt, part;
-+    int k, cnt, part, max_param;
-     uint64_t all_bits;
- 
-+    max_param = (1 << rc->coding_mode) - 2;
-+
-     part     = (1 << porder);
-     all_bits = 4 * part;
- 
-     cnt = (n >> porder) - pred_order;
-     for (i = 0; i < part; i++) {
--        k = find_optimal_param(sums[i], cnt);
-+        k = find_optimal_param(sums[i], cnt, max_param);
-         rc->params[i] = k;
-         all_bits += rice_encode_count(sums[i], cnt, k);
-         cnt = n >> porder;
-@@ -612,6 +626,8 @@ static uint64_t calc_rice_params(RiceContext *rc, int pmin, int pmax,
-     assert(pmax >= 0 && pmax <= MAX_PARTITION_ORDER);
-     assert(pmin <= pmax);
- 
-+    tmp_rc.coding_mode = rc->coding_mode;
-+
-     udata = av_malloc(n * sizeof(uint32_t));
-     for (i = 0; i < n; i++)
-         udata[i] = (2*data[i]) ^ (data[i]>>31);
-@@ -650,7 +666,7 @@ static uint64_t find_subframe_rice_params(FlacEncodeContext *s,
-     int pmax = get_max_p_order(s->options.max_partition_order,
-                                s->frame.blocksize, pred_order);
- 
--    uint64_t bits = 8 + pred_order * sub->obits + 2 + 4;
-+    uint64_t bits = 8 + pred_order * sub->obits + 2 + sub->rc.coding_mode;
-     if (sub->type == FLAC_SUBFRAME_LPC)
-         bits += 4 + 5 + pred_order * s->options.lpc_coeff_precision;
-     bits += calc_rice_params(&sub->rc, pmin, pmax, sub->residual,
-@@ -925,12 +941,18 @@ static void remove_wasted_bits(FlacEncodeContext *s)
- 
-             sub->wasted = v;
-             sub->obits -= v;
-+
-+            /* for 24-bit, check if removing wasted bits makes the range better
-+               suited for using RICE instead of RICE2 for entropy coding */
-+            if (sub->obits <= 17)
-+                sub->rc.coding_mode = CODING_MODE_RICE;
-         }
-     }
- }
- 
- 
--static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n)
-+static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n,
-+                                int max_rice_param)
- {
-     int i, best;
-     int32_t lt, rt;
-@@ -950,7 +972,7 @@ static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n)
-     }
-     /* estimate bit counts */
-     for (i = 0; i < 4; i++) {
--        k      = find_optimal_param(2 * sum[i], n);
-+        k      = find_optimal_param(2 * sum[i], n, max_rice_param);
-         sum[i] = rice_encode_count( 2 * sum[i], n, k);
-     }
- 
-@@ -989,9 +1011,10 @@ static void channel_decorrelation(FlacEncodeContext *s)
-         return;
-     }
- 
--    if (s->options.ch_mode < 0)
--        frame->ch_mode = estimate_stereo_mode(left, right, n);
--    else
-+    if (s->options.ch_mode < 0) {
-+        int max_rice_param = (1 << frame->subframes[0].rc.coding_mode) - 2;
-+        frame->ch_mode = estimate_stereo_mode(left, right, n, max_rice_param);
-+    } else
-         frame->ch_mode = s->options.ch_mode;
- 
-     /* perform decorrelation and adjust bits-per-sample */
-@@ -1100,7 +1123,7 @@ static void write_subframes(FlacEncodeContext *s)
-             }
- 
-             /* rice-encoded block */
--            put_bits(&s->pb, 2, 0);
-+            put_bits(&s->pb, 2, sub->rc.coding_mode - 4);
- 
-             /* partition order */
-             porder  = sub->rc.porder;
-@@ -1111,7 +1134,7 @@ static void write_subframes(FlacEncodeContext *s)
-             part_end  = &sub->residual[psize];
-             for (p = 0; p < 1 << porder; p++) {
-                 int k = sub->rc.params[p];
--                put_bits(&s->pb, 4, k);
-+                put_bits(&s->pb, sub->rc.coding_mode, k);
-                 while (res < part_end)
-                     set_sr_golomb_flac(&s->pb, *res++, k, INT32_MAX, 0);
-                 part_end = FFMIN(frame_end, part_end + psize);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0185-FATE-rename-FLAC-tests-from-flac-to-flac-16.patch b/debian/patches/post-9beta2/0185-FATE-rename-FLAC-tests-from-flac-to-flac-16.patch
deleted file mode 100644
index a3e0ef7..0000000
--- a/debian/patches/post-9beta2/0185-FATE-rename-FLAC-tests-from-flac-to-flac-16.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 31c3b9c95e2b14189f2bc9f2bd886834114da81d Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 27 Oct 2012 01:22:07 -0400
-Subject: [PATCH 185/278] FATE: rename FLAC tests from flac-* to flac-16-*
-
-This will distinguish FLAC 16-bit tests from FLAC tests with other bit
-depths.
----
- tests/fate/flac.mak |   25 +++++++++++++------------
- 1 file changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/tests/fate/flac.mak b/tests/fate/flac.mak
-index dc49928..f7ac342 100644
---- a/tests/fate/flac.mak
-+++ b/tests/fate/flac.mak
-@@ -1,17 +1,18 @@
--FATE_FLAC += fate-flac-chmode-indep                                     \
--             fate-flac-chmode-left_side                                 \
--             fate-flac-chmode-mid_side                                  \
--             fate-flac-chmode-right_side                                \
--             fate-flac-fixed                                            \
--             fate-flac-lpc-cholesky                                     \
--             fate-flac-lpc-levinson                                     \
-+FATE_FLAC += fate-flac-16-chmode-indep                                  \
-+             fate-flac-16-chmode-left_side                              \
-+             fate-flac-16-chmode-mid_side                               \
-+             fate-flac-16-chmode-right_side                             \
-+             fate-flac-16-fixed                                         \
-+             fate-flac-16-lpc-cholesky                                  \
-+             fate-flac-16-lpc-levinson                                  \
- 
--fate-flac-chmode-%: OPTS = -ch_mode $(@:fate-flac-chmode-%=%)
--fate-flac-fixed: OPTS = -lpc_type fixed
--fate-flac-lpc-%: OPTS = -lpc_type $(@:fate-flac-lpc-%=%)
-+fate-flac-16-chmode-%: OPTS = -ch_mode $(@:fate-flac-16-chmode-%=%)
-+fate-flac-16-fixed:    OPTS = -lpc_type fixed
-+fate-flac-16-lpc-%:    OPTS = -lpc_type $(@:fate-flac-16-lpc-%=%)
-+
-+fate-flac-16-%: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
-+fate-flac-16-%: CMD = enc_dec_pcm flac wav s16le $(REF) -c flac $(OPTS)
- 
--fate-flac-%: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
--fate-flac-%: CMD = enc_dec_pcm flac wav s16le $(REF) -c flac $(OPTS)
- fate-flac-%: CMP = oneoff
- fate-flac-%: FUZZ = 0
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0186-FATE-add-a-24-bit-FLAC-encoding-test.patch b/debian/patches/post-9beta2/0186-FATE-add-a-24-bit-FLAC-encoding-test.patch
deleted file mode 100644
index 7c42ccc..0000000
--- a/debian/patches/post-9beta2/0186-FATE-add-a-24-bit-FLAC-encoding-test.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 8a58894fc63c9d367c4cd6a17e277d1a8608c2c0 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 5 Nov 2012 12:49:36 -0500
-Subject: [PATCH 186/278] FATE: add a 24-bit FLAC encoding test
-
----
- tests/fate/flac.mak |    6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/tests/fate/flac.mak b/tests/fate/flac.mak
-index f7ac342..92eb743 100644
---- a/tests/fate/flac.mak
-+++ b/tests/fate/flac.mak
-@@ -5,6 +5,7 @@ FATE_FLAC += fate-flac-16-chmode-indep                                  \
-              fate-flac-16-fixed                                         \
-              fate-flac-16-lpc-cholesky                                  \
-              fate-flac-16-lpc-levinson                                  \
-+             fate-flac-24-comp-8                                        \
- 
- fate-flac-16-chmode-%: OPTS = -ch_mode $(@:fate-flac-16-chmode-%=%)
- fate-flac-16-fixed:    OPTS = -lpc_type fixed
-@@ -13,6 +14,11 @@ fate-flac-16-lpc-%:    OPTS = -lpc_type $(@:fate-flac-16-lpc-%=%)
- fate-flac-16-%: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
- fate-flac-16-%: CMD = enc_dec_pcm flac wav s16le $(REF) -c flac $(OPTS)
- 
-+fate-flac-24-comp-%: OPTS = -compression_level $(@:fate-flac-24-comp-%=%)
-+
-+fate-flac-24-%: REF = $(SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav
-+fate-flac-24-%: CMD = enc_dec_pcm flac wav s24le $(REF) -c flac $(OPTS)
-+
- fate-flac-%: CMP = oneoff
- fate-flac-%: FUZZ = 0
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0187-x86-avresample-Add-missing-colons-to-assembly-labels.patch b/debian/patches/post-9beta2/0187-x86-avresample-Add-missing-colons-to-assembly-labels.patch
deleted file mode 100644
index 5bc676a..0000000
--- a/debian/patches/post-9beta2/0187-x86-avresample-Add-missing-colons-to-assembly-labels.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 352e18b766650d298a3ba54f757259220746b03b Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 6 Nov 2012 12:07:35 +0100
-Subject: [PATCH 187/278] x86: avresample: Add missing colons to assembly
- labels
-
-YASM accepts labels without colons, but NASM issues warnings.
----
- libavresample/x86/audio_convert.asm |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
-index e7f7157..567a916 100644
---- a/libavresample/x86/audio_convert.asm
-+++ b/libavresample/x86/audio_convert.asm
-@@ -247,7 +247,7 @@ cglobal conv_s16p_to_s16_2ch, 3,4,5, dst, src0, len, src1
-     add       src1q, lenq
-     lea        dstq, [dstq+2*lenq]
-     neg        lenq
--.loop
-+.loop:
-     mova         m0, [src0q+lenq       ]
-     mova         m1, [src1q+lenq       ]
-     mova         m2, [src0q+lenq+mmsize]
-@@ -716,7 +716,7 @@ cglobal conv_fltp_to_flt_2ch, 3,4,5, dst, src0, len, src1
-     add  src1q, lenq
-     lea   dstq, [dstq+2*lenq]
-     neg   lenq
--.loop
-+.loop:
-     mova    m0, [src0q+lenq       ]
-     mova    m1, [src1q+lenq       ]
-     mova    m2, [src0q+lenq+mmsize]
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0188-fate-aac-cosmetics-Group-AAC-LATM-tests-together.patch b/debian/patches/post-9beta2/0188-fate-aac-cosmetics-Group-AAC-LATM-tests-together.patch
deleted file mode 100644
index 0555c84..0000000
--- a/debian/patches/post-9beta2/0188-fate-aac-cosmetics-Group-AAC-LATM-tests-together.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 06c7b33831451761c6f8c2e3ca8f2d7340d603a0 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 12:19:54 +0200
-Subject: [PATCH 188/278] fate: aac: cosmetics: Group AAC LATM tests together
-
----
- tests/fate/aac.mak |   16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
-index 0368798..ea738c5 100644
---- a/tests/fate/aac.mak
-+++ b/tests/fate/aac.mak
-@@ -46,18 +46,10 @@ FATE_AAC += fate-aac-al_sbr_ps_06_ur
- fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4
- fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16
- 
--FATE_AAC_LATM += fate-aac-latm_000000001180bc60
--fate-aac-latm_000000001180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_000000001180bc60.mpg
--fate-aac-latm_000000001180bc60: REF = $(SAMPLES)/aac/latm_000000001180bc60.s16
--
- FATE_AAC += fate-aac-ap05_48
- fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4
- fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
- 
--FATE_AAC_LATM += fate-aac-latm_stereo_to_51
--fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
--fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
--
- fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
- fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
- 
-@@ -71,6 +63,14 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp  \
- 
- FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%)
- 
-+FATE_AAC_LATM += fate-aac-latm_000000001180bc60
-+fate-aac-latm_000000001180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_000000001180bc60.mpg
-+fate-aac-latm_000000001180bc60: REF = $(SAMPLES)/aac/latm_000000001180bc60.s16
-+
-+FATE_AAC_LATM += fate-aac-latm_stereo_to_51
-+fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
-+fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
-+
- FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM)
- 
- $(FATE_AAC_ALL): CMP  = oneoff
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0189-fate-atrac-Place-atrac1-and-atrac3-tests-in-differen.patch b/debian/patches/post-9beta2/0189-fate-atrac-Place-atrac1-and-atrac3-tests-in-differen.patch
deleted file mode 100644
index d41ce72..0000000
--- a/debian/patches/post-9beta2/0189-fate-atrac-Place-atrac1-and-atrac3-tests-in-differen.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From e6c4c0f7cfaf0378a70f6f7f0611d4c21433067a Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 01:09:33 +0200
-Subject: [PATCH 189/278] fate: atrac: Place atrac1 and atrac3 tests in
- different groups
-
----
- tests/fate/atrac.mak |   18 +++++++++++-------
- 1 file changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
-index 08a6b25..39b788a 100644
---- a/tests/fate/atrac.mak
-+++ b/tests/fate/atrac.mak
-@@ -1,20 +1,24 @@
--FATE_ATRAC += fate-atrac1
-+FATE_ATRAC1 += fate-atrac1
- fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
- fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
- 
--FATE_ATRAC += fate-atrac3-1
-+FATE_ATRAC3 += fate-atrac3-1
- fate-atrac3-1: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_066_small.wav
- fate-atrac3-1: REF = $(SAMPLES)/atrac3/mc_sich_at3_066_small.pcm
- 
--FATE_ATRAC += fate-atrac3-2
-+FATE_ATRAC3 += fate-atrac3-2
- fate-atrac3-2: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_105_small.wav
- fate-atrac3-2: REF = $(SAMPLES)/atrac3/mc_sich_at3_105_small.pcm
- 
--FATE_ATRAC += fate-atrac3-3
-+FATE_ATRAC3 += fate-atrac3-3
- fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
- fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
- 
--$(FATE_ATRAC): CMP = oneoff
-+FATE_ATRAC_ALL = $(FATE_ATRAC1) $(FATE_ATRAC3)
- 
--FATE_SAMPLES_AVCONV += $(FATE_ATRAC)
--fate-atrac: $(FATE_ATRAC)
-+$(FATE_ATRAC_ALL): CMP = oneoff
-+
-+FATE_SAMPLES_AVCONV += $(FATE_ATRAC_ALL)
-+
-+fate-atrac:  $(FATE_ATRAC_ALL)
-+fate-atrac3: $(FATE_ATRAC3)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0190-libopencore-amr-Check-the-return-value-of-amr_decode.patch b/debian/patches/post-9beta2/0190-libopencore-amr-Check-the-return-value-of-amr_decode.patch
deleted file mode 100644
index bb6eb82..0000000
--- a/debian/patches/post-9beta2/0190-libopencore-amr-Check-the-return-value-of-amr_decode.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From ad961726dc0bec7435aae7fbab10471b9063018b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 6 Nov 2012 12:18:57 +0200
-Subject: [PATCH 190/278] libopencore-amr: Check the return value of
- amr_decode_fix_avctx
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This allows getting rid of redundant checks later in the codec
-specific init functions.
-
-Move the check to before actually initializing the decoder lib,
-to simplify error handling.
-
-This fixes a case of returning a value from a void function, present since
-d40dab907.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavcodec/libopencore-amr.c |   25 ++++++++++---------------
- 1 file changed, 10 insertions(+), 15 deletions(-)
-
-diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
-index a754d52..0c472b7 100644
---- a/libavcodec/libopencore-amr.c
-+++ b/libavcodec/libopencore-amr.c
-@@ -27,7 +27,7 @@
- #include "audio_frame_queue.h"
- #include "internal.h"
- 
--static void amr_decode_fix_avctx(AVCodecContext *avctx)
-+static int amr_decode_fix_avctx(AVCodecContext *avctx)
- {
-     const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB);
- 
-@@ -41,6 +41,7 @@ static void amr_decode_fix_avctx(AVCodecContext *avctx)
-     avctx->channels       = 1;
-     avctx->channel_layout = AV_CH_LAYOUT_MONO;
-     avctx->sample_fmt     = AV_SAMPLE_FMT_S16;
-+    return 0;
- }
- 
- #if CONFIG_LIBOPENCORE_AMRNB
-@@ -107,6 +108,10 @@ static const AVClass class = {
- static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
- {
-     AMRContext *s  = avctx->priv_data;
-+    int ret;
-+
-+    if ((ret = amr_decode_fix_avctx(avctx)) < 0)
-+        return ret;
- 
-     s->dec_state   = Decoder_Interface_init();
-     if (!s->dec_state) {
-@@ -114,13 +119,6 @@ static av_cold int amr_nb_decode_init(AVCodecContext *avctx)
-         return -1;
-     }
- 
--    amr_decode_fix_avctx(avctx);
--
--    if (avctx->channels > 1) {
--        av_log(avctx, AV_LOG_ERROR, "amr_nb: multichannel decoding not supported\n");
--        return AVERROR(ENOSYS);
--    }
--
-     avcodec_get_frame_defaults(&s->frame);
-     avctx->coded_frame = &s->frame;
- 
-@@ -324,15 +322,12 @@ typedef struct AMRWBContext {
- static av_cold int amr_wb_decode_init(AVCodecContext *avctx)
- {
-     AMRWBContext *s = avctx->priv_data;
-+    int ret;
- 
--    s->state        = D_IF_init();
--
--    amr_decode_fix_avctx(avctx);
-+    if ((ret = amr_decode_fix_avctx(avctx)) < 0)
-+        return ret;
- 
--    if (avctx->channels > 1) {
--        av_log(avctx, AV_LOG_ERROR, "amr_wb: multichannel decoding not supported\n");
--        return AVERROR(ENOSYS);
--    }
-+    s->state        = D_IF_init();
- 
-     avcodec_get_frame_defaults(&s->frame);
-     avctx->coded_frame = &s->frame;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0191-libvpxenc-Allow-enabling-constrained-quality-CQ-mode.patch b/debian/patches/post-9beta2/0191-libvpxenc-Allow-enabling-constrained-quality-CQ-mode.patch
deleted file mode 100644
index f6b5884..0000000
--- a/debian/patches/post-9beta2/0191-libvpxenc-Allow-enabling-constrained-quality-CQ-mode.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 12776d5d2a46363c52603ae2be888a3094fce1c6 Mon Sep 17 00:00:00 2001
-From: James Zern <jzern at google.com>
-Date: Mon, 11 Apr 2011 17:00:35 -0700
-Subject: [PATCH 191/278] libvpxenc: Allow enabling constrained quality (CQ)
- mode
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The CQ mode was introduced in libvpx 0.9.6.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- configure              |    4 ++--
- libavcodec/libvpxenc.c |   10 ++++++++--
- 2 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 9528b5d..515a3c9 100755
---- a/configure
-+++ b/configure
-@@ -3344,8 +3344,8 @@ enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lv
- enabled libvpx     && {
-     enabled libvpx_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx ||
-                                 die "ERROR: libvpx decoder version must be >=0.9.1"; }
--    enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx ||
--                                die "ERROR: libvpx encoder version must be >=0.9.1"; } }
-+    enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_CQ" -lvpx ||
-+                                die "ERROR: libvpx encoder version must be >=0.9.6"; } }
- enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
-                       { check_cpp_condition x264.h "X264_BUILD >= 118" ||
-                         die "ERROR: libx264 version must be >= 0.118."; }
-diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
-index f505d0e..9774d5a 100644
---- a/libavcodec/libvpxenc.c
-+++ b/libavcodec/libvpxenc.c
-@@ -64,6 +64,7 @@ typedef struct VP8EncoderContext {
-     int arnr_type;
-     int lag_in_frames;
-     int error_resilient;
-+    int crf;
- } VP8Context;
- 
- /** String mappings for enum vp8e_enc_control_id */
-@@ -84,6 +85,7 @@ static const char *const ctlidstr[] = {
-     [VP8E_SET_ARNR_MAXFRAMES]    = "VP8E_SET_ARNR_MAXFRAMES",
-     [VP8E_SET_ARNR_STRENGTH]     = "VP8E_SET_ARNR_STRENGTH",
-     [VP8E_SET_ARNR_TYPE]         = "VP8E_SET_ARNR_TYPE",
-+    [VP8E_SET_CQ_LEVEL]          = "VP8E_SET_CQ_LEVEL",
- };
- 
- static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
-@@ -251,8 +253,10 @@ static av_cold int vp8_init(AVCodecContext *avctx)
-         enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000,
-                                               AV_ROUND_NEAR_INF);
- 
--    if (avctx->rc_min_rate == avctx->rc_max_rate &&
--        avctx->rc_min_rate == avctx->bit_rate)
-+    if (ctx->crf)
-+        enccfg.rc_end_usage = VPX_CQ;
-+    else if (avctx->rc_min_rate == avctx->rc_max_rate &&
-+             avctx->rc_min_rate == avctx->bit_rate)
-         enccfg.rc_end_usage = VPX_CBR;
- 
-     if (avctx->qmin > 0)
-@@ -343,6 +347,7 @@ static av_cold int vp8_init(AVCodecContext *avctx)
-     codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
-     codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS,  av_log2(avctx->slices));
-     codecctl_int(avctx, VP8E_SET_STATIC_THRESHOLD,  avctx->mb_threshold);
-+    codecctl_int(avctx, VP8E_SET_CQ_LEVEL,          ctx->crf);
- 
-     //provide dummy value to initialize wrapper, values will be updated each _encode()
-     vpx_img_wrap(&ctx->rawimg, VPX_IMG_FMT_I420, avctx->width, avctx->height, 1,
-@@ -553,6 +558,7 @@ static const AVOption options[] = {
-                          "though earlier partitions have been lost. Note that intra predicition"
-                          " is still done over the partition boundary.",       0, AV_OPT_TYPE_CONST, {.i64 = VPX_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"},
- #endif
-+    { "crf",              "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 63, VE },
-     { NULL }
- };
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0192-x86-h264_intrapred-port-to-cpuflags.patch b/debian/patches/post-9beta2/0192-x86-h264_intrapred-port-to-cpuflags.patch
deleted file mode 100644
index 55d75e6..0000000
--- a/debian/patches/post-9beta2/0192-x86-h264_intrapred-port-to-cpuflags.patch
+++ /dev/null
@@ -1,637 +0,0 @@
-From 6ca60d4ddd9b34b98b8570d440d79736d060f02a Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 10 Jul 2012 00:04:18 +0200
-Subject: [PATCH 192/278] x86: h264_intrapred: port to cpuflags
-
----
- libavcodec/x86/h264_intrapred.asm |  230 +++++++++++++++++++------------------
- 1 file changed, 119 insertions(+), 111 deletions(-)
-
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index 94d979c..dc3d475 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -52,7 +52,8 @@ cextern pw_32
- ; void pred16x16_vertical(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred16x16_vertical_8_mmx, 2,3
-+INIT_MMX mmx
-+cglobal pred16x16_vertical_8, 2,3
-     sub   r0, r1
-     mov   r2, 8
-     movq mm0, [r0+0]
-@@ -67,7 +68,8 @@ cglobal pred16x16_vertical_8_mmx, 2,3
-     jg .loop
-     REP_RET
- 
--cglobal pred16x16_vertical_8_sse, 2,3
-+INIT_XMM sse
-+cglobal pred16x16_vertical_8, 2,3
-     sub   r0, r1
-     mov   r2, 4
-     movaps xmm0, [r0]
-@@ -122,7 +124,6 @@ INIT_MMX mmx2
- PRED16x16_H
- INIT_XMM ssse3
- PRED16x16_H
--INIT_XMM
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_dc(uint8_t *src, int stride)
-@@ -185,13 +186,12 @@ INIT_XMM sse2
- PRED16x16_DC
- INIT_XMM ssse3
- PRED16x16_DC
--INIT_XMM
- 
- ;-----------------------------------------------------------------------------
- ; void pred16x16_tm_vp8(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED16x16_TM_MMX 0
-+%macro PRED16x16_TM 0
- cglobal pred16x16_tm_vp8_8, 2,5
-     sub        r0, r1
-     pxor      mm7, mm7
-@@ -228,12 +228,12 @@ cglobal pred16x16_tm_vp8_8, 2,5
- %endmacro
- 
- INIT_MMX mmx
--PRED16x16_TM_MMX
-+PRED16x16_TM
- INIT_MMX mmx2
--PRED16x16_TM_MMX
--INIT_MMX
-+PRED16x16_TM
- 
--cglobal pred16x16_tm_vp8_8_sse2, 2,6,6
-+INIT_XMM sse2
-+cglobal pred16x16_tm_vp8_8, 2,6,6
-     sub          r0, r1
-     pxor       xmm2, xmm2
-     movdqa     xmm0, [r0]
-@@ -548,7 +548,6 @@ INIT_XMM ssse3
- H264_PRED16x16_PLANE h264
- H264_PRED16x16_PLANE rv40
- H264_PRED16x16_PLANE svq3
--INIT_XMM
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8_plane(uint8_t *src, int stride)
-@@ -723,13 +722,13 @@ INIT_XMM sse2
- H264_PRED8x8_PLANE
- INIT_XMM ssse3
- H264_PRED8x8_PLANE
--INIT_XMM
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8_vertical(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred8x8_vertical_8_mmx, 2,2
-+INIT_MMX mmx
-+cglobal pred8x8_vertical_8, 2,2
-     sub    r0, r1
-     movq  mm0, [r0]
- %rep 3
-@@ -768,12 +767,12 @@ INIT_MMX mmx2
- PRED8x8_H
- INIT_MMX ssse3
- PRED8x8_H
--INIT_MMX
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8_top_dc_mmxext(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--cglobal pred8x8_top_dc_8_mmxext, 2,5
-+INIT_MMX mmxext
-+cglobal pred8x8_top_dc_8, 2,5
-     sub         r0, r1
-     movq       mm0, [r0]
-     pxor       mm1, mm1
-@@ -807,8 +806,8 @@ cglobal pred8x8_top_dc_8_mmxext, 2,5
- ; void pred8x8_dc_mmxext(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--cglobal pred8x8_dc_8_mmxext, 2,5
-+INIT_MMX mmxext
-+cglobal pred8x8_dc_8, 2,5
-     sub       r0, r1
-     pxor      m7, m7
-     movd      m0, [r0+0]
-@@ -868,7 +867,8 @@ cglobal pred8x8_dc_8_mmxext, 2,5
- ; void pred8x8_dc_rv40(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred8x8_dc_rv40_8_mmxext, 2,7
-+INIT_MMX mmxext
-+cglobal pred8x8_dc_rv40_8, 2,7
-     mov       r4, r0
-     sub       r0, r1
-     pxor      mm0, mm0
-@@ -904,7 +904,7 @@ cglobal pred8x8_dc_rv40_8_mmxext, 2,7
- ; void pred8x8_tm_vp8(uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8_TM_MMX 0
-+%macro PRED8x8_TM 0
- cglobal pred8x8_tm_vp8_8, 2,6
-     sub        r0, r1
-     pxor      mm7, mm7
-@@ -940,12 +940,12 @@ cglobal pred8x8_tm_vp8_8, 2,6
- %endmacro
- 
- INIT_MMX mmx
--PRED8x8_TM_MMX
-+PRED8x8_TM
- INIT_MMX mmx2
--PRED8x8_TM_MMX
--INIT_MMX
-+PRED8x8_TM
- 
--cglobal pred8x8_tm_vp8_8_sse2, 2,6,4
-+INIT_XMM sse2
-+cglobal pred8x8_tm_vp8_8, 2,6,4
-     sub          r0, r1
-     pxor       xmm1, xmm1
-     movq       xmm0, [r0]
-@@ -973,7 +973,8 @@ cglobal pred8x8_tm_vp8_8_sse2, 2,6,4
-     jg .loop
-     REP_RET
- 
--cglobal pred8x8_tm_vp8_8_ssse3, 2,3,6
-+INIT_XMM ssse3
-+cglobal pred8x8_tm_vp8_8, 2,3,6
-     sub          r0, r1
-     movdqa     xmm4, [tm_shuf]
-     pxor       xmm1, xmm1
-@@ -1014,8 +1015,8 @@ cglobal pred8x8_tm_vp8_8_ssse3, 2,3,6
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_top_dc(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
--%macro PRED8x8L_TOP_DC 1
--cglobal pred8x8l_top_dc_8_%1, 4,4
-+%macro PRED8x8L_TOP_DC 0
-+cglobal pred8x8l_top_dc_8, 4,4
-     sub          r0, r3
-     pxor        mm7, mm7
-     movq        mm0, [r0-8]
-@@ -1061,18 +1062,19 @@ cglobal pred8x8l_top_dc_8_%1, 4,4
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_TOP_DC mmxext
-+PRED8x8L_TOP_DC
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_TOP_DC ssse3
-+PRED8x8L_TOP_DC
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_dc(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8L_DC 1
--cglobal pred8x8l_dc_8_%1, 4,5
-+%macro PRED8x8L_DC 0
-+cglobal pred8x8l_dc_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1164,18 +1166,20 @@ cglobal pred8x8l_dc_8_%1, 4,5
-     movq [r4+r3*2], mm0
-     RET
- %endmacro
--INIT_MMX
-+
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_DC mmxext
-+PRED8x8L_DC
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_DC ssse3
-+PRED8x8L_DC
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8L_HORIZONTAL 1
--cglobal pred8x8l_horizontal_8_%1, 4,4
-+%macro PRED8x8L_HORIZONTAL 0
-+cglobal pred8x8l_horizontal_8, 4,4
-     sub          r0, r3
-     lea          r2, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1236,18 +1240,19 @@ cglobal pred8x8l_horizontal_8_%1, 4,4
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_HORIZONTAL mmxext
-+PRED8x8L_HORIZONTAL
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_HORIZONTAL ssse3
-+PRED8x8L_HORIZONTAL
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8L_VERTICAL 1
--cglobal pred8x8l_vertical_8_%1, 4,4
-+%macro PRED8x8L_VERTICAL 0
-+cglobal pred8x8l_vertical_8, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1287,19 +1292,20 @@ cglobal pred8x8l_vertical_8_%1, 4,4
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_VERTICAL mmxext
-+PRED8x8L_VERTICAL
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_VERTICAL ssse3
-+PRED8x8L_VERTICAL
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_left(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_down_left_8_mmxext, 4,5
-+cglobal pred8x8l_down_left_8, 4,5
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1406,8 +1412,8 @@ cglobal pred8x8l_down_left_8_mmxext, 4,5
-     movq  [r0+r3*1], mm1
-     RET
- 
--%macro PRED8x8L_DOWN_LEFT 1
--cglobal pred8x8l_down_left_8_%1, 4,4
-+%macro PRED8x8L_DOWN_LEFT 0
-+cglobal pred8x8l_down_left_8, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -1467,7 +1473,7 @@ cglobal pred8x8l_down_left_8_%1, 4,4
-     lea         r2, [r1+r3*2]
-     movdqa    xmm1, xmm3
-     pslldq    xmm1, 1
--INIT_XMM
-+INIT_XMM cpuname
-     PRED4x4_LOWPASS xmm0, xmm1, xmm2, xmm3, xmm4
-     psrldq    xmm0, 1
-     movq [r0+r3*1], xmm0
-@@ -1489,20 +1495,20 @@ INIT_XMM
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_DOWN_LEFT sse2
--INIT_MMX
-+PRED8x8L_DOWN_LEFT
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_DOWN_LEFT ssse3
-+PRED8x8L_DOWN_LEFT
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_right_mmxext(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_down_right_8_mmxext, 4,5
-+cglobal pred8x8l_down_right_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1633,8 +1639,8 @@ cglobal pred8x8l_down_right_8_mmxext, 4,5
-     movq [r0+r3*1], mm0
-     RET
- 
--%macro PRED8x8L_DOWN_RIGHT 1
--cglobal pred8x8l_down_right_8_%1, 4,5
-+%macro PRED8x8L_DOWN_RIGHT 0
-+cglobal pred8x8l_down_right_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1722,7 +1728,7 @@ cglobal pred8x8l_down_right_8_%1, 4,5
-     lea         r0, [r2+r3*2]
-     movdqa    xmm2, xmm3
-     psrldq    xmm2, 1
--INIT_XMM
-+INIT_XMM cpuname
-     PRED4x4_LOWPASS xmm0, xmm1, xmm2, xmm3, xmm4
-     movdqa    xmm1, xmm0
-     psrldq    xmm1, 1
-@@ -1743,20 +1749,20 @@ INIT_XMM
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_DOWN_RIGHT sse2
--INIT_MMX
-+PRED8x8L_DOWN_RIGHT
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_DOWN_RIGHT ssse3
-+PRED8x8L_DOWN_RIGHT
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical_right(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_vertical_right_8_mmxext, 4,5
-+cglobal pred8x8l_vertical_right_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -1862,8 +1868,8 @@ cglobal pred8x8l_vertical_right_8_mmxext, 4,5
-     movq [r4+r3*2], mm5
-     RET
- 
--%macro PRED8x8L_VERTICAL_RIGHT 1
--cglobal pred8x8l_vertical_right_8_%1, 4,5,7
-+%macro PRED8x8L_VERTICAL_RIGHT 0
-+cglobal pred8x8l_vertical_right_8, 4,5,7
-     ; manually spill XMM registers for Win64 because
-     ; the code here is initialized with INIT_MMX
-     WIN64_SPILL_XMM 7
-@@ -1944,7 +1950,7 @@ cglobal pred8x8l_vertical_right_8_%1, 4,5,7
-     pslldq      xmm0, 1
-     pslldq      xmm1, 2
-     pavgb       xmm2, xmm0
--INIT_XMM
-+INIT_XMM cpuname
-     PRED4x4_LOWPASS xmm4, xmm3, xmm1, xmm0, xmm5
-     pandn       xmm6, xmm4
-     movdqa      xmm5, xmm4
-@@ -1973,19 +1979,19 @@ INIT_XMM
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_VERTICAL_RIGHT sse2
--INIT_MMX
-+PRED8x8L_VERTICAL_RIGHT
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_VERTICAL_RIGHT ssse3
-+PRED8x8L_VERTICAL_RIGHT
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_vertical_left(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8L_VERTICAL_LEFT 1
--cglobal pred8x8l_vertical_left_8_%1, 4,4
-+%macro PRED8x8L_VERTICAL_LEFT 0
-+cglobal pred8x8l_vertical_left_8, 4,4
-     sub          r0, r3
-     movq        mm0, [r0-8]
-     movq        mm3, [r0]
-@@ -2043,7 +2049,7 @@ cglobal pred8x8l_vertical_left_8_%1, 4,4
-     pslldq    xmm1, 1
-     pavgb     xmm3, xmm2
-     lea         r2, [r1+r3*2]
--INIT_XMM
-+INIT_XMM cpuname
-     PRED4x4_LOWPASS xmm0, xmm1, xmm2, xmm4, xmm5
-     psrldq    xmm0, 1
-     movq [r0+r3*1], xmm3
-@@ -2064,19 +2070,19 @@ INIT_XMM
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_VERTICAL_LEFT sse2
-+PRED8x8L_VERTICAL_LEFT
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--INIT_MMX
--PRED8x8L_VERTICAL_LEFT ssse3
-+PRED8x8L_VERTICAL_LEFT
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal_up(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED8x8L_HORIZONTAL_UP 1
--cglobal pred8x8l_horizontal_up_8_%1, 4,4
-+%macro PRED8x8L_HORIZONTAL_UP 0
-+cglobal pred8x8l_horizontal_up_8, 4,4
-     sub          r0, r3
-     lea          r2, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2153,19 +2159,20 @@ cglobal pred8x8l_horizontal_up_8_%1, 4,4
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_HORIZONTAL_UP mmxext
-+PRED8x8L_HORIZONTAL_UP
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_HORIZONTAL_UP ssse3
-+PRED8x8L_HORIZONTAL_UP
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_horizontal_down(uint8_t *src, int has_topleft, int has_topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred8x8l_horizontal_down_8_mmxext, 4,5
-+cglobal pred8x8l_horizontal_down_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2279,8 +2286,8 @@ cglobal pred8x8l_horizontal_down_8_mmxext, 4,5
-     movq [r0+r3*1], mm3
-     RET
- 
--%macro PRED8x8L_HORIZONTAL_DOWN 1
--cglobal pred8x8l_horizontal_down_8_%1, 4,5
-+%macro PRED8x8L_HORIZONTAL_DOWN 0
-+cglobal pred8x8l_horizontal_down_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-     movq        mm0, [r0+r3*1-8]
-@@ -2372,7 +2379,7 @@ cglobal pred8x8l_horizontal_down_8_%1, 4,5
-     movq2dq    xmm5, mm1
-     pslldq     xmm5, 8
-     por        xmm1, xmm5
--INIT_XMM
-+INIT_XMM cpuname
-     lea         r2, [r4+r3*2]
-     movdqa    xmm2, xmm1
-     movdqa    xmm3, xmm1
-@@ -2403,18 +2410,19 @@ INIT_XMM
-     RET
- %endmacro
- 
--INIT_MMX
-+INIT_MMX sse2
- %define PALIGNR PALIGNR_MMX
--PRED8x8L_HORIZONTAL_DOWN sse2
--INIT_MMX
-+PRED8x8L_HORIZONTAL_DOWN
-+INIT_MMX ssse3
- %define PALIGNR PALIGNR_SSSE3
--PRED8x8L_HORIZONTAL_DOWN ssse3
-+PRED8x8L_HORIZONTAL_DOWN
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--cglobal pred4x4_dc_8_mmxext, 3,5
-+INIT_MMX mmxext
-+cglobal pred4x4_dc_8, 3,5
-     pxor   mm7, mm7
-     mov     r4, r0
-     sub     r0, r2
-@@ -2443,7 +2451,7 @@ cglobal pred4x4_dc_8_mmxext, 3,5
- ; void pred4x4_tm_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--%macro PRED4x4_TM_MMX 0
-+%macro PRED4x4_TM 0
- cglobal pred4x4_tm_vp8_8, 3,6
-     sub        r0, r2
-     pxor      mm7, mm7
-@@ -2480,12 +2488,12 @@ cglobal pred4x4_tm_vp8_8, 3,6
- %endmacro
- 
- INIT_MMX mmx
--PRED4x4_TM_MMX
-+PRED4x4_TM
- INIT_MMX mmx2
--PRED4x4_TM_MMX
--INIT_MMX
-+PRED4x4_TM
- 
--cglobal pred4x4_tm_vp8_8_ssse3, 3,3
-+INIT_XMM ssse3
-+cglobal pred4x4_tm_vp8_8, 3,3
-     sub         r0, r2
-     movq       mm6, [tm_shuf]
-     pxor       mm1, mm1
-@@ -2524,8 +2532,8 @@ cglobal pred4x4_tm_vp8_8_ssse3, 3,3
- ; void pred4x4_vertical_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--cglobal pred4x4_vertical_vp8_8_mmxext, 3,3
-+INIT_MMX mmxext
-+cglobal pred4x4_vertical_vp8_8, 3,3
-     sub       r0, r2
-     movd      m1, [r0-1]
-     movd      m0, [r0]
-@@ -2543,8 +2551,8 @@ cglobal pred4x4_vertical_vp8_8_mmxext, 3,3
- ;-----------------------------------------------------------------------------
- ; void pred4x4_down_left_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
--INIT_MMX
--cglobal pred4x4_down_left_8_mmxext, 3,3
-+INIT_MMX mmxext
-+cglobal pred4x4_down_left_8, 3,3
-     sub       r0, r2
-     movq      m1, [r0]
-     punpckldq m1, [r1]
-@@ -2570,8 +2578,8 @@ cglobal pred4x4_down_left_8_mmxext, 3,3
- ; void pred4x4_vertical_left_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--cglobal pred4x4_vertical_left_8_mmxext, 3,3
-+INIT_MMX mmxext
-+cglobal pred4x4_vertical_left_8, 3,3
-     sub       r0, r2
-     movq      m1, [r0]
-     punpckldq m1, [r1]
-@@ -2595,8 +2603,8 @@ cglobal pred4x4_vertical_left_8_mmxext, 3,3
- ; void pred4x4_horizontal_up_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
--cglobal pred4x4_horizontal_up_8_mmxext, 3,3
-+INIT_MMX mmxext
-+cglobal pred4x4_horizontal_up_8, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movd      m0, [r0+r2*1-4]
-@@ -2628,9 +2636,9 @@ cglobal pred4x4_horizontal_up_8_mmxext, 3,3
- ; void pred4x4_horizontal_down_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_horizontal_down_8_mmxext, 3,3
-+cglobal pred4x4_horizontal_down_8, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movh      m0, [r0-4]      ; lt ..
-@@ -2664,9 +2672,9 @@ cglobal pred4x4_horizontal_down_8_mmxext, 3,3
- ; void pred4x4_vertical_right_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_vertical_right_8_mmxext, 3,3
-+cglobal pred4x4_vertical_right_8, 3,3
-     sub     r0, r2
-     lea     r1, [r0+r2*2]
-     movh    m0, [r0]                    ; ........t3t2t1t0
-@@ -2695,9 +2703,9 @@ cglobal pred4x4_vertical_right_8_mmxext, 3,3
- ; void pred4x4_down_right_mmxext(uint8_t *src, const uint8_t *topright, int stride)
- ;-----------------------------------------------------------------------------
- 
--INIT_MMX
-+INIT_MMX mmxext
- %define PALIGNR PALIGNR_MMX
--cglobal pred4x4_down_right_8_mmxext, 3,3
-+cglobal pred4x4_down_right_8, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-     movq      m1, [r1-8]
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0193-rtpenc_aac-Fix-calculation-of-the-header-size.patch b/debian/patches/post-9beta2/0193-rtpenc_aac-Fix-calculation-of-the-header-size.patch
deleted file mode 100644
index ddbb0e6..0000000
--- a/debian/patches/post-9beta2/0193-rtpenc_aac-Fix-calculation-of-the-header-size.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e004d175fe2463af8242e390b15350f4745be7b4 Mon Sep 17 00:00:00 2001
-From: Luca Abeni <lucabe72 at email.it>
-Date: Thu, 8 Nov 2012 01:38:50 +0100
-Subject: [PATCH 193/278] rtpenc_aac: Fix calculation of the header size
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Previously the high end byte was always set to zero. Also get
-rid of an unnecessary multiplication (which in practice couldn't
-overflow) before shifting.
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/rtpenc_aac.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/rtpenc_aac.c b/libavformat/rtpenc_aac.c
-index 86318df..1b2fa0a 100644
---- a/libavformat/rtpenc_aac.c
-+++ b/libavformat/rtpenc_aac.c
-@@ -47,8 +47,8 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
-             memmove(p + 2, s->buf + 2, au_size);
-         }
-         /* Write the AU header size */
--        p[0] = ((au_size * 8) & 0xFF) >> 8;
--        p[1] = (au_size * 8) & 0xFF;
-+        p[0] =  au_size >> 5;
-+        p[1] = (au_size & 0x1F) << 3;
- 
-         ff_rtp_send_data(s1, p, s->buf_ptr - p, 1);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0194-add-24-bit-FLAC-encoding-to-Changelog.patch b/debian/patches/post-9beta2/0194-add-24-bit-FLAC-encoding-to-Changelog.patch
deleted file mode 100644
index 81d66f6..0000000
--- a/debian/patches/post-9beta2/0194-add-24-bit-FLAC-encoding-to-Changelog.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 00f8ad41c78df71c464e98d2c1171a40f205db78 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Mon, 5 Nov 2012 15:36:19 -0500
-Subject: [PATCH 194/278] add 24-bit FLAC encoding to Changelog
-
-Also move a misplaced line from the 9_beta2 section to <next>
----
- Changelog |    6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/Changelog b/Changelog
-index e2c4273..f8079d1 100644
---- a/Changelog
-+++ b/Changelog
-@@ -2,9 +2,13 @@ Entries are sorted chronologically from oldest to youngest within each release,
- releases are sorted from youngest to oldest.
- 
- version <next>:
-+- ashowinfo audio filter
-+- 24-bit FLAC encoding
-+
-+
-+version 9_beta2:
- - metadata (INFO tag) support in WAV muxer
- - support for building DLLs using MSVC
--- ashowinfo audio filter
- 
- 
- version 9_beta1:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0195-avconv-rescale-packet-duration-to-muxer-time-base-wh.patch b/debian/patches/post-9beta2/0195-avconv-rescale-packet-duration-to-muxer-time-base-wh.patch
deleted file mode 100644
index 90147b3..0000000
--- a/debian/patches/post-9beta2/0195-avconv-rescale-packet-duration-to-muxer-time-base-wh.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 3ba416408aef99b4d7d92719c0a03dc2c9647025 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Tue, 6 Nov 2012 14:24:31 -0500
-Subject: [PATCH 195/278] avconv: rescale packet duration to muxer time base
- when flushing encoders
-
-Fixes Bug 385
----
- avconv.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/avconv.c b/avconv.c
-index 964847a..c931c46 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -964,6 +964,8 @@ static void flush_encoders(void)
-                     pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base);
-                 if (pkt.dts != AV_NOPTS_VALUE)
-                     pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base);
-+                if (pkt.duration > 0)
-+                    pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base);
-                 write_frame(os, &pkt, ost);
-             }
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0196-flacenc-ensure-the-order-is-within-the-min-max-range.patch b/debian/patches/post-9beta2/0196-flacenc-ensure-the-order-is-within-the-min-max-range.patch
deleted file mode 100644
index b42e96e..0000000
--- a/debian/patches/post-9beta2/0196-flacenc-ensure-the-order-is-within-the-min-max-range.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 3a2731cbd31d0c5681ddbc7c78edd5c53c4d0032 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Wed, 7 Nov 2012 14:48:28 -0500
-Subject: [PATCH 196/278] flacenc: ensure the order is within the min/max
- range in LPC order search
-
-This fixes use of uninitialized values when the FLAC encoder uses the
-2-level, 4-level, and 8-level search methods. Fixes failure of the
-fate-flac-24-comp-8 test when run using valgrind.
----
- libavcodec/flacenc.c |    8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
-index 93d4646..54bc64c 100644
---- a/libavcodec/flacenc.c
-+++ b/libavcodec/flacenc.c
-@@ -799,14 +799,16 @@ static int encode_residual_ch(FlacEncodeContext *s, int ch)
-         omethod == ORDER_METHOD_8LEVEL) {
-         int levels = 1 << omethod;
-         uint64_t bits[1 << ORDER_METHOD_8LEVEL];
--        int order;
-+        int order       = -1;
-         int opt_index   = levels-1;
-         opt_order       = max_order-1;
-         bits[opt_index] = UINT32_MAX;
-         for (i = levels-1; i >= 0; i--) {
-+            int last_order = order;
-             order = min_order + (((max_order-min_order+1) * (i+1)) / levels)-1;
--            if (order < 0)
--                order = 0;
-+            order = av_clip(order, min_order - 1, max_order - 1);
-+            if (order == last_order)
-+                continue;
-             s->flac_dsp.lpc_encode(res, smp, n, order+1, coefs[order],
-                                    shift[order]);
-             bits[i] = find_subframe_rice_params(s, sub, order+1);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0197-x86-h264_qpel_10bit-port-to-cpuflags.patch b/debian/patches/post-9beta2/0197-x86-h264_qpel_10bit-port-to-cpuflags.patch
deleted file mode 100644
index f52183e..0000000
--- a/debian/patches/post-9beta2/0197-x86-h264_qpel_10bit-port-to-cpuflags.patch
+++ /dev/null
@@ -1,668 +0,0 @@
-From 4d1f69f2440041b58d5a31bcfcff83ee3c88ac7e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Mon, 30 Jul 2012 17:04:26 +0200
-Subject: [PATCH 197/278] x86: h264_qpel_10bit: port to cpuflags
-
----
- libavcodec/x86/h264_qpel_10bit.asm |  314 ++++++++++++++++++------------------
- 1 file changed, 155 insertions(+), 159 deletions(-)
-
-diff --git a/libavcodec/x86/h264_qpel_10bit.asm b/libavcodec/x86/h264_qpel_10bit.asm
-index a84b810..4aea032 100644
---- a/libavcodec/x86/h264_qpel_10bit.asm
-+++ b/libavcodec/x86/h264_qpel_10bit.asm
-@@ -97,81 +97,73 @@ SECTION .text
- 
- %macro MC 1
- %define OP_MOV mova
--INIT_MMX
--%1 mmxext, put, 4
--INIT_XMM
--%1 sse2  , put, 8
-+INIT_MMX mmxext
-+%1 put, 4
-+INIT_XMM sse2
-+%1 put, 8
- 
- %define OP_MOV AVG_MOV
--INIT_MMX
--%1 mmxext, avg, 4
--INIT_XMM
--%1 sse2  , avg, 8
-+INIT_MMX mmxext
-+%1 avg, 4
-+INIT_XMM sse2
-+%1 avg, 8
- %endmacro
- 
--%macro MCAxA 8
--%if ARCH_X86_64
--%ifnidn %1,mmxext
--MCAxA_OP %1,%2,%3,%4,%5,%6,%7,%8
--%endif
--%else
--MCAxA_OP %1,%2,%3,%4,%5,%6,%7,%8
--%endif
--%endmacro
--
--%macro MCAxA_OP 8
-+%macro MCAxA_OP 7
- %if ARCH_X86_32
--cglobal %2_h264_qpel%5_%3_10_%1, %6,%7,%8
--    call stub_%2_h264_qpel%4_%3_10_%1
-+cglobal %1_h264_qpel%4_%2_10, %5,%6,%7
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     mov  r0, r0m
-     mov  r1, r1m
--    add  r0, %4*2
--    add  r1, %4*2
--    call stub_%2_h264_qpel%4_%3_10_%1
-+    add  r0, %3*2
-+    add  r1, %3*2
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     mov  r0, r0m
-     mov  r1, r1m
--    lea  r0, [r0+r2*%4]
--    lea  r1, [r1+r2*%4]
--    call stub_%2_h264_qpel%4_%3_10_%1
-+    lea  r0, [r0+r2*%3]
-+    lea  r1, [r1+r2*%3]
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     mov  r0, r0m
-     mov  r1, r1m
--    lea  r0, [r0+r2*%4+%4*2]
--    lea  r1, [r1+r2*%4+%4*2]
--    call stub_%2_h264_qpel%4_%3_10_%1
-+    lea  r0, [r0+r2*%3+%3*2]
-+    lea  r1, [r1+r2*%3+%3*2]
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     RET
- %else ; ARCH_X86_64
--cglobal %2_h264_qpel%5_%3_10_%1, %6,%7 + 2,%8
--    mov r%7, r0
--%assign p1 %7+1
-+cglobal %1_h264_qpel%4_%2_10, %5,%6 + 2,%7
-+    mov r%6, r0
-+%assign p1 %6+1
-     mov r %+ p1, r1
--    call stub_%2_h264_qpel%4_%3_10_%1
--    lea  r0, [r%7+%4*2]
--    lea  r1, [r %+ p1+%4*2]
--    call stub_%2_h264_qpel%4_%3_10_%1
--    lea  r0, [r%7+r2*%4]
--    lea  r1, [r %+ p1+r2*%4]
--    call stub_%2_h264_qpel%4_%3_10_%1
--    lea  r0, [r%7+r2*%4+%4*2]
--    lea  r1, [r %+ p1+r2*%4+%4*2]
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-+    lea  r0, [r%6+%3*2]
-+    lea  r1, [r %+ p1+%3*2]
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-+    lea  r0, [r%6+r2*%3]
-+    lea  r1, [r %+ p1+r2*%3]
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-+    lea  r0, [r%6+r2*%3+%3*2]
-+    lea  r1, [r %+ p1+r2*%3+%3*2]
- %if UNIX64 == 0 ; fall through to function
--    call stub_%2_h264_qpel%4_%3_10_%1
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     RET
- %endif
- %endif
- %endmacro
- 
- ;cpu, put/avg, mc, 4/8, ...
--%macro cglobal_mc 7
--%assign i %4*2
--MCAxA %1, %2, %3, %4, i, %5,%6,%7
-+%macro cglobal_mc 6
-+%assign i %3*2
-+%if ARCH_X86_32 || cpuflag(sse2)
-+MCAxA_OP %1, %2, %3, i, %4,%5,%6
-+%endif
- 
--cglobal %2_h264_qpel%4_%3_10_%1, %5,%6,%7
-+cglobal %1_h264_qpel%3_%2_10, %4,%5,%6
- %if UNIX64 == 0 ; no prologue or epilogue for UNIX64
--    call stub_%2_h264_qpel%4_%3_10_%1
-+    call stub_%1_h264_qpel%3_%2_10 %+ SUFFIX
-     RET
- %endif
- 
--stub_%2_h264_qpel%4_%3_10_%1:
-+stub_%1_h264_qpel%3_%2_10 %+ SUFFIX:
- %endmacro
- 
- ;-----------------------------------------------------------------------------
-@@ -189,14 +181,14 @@ stub_%2_h264_qpel%4_%3_10_%1:
- %endmacro
- 
- %macro MC00 1
--INIT_MMX
--cglobal_mc mmxext, %1, mc00, 4, 3,4,0
-+INIT_MMX mmxext
-+cglobal_mc %1, mc00, 4, 3,4,0
-     lea           r3, [r2*3]
-     COPY4
-     ret
- 
--INIT_XMM
--cglobal %1_h264_qpel8_mc00_10_sse2, 3,4
-+INIT_XMM sse2
-+cglobal %1_h264_qpel8_mc00_10, 3,4
-     lea  r3, [r2*3]
-     COPY4
-     lea  r0, [r0+r2*4]
-@@ -204,7 +196,7 @@ cglobal %1_h264_qpel8_mc00_10_sse2, 3,4
-     COPY4
-     RET
- 
--cglobal %1_h264_qpel16_mc00_10_sse2, 3,4
-+cglobal %1_h264_qpel16_mc00_10, 3,4
-     mov r3d, 8
- .loop:
-     movu           m0, [r1      ]
-@@ -234,28 +226,32 @@ MC00 avg
- %macro MC_CACHE 1
- %define OP_MOV mova
- %define PALIGNR PALIGNR_MMX
--INIT_MMX
--%1 mmxext       , put, 4
--INIT_XMM
--%1 sse2_cache64 , put, 8
-+INIT_MMX mmxext
-+%1 put, 4
-+INIT_XMM sse2, cache64
-+%1 put, 8
-+INIT_XMM ssse3, cache64
- %define PALIGNR PALIGNR_SSSE3
--%1 ssse3_cache64, put, 8
--%1 sse2         , put, 8, 0
-+%1 put, 8
-+INIT_XMM sse2
-+%1 put, 8, 0
- 
- %define OP_MOV AVG_MOV
- %define PALIGNR PALIGNR_MMX
--INIT_MMX
--%1 mmxext       , avg, 4
--INIT_XMM
--%1 sse2_cache64 , avg, 8
-+INIT_MMX mmxext
-+%1 avg, 4
-+INIT_XMM sse2, cache64
-+%1 avg, 8
-+INIT_XMM ssse3, cache64
- %define PALIGNR PALIGNR_SSSE3
--%1 ssse3_cache64, avg, 8
--%1 sse2         , avg, 8, 0
-+%1 avg, 8
-+INIT_XMM sse2
-+%1 avg, 8, 0
- %endmacro
- 
--%macro MC20 3-4
--cglobal_mc %1, %2, mc20, %3, 3,4,9
--    mov     r3d, %3
-+%macro MC20 2-3
-+cglobal_mc %1, mc20, %2, 3,4,9
-+    mov     r3d, %2
-     mova     m1, [pw_pixel_max]
- %if num_mmregs > 8
-     mova     m8, [pw_16]
-@@ -315,10 +311,10 @@ MC_CACHE MC20
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc30(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC30 3-4
--cglobal_mc %1, %2, mc30, %3, 3,5,9
-+%macro MC30 2-3
-+cglobal_mc %1, mc30, %2, 3,5,9
-     lea r4, [r1+2]
--    jmp stub_%2_h264_qpel%3_mc10_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc10_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC_CACHE MC30
-@@ -326,11 +322,11 @@ MC_CACHE MC30
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc10(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC10 3-4
--cglobal_mc %1, %2, mc10, %3, 3,5,9
-+%macro MC10 2-3
-+cglobal_mc %1, mc10, %2, 3,5,9
-     mov      r4, r1
- .body:
--    mov     r3d, %3
-+    mov     r3d, %2
-     mova     m1, [pw_pixel_max]
- %if num_mmregs > 8
-     mova     m8, [pw_16]
-@@ -393,8 +389,8 @@ MC_CACHE MC10
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc02(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro V_FILT 11
--v_filt%9_%10_10_%11:
-+%macro V_FILT 10
-+v_filt%9_%10_10
-     add    r4, r2
- .no_addr4:
-     FILT_V m0, m1, m2, m3, m4, m5, m6, m7
-@@ -403,33 +399,33 @@ v_filt%9_%10_10_%11:
-     ret
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- RESET_MM_PERMUTATION
- %assign i 0
- %rep 4
--V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 4, i, mmxext
-+V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 4, i
- SWAP 0,1,2,3,4,5
- %assign i i+1
- %endrep
- 
--INIT_XMM
-+INIT_XMM sse2
- RESET_MM_PERMUTATION
- %assign i 0
- %rep 6
--V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 8, i, sse2
-+V_FILT m0, m1, m2, m3, m4, m5, m6, m7, 8, i
- SWAP 0,1,2,3,4,5
- %assign i i+1
- %endrep
- 
--%macro MC02 3
--cglobal_mc %1, %2, mc02, %3, 3,4,8
-+%macro MC02 2
-+cglobal_mc %1, mc02, %2, 3,4,8
-     PRELOAD_V
- 
-     sub      r0, r2
- %assign j 0
--%rep %3
-+%rep %2
-     %assign i (j % 6)
--    call v_filt%3_ %+ i %+ _10_%1.no_addr4
-+    call v_filt%2_ %+ i %+ _10.no_addr4
-     OP_MOV [r0], m0
-     SWAP 0,1,2,3,4,5
-     %assign j j+1
-@@ -442,8 +438,8 @@ MC MC02
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc01(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC01 3
--cglobal_mc %1, %2, mc01, %3, 3,5,8
-+%macro MC01 2
-+cglobal_mc %1, mc01, %2, 3,5,8
-     mov      r4, r1
- .body:
-     PRELOAD_V
-@@ -451,9 +447,9 @@ cglobal_mc %1, %2, mc01, %3, 3,5,8
-     sub      r4, r2
-     sub      r0, r2
- %assign j 0
--%rep %3
-+%rep %2
-     %assign i (j % 6)
--    call v_filt%3_ %+ i %+ _10_%1
-+    call v_filt%2_ %+ i %+ _10
-     movu     m7, [r4]
-     pavgw    m0, m7
-     OP_MOV [r0], m0
-@@ -468,10 +464,10 @@ MC MC01
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc03(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC03 3
--cglobal_mc %1, %2, mc03, %3, 3,5,8
-+%macro MC03 2
-+cglobal_mc %1, mc03, %2, 3,5,8
-     lea r4, [r1+r2]
--    jmp stub_%2_h264_qpel%3_mc01_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc01_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC03
-@@ -479,8 +475,8 @@ MC MC03
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc11(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro H_FILT_AVG 3-4
--h_filt%2_%3_10_%1:
-+%macro H_FILT_AVG 2-3
-+h_filt%1_%2_10:
- ;FILT_H with fewer registers and averaged with the FILT_V result
- ;m6,m7 are tmp registers, m0 is the FILT_V result, the rest are to be used next in the next iteration
- ;unfortunately I need three registers, so m5 will have to be re-read from memory
-@@ -507,32 +503,32 @@ h_filt%2_%3_10_%1:
-     ret
- %endmacro
- 
--INIT_MMX
-+INIT_MMX mmxext
- RESET_MM_PERMUTATION
- %assign i 0
- %rep 3
--H_FILT_AVG mmxext, 4, i
-+H_FILT_AVG 4, i
- SWAP 0,1,2,3,4,5
- %assign i i+1
- %endrep
--H_FILT_AVG mmxext, 4, i, 0
-+H_FILT_AVG 4, i, 0
- 
--INIT_XMM
-+INIT_XMM sse2
- RESET_MM_PERMUTATION
- %assign i 0
- %rep 6
- %if i==1
--H_FILT_AVG sse2,   8, i, 0
-+H_FILT_AVG 8, i, 0
- %else
--H_FILT_AVG sse2,   8, i
-+H_FILT_AVG 8, i
- %endif
- SWAP 0,1,2,3,4,5
- %assign i i+1
- %endrep
- 
--%macro MC11 3
-+%macro MC11 2
- ; this REALLY needs x86_64
--cglobal_mc %1, %2, mc11, %3, 3,6,8
-+cglobal_mc %1, mc11, %2, 3,6,8
-     mov      r4, r1
- .body:
-     PRELOAD_V
-@@ -542,11 +538,11 @@ cglobal_mc %1, %2, mc11, %3, 3,6,8
-     mov      r5, r2
-     neg      r5
- %assign j 0
--%rep %3
-+%rep %2
-     %assign i (j % 6)
--    call v_filt%3_ %+ i %+ _10_%1
--    call h_filt%3_ %+ i %+ _10_%1
--%if %3==8 && i==1
-+    call v_filt%2_ %+ i %+ _10
-+    call h_filt%2_ %+ i %+ _10
-+%if %2==8 && i==1
-     movu     m5, [r1+r5]
- %endif
-     OP_MOV [r0], m0
-@@ -561,11 +557,11 @@ MC MC11
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc31(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC31 3
--cglobal_mc %1, %2, mc31, %3, 3,6,8
-+%macro MC31 2
-+cglobal_mc %1, mc31, %2, 3,6,8
-     mov r4, r1
-     add r1, 2
--    jmp stub_%2_h264_qpel%3_mc11_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc11_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC31
-@@ -573,10 +569,10 @@ MC MC31
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc13(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC13 3
--cglobal_mc %1, %2, mc13, %3, 3,7,12
-+%macro MC13 2
-+cglobal_mc %1, mc13, %2, 3,7,12
-     lea r4, [r1+r2]
--    jmp stub_%2_h264_qpel%3_mc11_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc11_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC13
-@@ -584,11 +580,11 @@ MC MC13
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc33(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC33 3
--cglobal_mc %1, %2, mc33, %3, 3,6,8
-+%macro MC33 2
-+cglobal_mc %1, mc33, %2, 3,6,8
-     lea r4, [r1+r2]
-     add r1, 2
--    jmp stub_%2_h264_qpel%3_mc11_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc11_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC33
-@@ -615,15 +611,15 @@ MC MC33
-     FILT_H2  %1, %7, %8
- %endmacro
- 
--%macro HV 2
--%ifidn %1,sse2
-+%macro HV 1
-+%if mmsize==16
- %define PAD 12
- %define COUNT 2
- %else
- %define PAD 4
- %define COUNT 3
- %endif
--put_hv%2_10_%1:
-+put_hv%1_10:
-     neg      r2           ; This actually saves instructions
-     lea      r1, [r1+r2*2-mmsize+PAD]
-     lea      r4, [rsp+PAD+gprsize]
-@@ -640,7 +636,7 @@ put_hv%2_10_%1:
-     movu     m4, [r1]
-     sub      r1, r2
- %assign i 0
--%rep %2-1
-+%rep %1-1
-     FILT_VNRD m0, m1, m2, m3, m4, m5, m6, m7
-     psubw    m0, [pad20]
-     movu     [r4+i*mmsize*3], m0
-@@ -653,7 +649,7 @@ put_hv%2_10_%1:
-     movu     [r4+i*mmsize*3], m0
-     add      r4, mmsize
-     lea      r1, [r1+r2*8+mmsize]
--%if %2==8
-+%if %1==8
-     lea      r1, [r1+r2*4]
- %endif
-     dec      r3d
-@@ -662,12 +658,12 @@ put_hv%2_10_%1:
-     ret
- %endmacro
- 
--INIT_MMX
--HV mmxext, 4
--INIT_XMM
--HV sse2  , 8
-+INIT_MMX mmxext
-+HV 4
-+INIT_XMM sse2
-+HV 8
- 
--%macro H_LOOP 2
-+%macro H_LOOP 1
- %if num_mmregs > 8
-     %define s1 m8
-     %define s2 m9
-@@ -679,7 +675,7 @@ HV sse2  , 8
-     %define s3 [tap3]
-     %define d1 [depad]
- %endif
--h%2_loop_op_%1:
-+h%1_loop_op:
-     movu       m1, [r1+mmsize-4]
-     movu       m2, [r1+mmsize-2]
-     mova       m3, [r1+mmsize+0]
-@@ -726,21 +722,21 @@ h%2_loop_op_%1:
-     ret
- %endmacro
- 
--INIT_MMX
--H_LOOP mmxext, 4
--INIT_XMM
--H_LOOP sse2  , 8
-+INIT_MMX mmxext
-+H_LOOP 4
-+INIT_XMM sse2
-+H_LOOP 8
- 
--%macro MC22 3
--cglobal_mc %1, %2, mc22, %3, 3,7,12
-+%macro MC22 2
-+cglobal_mc %1, mc22, %2, 3,7,12
- %define PAD mmsize*8*4*2      ; SIZE*16*4*sizeof(pixel)
-     mov      r6, rsp          ; backup stack pointer
-     and     rsp, ~(mmsize-1)  ; align stack
-     sub     rsp, PAD
- 
--    call put_hv%3_10_%1
-+    call put_hv%2_10
- 
--    mov       r3d, %3
-+    mov       r3d, %2
-     mova       m7, [pw_pixel_max]
- %if num_mmregs > 8
-     pxor       m0, m0
-@@ -751,7 +747,7 @@ cglobal_mc %1, %2, mc22, %3, 3,7,12
- %endif
-     mov        r1, rsp
- .h_loop:
--    call h%3_loop_op_%1
-+    call h%2_loop_op
- 
-     OP_MOV   [r0], m1
-     add        r0, r2
-@@ -767,18 +763,18 @@ MC MC22
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc12(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC12 3
--cglobal_mc %1, %2, mc12, %3, 3,7,12
-+%macro MC12 2
-+cglobal_mc %1, mc12, %2, 3,7,12
- %define PAD mmsize*8*4*2        ; SIZE*16*4*sizeof(pixel)
-     mov        r6, rsp          ; backup stack pointer
-     and       rsp, ~(mmsize-1)  ; align stack
-     sub       rsp, PAD
- 
--    call put_hv%3_10_%1
-+    call put_hv%2_10
- 
-     xor       r4d, r4d
- .body:
--    mov       r3d, %3
-+    mov       r3d, %2
-     pxor       m0, m0
-     mova       m7, [pw_pixel_max]
- %if num_mmregs > 8
-@@ -789,7 +785,7 @@ cglobal_mc %1, %2, mc12, %3, 3,7,12
- %endif
-     mov        r1, rsp
- .h_loop:
--    call h%3_loop_op_%1
-+    call h%2_loop_op
- 
-     movu       m3, [r1+r4-2*mmsize] ; movu needed for mc32, etc
-     paddw      m3, [depad2]
-@@ -812,17 +808,17 @@ MC MC12
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc32(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC32 3
--cglobal_mc %1, %2, mc32, %3, 3,7,12
-+%macro MC32 2
-+cglobal_mc %1, mc32, %2, 3,7,12
- %define PAD mmsize*8*3*2  ; SIZE*16*4*sizeof(pixel)
-     mov  r6, rsp          ; backup stack pointer
-     and rsp, ~(mmsize-1)  ; align stack
-     sub rsp, PAD
- 
--    call put_hv%3_10_%1
-+    call put_hv%2_10
- 
-     mov r4d, 2            ; sizeof(pixel)
--    jmp stub_%2_h264_qpel%3_mc12_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc12_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC32
-@@ -830,10 +826,10 @@ MC MC32
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc21(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro H_NRD 2
--put_h%2_10_%1:
-+%macro H_NRD 1
-+put_h%1_10:
-     add       rsp, gprsize
--    mov       r3d, %2
-+    mov       r3d, %1
-     xor       r4d, r4d
-     mova       m6, [pad20]
- .nextrow:
-@@ -855,13 +851,13 @@ put_h%2_10_%1:
-     ret
- %endmacro
- 
--INIT_MMX
--H_NRD mmxext, 4
--INIT_XMM
--H_NRD sse2  , 8
-+INIT_MMX mmxext
-+H_NRD 4
-+INIT_XMM sse2
-+H_NRD 8
- 
--%macro MC21 3
--cglobal_mc %1, %2, mc21, %3, 3,7,12
-+%macro MC21 2
-+cglobal_mc %1, mc21, %2, 3,7,12
-     mov   r5, r1
- .body:
- %define PAD mmsize*8*3*2   ; SIZE*16*4*sizeof(pixel)
-@@ -869,13 +865,13 @@ cglobal_mc %1, %2, mc21, %3, 3,7,12
-     and  rsp, ~(mmsize-1)  ; align stack
- 
-     sub  rsp, PAD
--    call put_h%3_10_%1
-+    call put_h%2_10
- 
-     sub  rsp, PAD
--    call put_hv%3_10_%1
-+    call put_hv%2_10
- 
-     mov r4d, PAD-mmsize    ; H buffer
--    jmp stub_%2_h264_qpel%3_mc12_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc12_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC21
-@@ -883,10 +879,10 @@ MC MC21
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc23(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC23 3
--cglobal_mc %1, %2, mc23, %3, 3,7,12
-+%macro MC23 2
-+cglobal_mc %1, mc23, %2, 3,7,12
-     lea   r5, [r1+r2]
--    jmp stub_%2_h264_qpel%3_mc21_10_%1.body
-+    jmp stub_%1_h264_qpel%2_mc21_10 %+ SUFFIX %+ .body
- %endmacro
- 
- MC MC23
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0198-x86-PALIGNR-port-to-cpuflags.patch b/debian/patches/post-9beta2/0198-x86-PALIGNR-port-to-cpuflags.patch
deleted file mode 100644
index c3fa79a..0000000
--- a/debian/patches/post-9beta2/0198-x86-PALIGNR-port-to-cpuflags.patch
+++ /dev/null
@@ -1,409 +0,0 @@
-From 4b60fac4199680957b15b7a08c5df47e47c6e25e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 8 Jul 2012 01:30:30 +0200
-Subject: [PATCH 198/278] x86: PALIGNR: port to cpuflags
-
----
- libavcodec/x86/h264_intrapred.asm       |   27 ---------------------------
- libavcodec/x86/h264_intrapred_10bit.asm |   16 ----------------
- libavcodec/x86/h264_qpel_10bit.asm      |    4 ----
- libavresample/x86/audio_convert.asm     |    6 ------
- libavutil/x86/x86util.asm               |   16 ++++++++--------
- libswscale/x86/output.asm               |    4 +---
- 6 files changed, 9 insertions(+), 64 deletions(-)
-
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index dc3d475..8faaaf4 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -1063,10 +1063,8 @@ cglobal pred8x8l_top_dc_8, 4,4
- %endmacro
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_TOP_DC
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_TOP_DC
- 
- ;-----------------------------------------------------------------------------
-@@ -1168,10 +1166,8 @@ cglobal pred8x8l_dc_8, 4,5
- %endmacro
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_DC
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_DC
- 
- ;-----------------------------------------------------------------------------
-@@ -1241,10 +1237,8 @@ cglobal pred8x8l_horizontal_8, 4,4
- %endmacro
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_HORIZONTAL
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_HORIZONTAL
- 
- ;-----------------------------------------------------------------------------
-@@ -1293,10 +1287,8 @@ cglobal pred8x8l_vertical_8, 4,4
- %endmacro
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_VERTICAL
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_VERTICAL
- 
- ;-----------------------------------------------------------------------------
-@@ -1304,7 +1296,6 @@ PRED8x8L_VERTICAL
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred8x8l_down_left_8, 4,5
-     sub          r0, r3
-     movq        mm0, [r0-8]
-@@ -1496,10 +1487,8 @@ INIT_XMM cpuname
- %endmacro
- 
- INIT_MMX sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_DOWN_LEFT
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_DOWN_LEFT
- 
- ;-----------------------------------------------------------------------------
-@@ -1507,7 +1496,6 @@ PRED8x8L_DOWN_LEFT
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred8x8l_down_right_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-@@ -1750,10 +1738,8 @@ INIT_XMM cpuname
- %endmacro
- 
- INIT_MMX sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_DOWN_RIGHT
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_DOWN_RIGHT
- 
- ;-----------------------------------------------------------------------------
-@@ -1761,7 +1747,6 @@ PRED8x8L_DOWN_RIGHT
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred8x8l_vertical_right_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-@@ -1980,10 +1965,8 @@ INIT_XMM cpuname
- %endmacro
- 
- INIT_MMX sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_VERTICAL_RIGHT
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_VERTICAL_RIGHT
- 
- ;-----------------------------------------------------------------------------
-@@ -2071,10 +2054,8 @@ INIT_XMM cpuname
- %endmacro
- 
- INIT_MMX sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_VERTICAL_LEFT
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_VERTICAL_LEFT
- 
- ;-----------------------------------------------------------------------------
-@@ -2160,10 +2141,8 @@ cglobal pred8x8l_horizontal_up_8, 4,4
- %endmacro
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_HORIZONTAL_UP
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_HORIZONTAL_UP
- 
- ;-----------------------------------------------------------------------------
-@@ -2171,7 +2150,6 @@ PRED8x8L_HORIZONTAL_UP
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred8x8l_horizontal_down_8, 4,5
-     sub          r0, r3
-     lea          r4, [r0+r3*2]
-@@ -2411,10 +2389,8 @@ INIT_XMM cpuname
- %endmacro
- 
- INIT_MMX sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_HORIZONTAL_DOWN
- INIT_MMX ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_HORIZONTAL_DOWN
- 
- ;-----------------------------------------------------------------------------
-@@ -2637,7 +2613,6 @@ cglobal pred4x4_horizontal_up_8, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred4x4_horizontal_down_8, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-@@ -2673,7 +2648,6 @@ cglobal pred4x4_horizontal_down_8, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred4x4_vertical_right_8, 3,3
-     sub     r0, r2
-     lea     r1, [r0+r2*2]
-@@ -2704,7 +2678,6 @@ cglobal pred4x4_vertical_right_8, 3,3
- ;-----------------------------------------------------------------------------
- 
- INIT_MMX mmxext
--%define PALIGNR PALIGNR_MMX
- cglobal pred4x4_down_right_8, 3,3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index 50ebaa7..039af6d 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -79,10 +79,8 @@ cglobal pred4x4_down_right_10, 3, 3
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED4x4_DR
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED4x4_DR
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -120,10 +118,8 @@ cglobal pred4x4_vertical_right_10, 3, 3, 6
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED4x4_VR
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED4x4_VR
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -164,10 +160,8 @@ cglobal pred4x4_horizontal_down_10, 3, 3
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED4x4_HD
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED4x4_HD
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -726,10 +720,8 @@ cglobal pred8x8l_horizontal_10, 4, 4, 5
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_HORIZONTAL
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_HORIZONTAL
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -796,10 +788,8 @@ cglobal pred8x8l_down_left_10, 4, 4, 7
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_DOWN_LEFT
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_DOWN_LEFT
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -872,10 +862,8 @@ cglobal pred8x8l_down_right_10, 4, 5, 8
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_DOWN_RIGHT
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_DOWN_RIGHT
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -944,10 +932,8 @@ cglobal pred8x8l_vertical_right_10, 4, 5, 7
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_VERTICAL_RIGHT
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_VERTICAL_RIGHT
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-@@ -1007,10 +993,8 @@ cglobal pred8x8l_horizontal_up_10, 4, 4, 6
- %endmacro
- 
- INIT_XMM sse2
--%define PALIGNR PALIGNR_MMX
- PRED8x8L_HORIZONTAL_UP
- INIT_XMM ssse3
--%define PALIGNR PALIGNR_SSSE3
- PRED8x8L_HORIZONTAL_UP
- %if HAVE_AVX_EXTERNAL
- INIT_XMM avx
-diff --git a/libavcodec/x86/h264_qpel_10bit.asm b/libavcodec/x86/h264_qpel_10bit.asm
-index 4aea032..c05c7a6 100644
---- a/libavcodec/x86/h264_qpel_10bit.asm
-+++ b/libavcodec/x86/h264_qpel_10bit.asm
-@@ -225,25 +225,21 @@ MC00 avg
- ;-----------------------------------------------------------------------------
- %macro MC_CACHE 1
- %define OP_MOV mova
--%define PALIGNR PALIGNR_MMX
- INIT_MMX mmxext
- %1 put, 4
- INIT_XMM sse2, cache64
- %1 put, 8
- INIT_XMM ssse3, cache64
--%define PALIGNR PALIGNR_SSSE3
- %1 put, 8
- INIT_XMM sse2
- %1 put, 8, 0
- 
- %define OP_MOV AVG_MOV
--%define PALIGNR PALIGNR_MMX
- INIT_MMX mmxext
- %1 avg, 4
- INIT_XMM sse2, cache64
- %1 avg, 8
- INIT_XMM ssse3, cache64
--%define PALIGNR PALIGNR_SSSE3
- %1 avg, 8
- INIT_XMM sse2
- %1 avg, 8, 0
-diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
-index 567a916..1d125c2 100644
---- a/libavresample/x86/audio_convert.asm
-+++ b/libavresample/x86/audio_convert.asm
-@@ -919,10 +919,8 @@ cglobal conv_s16_to_s16p_6ch, 2,7,5, dst, src, dst1, dst2, dst3, dst4, dst5
-     REP_RET
- %endmacro
- 
--%define PALIGNR PALIGNR_MMX
- INIT_XMM sse2
- CONV_S16_TO_S16P_6CH
--%define PALIGNR PALIGNR_SSSE3
- INIT_XMM ssse3
- CONV_S16_TO_S16P_6CH
- %if HAVE_AVX_EXTERNAL
-@@ -1038,10 +1036,8 @@ cglobal conv_s16_to_fltp_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5
-     REP_RET
- %endmacro
- 
--%define PALIGNR PALIGNR_MMX
- INIT_XMM sse2
- CONV_S16_TO_FLTP_6CH
--%define PALIGNR PALIGNR_SSSE3
- INIT_XMM ssse3
- CONV_S16_TO_FLTP_6CH
- INIT_XMM sse4
-@@ -1160,10 +1156,8 @@ cglobal conv_flt_to_s16p_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5
-     REP_RET
- %endmacro
- 
--%define PALIGNR PALIGNR_MMX
- INIT_XMM sse2
- CONV_FLT_TO_S16P_6CH
--%define PALIGNR PALIGNR_SSSE3
- INIT_XMM ssse3
- CONV_FLT_TO_S16P_6CH
- %if HAVE_AVX_EXTERNAL
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index b35d594..31163ee 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -280,7 +280,14 @@
- %endif
- %endmacro
- 
--%macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp
-+%macro PALIGNR 4-5
-+%if cpuflag(ssse3)
-+%if %0==5
-+    palignr %1, %2, %3, %4
-+%else
-+    palignr %1, %2, %3
-+%endif
-+%elif cpuflag(mmx) ; [dst,] src1, src2, imm, tmp
-     %define %%dst %1
- %if %0==5
- %ifnidn %1, %2
-@@ -299,13 +306,6 @@
-     psrldq  %4, %3
- %endif
-     por     %%dst, %4
--%endmacro
--
--%macro PALIGNR_SSSE3 4-5
--%if %0==5
--    palignr %1, %2, %3, %4
--%else
--    palignr %1, %2, %3
- %endif
- %endmacro
- 
-diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
-index cf0dec3..23508b8 100644
---- a/libswscale/x86/output.asm
-+++ b/libswscale/x86/output.asm
-@@ -246,7 +246,6 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
- %endif ; %1 == 8/9/10/16
- %endmacro
- 
--%define PALIGNR PALIGNR_MMX
- %if ARCH_X86_32
- INIT_MMX mmx2
- yuv2planeX_fn  8,  0, 7
-@@ -259,7 +258,6 @@ yuv2planeX_fn  8, 10, 7
- yuv2planeX_fn  9,  7, 5
- yuv2planeX_fn 10,  7, 5
- 
--%define PALIGNR PALIGNR_SSSE3
- INIT_XMM sse4
- yuv2planeX_fn  8, 10, 7
- yuv2planeX_fn  9,  7, 5
-@@ -344,7 +342,7 @@ cglobal yuv2plane1_%1, %3, %3, %2, src, dst, w, dither, offset
- %if mmsize == 16
-     punpcklqdq      m3, m3
- %endif ; mmsize == 16
--    PALIGNR_MMX     m3, m3, 3, m2
-+    PALIGNR         m3, m3, 3, m2
- .no_rot:
- %if mmsize == 8
-     mova            m2, m3
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0199-x86-h264_qpel_10bit-drop-unused-parameter-from-MC10-.patch b/debian/patches/post-9beta2/0199-x86-h264_qpel_10bit-drop-unused-parameter-from-MC10-.patch
deleted file mode 100644
index aebfb6c..0000000
--- a/debian/patches/post-9beta2/0199-x86-h264_qpel_10bit-drop-unused-parameter-from-MC10-.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 6cd796049dc06eabe1a9714290713bd31024af9e Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 28 Jul 2012 04:02:09 +0200
-Subject: [PATCH 199/278] x86: h264_qpel_10bit: drop unused parameter from
- MC10/MC20/MC30 macros
-
----
- libavcodec/x86/h264_qpel_10bit.asm |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libavcodec/x86/h264_qpel_10bit.asm b/libavcodec/x86/h264_qpel_10bit.asm
-index c05c7a6..e14df84 100644
---- a/libavcodec/x86/h264_qpel_10bit.asm
-+++ b/libavcodec/x86/h264_qpel_10bit.asm
-@@ -232,7 +232,7 @@ INIT_XMM sse2, cache64
- INIT_XMM ssse3, cache64
- %1 put, 8
- INIT_XMM sse2
--%1 put, 8, 0
-+%1 put, 8
- 
- %define OP_MOV AVG_MOV
- INIT_MMX mmxext
-@@ -242,10 +242,10 @@ INIT_XMM sse2, cache64
- INIT_XMM ssse3, cache64
- %1 avg, 8
- INIT_XMM sse2
--%1 avg, 8, 0
-+%1 avg, 8
- %endmacro
- 
--%macro MC20 2-3
-+%macro MC20 2
- cglobal_mc %1, mc20, %2, 3,4,9
-     mov     r3d, %2
-     mova     m1, [pw_pixel_max]
-@@ -307,7 +307,7 @@ MC_CACHE MC20
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc30(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC30 2-3
-+%macro MC30 2
- cglobal_mc %1, mc30, %2, 3,5,9
-     lea r4, [r1+2]
-     jmp stub_%1_h264_qpel%2_mc10_10 %+ SUFFIX %+ .body
-@@ -318,7 +318,7 @@ MC_CACHE MC30
- ;-----------------------------------------------------------------------------
- ; void h264_qpel_mc10(uint8_t *dst, uint8_t *src, int stride)
- ;-----------------------------------------------------------------------------
--%macro MC10 2-3
-+%macro MC10 2
- cglobal_mc %1, mc10, %2, 3,5,9
-     mov      r4, r1
- .body:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0200-x86inc-Set-program_name-outside-of-x86inc.asm.patch b/debian/patches/post-9beta2/0200-x86inc-Set-program_name-outside-of-x86inc.asm.patch
deleted file mode 100644
index f6129ed..0000000
--- a/debian/patches/post-9beta2/0200-x86inc-Set-program_name-outside-of-x86inc.asm.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From f0d124f005ff02dba56b09fdd5fe2a9ba961f650 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 30 Oct 2012 03:21:48 +0100
-Subject: [PATCH 200/278] x86inc: Set program_name outside of x86inc.asm
-
-This reduces the local difference to the x264 upstream version.
----
- libavutil/x86/x86inc.asm  |    2 +-
- libavutil/x86/x86util.asm |    1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
-index b0df2b2..52ee46a 100644
---- a/libavutil/x86/x86inc.asm
-+++ b/libavutil/x86/x86inc.asm
-@@ -35,7 +35,7 @@
- ; to x264-devel at videolan.org .
- 
- %ifndef program_name
--    %define program_name ff
-+    %define program_name x264
- %endif
- 
- %define WIN64  0
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index 31163ee..cf11183 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -23,6 +23,7 @@
- ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- ;******************************************************************************
- 
-+%define program_name ff
- %define cpuflags_mmxext cpuflags_mmx2
- 
- %include "libavutil/x86/x86inc.asm"
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0201-configure-add-lavu-dependency-to-lavr-lavfi-.pc-file.patch b/debian/patches/post-9beta2/0201-configure-add-lavu-dependency-to-lavr-lavfi-.pc-file.patch
deleted file mode 100644
index a5e14d4..0000000
--- a/debian/patches/post-9beta2/0201-configure-add-lavu-dependency-to-lavr-lavfi-.pc-file.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e5e1a06e443f4994cdeff39e99f67ce2c518ed2a Mon Sep 17 00:00:00 2001
-From: Anton Khirnov <anton at khirnov.net>
-Date: Sat, 3 Nov 2012 08:14:11 +0100
-Subject: [PATCH 201/278] configure: add lavu dependency to lavr/lavfi .pc
- files
-
----
- configure |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 515a3c9..d67fc85 100755
---- a/configure
-+++ b/configure
-@@ -3903,6 +3903,6 @@ pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM
- pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
- pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
- pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
--pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
--pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs"
-+pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
-+pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
- pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0202-mss2-fix-handling-of-unmasked-implicit-WMV9-rectangl.patch b/debian/patches/post-9beta2/0202-mss2-fix-handling-of-unmasked-implicit-WMV9-rectangl.patch
deleted file mode 100644
index fe85ad5..0000000
--- a/debian/patches/post-9beta2/0202-mss2-fix-handling-of-unmasked-implicit-WMV9-rectangl.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From b077eb07805dc5d139b2f118ddb122cc9df8b87a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alberto=20Delm=C3=A1s?= <adelmas at gmail.com>
-Date: Sun, 11 Nov 2012 09:23:06 +0100
-Subject: [PATCH 202/278] mss2: fix handling of unmasked implicit WMV9
- rectangles
-
-Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>
----
- libavcodec/mss2.c |   23 +++++++++++++----------
- 1 file changed, 13 insertions(+), 10 deletions(-)
-
-diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
-index 597ebb6..ceeff5a 100644
---- a/libavcodec/mss2.c
-+++ b/libavcodec/mss2.c
-@@ -474,7 +474,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-     int keyframe, has_wmv9, has_mv, is_rle, is_555, ret;
- 
-     Rectangle wmv9rects[MAX_WMV9_RECTANGLES], *r;
--    int used_rects = 0, i, implicit_rect, av_uninit(wmv9_mask);
-+    int used_rects = 0, i, implicit_rect = 0, av_uninit(wmv9_mask);
- 
-     av_assert0(FF_INPUT_BUFFER_PADDING_SIZE >=
-                ARITH2_PADDING + (MIN_CACHE_BITS + 7) / 8);
-@@ -650,7 +650,14 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-             return AVERROR_INVALIDDATA;
- 
-         buf_size -= bytestream2_tell(&gB);
--    } else if (is_rle) {
-+    } else {
-+        if (keyframe) {
-+            c->corrupted = 0;
-+            ff_mss12_slicecontext_reset(&ctx->sc[0]);
-+            if (c->slice_split)
-+                ff_mss12_slicecontext_reset(&ctx->sc[1]);
-+        }
-+    if (is_rle) {
-         init_get_bits(&gb, buf, buf_size * 8);
-         if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
-                              c->rgb_pic, c->rgb_stride, c->pal, keyframe,
-@@ -669,14 +676,8 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-         align_get_bits(&gb);
-         buf      += get_bits_count(&gb) >> 3;
-         buf_size -= get_bits_count(&gb) >> 3;
--    } else {
--        if (keyframe) {
--            c->corrupted = 0;
--            ff_mss12_slicecontext_reset(&ctx->sc[0]);
--            if (c->slice_split)
--                ff_mss12_slicecontext_reset(&ctx->sc[1]);
--        }
--        else if (c->corrupted)
-+    } else if (!implicit_rect || wmv9_mask != -1) {
-+        if (c->corrupted)
-             return AVERROR_INVALIDDATA;
-         bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
-         arith2_init(&acoder, &gB);
-@@ -702,6 +703,8 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-             buf      += arith2_get_consumed_bytes(&acoder);
-             buf_size -= arith2_get_consumed_bytes(&acoder);
-         }
-+    } else
-+        memset(c->pal_pic, 0, c->pal_stride * avctx->height);
-     }
- 
-     if (has_wmv9) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0203-mss2-reindent-after-last-commit.patch b/debian/patches/post-9beta2/0203-mss2-reindent-after-last-commit.patch
deleted file mode 100644
index 937a218..0000000
--- a/debian/patches/post-9beta2/0203-mss2-reindent-after-last-commit.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 6d93308c0ca3783b3278aef8e6e64d8f0558f319 Mon Sep 17 00:00:00 2001
-From: Kostya Shishkov <kostya.shishkov at gmail.com>
-Date: Sun, 11 Nov 2012 15:00:38 +0100
-Subject: [PATCH 203/278] mss2: reindent after last commit
-
----
- libavcodec/mss2.c |   68 ++++++++++++++++++++++++++---------------------------
- 1 file changed, 34 insertions(+), 34 deletions(-)
-
-diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
-index ceeff5a..5f99b7a 100644
---- a/libavcodec/mss2.c
-+++ b/libavcodec/mss2.c
-@@ -657,54 +657,54 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-             if (c->slice_split)
-                 ff_mss12_slicecontext_reset(&ctx->sc[1]);
-         }
--    if (is_rle) {
--        init_get_bits(&gb, buf, buf_size * 8);
--        if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
--                             c->rgb_pic, c->rgb_stride, c->pal, keyframe,
--                             ctx->split_position, 0,
--                             avctx->width, avctx->height))
--            return ret;
--        align_get_bits(&gb);
--
--        if (c->slice_split)
-+        if (is_rle) {
-+            init_get_bits(&gb, buf, buf_size * 8);
-             if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
-                                  c->rgb_pic, c->rgb_stride, c->pal, keyframe,
--                                 ctx->split_position, 1,
-+                                 ctx->split_position, 0,
-                                  avctx->width, avctx->height))
-                 return ret;
-+            align_get_bits(&gb);
- 
--        align_get_bits(&gb);
--        buf      += get_bits_count(&gb) >> 3;
--        buf_size -= get_bits_count(&gb) >> 3;
--    } else if (!implicit_rect || wmv9_mask != -1) {
--        if (c->corrupted)
--            return AVERROR_INVALIDDATA;
--        bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
--        arith2_init(&acoder, &gB);
--        c->keyframe = keyframe;
--        if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, 0,
--                                                avctx->width,
--                                                ctx->split_position))
--            return AVERROR_INVALIDDATA;
-+            if (c->slice_split)
-+                if (ret = decode_rle(&gb, c->pal_pic, c->pal_stride,
-+                                     c->rgb_pic, c->rgb_stride, c->pal, keyframe,
-+                                     ctx->split_position, 1,
-+                                     avctx->width, avctx->height))
-+                    return ret;
- 
--        buf      += arith2_get_consumed_bytes(&acoder);
--        buf_size -= arith2_get_consumed_bytes(&acoder);
--        if (c->slice_split) {
--            if (buf_size < 1)
-+            align_get_bits(&gb);
-+            buf      += get_bits_count(&gb) >> 3;
-+            buf_size -= get_bits_count(&gb) >> 3;
-+        } else if (!implicit_rect || wmv9_mask != -1) {
-+            if (c->corrupted)
-                 return AVERROR_INVALIDDATA;
-             bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
-             arith2_init(&acoder, &gB);
--            if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[1], &acoder, 0,
--                                                    ctx->split_position,
-+            c->keyframe = keyframe;
-+            if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[0], &acoder, 0, 0,
-                                                     avctx->width,
--                                                    avctx->height - ctx->split_position))
-+                                                    ctx->split_position))
-                 return AVERROR_INVALIDDATA;
- 
-             buf      += arith2_get_consumed_bytes(&acoder);
-             buf_size -= arith2_get_consumed_bytes(&acoder);
--        }
--    } else
--        memset(c->pal_pic, 0, c->pal_stride * avctx->height);
-+            if (c->slice_split) {
-+                if (buf_size < 1)
-+                    return AVERROR_INVALIDDATA;
-+                bytestream2_init(&gB, buf, buf_size + ARITH2_PADDING);
-+                arith2_init(&acoder, &gB);
-+                if (c->corrupted = ff_mss12_decode_rect(&ctx->sc[1], &acoder, 0,
-+                                                        ctx->split_position,
-+                                                        avctx->width,
-+                                                        avctx->height - ctx->split_position))
-+                    return AVERROR_INVALIDDATA;
-+
-+                buf      += arith2_get_consumed_bytes(&acoder);
-+                buf_size -= arith2_get_consumed_bytes(&acoder);
-+            }
-+        } else
-+            memset(c->pal_pic, 0, c->pal_stride * avctx->height);
-     }
- 
-     if (has_wmv9) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0204-mss2-prevent-potential-uninitialized-reads.patch b/debian/patches/post-9beta2/0204-mss2-prevent-potential-uninitialized-reads.patch
deleted file mode 100644
index efb3138..0000000
--- a/debian/patches/post-9beta2/0204-mss2-prevent-potential-uninitialized-reads.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 802713c4e7b41bc2deed754d78649945c3442063 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alberto=20Delm=C3=A1s?= <adelmas at gmail.com>
-Date: Sun, 11 Nov 2012 09:47:39 +0100
-Subject: [PATCH 204/278] mss2: prevent potential uninitialized reads
-
-The alternative to zeroing on init is setting the corrupted flag in
-all cases where pal_pic is not fully written, at the cost of added
-complexity.
-
-Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>
----
- libavcodec/mss2.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
-index 5f99b7a..bec3f45 100644
---- a/libavcodec/mss2.c
-+++ b/libavcodec/mss2.c
-@@ -839,8 +839,8 @@ static av_cold int mss2_decode_init(AVCodecContext *avctx)
-     if (ret = ff_mss12_decode_init(c, 1, &ctx->sc[0], &ctx->sc[1]))
-         return ret;
-     c->pal_stride   = c->mask_stride;
--    c->pal_pic      = av_malloc(c->pal_stride * avctx->height);
--    c->last_pal_pic = av_malloc(c->pal_stride * avctx->height);
-+    c->pal_pic      = av_mallocz(c->pal_stride * avctx->height);
-+    c->last_pal_pic = av_mallocz(c->pal_stride * avctx->height);
-     if (!c->pal_pic || !c->last_pal_pic) {
-         mss2_decode_end(avctx);
-         return AVERROR(ENOMEM);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0205-lavu-rename-audioconvert.-to-channel_layout.-and-dep.patch b/debian/patches/post-9beta2/0205-lavu-rename-audioconvert.-to-channel_layout.-and-dep.patch
deleted file mode 100644
index 8340d71..0000000
--- a/debian/patches/post-9beta2/0205-lavu-rename-audioconvert.-to-channel_layout.-and-dep.patch
+++ /dev/null
@@ -1,936 +0,0 @@
-From 5980f5dd18822f29cfd583c9c085c3e77d81aa72 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 10 Nov 2012 09:03:17 -0500
-Subject: [PATCH 205/278] lavu: rename audioconvert.* to channel_layout.* and
- deprecate audioconvert.h
-
----
- doc/APIchanges             |    3 +
- libavutil/Makefile         |    3 +-
- libavutil/audioconvert.c   |  231 --------------------------------------------
- libavutil/audioconvert.h   |  184 +----------------------------------
- libavutil/channel_layout.c |  231 ++++++++++++++++++++++++++++++++++++++++++++
- libavutil/channel_layout.h |  182 ++++++++++++++++++++++++++++++++++
- libavutil/version.h        |    5 +-
- 7 files changed, 426 insertions(+), 413 deletions(-)
- delete mode 100644 libavutil/audioconvert.c
- create mode 100644 libavutil/channel_layout.c
- create mode 100644 libavutil/channel_layout.h
-
-diff --git a/doc/APIchanges b/doc/APIchanges
-index c8b8fbf..a0756da 100644
---- a/doc/APIchanges
-+++ b/doc/APIchanges
-@@ -13,6 +13,9 @@ libavutil:     2012-10-22
- 
- API changes, most recent first:
- 
-+2012-xx-xx - xxxxxxx - lavu 52.2.0 - audioconvert.h
-+  Rename audioconvert.h to channel_layout.h. audioconvert.h is now deprecated.
-+
- 2012-xx-xx - xxxxxxx - lavu 52.1.0 - intmath.h
-   Add av_ctz() for trailing zero bit count
- 
-diff --git a/libavutil/Makefile b/libavutil/Makefile
-index d4ffd5e..48a0e16 100644
---- a/libavutil/Makefile
-+++ b/libavutil/Makefile
-@@ -11,6 +11,7 @@ HEADERS = adler32.h                                                     \
-           base64.h                                                      \
-           blowfish.h                                                    \
-           bswap.h                                                       \
-+          channel_layout.h                                              \
-           common.h                                                      \
-           cpu.h                                                         \
-           crc.h                                                         \
-@@ -53,10 +54,10 @@ BUILT_HEADERS = avconfig.h
- OBJS = adler32.o                                                        \
-        aes.o                                                            \
-        audio_fifo.o                                                     \
--       audioconvert.o                                                   \
-        avstring.o                                                       \
-        base64.o                                                         \
-        blowfish.o                                                       \
-+       channel_layout.o                                                 \
-        cpu.o                                                            \
-        crc.o                                                            \
-        des.o                                                            \
-diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c
-deleted file mode 100644
-index 113b9d7..0000000
---- a/libavutil/audioconvert.c
-+++ /dev/null
-@@ -1,231 +0,0 @@
--/*
-- * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at>
-- *
-- * This file is part of Libav.
-- *
-- * Libav is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2.1 of the License, or (at your option) any later version.
-- *
-- * Libav is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with Libav; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-- */
--
--/**
-- * @file
-- * audio conversion routines
-- */
--
--#include "avstring.h"
--#include "avutil.h"
--#include "audioconvert.h"
--#include "common.h"
--
--static const char * const channel_names[] = {
--    [0]  = "FL",        /* front left */
--    [1]  = "FR",        /* front right */
--    [2]  = "FC",        /* front center */
--    [3]  = "LFE",       /* low frequency */
--    [4]  = "BL",        /* back left */
--    [5]  = "BR",        /* back right */
--    [6]  = "FLC",       /* front left-of-center  */
--    [7]  = "FRC",       /* front right-of-center */
--    [8]  = "BC",        /* back-center */
--    [9]  = "SL",        /* side left */
--    [10] = "SR",        /* side right */
--    [11] = "TC",        /* top center */
--    [12] = "TFL",       /* top front left */
--    [13] = "TFC",       /* top front center */
--    [14] = "TFR",       /* top front right */
--    [15] = "TBL",       /* top back left */
--    [16] = "TBC",       /* top back center */
--    [17] = "TBR",       /* top back right */
--    [29] = "DL",        /* downmix left */
--    [30] = "DR",        /* downmix right */
--    [31] = "WL",        /* wide left */
--    [32] = "WR",        /* wide right */
--    [33] = "SDL",       /* surround direct left */
--    [34] = "SDR",       /* surround direct right */
--    [35] = "LFE2",      /* low frequency 2 */
--};
--
--static const char *get_channel_name(int channel_id)
--{
--    if (channel_id < 0 || channel_id >= FF_ARRAY_ELEMS(channel_names))
--        return NULL;
--    return channel_names[channel_id];
--}
--
--static const struct {
--    const char *name;
--    int         nb_channels;
--    uint64_t     layout;
--} channel_layout_map[] = {
--    { "mono",        1,  AV_CH_LAYOUT_MONO },
--    { "stereo",      2,  AV_CH_LAYOUT_STEREO },
--    { "stereo",      2,  AV_CH_LAYOUT_STEREO_DOWNMIX },
--    { "2.1",         3,  AV_CH_LAYOUT_2POINT1 },
--    { "3.0",         3,  AV_CH_LAYOUT_SURROUND },
--    { "3.0(back)",   3,  AV_CH_LAYOUT_2_1 },
--    { "3.1",         4,  AV_CH_LAYOUT_3POINT1 },
--    { "4.0",         4,  AV_CH_LAYOUT_4POINT0 },
--    { "quad",        4,  AV_CH_LAYOUT_QUAD },
--    { "quad(side)",  4,  AV_CH_LAYOUT_2_2 },
--    { "4.1",         5,  AV_CH_LAYOUT_4POINT1 },
--    { "5.0",         5,  AV_CH_LAYOUT_5POINT0 },
--    { "5.0",         5,  AV_CH_LAYOUT_5POINT0_BACK },
--    { "5.1",         6,  AV_CH_LAYOUT_5POINT1 },
--    { "5.1",         6,  AV_CH_LAYOUT_5POINT1_BACK },
--    { "6.0",         6,  AV_CH_LAYOUT_6POINT0 },
--    { "6.0(front)",  6,  AV_CH_LAYOUT_6POINT0_FRONT },
--    { "hexagonal",   6,  AV_CH_LAYOUT_HEXAGONAL },
--    { "6.1",         7,  AV_CH_LAYOUT_6POINT1 },
--    { "6.1",         7,  AV_CH_LAYOUT_6POINT1_BACK },
--    { "6.1(front)",  7,  AV_CH_LAYOUT_6POINT1_FRONT },
--    { "7.0",         7,  AV_CH_LAYOUT_7POINT0 },
--    { "7.0(front)",  7,  AV_CH_LAYOUT_7POINT0_FRONT },
--    { "7.1",         8,  AV_CH_LAYOUT_7POINT1 },
--    { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE },
--    { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE_BACK },
--    { "octagonal",   8,  AV_CH_LAYOUT_OCTAGONAL },
--    { "downmix",     2,  AV_CH_LAYOUT_STEREO_DOWNMIX, },
--    { 0 }
--};
--
--static uint64_t get_channel_layout_single(const char *name, int name_len)
--{
--    int i;
--    char *end;
--    int64_t layout;
--
--    for (i = 0; i < FF_ARRAY_ELEMS(channel_layout_map) - 1; i++) {
--        if (strlen(channel_layout_map[i].name) == name_len &&
--            !memcmp(channel_layout_map[i].name, name, name_len))
--            return channel_layout_map[i].layout;
--    }
--    for (i = 0; i < FF_ARRAY_ELEMS(channel_names); i++)
--        if (channel_names[i] &&
--            strlen(channel_names[i]) == name_len &&
--            !memcmp(channel_names[i], name, name_len))
--            return (int64_t)1 << i;
--    i = strtol(name, &end, 10);
--    if (end - name == name_len ||
--        (end + 1 - name == name_len && *end  == 'c'))
--        return av_get_default_channel_layout(i);
--    layout = strtoll(name, &end, 0);
--    if (end - name == name_len)
--        return FFMAX(layout, 0);
--    return 0;
--}
--
--uint64_t av_get_channel_layout(const char *name)
--{
--    const char *n, *e;
--    const char *name_end = name + strlen(name);
--    int64_t layout = 0, layout_single;
--
--    for (n = name; n < name_end; n = e + 1) {
--        for (e = n; e < name_end && *e != '+' && *e != '|'; e++);
--        layout_single = get_channel_layout_single(n, e - n);
--        if (!layout_single)
--            return 0;
--        layout |= layout_single;
--    }
--    return layout;
--}
--
--void av_get_channel_layout_string(char *buf, int buf_size,
--                                  int nb_channels, uint64_t channel_layout)
--{
--    int i;
--
--    if (nb_channels <= 0)
--        nb_channels = av_get_channel_layout_nb_channels(channel_layout);
--
--    for (i = 0; channel_layout_map[i].name; i++)
--        if (nb_channels    == channel_layout_map[i].nb_channels &&
--            channel_layout == channel_layout_map[i].layout) {
--            av_strlcpy(buf, channel_layout_map[i].name, buf_size);
--            return;
--        }
--
--    snprintf(buf, buf_size, "%d channels", nb_channels);
--    if (channel_layout) {
--        int i, ch;
--        av_strlcat(buf, " (", buf_size);
--        for (i = 0, ch = 0; i < 64; i++) {
--            if ((channel_layout & (UINT64_C(1) << i))) {
--                const char *name = get_channel_name(i);
--                if (name) {
--                    if (ch > 0)
--                        av_strlcat(buf, "|", buf_size);
--                    av_strlcat(buf, name, buf_size);
--                }
--                ch++;
--            }
--        }
--        av_strlcat(buf, ")", buf_size);
--    }
--}
--
--int av_get_channel_layout_nb_channels(uint64_t channel_layout)
--{
--    return av_popcount64(channel_layout);
--}
--
--uint64_t av_get_default_channel_layout(int nb_channels)
--{
--    switch(nb_channels) {
--    case 1: return AV_CH_LAYOUT_MONO;
--    case 2: return AV_CH_LAYOUT_STEREO;
--    case 3: return AV_CH_LAYOUT_SURROUND;
--    case 4: return AV_CH_LAYOUT_QUAD;
--    case 5: return AV_CH_LAYOUT_5POINT0;
--    case 6: return AV_CH_LAYOUT_5POINT1;
--    case 7: return AV_CH_LAYOUT_6POINT1;
--    case 8: return AV_CH_LAYOUT_7POINT1;
--    default: return 0;
--    }
--}
--
--int av_get_channel_layout_channel_index(uint64_t channel_layout,
--                                        uint64_t channel)
--{
--    if (!(channel_layout & channel) ||
--        av_get_channel_layout_nb_channels(channel) != 1)
--        return AVERROR(EINVAL);
--    channel_layout &= channel - 1;
--    return av_get_channel_layout_nb_channels(channel_layout);
--}
--
--const char *av_get_channel_name(uint64_t channel)
--{
--    int i;
--    if (av_get_channel_layout_nb_channels(channel) != 1)
--        return NULL;
--    for (i = 0; i < 64; i++)
--        if ((1ULL<<i) & channel)
--            return get_channel_name(i);
--    return NULL;
--}
--
--uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
--{
--    int i;
--
--    if (av_get_channel_layout_nb_channels(channel_layout) <= index)
--        return 0;
--
--    for (i = 0; i < 64; i++) {
--        if ((1ULL << i) & channel_layout && !index--)
--            return 1ULL << i;
--    }
--    return 0;
--}
-diff --git a/libavutil/audioconvert.h b/libavutil/audioconvert.h
-index 73076cb..300a67c 100644
---- a/libavutil/audioconvert.h
-+++ b/libavutil/audioconvert.h
-@@ -1,182 +1,6 @@
--/*
-- * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at>
-- * Copyright (c) 2008 Peter Ross
-- *
-- * This file is part of Libav.
-- *
-- * Libav is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Lesser General Public
-- * License as published by the Free Software Foundation; either
-- * version 2.1 of the License, or (at your option) any later version.
-- *
-- * Libav is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with Libav; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-- */
- 
--#ifndef AVUTIL_AUDIOCONVERT_H
--#define AVUTIL_AUDIOCONVERT_H
-+#include "version.h"
- 
--#include <stdint.h>
--
--/**
-- * @file
-- * audio conversion routines
-- */
--
--/**
-- * @addtogroup lavu_audio
-- * @{
-- */
--
--/**
-- * @defgroup channel_masks Audio channel masks
-- * @{
-- */
--#define AV_CH_FRONT_LEFT             0x00000001
--#define AV_CH_FRONT_RIGHT            0x00000002
--#define AV_CH_FRONT_CENTER           0x00000004
--#define AV_CH_LOW_FREQUENCY          0x00000008
--#define AV_CH_BACK_LEFT              0x00000010
--#define AV_CH_BACK_RIGHT             0x00000020
--#define AV_CH_FRONT_LEFT_OF_CENTER   0x00000040
--#define AV_CH_FRONT_RIGHT_OF_CENTER  0x00000080
--#define AV_CH_BACK_CENTER            0x00000100
--#define AV_CH_SIDE_LEFT              0x00000200
--#define AV_CH_SIDE_RIGHT             0x00000400
--#define AV_CH_TOP_CENTER             0x00000800
--#define AV_CH_TOP_FRONT_LEFT         0x00001000
--#define AV_CH_TOP_FRONT_CENTER       0x00002000
--#define AV_CH_TOP_FRONT_RIGHT        0x00004000
--#define AV_CH_TOP_BACK_LEFT          0x00008000
--#define AV_CH_TOP_BACK_CENTER        0x00010000
--#define AV_CH_TOP_BACK_RIGHT         0x00020000
--#define AV_CH_STEREO_LEFT            0x20000000  ///< Stereo downmix.
--#define AV_CH_STEREO_RIGHT           0x40000000  ///< See AV_CH_STEREO_LEFT.
--#define AV_CH_WIDE_LEFT              0x0000000080000000ULL
--#define AV_CH_WIDE_RIGHT             0x0000000100000000ULL
--#define AV_CH_SURROUND_DIRECT_LEFT   0x0000000200000000ULL
--#define AV_CH_SURROUND_DIRECT_RIGHT  0x0000000400000000ULL
--#define AV_CH_LOW_FREQUENCY_2        0x0000000800000000ULL
--
--/** Channel mask value used for AVCodecContext.request_channel_layout
--    to indicate that the user requests the channel order of the decoder output
--    to be the native codec channel order. */
--#define AV_CH_LAYOUT_NATIVE          0x8000000000000000ULL
--
--/**
-- * @}
-- * @defgroup channel_mask_c Audio channel convenience macros
-- * @{
-- * */
--#define AV_CH_LAYOUT_MONO              (AV_CH_FRONT_CENTER)
--#define AV_CH_LAYOUT_STEREO            (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
--#define AV_CH_LAYOUT_2POINT1           (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_2_1               (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_SURROUND          (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
--#define AV_CH_LAYOUT_3POINT1           (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_4POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_4POINT1           (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_2_2               (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
--#define AV_CH_LAYOUT_QUAD              (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
--#define AV_CH_LAYOUT_5POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
--#define AV_CH_LAYOUT_5POINT1           (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_5POINT0_BACK      (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
--#define AV_CH_LAYOUT_5POINT1_BACK      (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_6POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_6POINT0_FRONT     (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
--#define AV_CH_LAYOUT_HEXAGONAL         (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_6POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_6POINT1_BACK      (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
--#define AV_CH_LAYOUT_6POINT1_FRONT     (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
--#define AV_CH_LAYOUT_7POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
--#define AV_CH_LAYOUT_7POINT0_FRONT     (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
--#define AV_CH_LAYOUT_7POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
--#define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
--#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
--#define AV_CH_LAYOUT_OCTAGONAL         (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
--#define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
--
--enum AVMatrixEncoding {
--    AV_MATRIX_ENCODING_NONE,
--    AV_MATRIX_ENCODING_DOLBY,
--    AV_MATRIX_ENCODING_DPLII,
--    AV_MATRIX_ENCODING_NB
--};
--
--/**
-- * @}
-- */
--
--/**
-- * Return a channel layout id that matches name, or 0 if no match is found.
-- *
-- * name can be one or several of the following notations,
-- * separated by '+' or '|':
-- * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
-- *   5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
-- * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
-- *   SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
-- * - a number of channels, in decimal, optionally followed by 'c', yielding
-- *   the default channel layout for that number of channels (@see
-- *   av_get_default_channel_layout);
-- * - a channel layout mask, in hexadecimal starting with "0x" (see the
-- *   AV_CH_* macros).
-- *
-- * Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
-- */
--uint64_t av_get_channel_layout(const char *name);
--
--/**
-- * Return a description of a channel layout.
-- * If nb_channels is <= 0, it is guessed from the channel_layout.
-- *
-- * @param buf put here the string containing the channel layout
-- * @param buf_size size in bytes of the buffer
-- */
--void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
--
--/**
-- * Return the number of channels in the channel layout.
-- */
--int av_get_channel_layout_nb_channels(uint64_t channel_layout);
--
--/**
-- * Return default channel layout for a given number of channels.
-- */
--uint64_t av_get_default_channel_layout(int nb_channels);
--
--/**
-- * Get the index of a channel in channel_layout.
-- *
-- * @param channel a channel layout describing exactly one channel which must be
-- *                present in channel_layout.
-- *
-- * @return index of channel in channel_layout on success, a negative AVERROR
-- *         on error.
-- */
--int av_get_channel_layout_channel_index(uint64_t channel_layout,
--                                        uint64_t channel);
--
--/**
-- * Get the channel with the given index in channel_layout.
-- */
--uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
--
--/**
-- * Get the name of a given channel.
-- *
-- * @return channel name on success, NULL on error.
-- */
--const char *av_get_channel_name(uint64_t channel);
--
--/**
-- * @}
-- */
--
--#endif /* AVUTIL_AUDIOCONVERT_H */
-+#if FF_API_AUDIOCONVERT
-+#include "channel_layout.h"
-+#endif
-diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c
-new file mode 100644
-index 0000000..79e398e
---- /dev/null
-+++ b/libavutil/channel_layout.c
-@@ -0,0 +1,231 @@
-+/*
-+ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at>
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file
-+ * audio channel layout utility functions
-+ */
-+
-+#include "avstring.h"
-+#include "avutil.h"
-+#include "channel_layout.h"
-+#include "common.h"
-+
-+static const char * const channel_names[] = {
-+    [0]  = "FL",        /* front left */
-+    [1]  = "FR",        /* front right */
-+    [2]  = "FC",        /* front center */
-+    [3]  = "LFE",       /* low frequency */
-+    [4]  = "BL",        /* back left */
-+    [5]  = "BR",        /* back right */
-+    [6]  = "FLC",       /* front left-of-center  */
-+    [7]  = "FRC",       /* front right-of-center */
-+    [8]  = "BC",        /* back-center */
-+    [9]  = "SL",        /* side left */
-+    [10] = "SR",        /* side right */
-+    [11] = "TC",        /* top center */
-+    [12] = "TFL",       /* top front left */
-+    [13] = "TFC",       /* top front center */
-+    [14] = "TFR",       /* top front right */
-+    [15] = "TBL",       /* top back left */
-+    [16] = "TBC",       /* top back center */
-+    [17] = "TBR",       /* top back right */
-+    [29] = "DL",        /* downmix left */
-+    [30] = "DR",        /* downmix right */
-+    [31] = "WL",        /* wide left */
-+    [32] = "WR",        /* wide right */
-+    [33] = "SDL",       /* surround direct left */
-+    [34] = "SDR",       /* surround direct right */
-+    [35] = "LFE2",      /* low frequency 2 */
-+};
-+
-+static const char *get_channel_name(int channel_id)
-+{
-+    if (channel_id < 0 || channel_id >= FF_ARRAY_ELEMS(channel_names))
-+        return NULL;
-+    return channel_names[channel_id];
-+}
-+
-+static const struct {
-+    const char *name;
-+    int         nb_channels;
-+    uint64_t     layout;
-+} channel_layout_map[] = {
-+    { "mono",        1,  AV_CH_LAYOUT_MONO },
-+    { "stereo",      2,  AV_CH_LAYOUT_STEREO },
-+    { "stereo",      2,  AV_CH_LAYOUT_STEREO_DOWNMIX },
-+    { "2.1",         3,  AV_CH_LAYOUT_2POINT1 },
-+    { "3.0",         3,  AV_CH_LAYOUT_SURROUND },
-+    { "3.0(back)",   3,  AV_CH_LAYOUT_2_1 },
-+    { "3.1",         4,  AV_CH_LAYOUT_3POINT1 },
-+    { "4.0",         4,  AV_CH_LAYOUT_4POINT0 },
-+    { "quad",        4,  AV_CH_LAYOUT_QUAD },
-+    { "quad(side)",  4,  AV_CH_LAYOUT_2_2 },
-+    { "4.1",         5,  AV_CH_LAYOUT_4POINT1 },
-+    { "5.0",         5,  AV_CH_LAYOUT_5POINT0 },
-+    { "5.0",         5,  AV_CH_LAYOUT_5POINT0_BACK },
-+    { "5.1",         6,  AV_CH_LAYOUT_5POINT1 },
-+    { "5.1",         6,  AV_CH_LAYOUT_5POINT1_BACK },
-+    { "6.0",         6,  AV_CH_LAYOUT_6POINT0 },
-+    { "6.0(front)",  6,  AV_CH_LAYOUT_6POINT0_FRONT },
-+    { "hexagonal",   6,  AV_CH_LAYOUT_HEXAGONAL },
-+    { "6.1",         7,  AV_CH_LAYOUT_6POINT1 },
-+    { "6.1",         7,  AV_CH_LAYOUT_6POINT1_BACK },
-+    { "6.1(front)",  7,  AV_CH_LAYOUT_6POINT1_FRONT },
-+    { "7.0",         7,  AV_CH_LAYOUT_7POINT0 },
-+    { "7.0(front)",  7,  AV_CH_LAYOUT_7POINT0_FRONT },
-+    { "7.1",         8,  AV_CH_LAYOUT_7POINT1 },
-+    { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE },
-+    { "7.1(wide)",   8,  AV_CH_LAYOUT_7POINT1_WIDE_BACK },
-+    { "octagonal",   8,  AV_CH_LAYOUT_OCTAGONAL },
-+    { "downmix",     2,  AV_CH_LAYOUT_STEREO_DOWNMIX, },
-+    { 0 }
-+};
-+
-+static uint64_t get_channel_layout_single(const char *name, int name_len)
-+{
-+    int i;
-+    char *end;
-+    int64_t layout;
-+
-+    for (i = 0; i < FF_ARRAY_ELEMS(channel_layout_map) - 1; i++) {
-+        if (strlen(channel_layout_map[i].name) == name_len &&
-+            !memcmp(channel_layout_map[i].name, name, name_len))
-+            return channel_layout_map[i].layout;
-+    }
-+    for (i = 0; i < FF_ARRAY_ELEMS(channel_names); i++)
-+        if (channel_names[i] &&
-+            strlen(channel_names[i]) == name_len &&
-+            !memcmp(channel_names[i], name, name_len))
-+            return (int64_t)1 << i;
-+    i = strtol(name, &end, 10);
-+    if (end - name == name_len ||
-+        (end + 1 - name == name_len && *end  == 'c'))
-+        return av_get_default_channel_layout(i);
-+    layout = strtoll(name, &end, 0);
-+    if (end - name == name_len)
-+        return FFMAX(layout, 0);
-+    return 0;
-+}
-+
-+uint64_t av_get_channel_layout(const char *name)
-+{
-+    const char *n, *e;
-+    const char *name_end = name + strlen(name);
-+    int64_t layout = 0, layout_single;
-+
-+    for (n = name; n < name_end; n = e + 1) {
-+        for (e = n; e < name_end && *e != '+' && *e != '|'; e++);
-+        layout_single = get_channel_layout_single(n, e - n);
-+        if (!layout_single)
-+            return 0;
-+        layout |= layout_single;
-+    }
-+    return layout;
-+}
-+
-+void av_get_channel_layout_string(char *buf, int buf_size,
-+                                  int nb_channels, uint64_t channel_layout)
-+{
-+    int i;
-+
-+    if (nb_channels <= 0)
-+        nb_channels = av_get_channel_layout_nb_channels(channel_layout);
-+
-+    for (i = 0; channel_layout_map[i].name; i++)
-+        if (nb_channels    == channel_layout_map[i].nb_channels &&
-+            channel_layout == channel_layout_map[i].layout) {
-+            av_strlcpy(buf, channel_layout_map[i].name, buf_size);
-+            return;
-+        }
-+
-+    snprintf(buf, buf_size, "%d channels", nb_channels);
-+    if (channel_layout) {
-+        int i, ch;
-+        av_strlcat(buf, " (", buf_size);
-+        for (i = 0, ch = 0; i < 64; i++) {
-+            if ((channel_layout & (UINT64_C(1) << i))) {
-+                const char *name = get_channel_name(i);
-+                if (name) {
-+                    if (ch > 0)
-+                        av_strlcat(buf, "|", buf_size);
-+                    av_strlcat(buf, name, buf_size);
-+                }
-+                ch++;
-+            }
-+        }
-+        av_strlcat(buf, ")", buf_size);
-+    }
-+}
-+
-+int av_get_channel_layout_nb_channels(uint64_t channel_layout)
-+{
-+    return av_popcount64(channel_layout);
-+}
-+
-+uint64_t av_get_default_channel_layout(int nb_channels)
-+{
-+    switch(nb_channels) {
-+    case 1: return AV_CH_LAYOUT_MONO;
-+    case 2: return AV_CH_LAYOUT_STEREO;
-+    case 3: return AV_CH_LAYOUT_SURROUND;
-+    case 4: return AV_CH_LAYOUT_QUAD;
-+    case 5: return AV_CH_LAYOUT_5POINT0;
-+    case 6: return AV_CH_LAYOUT_5POINT1;
-+    case 7: return AV_CH_LAYOUT_6POINT1;
-+    case 8: return AV_CH_LAYOUT_7POINT1;
-+    default: return 0;
-+    }
-+}
-+
-+int av_get_channel_layout_channel_index(uint64_t channel_layout,
-+                                        uint64_t channel)
-+{
-+    if (!(channel_layout & channel) ||
-+        av_get_channel_layout_nb_channels(channel) != 1)
-+        return AVERROR(EINVAL);
-+    channel_layout &= channel - 1;
-+    return av_get_channel_layout_nb_channels(channel_layout);
-+}
-+
-+const char *av_get_channel_name(uint64_t channel)
-+{
-+    int i;
-+    if (av_get_channel_layout_nb_channels(channel) != 1)
-+        return NULL;
-+    for (i = 0; i < 64; i++)
-+        if ((1ULL<<i) & channel)
-+            return get_channel_name(i);
-+    return NULL;
-+}
-+
-+uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
-+{
-+    int i;
-+
-+    if (av_get_channel_layout_nb_channels(channel_layout) <= index)
-+        return 0;
-+
-+    for (i = 0; i < 64; i++) {
-+        if ((1ULL << i) & channel_layout && !index--)
-+            return 1ULL << i;
-+    }
-+    return 0;
-+}
-diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h
-new file mode 100644
-index 0000000..15b6887
---- /dev/null
-+++ b/libavutil/channel_layout.h
-@@ -0,0 +1,182 @@
-+/*
-+ * Copyright (c) 2006 Michael Niedermayer <michaelni at gmx.at>
-+ * Copyright (c) 2008 Peter Ross
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifndef AVUTIL_CHANNEL_LAYOUT_H
-+#define AVUTIL_CHANNEL_LAYOUT_H
-+
-+#include <stdint.h>
-+
-+/**
-+ * @file
-+ * audio channel layout utility functions
-+ */
-+
-+/**
-+ * @addtogroup lavu_audio
-+ * @{
-+ */
-+
-+/**
-+ * @defgroup channel_masks Audio channel masks
-+ * @{
-+ */
-+#define AV_CH_FRONT_LEFT             0x00000001
-+#define AV_CH_FRONT_RIGHT            0x00000002
-+#define AV_CH_FRONT_CENTER           0x00000004
-+#define AV_CH_LOW_FREQUENCY          0x00000008
-+#define AV_CH_BACK_LEFT              0x00000010
-+#define AV_CH_BACK_RIGHT             0x00000020
-+#define AV_CH_FRONT_LEFT_OF_CENTER   0x00000040
-+#define AV_CH_FRONT_RIGHT_OF_CENTER  0x00000080
-+#define AV_CH_BACK_CENTER            0x00000100
-+#define AV_CH_SIDE_LEFT              0x00000200
-+#define AV_CH_SIDE_RIGHT             0x00000400
-+#define AV_CH_TOP_CENTER             0x00000800
-+#define AV_CH_TOP_FRONT_LEFT         0x00001000
-+#define AV_CH_TOP_FRONT_CENTER       0x00002000
-+#define AV_CH_TOP_FRONT_RIGHT        0x00004000
-+#define AV_CH_TOP_BACK_LEFT          0x00008000
-+#define AV_CH_TOP_BACK_CENTER        0x00010000
-+#define AV_CH_TOP_BACK_RIGHT         0x00020000
-+#define AV_CH_STEREO_LEFT            0x20000000  ///< Stereo downmix.
-+#define AV_CH_STEREO_RIGHT           0x40000000  ///< See AV_CH_STEREO_LEFT.
-+#define AV_CH_WIDE_LEFT              0x0000000080000000ULL
-+#define AV_CH_WIDE_RIGHT             0x0000000100000000ULL
-+#define AV_CH_SURROUND_DIRECT_LEFT   0x0000000200000000ULL
-+#define AV_CH_SURROUND_DIRECT_RIGHT  0x0000000400000000ULL
-+#define AV_CH_LOW_FREQUENCY_2        0x0000000800000000ULL
-+
-+/** Channel mask value used for AVCodecContext.request_channel_layout
-+    to indicate that the user requests the channel order of the decoder output
-+    to be the native codec channel order. */
-+#define AV_CH_LAYOUT_NATIVE          0x8000000000000000ULL
-+
-+/**
-+ * @}
-+ * @defgroup channel_mask_c Audio channel convenience macros
-+ * @{
-+ * */
-+#define AV_CH_LAYOUT_MONO              (AV_CH_FRONT_CENTER)
-+#define AV_CH_LAYOUT_STEREO            (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
-+#define AV_CH_LAYOUT_2POINT1           (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_2_1               (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_SURROUND          (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
-+#define AV_CH_LAYOUT_3POINT1           (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_4POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_4POINT1           (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_2_2               (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
-+#define AV_CH_LAYOUT_QUAD              (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
-+#define AV_CH_LAYOUT_5POINT0           (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
-+#define AV_CH_LAYOUT_5POINT1           (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_5POINT0_BACK      (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
-+#define AV_CH_LAYOUT_5POINT1_BACK      (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_6POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_6POINT0_FRONT     (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-+#define AV_CH_LAYOUT_HEXAGONAL         (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_6POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_6POINT1_BACK      (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
-+#define AV_CH_LAYOUT_6POINT1_FRONT     (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
-+#define AV_CH_LAYOUT_7POINT0           (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
-+#define AV_CH_LAYOUT_7POINT0_FRONT     (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-+#define AV_CH_LAYOUT_7POINT1           (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
-+#define AV_CH_LAYOUT_7POINT1_WIDE      (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-+#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
-+#define AV_CH_LAYOUT_OCTAGONAL         (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
-+#define AV_CH_LAYOUT_STEREO_DOWNMIX    (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
-+
-+enum AVMatrixEncoding {
-+    AV_MATRIX_ENCODING_NONE,
-+    AV_MATRIX_ENCODING_DOLBY,
-+    AV_MATRIX_ENCODING_DPLII,
-+    AV_MATRIX_ENCODING_NB
-+};
-+
-+/**
-+ * @}
-+ */
-+
-+/**
-+ * Return a channel layout id that matches name, or 0 if no match is found.
-+ *
-+ * name can be one or several of the following notations,
-+ * separated by '+' or '|':
-+ * - the name of an usual channel layout (mono, stereo, 4.0, quad, 5.0,
-+ *   5.0(side), 5.1, 5.1(side), 7.1, 7.1(wide), downmix);
-+ * - the name of a single channel (FL, FR, FC, LFE, BL, BR, FLC, FRC, BC,
-+ *   SL, SR, TC, TFL, TFC, TFR, TBL, TBC, TBR, DL, DR);
-+ * - a number of channels, in decimal, optionally followed by 'c', yielding
-+ *   the default channel layout for that number of channels (@see
-+ *   av_get_default_channel_layout);
-+ * - a channel layout mask, in hexadecimal starting with "0x" (see the
-+ *   AV_CH_* macros).
-+ *
-+ * Example: "stereo+FC" = "2+FC" = "2c+1c" = "0x7"
-+ */
-+uint64_t av_get_channel_layout(const char *name);
-+
-+/**
-+ * Return a description of a channel layout.
-+ * If nb_channels is <= 0, it is guessed from the channel_layout.
-+ *
-+ * @param buf put here the string containing the channel layout
-+ * @param buf_size size in bytes of the buffer
-+ */
-+void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
-+
-+/**
-+ * Return the number of channels in the channel layout.
-+ */
-+int av_get_channel_layout_nb_channels(uint64_t channel_layout);
-+
-+/**
-+ * Return default channel layout for a given number of channels.
-+ */
-+uint64_t av_get_default_channel_layout(int nb_channels);
-+
-+/**
-+ * Get the index of a channel in channel_layout.
-+ *
-+ * @param channel a channel layout describing exactly one channel which must be
-+ *                present in channel_layout.
-+ *
-+ * @return index of channel in channel_layout on success, a negative AVERROR
-+ *         on error.
-+ */
-+int av_get_channel_layout_channel_index(uint64_t channel_layout,
-+                                        uint64_t channel);
-+
-+/**
-+ * Get the channel with the given index in channel_layout.
-+ */
-+uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
-+
-+/**
-+ * Get the name of a given channel.
-+ *
-+ * @return channel name on success, NULL on error.
-+ */
-+const char *av_get_channel_name(uint64_t channel);
-+
-+/**
-+ * @}
-+ */
-+
-+#endif /* AVUTIL_CHANNEL_LAYOUT_H */
-diff --git a/libavutil/version.h b/libavutil/version.h
-index 1659dbd..6f79eeb 100644
---- a/libavutil/version.h
-+++ b/libavutil/version.h
-@@ -37,7 +37,7 @@
-  */
- 
- #define LIBAVUTIL_VERSION_MAJOR 52
--#define LIBAVUTIL_VERSION_MINOR  1
-+#define LIBAVUTIL_VERSION_MINOR  2
- #define LIBAVUTIL_VERSION_MICRO  0
- 
- #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
-@@ -73,6 +73,9 @@
- #ifndef FF_API_AV_REVERSE
- #define FF_API_AV_REVERSE               (LIBAVUTIL_VERSION_MAJOR < 53)
- #endif
-+#ifndef FF_API_AUDIOCONVERT
-+#define FF_API_AUDIOCONVERT             (LIBAVUTIL_VERSION_MAJOR < 53)
-+#endif
- 
- /**
-  * @}
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0206-Include-libavutil-channel_layout.h-instead-of-libavu.patch b/debian/patches/post-9beta2/0206-Include-libavutil-channel_layout.h-instead-of-libavu.patch
deleted file mode 100644
index c77bb1e..0000000
--- a/debian/patches/post-9beta2/0206-Include-libavutil-channel_layout.h-instead-of-libavu.patch
+++ /dev/null
@@ -1,1266 +0,0 @@
-From a903f8f087b0bdcc5643054147f3a5f278e7eb99 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 10 Nov 2012 10:00:00 -0500
-Subject: [PATCH 206/278] Include libavutil/channel_layout.h instead of
- libavutil/audioconvert.h
-
-Also reorder some other #include when applicable.
----
- avconv.c                        |    2 +-
- avconv_filter.c                 |    2 +-
- avconv_opt.c                    |    2 +-
- doc/filters.texi                |    2 +-
- libavcodec/aacdectab.h          |    2 +-
- libavcodec/ac3_parser.c         |    2 +-
- libavcodec/ac3enc.c             |    3 +--
- libavcodec/ac3tab.c             |    2 +-
- libavcodec/alac.c               |    2 +-
- libavcodec/amrnbdec.c           |    2 +-
- libavcodec/amrwbdec.c           |    2 +-
- libavcodec/apedec.c             |    6 +++---
- libavcodec/api-example.c        |    2 +-
- libavcodec/audioconvert.h       |    2 +-
- libavcodec/bmv.c                |    2 +-
- libavcodec/cook.c               |    2 +-
- libavcodec/dcadec.c             |    2 +-
- libavcodec/dsicinav.c           |    2 +-
- libavcodec/flac.c               |    2 +-
- libavcodec/flacdec.c            |    2 +-
- libavcodec/g722dec.c            |    4 ++--
- libavcodec/g723_1.c             |    2 +-
- libavcodec/g726.c               |    2 +-
- libavcodec/gsmdec.c             |    2 +-
- libavcodec/imc.c                |    2 +-
- libavcodec/libfaac.c            |    4 ++--
- libavcodec/libfdk-aacenc.c      |    6 +++---
- libavcodec/libgsm.c             |    4 ++--
- libavcodec/libilbc.c            |    4 ++--
- libavcodec/libmp3lame.c         |    2 +-
- libavcodec/libopencore-amr.c    |    4 ++--
- libavcodec/libspeexdec.c        |    2 +-
- libavcodec/libspeexenc.c        |    2 +-
- libavcodec/mlp_parser.c         |    2 +-
- libavcodec/mpc7.c               |    2 +-
- libavcodec/mpc8.c               |    2 +-
- libavcodec/mpegaudiodec.c       |    2 +-
- libavcodec/mpegaudioenc.c       |    2 +-
- libavcodec/nellymoserdec.c      |    4 ++--
- libavcodec/pcm-mpeg.c           |    2 +-
- libavcodec/qcelpdec.c           |    2 +-
- libavcodec/qdm2.c               |    2 +-
- libavcodec/ra144dec.c           |    2 +-
- libavcodec/ra288.c              |    2 +-
- libavcodec/ralf.c               |    2 +-
- libavcodec/sipr.c               |    2 +-
- libavcodec/smacker.c            |    2 +-
- libavcodec/truespeech.c         |    2 +-
- libavcodec/twinvq.c             |    2 +-
- libavcodec/utils.c              |    3 +--
- libavcodec/vmdav.c              |    2 +-
- libavcodec/vorbis_data.c        |    4 ++--
- libavcodec/wavpack.c            |    2 +-
- libavcodec/wmavoice.c           |    2 +-
- libavcodec/ws-snd1.c            |    2 +-
- libavdevice/alsa-audio-common.c |    2 +-
- libavfilter/af_aformat.c        |    2 +-
- libavfilter/af_amix.c           |    2 +-
- libavfilter/af_ashowinfo.c      |    2 +-
- libavfilter/af_channelmap.c     |    2 +-
- libavfilter/af_channelsplit.c   |    2 +-
- libavfilter/af_join.c           |    2 +-
- libavfilter/asrc_anullsrc.c     |    4 ++--
- libavfilter/audio.c             |    2 +-
- libavfilter/avfilter.c          |    2 +-
- libavfilter/avfilter.h          |    2 +-
- libavfilter/avfiltergraph.c     |    9 ++++-----
- libavfilter/buffer.c            |    2 +-
- libavfilter/buffersink.c        |    2 +-
- libavfilter/buffersrc.c         |   13 ++++++-------
- libavfilter/fifo.c              |    2 +-
- libavformat/aea.c               |    4 ++--
- libavformat/flic.c              |    2 +-
- libavformat/g723_1.c            |    2 +-
- libavformat/mov.c               |    2 +-
- libavformat/mov_chan.c          |    2 +-
- libavformat/wv.c                |    2 +-
- libavresample/avresample.h      |    2 +-
- 78 files changed, 99 insertions(+), 103 deletions(-)
-
-diff --git a/avconv.c b/avconv.c
-index c931c46..b2e1f04 100644
---- a/avconv.c
-+++ b/avconv.c
-@@ -32,7 +32,7 @@
- #include "libswscale/swscale.h"
- #include "libavresample/avresample.h"
- #include "libavutil/opt.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/parseutils.h"
- #include "libavutil/samplefmt.h"
- #include "libavutil/colorspace.h"
-diff --git a/avconv_filter.c b/avconv_filter.c
-index 8f3f912..f51e3e1 100644
---- a/avconv_filter.c
-+++ b/avconv_filter.c
-@@ -23,8 +23,8 @@
- #include "libavfilter/avfilter.h"
- #include "libavfilter/avfiltergraph.h"
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/pixdesc.h"
- #include "libavutil/pixfmt.h"
- #include "libavutil/samplefmt.h"
-diff --git a/avconv_opt.c b/avconv_opt.c
-index ffb6c65..0354454 100644
---- a/avconv_opt.c
-+++ b/avconv_opt.c
-@@ -30,10 +30,10 @@
- #include "libavfilter/avfilter.h"
- #include "libavfilter/avfiltergraph.h"
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
- #include "libavutil/avstring.h"
- #include "libavutil/avutil.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/fifo.h"
- #include "libavutil/mathematics.h"
-diff --git a/doc/filters.texi b/doc/filters.texi
-index 85c8ae0..e1da2fe 100644
---- a/doc/filters.texi
-+++ b/doc/filters.texi
-@@ -381,7 +381,7 @@ integer or a string representing a channel layout. The default value
- of @var{channel_layout} is 3, which corresponds to CH_LAYOUT_STEREO.
- 
- Check the channel_layout_map definition in
-- at file{libavcodec/audioconvert.c} for the mapping between strings and
-+ at file{libavutil/channel_layout.c} for the mapping between strings and
- channel layout values.
- 
- Follow some examples:
-diff --git a/libavcodec/aacdectab.h b/libavcodec/aacdectab.h
-index 844579f..4c23f2d 100644
---- a/libavcodec/aacdectab.h
-+++ b/libavcodec/aacdectab.h
-@@ -30,7 +30,7 @@
- #ifndef AVCODEC_AACDECTAB_H
- #define AVCODEC_AACDECTAB_H
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "aac.h"
- 
- #include <stdint.h>
-diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
-index 9786da3..4abcf16 100644
---- a/libavcodec/ac3_parser.c
-+++ b/libavcodec/ac3_parser.c
-@@ -20,11 +20,11 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "parser.h"
- #include "ac3_parser.h"
- #include "aac_ac3_parser.h"
- #include "get_bits.h"
--#include "libavutil/audioconvert.h"
- 
- 
- #define AC3_HEADER_SIZE 7
-diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
-index 5102e30..6d038ef 100644
---- a/libavcodec/ac3enc.c
-+++ b/libavcodec/ac3enc.c
-@@ -30,9 +30,9 @@
- 
- #include <stdint.h>
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/crc.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-@@ -40,7 +40,6 @@
- #include "dsputil.h"
- #include "ac3dsp.h"
- #include "ac3.h"
--#include "audioconvert.h"
- #include "fft.h"
- #include "ac3enc.h"
- #include "eac3enc.h"
-diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c
-index 951a101..ebcfb0b 100644
---- a/libavcodec/ac3tab.c
-+++ b/libavcodec/ac3tab.c
-@@ -24,7 +24,7 @@
-  * tables taken directly from the AC-3 spec.
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "ac3tab.h"
- 
-diff --git a/libavcodec/alac.c b/libavcodec/alac.c
-index 80f6863..242e531 100644
---- a/libavcodec/alac.c
-+++ b/libavcodec/alac.c
-@@ -45,7 +45,7 @@
-  * 32bit  samplerate
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "bytestream.h"
-diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
-index 2196645..ccf1b0c 100644
---- a/libavcodec/amrnbdec.c
-+++ b/libavcodec/amrnbdec.c
-@@ -43,7 +43,7 @@
- #include <string.h>
- #include <math.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "dsputil.h"
- #include "libavutil/common.h"
-diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
-index 9b0fe25..43ac0c3 100644
---- a/libavcodec/amrwbdec.c
-+++ b/libavcodec/amrwbdec.c
-@@ -24,7 +24,7 @@
-  * AMR wideband decoder
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/lfg.h"
- 
-diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
-index 9d2941c..7a6ee41 100644
---- a/libavcodec/apedec.c
-+++ b/libavcodec/apedec.c
-@@ -20,12 +20,12 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/opt.h"
- #include "avcodec.h"
- #include "dsputil.h"
- #include "bytestream.h"
--#include "libavutil/audioconvert.h"
--#include "libavutil/avassert.h"
--#include "libavutil/opt.h"
- 
- /**
-  * @file
-diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c
-index 198a59d..949b3ef 100644
---- a/libavcodec/api-example.c
-+++ b/libavcodec/api-example.c
-@@ -37,7 +37,7 @@
- #endif
- 
- #include "libavcodec/avcodec.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/imgutils.h"
- #include "libavutil/mathematics.h"
-diff --git a/libavcodec/audioconvert.h b/libavcodec/audioconvert.h
-index a7b0baa..7d76fd6 100644
---- a/libavcodec/audioconvert.h
-+++ b/libavcodec/audioconvert.h
-@@ -31,7 +31,7 @@
- 
- #include "libavutil/cpu.h"
- #include "avcodec.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- 
- struct AVAudioConvert;
- typedef struct AVAudioConvert AVAudioConvert;
-diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
-index 53781e7..3ff6177 100644
---- a/libavcodec/bmv.c
-+++ b/libavcodec/bmv.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "bytestream.h"
- 
-diff --git a/libavcodec/cook.c b/libavcodec/cook.c
-index 201b44c..f41457d 100644
---- a/libavcodec/cook.c
-+++ b/libavcodec/cook.c
-@@ -42,13 +42,13 @@
-  * available.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/lfg.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
- #include "bytestream.h"
- #include "fft.h"
--#include "libavutil/audioconvert.h"
- #include "sinewin.h"
- 
- #include "cookdata.h"
-diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
-index 026c572..712a72a 100644
---- a/libavcodec/dcadec.c
-+++ b/libavcodec/dcadec.c
-@@ -26,12 +26,12 @@
- #include <stddef.h>
- #include <stdio.h>
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/float_dsp.h"
- #include "libavutil/intmath.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/mathematics.h"
--#include "libavutil/audioconvert.h"
- #include "libavutil/samplefmt.h"
- #include "avcodec.h"
- #include "dsputil.h"
-diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
-index 2dcbf74..4874aa3 100644
---- a/libavcodec/dsicinav.c
-+++ b/libavcodec/dsicinav.c
-@@ -24,7 +24,7 @@
-  * Delphine Software International CIN audio/video decoders
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "bytestream.h"
- #include "mathops.h"
-diff --git a/libavcodec/flac.c b/libavcodec/flac.c
-index 07da702..32b28d0 100644
---- a/libavcodec/flac.c
-+++ b/libavcodec/flac.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/crc.h"
- #include "libavutil/log.h"
- #include "bytestream.h"
-diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
-index 10e33f2..6b290e2 100644
---- a/libavcodec/flacdec.c
-+++ b/libavcodec/flacdec.c
-@@ -33,7 +33,7 @@
- 
- #include <limits.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/crc.h"
- #include "avcodec.h"
- #include "internal.h"
-diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
-index 3364850..55a23d1 100644
---- a/libavcodec/g722dec.c
-+++ b/libavcodec/g722dec.c
-@@ -34,11 +34,11 @@
-  *       respectively of each byte are ignored.
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/opt.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "g722.h"
--#include "libavutil/opt.h"
- 
- #define OFFSET(x) offsetof(G722Context, x)
- #define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
-diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
-index 342c634..fe88682 100644
---- a/libavcodec/g723_1.c
-+++ b/libavcodec/g723_1.c
-@@ -26,7 +26,7 @@
-  */
- 
- #define BITSTREAM_READER_LE
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/mem.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-diff --git a/libavcodec/g726.c b/libavcodec/g726.c
-index 91b5e54..402ae3d 100644
---- a/libavcodec/g726.c
-+++ b/libavcodec/g726.c
-@@ -23,8 +23,8 @@
-  */
- #include <limits.h>
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
- #include "internal.h"
-diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
-index 14b7e03..06e6c33 100644
---- a/libavcodec/gsmdec.c
-+++ b/libavcodec/gsmdec.c
-@@ -24,7 +24,7 @@
-  * GSM decoder
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "msgsmdec.h"
-diff --git a/libavcodec/imc.c b/libavcodec/imc.c
-index 4c2d01d..ea6172b 100644
---- a/libavcodec/imc.c
-+++ b/libavcodec/imc.c
-@@ -35,11 +35,11 @@
- #include <stddef.h>
- #include <stdio.h>
- 
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
- #include "fft.h"
--#include "libavutil/audioconvert.h"
- #include "sinewin.h"
- 
- #include "imcdata.h"
-diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
-index 7297179..24f3bf2 100644
---- a/libavcodec/libfaac.c
-+++ b/libavcodec/libfaac.c
-@@ -26,11 +26,11 @@
- 
- #include <faac.h>
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/common.h"
- #include "avcodec.h"
- #include "audio_frame_queue.h"
- #include "internal.h"
--#include "libavutil/audioconvert.h"
--#include "libavutil/common.h"
- 
- 
- /* libfaac has an encoder delay of 1024 samples */
-diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
-index fada1c2..85ccb10 100644
---- a/libavcodec/libfdk-aacenc.c
-+++ b/libavcodec/libfdk-aacenc.c
-@@ -21,12 +21,12 @@
- 
- #include <fdk-aac/aacenc_lib.h>
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/common.h"
-+#include "libavutil/opt.h"
- #include "avcodec.h"
- #include "audio_frame_queue.h"
- #include "internal.h"
--#include "libavutil/audioconvert.h"
--#include "libavutil/common.h"
--#include "libavutil/opt.h"
- 
- typedef struct AACContext {
-     const AVClass *class;
-diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
-index afed710..55697db 100644
---- a/libavcodec/libgsm.c
-+++ b/libavcodec/libgsm.c
-@@ -29,11 +29,11 @@
- 
- #include <gsm/gsm.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/common.h"
- #include "avcodec.h"
- #include "internal.h"
- #include "gsm.h"
--#include "libavutil/common.h"
- 
- static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
-     if (avctx->channels > 1) {
-diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
-index 2812061..450f413 100644
---- a/libavcodec/libilbc.c
-+++ b/libavcodec/libilbc.c
-@@ -21,10 +21,10 @@
- 
- #include <ilbc.h>
- 
--#include "libavutil/audioconvert.h"
--#include "avcodec.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
-+#include "avcodec.h"
- #include "internal.h"
- 
- static int get_mode(AVCodecContext *avctx)
-diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
-index 947edc0..600f6fd 100644
---- a/libavcodec/libmp3lame.c
-+++ b/libavcodec/libmp3lame.c
-@@ -26,7 +26,7 @@
- 
- #include <lame/lame.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/log.h"
-diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
-index 0c472b7..006c852 100644
---- a/libavcodec/libopencore-amr.c
-+++ b/libavcodec/libopencore-amr.c
-@@ -19,11 +19,11 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
--#include "avcodec.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
-+#include "avcodec.h"
- #include "audio_frame_queue.h"
- #include "internal.h"
- 
-diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
-index 0c93f05..e9442f4 100644
---- a/libavcodec/libspeexdec.c
-+++ b/libavcodec/libspeexdec.c
-@@ -23,7 +23,7 @@
- #include <speex/speex_stereo.h>
- #include <speex/speex_callbacks.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "avcodec.h"
- 
-diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
-index cbfa5be..e30185a 100644
---- a/libavcodec/libspeexenc.c
-+++ b/libavcodec/libspeexenc.c
-@@ -85,7 +85,7 @@
- #include <speex/speex_header.h>
- #include <speex/speex_stereo.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
-diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
-index 4c1cf9b..d1a3dc1 100644
---- a/libavcodec/mlp_parser.c
-+++ b/libavcodec/mlp_parser.c
-@@ -26,8 +26,8 @@
- 
- #include <stdint.h>
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/crc.h"
--#include "libavutil/audioconvert.h"
- #include "get_bits.h"
- #include "parser.h"
- #include "mlp_parser.h"
-diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
-index b013eeb..7c9103c 100644
---- a/libavcodec/mpc7.c
-+++ b/libavcodec/mpc7.c
-@@ -25,12 +25,12 @@
-  * divided into 32 subbands.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/lfg.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
- #include "mpegaudiodsp.h"
--#include "libavutil/audioconvert.h"
- 
- #include "mpc.h"
- #include "mpc7data.h"
-diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
-index 0331789..f43cb4e 100644
---- a/libavcodec/mpc8.c
-+++ b/libavcodec/mpc8.c
-@@ -25,12 +25,12 @@
-  * divided into 32 subbands.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/lfg.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
- #include "mpegaudiodsp.h"
--#include "libavutil/audioconvert.h"
- 
- #include "mpc.h"
- #include "mpc8data.h"
-diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
-index 52abcb2..bb539cd 100644
---- a/libavcodec/mpegaudiodec.c
-+++ b/libavcodec/mpegaudiodec.c
-@@ -24,7 +24,7 @@
-  * MPEG Audio decoder
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "mathops.h"
-diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
-index ab9e0fa..ba0d8cf 100644
---- a/libavcodec/mpegaudioenc.c
-+++ b/libavcodec/mpegaudioenc.c
-@@ -24,7 +24,7 @@
-  * The simplest mpeg audio layer 2 encoder.
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- 
- #include "avcodec.h"
- #include "internal.h"
-diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
-index f17e9fd..1f79058 100644
---- a/libavcodec/nellymoserdec.c
-+++ b/libavcodec/nellymoserdec.c
-@@ -31,14 +31,14 @@
-  * implementors. The original code is available from http://code.google.com/p/nelly2pcm/
-  */
- 
--#include "nellymoser.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/lfg.h"
- #include "libavutil/random_seed.h"
--#include "libavutil/audioconvert.h"
- #include "avcodec.h"
- #include "dsputil.h"
- #include "fft.h"
- #include "fmtconvert.h"
-+#include "nellymoser.h"
- #include "sinewin.h"
- 
- #define BITSTREAM_READER_LE
-diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c
-index b5af649..4f9f525 100644
---- a/libavcodec/pcm-mpeg.c
-+++ b/libavcodec/pcm-mpeg.c
-@@ -24,7 +24,7 @@
-  * PCM codecs for encodings found in MPEG streams (DVD/Blu-ray)
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "bytestream.h"
- 
-diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
-index 9c2b354..d0f4107 100644
---- a/libavcodec/qcelpdec.c
-+++ b/libavcodec/qcelpdec.c
-@@ -29,7 +29,7 @@
- 
- #include <stddef.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "internal.h"
- #include "get_bits.h"
-diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
-index a094e6c..1666242 100644
---- a/libavcodec/qdm2.c
-+++ b/libavcodec/qdm2.c
-@@ -36,7 +36,7 @@
- #include <stdio.h>
- 
- #define BITSTREAM_READER_LE
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "dsputil.h"
-diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
-index cee3892..0c6c7d3 100644
---- a/libavcodec/ra144dec.c
-+++ b/libavcodec/ra144dec.c
-@@ -22,7 +22,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intmath.h"
- #include "avcodec.h"
- #include "get_bits.h"
-diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
-index e080d2b..deaafd2 100644
---- a/libavcodec/ra288.c
-+++ b/libavcodec/ra288.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/float_dsp.h"
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
-diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
-index 3244424..c9c8080 100644
---- a/libavcodec/ralf.c
-+++ b/libavcodec/ralf.c
-@@ -26,11 +26,11 @@
-  * Dedicated to the mastermind behind it, Ralph Wiggum.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "golomb.h"
- #include "unary.h"
--#include "libavutil/audioconvert.h"
- #include "ralfdata.h"
- 
- #define FILTER_NONE 0
-diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
-index 9db0923..211396b 100644
---- a/libavcodec/sipr.c
-+++ b/libavcodec/sipr.c
-@@ -25,7 +25,7 @@
- #include <stdint.h>
- #include <string.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/mathematics.h"
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
-diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
-index df2d4c4..61283e8 100644
---- a/libavcodec/smacker.c
-+++ b/libavcodec/smacker.c
-@@ -31,8 +31,8 @@
- #include <stdio.h>
- #include <stdlib.h>
- 
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
--#include "libavutil/audioconvert.h"
- #include "mathops.h"
- 
- #define BITSTREAM_READER_LE
-diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
-index efe5f45..7ee1556 100644
---- a/libavcodec/truespeech.c
-+++ b/libavcodec/truespeech.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
- #include "dsputil.h"
-diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
-index 7af370e..072af7e 100644
---- a/libavcodec/twinvq.c
-+++ b/libavcodec/twinvq.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/float_dsp.h"
- #include "avcodec.h"
- #include "get_bits.h"
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 78726ae..8c203b9 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -27,10 +27,10 @@
- 
- #include "libavutil/avassert.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/crc.h"
- #include "libavutil/mathematics.h"
- #include "libavutil/pixdesc.h"
--#include "libavutil/audioconvert.h"
- #include "libavutil/imgutils.h"
- #include "libavutil/samplefmt.h"
- #include "libavutil/dict.h"
-@@ -38,7 +38,6 @@
- #include "dsputil.h"
- #include "libavutil/opt.h"
- #include "thread.h"
--#include "audioconvert.h"
- #include "internal.h"
- #include "bytestream.h"
- #include <stdlib.h>
-diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
-index 6efc9e7..2fdd27f 100644
---- a/libavcodec/vmdav.c
-+++ b/libavcodec/vmdav.c
-@@ -43,7 +43,7 @@
- #include <stdlib.h>
- #include <string.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
-diff --git a/libavcodec/vorbis_data.c b/libavcodec/vorbis_data.c
-index 98c7a59..03c3d6b 100644
---- a/libavcodec/vorbis_data.c
-+++ b/libavcodec/vorbis_data.c
-@@ -18,10 +18,10 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/mem.h"
- #include "dsputil.h"
- #include "vorbis.h"
--#include "libavutil/audioconvert.h"
--#include "libavutil/mem.h"
- 
- const uint8_t ff_vorbis_channel_layout_offsets[8][8] = {
-     { 0 },
-diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
-index eafb40d..a0ce4a3 100644
---- a/libavcodec/wavpack.c
-+++ b/libavcodec/wavpack.c
-@@ -21,7 +21,7 @@
- 
- #define BITSTREAM_READER_LE
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #include "get_bits.h"
- #include "unary.h"
-diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
-index df98167..2ee235c 100644
---- a/libavcodec/wmavoice.c
-+++ b/libavcodec/wmavoice.c
-@@ -29,7 +29,7 @@
- 
- #include <math.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/mem.h"
- #include "dsputil.h"
- #include "avcodec.h"
-diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
-index 05cb31c..036316c 100644
---- a/libavcodec/ws-snd1.c
-+++ b/libavcodec/ws-snd1.c
-@@ -21,7 +21,7 @@
- 
- #include <stdint.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
- #include "avcodec.h"
-diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
-index b48e007..21f1594 100644
---- a/libavdevice/alsa-audio-common.c
-+++ b/libavdevice/alsa-audio-common.c
-@@ -31,7 +31,7 @@
- #include <alsa/asoundlib.h>
- #include "libavformat/avformat.h"
- #include "libavutil/avassert.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- 
- #include "alsa-audio.h"
- 
-diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c
-index 77c16be..2059cf2 100644
---- a/libavfilter/af_aformat.c
-+++ b/libavfilter/af_aformat.c
-@@ -23,8 +23,8 @@
-  * format audio filter
-  */
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
- 
-diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
-index dde9595..7ef94b9 100644
---- a/libavfilter/af_amix.c
-+++ b/libavfilter/af_amix.c
-@@ -28,10 +28,10 @@
-  * output.
-  */
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/audio_fifo.h"
- #include "libavutil/avassert.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/float_dsp.h"
- #include "libavutil/mathematics.h"
-diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
-index 00e0322..bcf821a 100644
---- a/libavfilter/af_ashowinfo.c
-+++ b/libavfilter/af_ashowinfo.c
-@@ -27,7 +27,7 @@
- #include <stddef.h>
- 
- #include "libavutil/adler32.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/mem.h"
- #include "libavutil/samplefmt.h"
-diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
-index f70b481..4f9ee86 100644
---- a/libavfilter/af_channelmap.c
-+++ b/libavfilter/af_channelmap.c
-@@ -25,8 +25,8 @@
- 
- #include <ctype.h>
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/mathematics.h"
- #include "libavutil/opt.h"
-diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
-index 92fb27e..e8ceb9c 100644
---- a/libavfilter/af_channelsplit.c
-+++ b/libavfilter/af_channelsplit.c
-@@ -23,7 +23,7 @@
-  * Split an audio stream into per-channel streams.
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/internal.h"
- #include "libavutil/opt.h"
- 
-diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
-index 7e3a542..c810e59 100644
---- a/libavfilter/af_join.c
-+++ b/libavfilter/af_join.c
-@@ -25,8 +25,8 @@
-  * a single output
-  */
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/opt.h"
- 
-diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
-index 7096cea..4cbaa81 100644
---- a/libavfilter/asrc_anullsrc.c
-+++ b/libavfilter/asrc_anullsrc.c
-@@ -24,10 +24,10 @@
- #include <inttypes.h>
- #include <stdio.h>
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/internal.h"
- #include "avfilter.h"
- #include "internal.h"
--#include "libavutil/audioconvert.h"
--#include "libavutil/internal.h"
- 
- typedef struct {
-     uint64_t channel_layout;
-diff --git a/libavfilter/audio.c b/libavfilter/audio.c
-index 66010c1..48e038b 100644
---- a/libavfilter/audio.c
-+++ b/libavfilter/audio.c
-@@ -16,7 +16,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- 
- #include "audio.h"
-diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
-index 1e3b001..c7db857 100644
---- a/libavfilter/avfilter.c
-+++ b/libavfilter/avfilter.c
-@@ -21,10 +21,10 @@
- 
- /* #define DEBUG */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/pixdesc.h"
- #include "libavutil/rational.h"
--#include "libavutil/audioconvert.h"
- 
- #include "avfilter.h"
- #include "formats.h"
-diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
-index adb8b79..01d39b6 100644
---- a/libavfilter/avfilter.h
-+++ b/libavfilter/avfilter.h
-@@ -478,7 +478,7 @@ struct AVFilterLink {
-     int h;                      ///< agreed upon image height
-     AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
-     /* These two parameters apply only to audio */
--    uint64_t channel_layout;    ///< channel layout of current buffer (see libavutil/audioconvert.h)
-+    uint64_t channel_layout;    ///< channel layout of current buffer (see libavutil/channel_layout.h)
-     int sample_rate;            ///< samples per second
- 
-     int format;                 ///< agreed upon media format
-diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
-index 4a66c78..f5c9984 100644
---- a/libavfilter/avfiltergraph.c
-+++ b/libavfilter/avfiltergraph.c
-@@ -23,16 +23,15 @@
- #include <ctype.h>
- #include <string.h>
- 
-+#include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/common.h"
-+#include "libavutil/log.h"
- #include "avfilter.h"
- #include "avfiltergraph.h"
- #include "formats.h"
- #include "internal.h"
- 
--#include "libavutil/audioconvert.h"
--#include "libavutil/avassert.h"
--#include "libavutil/common.h"
--#include "libavutil/log.h"
--
- static const AVClass filtergraph_class = {
-     .class_name = "AVFilterGraph",
-     .item_name  = av_default_item_name,
-diff --git a/libavfilter/buffer.c b/libavfilter/buffer.c
-index 439425a..8eb3ce3 100644
---- a/libavfilter/buffer.c
-+++ b/libavfilter/buffer.c
-@@ -16,7 +16,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavcodec/avcodec.h"
- 
-diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
-index c68b909..96f5351 100644
---- a/libavfilter/buffersink.c
-+++ b/libavfilter/buffersink.c
-@@ -24,8 +24,8 @@
-  */
- 
- #include "libavutil/audio_fifo.h"
--#include "libavutil/audioconvert.h"
- #include "libavutil/avassert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/mathematics.h"
- 
-diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
-index a2d5edb..9354691 100644
---- a/libavfilter/buffersrc.c
-+++ b/libavfilter/buffersrc.c
-@@ -23,6 +23,12 @@
-  * memory buffer source filter
-  */
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/common.h"
-+#include "libavutil/fifo.h"
-+#include "libavutil/imgutils.h"
-+#include "libavutil/opt.h"
-+#include "libavutil/samplefmt.h"
- #include "audio.h"
- #include "avfilter.h"
- #include "buffersrc.h"
-@@ -30,13 +36,6 @@
- #include "internal.h"
- #include "video.h"
- 
--#include "libavutil/audioconvert.h"
--#include "libavutil/common.h"
--#include "libavutil/fifo.h"
--#include "libavutil/imgutils.h"
--#include "libavutil/opt.h"
--#include "libavutil/samplefmt.h"
--
- typedef struct {
-     const AVClass    *class;
-     AVFifoBuffer     *fifo;
-diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
-index b13be68..1bfacaf 100644
---- a/libavfilter/fifo.c
-+++ b/libavfilter/fifo.c
-@@ -24,7 +24,7 @@
-  */
- 
- #include "libavutil/avassert.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "libavutil/mathematics.h"
- #include "libavutil/samplefmt.h"
-diff --git a/libavformat/aea.c b/libavformat/aea.c
-index 4b6bf32..7675009 100644
---- a/libavformat/aea.c
-+++ b/libavformat/aea.c
-@@ -20,10 +20,10 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
-+#include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "pcm.h"
--#include "libavutil/intreadwrite.h"
--#include "libavutil/audioconvert.h"
- 
- #define AT1_SU_SIZE     212
- 
-diff --git a/libavformat/flic.c b/libavformat/flic.c
-index 6019763..2eb6f05 100644
---- a/libavformat/flic.c
-+++ b/libavformat/flic.c
-@@ -31,8 +31,8 @@
-  * special FLIs from the PC games "Magic Carpet" and "X-COM: Terror from the Deep".
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
--#include "libavutil/audioconvert.h"
- #include "avformat.h"
- #include "internal.h"
- 
-diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c
-index 2674ce5..0b92702 100644
---- a/libavformat/g723_1.c
-+++ b/libavformat/g723_1.c
-@@ -24,7 +24,7 @@
-  * G.723.1 demuxer
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- 
-diff --git a/libavformat/mov.c b/libavformat/mov.c
-index 63049f5..35c07bd 100644
---- a/libavformat/mov.c
-+++ b/libavformat/mov.c
-@@ -26,7 +26,7 @@
- //#define MOV_EXPORT_ALL_METADATA
- 
- #include "libavutil/attributes.h"
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/intfloat.h"
- #include "libavutil/mathematics.h"
-diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
-index 00a2a4b..aa7ba10 100644
---- a/libavformat/mov_chan.c
-+++ b/libavformat/mov_chan.c
-@@ -25,7 +25,7 @@
- 
- #include <stdint.h>
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavcodec/avcodec.h"
- #include "mov_chan.h"
- 
-diff --git a/libavformat/wv.c b/libavformat/wv.c
-index a2ae5a4..f6b96d5 100644
---- a/libavformat/wv.c
-+++ b/libavformat/wv.c
-@@ -19,7 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
--#include "libavutil/audioconvert.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/dict.h"
- #include "avformat.h"
-diff --git a/libavresample/avresample.h b/libavresample/avresample.h
-index b0a9e24..affeeeb 100644
---- a/libavresample/avresample.h
-+++ b/libavresample/avresample.h
-@@ -93,8 +93,8 @@
-  *  avresample_free().
-  */
- 
--#include "libavutil/audioconvert.h"
- #include "libavutil/avutil.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/dict.h"
- #include "libavutil/log.h"
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0207-doc-git-howto-Leave-reviewers-time-to-react-before-p.patch b/debian/patches/post-9beta2/0207-doc-git-howto-Leave-reviewers-time-to-react-before-p.patch
deleted file mode 100644
index 7c9faad..0000000
--- a/debian/patches/post-9beta2/0207-doc-git-howto-Leave-reviewers-time-to-react-before-p.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 97bf7c03b1338a867da52c159a2afecbdedcfa88 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Thu, 25 Oct 2012 18:33:38 +0200
-Subject: [PATCH 207/278] doc: git-howto: Leave reviewers time to react before
- pushing patches
-
----
- doc/git-howto.texi |    7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/doc/git-howto.texi b/doc/git-howto.texi
-index 68e0061..5a8e2a3 100644
---- a/doc/git-howto.texi
-+++ b/doc/git-howto.texi
-@@ -419,6 +419,13 @@ Also note that every single commit should pass the test suite, not just
- the result of a series of patches. So if you have a series of commits
- to push, run the test suite on every single commit.
- 
-+Give other developers a reasonable amount of time to look at and review
-+patches before you push them. Not everybody is online 24/7, but may wish
-+to look at and comment on a patch nonetheless. The time you leave depends
-+on the urgency and complexity of the patch. Use your common sense to pick
-+a timeframe that allows everybody that you think may wish to comment
-+and/or should comment on the change an opportunity to see it.
-+
- Finally, after pushing, mark all patches as committed on
- @url{http://patches.libav.org/,patchwork}.
- Sometimes this is not automatically done when a patch has been
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0208-x86-Require-an-assembler-able-to-cope-with-AVX-instr.patch b/debian/patches/post-9beta2/0208-x86-Require-an-assembler-able-to-cope-with-AVX-instr.patch
deleted file mode 100644
index b328d1c..0000000
--- a/debian/patches/post-9beta2/0208-x86-Require-an-assembler-able-to-cope-with-AVX-instr.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From b8e8a07c6c4df93de92480f5c3a14296a6a2a690 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 28 Sep 2012 19:36:53 +0200
-Subject: [PATCH 208/278] x86: Require an assembler able to cope with AVX
- instructions
-
-All modern assemblers have this capability.  Older NASM versions
-that lack the capability produce code that crashes at runtime,
-so it's better to error out during the build process instead.
-
-CC: libav-stable at libav.org
----
- configure |    3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index d67fc85..a66a7ff 100755
---- a/configure
-+++ b/configure
-@@ -3152,9 +3152,8 @@ EOF
-             elf*) enabled debug && append YASMFLAGS $yasm_debug ;;
-         esac
- 
--        check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
-+        check_yasm "vextractf128 xmm0, ymm0, 0" && enable yasm ||
-             die "yasm not found, use --disable-yasm for a crippled build"
--        check_yasm "vextractf128 xmm0, ymm0, 0"      || disable avx_external
-         check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
-         check_yasm "CPU amdnop" && enable cpunop
-     fi
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0209-build-Drop-AVX-assembly-ifdefs.patch b/debian/patches/post-9beta2/0209-build-Drop-AVX-assembly-ifdefs.patch
deleted file mode 100644
index 9b5ecef..0000000
--- a/debian/patches/post-9beta2/0209-build-Drop-AVX-assembly-ifdefs.patch
+++ /dev/null
@@ -1,661 +0,0 @@
-From 2b479bcab0a8365a7c094c5fa44b8cb6da9810d0 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 19 Oct 2012 19:04:40 +0200
-Subject: [PATCH 209/278] build: Drop AVX assembly ifdefs
-
-An assembler able to cope with AVX instructions is now required.
----
- libavcodec/x86/dct32.asm                |    2 --
- libavcodec/x86/dsputil.asm              |    6 ------
- libavcodec/x86/fft.asm                  |    9 --------
- libavcodec/x86/h264_chromamc_10bit.asm  |    4 ----
- libavcodec/x86/h264_idct_10bit.asm      |   16 ---------------
- libavcodec/x86/h264_intrapred_10bit.asm |   26 -----------------------
- libavresample/x86/audio_convert.asm     |   34 -------------------------------
- libavresample/x86/audio_mix.asm         |    8 --------
- libavutil/x86/float_dsp.asm             |    4 ----
- 9 files changed, 109 deletions(-)
-
-diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm
-index 25bc8f7..9c147b9 100644
---- a/libavcodec/x86/dct32.asm
-+++ b/libavcodec/x86/dct32.asm
-@@ -192,7 +192,6 @@ ps_p1p1m1m1: dd 0, 0, 0x80000000, 0x80000000, 0, 0, 0x80000000, 0x80000000
- 
- INIT_YMM avx
- SECTION_TEXT
--%if HAVE_AVX_EXTERNAL
- ; void ff_dct32_float_avx(FFTSample *out, const FFTSample *in)
- cglobal dct32_float, 2,3,8, out, in, tmp
-     ; pass 1
-@@ -265,7 +264,6 @@ cglobal dct32_float, 2,3,8, out, in, tmp
- INIT_XMM
-     PASS6_AND_PERMUTE
-     RET
--%endif
- 
- %if ARCH_X86_64
- %define SPILL SWAP
-diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
-index 0ed64aa..c9118a1 100644
---- a/libavcodec/x86/dsputil.asm
-+++ b/libavcodec/x86/dsputil.asm
-@@ -1168,10 +1168,8 @@ ALIGN 16
- 
- INIT_XMM sse
- VECTOR_FMUL_REVERSE
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- VECTOR_FMUL_REVERSE
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; vector_fmul_add(float *dst, const float *src0, const float *src1,
-@@ -1198,10 +1196,8 @@ ALIGN 16
- 
- INIT_XMM sse
- VECTOR_FMUL_ADD
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- VECTOR_FMUL_ADD
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void ff_butterflies_float_interleave(float *dst, const float *src0,
-@@ -1244,10 +1240,8 @@ cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len
- 
- INIT_XMM sse
- BUTTERFLIES_FLOAT_INTERLEAVE
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- BUTTERFLIES_FLOAT_INTERLEAVE
--%endif
- 
- INIT_XMM sse2
- ; %1 = aligned/unaligned
-diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm
-index 111f322..c87752b 100644
---- a/libavcodec/x86/fft.asm
-+++ b/libavcodec/x86/fft.asm
-@@ -305,7 +305,6 @@ IF%1 mova  Z(1), m5
- 
- INIT_YMM avx
- 
--%if HAVE_AVX_EXTERNAL
- align 16
- fft8_avx:
-     mova      m0, Z(0)
-@@ -394,7 +393,6 @@ fft32_interleave_avx:
-     sub r2d, mmsize/4
-     jg .deint_loop
-     ret
--%endif
- 
- INIT_XMM sse
- 
-@@ -539,7 +537,6 @@ DEFINE_ARGS zc, w, n, o1, o3
- 
- INIT_YMM avx
- 
--%if HAVE_AVX_EXTERNAL
- %macro INTERL_AVX 5
-     vunpckhps      %3, %2, %1
-     vunpcklps      %2, %2, %1
-@@ -561,7 +558,6 @@ cglobal fft_calc, 2,5,8
-     FFT_DISPATCH _interleave %+ SUFFIX, r1
-     REP_RET
- 
--%endif
- 
- INIT_XMM sse
- 
-@@ -780,11 +776,9 @@ align 8
- dispatch_tab %+ fullsuffix: pointer list_of_fft
- %endmacro ; DECL_FFT
- 
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- DECL_FFT 6
- DECL_FFT 6, _interleave
--%endif
- INIT_XMM sse
- DECL_FFT 5
- DECL_FFT 5, _interleave
-@@ -1086,7 +1080,4 @@ DECL_IMDCT POSROTATESHUF_3DNOW
- %endif
- 
- INIT_YMM avx
--
--%if HAVE_AVX_EXTERNAL
- DECL_IMDCT POSROTATESHUF_AVX
--%endif
-diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
-index d24308d..2619737 100644
---- a/libavcodec/x86/h264_chromamc_10bit.asm
-+++ b/libavcodec/x86/h264_chromamc_10bit.asm
-@@ -251,10 +251,8 @@ cglobal %1_h264_chroma_mc2_10, 6,7
- %define CHROMAMC_AVG  NOTHING
- INIT_XMM sse2
- CHROMA_MC8 put
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CHROMA_MC8 put
--%endif
- INIT_MMX mmx2
- CHROMA_MC4 put
- CHROMA_MC2 put
-@@ -262,10 +260,8 @@ CHROMA_MC2 put
- %define CHROMAMC_AVG  AVG
- INIT_XMM sse2
- CHROMA_MC8 avg
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CHROMA_MC8 avg
--%endif
- INIT_MMX mmx2
- CHROMA_MC4 avg
- CHROMA_MC2 avg
-diff --git a/libavcodec/x86/h264_idct_10bit.asm b/libavcodec/x86/h264_idct_10bit.asm
-index 5ba241b..b3b7df9 100644
---- a/libavcodec/x86/h264_idct_10bit.asm
-+++ b/libavcodec/x86/h264_idct_10bit.asm
-@@ -79,10 +79,8 @@ cglobal h264_idct_add_10, 3,3
- 
- INIT_XMM sse2
- IDCT_ADD_10
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT_ADD_10
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; h264_idct_add16(pixel *dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8])
-@@ -109,11 +107,9 @@ add4x4_idct %+ SUFFIX:
- INIT_XMM sse2
- ALIGN 16
- ADD4x4IDCT
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- ALIGN 16
- ADD4x4IDCT
--%endif
- 
- %macro ADD16_OP 2
-     cmp          byte [r4+%2], 0
-@@ -149,10 +145,8 @@ cglobal h264_idct_add16_10, 5,6
- 
- INIT_XMM sse2
- IDCT_ADD16_10
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT_ADD16_10
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void h264_idct_dc_add(pixel *dst, dctcoef *block, int stride)
-@@ -215,10 +209,8 @@ cglobal h264_idct8_dc_add_10,3,3,7
- 
- INIT_XMM sse2
- IDCT8_DC_ADD
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT8_DC_ADD
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; h264_idct_add16intra(pixel *dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8])
-@@ -286,10 +278,8 @@ cglobal h264_idct_add16intra_10,5,7,8
- 
- INIT_XMM sse2
- IDCT_ADD16INTRA_10
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT_ADD16INTRA_10
--%endif
- 
- %assign last_block 36
- ;-----------------------------------------------------------------------------
-@@ -323,10 +313,8 @@ cglobal h264_idct_add8_10,5,8,7
- 
- INIT_XMM sse2
- IDCT_ADD8
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT_ADD8
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void h264_idct8_add(pixel *dst, dctcoef *block, int stride)
-@@ -500,10 +488,8 @@ h264_idct8_add1_10 %+ SUFFIX:
- 
- INIT_XMM sse2
- IDCT8_ADD
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT8_ADD
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; h264_idct8_add4(pixel **dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8])
-@@ -540,7 +526,5 @@ cglobal h264_idct8_add4_10, 0,7,16
- 
- INIT_XMM sse2
- IDCT8_ADD4
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- IDCT8_ADD4
--%endif
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index 039af6d..eae45ae 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -82,10 +82,8 @@ INIT_XMM sse2
- PRED4x4_DR
- INIT_XMM ssse3
- PRED4x4_DR
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED4x4_DR
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_vertical_right(pixel *src, const pixel *topright, int stride)
-@@ -121,10 +119,8 @@ INIT_XMM sse2
- PRED4x4_VR
- INIT_XMM ssse3
- PRED4x4_VR
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED4x4_VR
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_horizontal_down(pixel *src, const pixel *topright, int stride)
-@@ -163,10 +159,8 @@ INIT_XMM sse2
- PRED4x4_HD
- INIT_XMM ssse3
- PRED4x4_HD
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED4x4_HD
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_dc(pixel *src, const pixel *topright, int stride)
-@@ -234,10 +228,8 @@ cglobal pred4x4_down_left_10, 3, 3
- 
- INIT_XMM sse2
- PRED4x4_DL
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED4x4_DL
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_vertical_left(pixel *src, const pixel *topright, int stride)
-@@ -263,10 +255,8 @@ cglobal pred4x4_vertical_left_10, 3, 3
- 
- INIT_XMM sse2
- PRED4x4_VL
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED4x4_VL
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred4x4_horizontal_up(pixel *src, const pixel *topright, int stride)
-@@ -573,10 +563,8 @@ cglobal pred8x8l_top_dc_10, 4, 4, 6
- 
- INIT_XMM sse2
- PRED8x8L_TOP_DC
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_TOP_DC
--%endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_dc(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -632,10 +620,8 @@ cglobal pred8x8l_dc_10, 4, 6, 6
- 
- INIT_XMM sse2
- PRED8x8L_DC
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_DC
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -667,10 +653,8 @@ cglobal pred8x8l_vertical_10, 4, 4, 6
- 
- INIT_XMM sse2
- PRED8x8L_VERTICAL
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_VERTICAL
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal(uint8_t *src, int has_topleft, int has_topright, int stride)
-@@ -723,10 +707,8 @@ INIT_XMM sse2
- PRED8x8L_HORIZONTAL
- INIT_XMM ssse3
- PRED8x8L_HORIZONTAL
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_HORIZONTAL
--%endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_left(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -791,10 +773,8 @@ INIT_XMM sse2
- PRED8x8L_DOWN_LEFT
- INIT_XMM ssse3
- PRED8x8L_DOWN_LEFT
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_DOWN_LEFT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ;void pred8x8l_down_right(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -865,10 +845,8 @@ INIT_XMM sse2
- PRED8x8L_DOWN_RIGHT
- INIT_XMM ssse3
- PRED8x8L_DOWN_RIGHT
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_DOWN_RIGHT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_vertical_right(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -935,10 +913,8 @@ INIT_XMM sse2
- PRED8x8L_VERTICAL_RIGHT
- INIT_XMM ssse3
- PRED8x8L_VERTICAL_RIGHT
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_VERTICAL_RIGHT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void pred8x8l_horizontal_up(pixel *src, int has_topleft, int has_topright, int stride)
-@@ -996,10 +972,8 @@ INIT_XMM sse2
- PRED8x8L_HORIZONTAL_UP
- INIT_XMM ssse3
- PRED8x8L_HORIZONTAL_UP
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- PRED8x8L_HORIZONTAL_UP
--%endif
- 
- 
- ;-----------------------------------------------------------------------------
-diff --git a/libavresample/x86/audio_convert.asm b/libavresample/x86/audio_convert.asm
-index 1d125c2..1af1429 100644
---- a/libavresample/x86/audio_convert.asm
-+++ b/libavresample/x86/audio_convert.asm
-@@ -155,10 +155,8 @@ cglobal conv_s32_to_flt, 3,3,3, dst, src, len
- 
- INIT_XMM sse2
- CONV_S32_TO_FLT
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- CONV_S32_TO_FLT
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_flt_to_s16(int16_t *dst, const float *src, int len);
-@@ -228,10 +226,8 @@ cglobal conv_flt_to_s32, 3,3,6, dst, src, len
- 
- INIT_XMM sse2
- CONV_FLT_TO_S32
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- CONV_FLT_TO_S32
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16p_to_s16_2ch(int16_t *dst, int16_t *const *src, int len,
-@@ -265,10 +261,8 @@ cglobal conv_s16p_to_s16_2ch, 3,4,5, dst, src0, len, src1
- 
- INIT_XMM sse2
- CONV_S16P_TO_S16_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16P_TO_S16_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16p_to_s16_6ch(int16_t *dst, int16_t *const *src, int len,
-@@ -388,10 +382,8 @@ INIT_XMM sse2
- CONV_S16P_TO_S16_6CH
- INIT_XMM sse2slow
- CONV_S16P_TO_S16_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16P_TO_S16_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16p_to_flt_2ch(float *dst, int16_t *const *src, int len,
-@@ -437,10 +429,8 @@ cglobal conv_s16p_to_flt_2ch, 3,4,6, dst, src0, len, src1
- 
- INIT_XMM sse2
- CONV_S16P_TO_FLT_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16P_TO_FLT_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16p_to_flt_6ch(float *dst, int16_t *const *src, int len,
-@@ -541,10 +531,8 @@ INIT_XMM sse2
- CONV_S16P_TO_FLT_6CH
- INIT_XMM ssse3
- CONV_S16P_TO_FLT_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16P_TO_FLT_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_fltp_to_s16_2ch(int16_t *dst, float *const *src, int len,
-@@ -697,10 +685,8 @@ INIT_MMX sse
- CONV_FLTP_TO_S16_6CH
- INIT_XMM sse2
- CONV_FLTP_TO_S16_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLTP_TO_S16_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_fltp_to_flt_2ch(float *dst, float *const *src, int len,
-@@ -734,10 +720,8 @@ cglobal conv_fltp_to_flt_2ch, 3,4,5, dst, src0, len, src1
- 
- INIT_XMM sse
- CONV_FLTP_TO_FLT_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLTP_TO_FLT_2CH
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len,
-@@ -815,10 +799,8 @@ INIT_MMX mmx
- CONV_FLTP_TO_FLT_6CH
- INIT_XMM sse4
- CONV_FLTP_TO_FLT_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLTP_TO_FLT_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16_to_s16p_2ch(int16_t *const *dst, int16_t *src, int len,
-@@ -864,10 +846,8 @@ INIT_XMM sse2
- CONV_S16_TO_S16P_2CH
- INIT_XMM ssse3
- CONV_S16_TO_S16P_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16_TO_S16P_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16_to_s16p_6ch(int16_t *const *dst, int16_t *src, int len,
-@@ -923,10 +903,8 @@ INIT_XMM sse2
- CONV_S16_TO_S16P_6CH
- INIT_XMM ssse3
- CONV_S16_TO_S16P_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16_TO_S16P_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16_to_fltp_2ch(float *const *dst, int16_t *src, int len,
-@@ -961,10 +939,8 @@ cglobal conv_s16_to_fltp_2ch, 3,4,5, dst0, src, len, dst1
- 
- INIT_XMM sse2
- CONV_S16_TO_FLTP_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16_TO_FLTP_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_s16_to_fltp_6ch(float *const *dst, int16_t *src, int len,
-@@ -1042,10 +1018,8 @@ INIT_XMM ssse3
- CONV_S16_TO_FLTP_6CH
- INIT_XMM sse4
- CONV_S16_TO_FLTP_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_S16_TO_FLTP_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_flt_to_s16p_2ch(int16_t *const *dst, float *src, int len,
-@@ -1088,10 +1062,8 @@ cglobal conv_flt_to_s16p_2ch, 3,4,6, dst0, src, len, dst1
- 
- INIT_XMM sse2
- CONV_FLT_TO_S16P_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLT_TO_S16P_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_flt_to_s16p_6ch(int16_t *const *dst, float *src, int len,
-@@ -1160,10 +1132,8 @@ INIT_XMM sse2
- CONV_FLT_TO_S16P_6CH
- INIT_XMM ssse3
- CONV_FLT_TO_S16P_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLT_TO_S16P_6CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_flt_to_fltp_2ch(float *const *dst, float *src, int len,
-@@ -1192,10 +1162,8 @@ cglobal conv_flt_to_fltp_2ch, 3,4,3, dst0, src, len, dst1
- 
- INIT_XMM sse
- CONV_FLT_TO_FLTP_2CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLT_TO_FLTP_2CH
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_conv_flt_to_fltp_6ch(float *const *dst, float *src, int len,
-@@ -1255,7 +1223,5 @@ cglobal conv_flt_to_fltp_6ch, 2,7,7, dst, src, dst1, dst2, dst3, dst4, dst5
- 
- INIT_XMM sse2
- CONV_FLT_TO_FLTP_6CH
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- CONV_FLT_TO_FLTP_6CH
--%endif
-diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm
-index 7f3b5b9..47c23e4 100644
---- a/libavresample/x86/audio_mix.asm
-+++ b/libavresample/x86/audio_mix.asm
-@@ -55,10 +55,8 @@ cglobal mix_2_to_1_fltp_flt, 3,4,6, src, matrix, len, src1
- 
- INIT_XMM sse
- MIX_2_TO_1_FLTP_FLT
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- MIX_2_TO_1_FLTP_FLT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void ff_mix_2_to_1_s16p_flt(int16_t **src, float **matrix, int len,
-@@ -174,10 +172,8 @@ cglobal mix_1_to_2_fltp_flt, 3,5,4, src0, matrix0, len, src1, matrix1
- 
- INIT_XMM sse
- MIX_1_TO_2_FLTP_FLT
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- MIX_1_TO_2_FLTP_FLT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void ff_mix_1_to_2_s16p_flt(int16_t **src, float **matrix, int len,
-@@ -221,10 +217,8 @@ INIT_XMM sse2
- MIX_1_TO_2_S16P_FLT
- INIT_XMM sse4
- MIX_1_TO_2_S16P_FLT
--%if HAVE_AVX_EXTERNAL
- INIT_XMM avx
- MIX_1_TO_2_S16P_FLT
--%endif
- 
- ;-----------------------------------------------------------------------------
- ; void ff_mix_3_8_to_1_2_fltp/s16p_flt(float/int16_t **src, float **matrix,
-@@ -489,7 +483,6 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, s
-     MIX_3_8_TO_1_2_FLT %%i, 1, s16p
-     MIX_3_8_TO_1_2_FLT %%i, 2, s16p
-     ; do not use ymm AVX or FMA4 in x86-32 for 6 or more channels due to stack alignment issues
--    %if HAVE_AVX_EXTERNAL
-     %if ARCH_X86_64 || %%i < 6
-     INIT_YMM avx
-     %else
-@@ -500,7 +493,6 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, s
-     INIT_XMM avx
-     MIX_3_8_TO_1_2_FLT %%i, 1, s16p
-     MIX_3_8_TO_1_2_FLT %%i, 2, s16p
--    %endif
-     %if HAVE_FMA4_EXTERNAL
-     %if ARCH_X86_64 || %%i < 6
-     INIT_YMM fma4
-diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm
-index bbc9a8b..a8857b9 100644
---- a/libavutil/x86/float_dsp.asm
-+++ b/libavutil/x86/float_dsp.asm
-@@ -44,10 +44,8 @@ ALIGN 16
- 
- INIT_XMM sse
- VECTOR_FMUL
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- VECTOR_FMUL
--%endif
- 
- ;------------------------------------------------------------------------------
- ; void ff_vector_fmac_scalar(float *dst, const float *src, float mul, int len)
-@@ -85,7 +83,5 @@ cglobal vector_fmac_scalar, 4,4,3, dst, src, mul, len
- 
- INIT_XMM sse
- VECTOR_FMAC_SCALAR
--%if HAVE_AVX_EXTERNAL
- INIT_YMM avx
- VECTOR_FMAC_SCALAR
--%endif
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0210-binkaudio-set-channel-layout.patch b/debian/patches/post-9beta2/0210-binkaudio-set-channel-layout.patch
deleted file mode 100644
index d521767..0000000
--- a/debian/patches/post-9beta2/0210-binkaudio-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From faf340f60c18c0af282570eed156ec67c1d98f6f Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:10:59 -0400
-Subject: [PATCH 210/278] binkaudio: set channel layout
-
----
- libavcodec/binkaudio.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
-index af56526..3a138e5 100644
---- a/libavcodec/binkaudio.c
-+++ b/libavcodec/binkaudio.c
-@@ -28,6 +28,7 @@
-  *  http://wiki.multimedia.cx/index.php?title=Bink_Audio
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avcodec.h"
- #define BITSTREAM_READER_LE
- #include "get_bits.h"
-@@ -87,6 +88,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
-         av_log(avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
-         return -1;
-     }
-+    avctx->channel_layout = avctx->channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                   AV_CH_LAYOUT_STEREO;
- 
-     s->version_b = avctx->extradata && avctx->extradata[3] == 'b';
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0211-configure-remove-support-for-n-flag-in-print_enabled.patch b/debian/patches/post-9beta2/0211-configure-remove-support-for-n-flag-in-print_enabled.patch
deleted file mode 100644
index 8f58ecb..0000000
--- a/debian/patches/post-9beta2/0211-configure-remove-support-for-n-flag-in-print_enabled.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9eda2a85c64e5551fd5ee47285834e7b33b48080 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Sat, 27 Oct 2012 19:11:04 +0100
-Subject: [PATCH 211/278] configure: remove support for -n flag in
- print_enabled()
-
-This flag is no longer used.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |    3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index a66a7ff..163b742 100755
---- a/configure
-+++ b/configure
-@@ -592,11 +592,10 @@ print_config(){
- }
- 
- print_enabled(){
--    test x"$1" = x-n && end=" " && shift || end="\n"
-     suf=$1
-     shift
-     for v; do
--        enabled $v && printf "%s$end" ${v%$suf};
-+        enabled $v && printf "%s\n" ${v%$suf};
-     done
- }
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0212-ppc-fix-some-unused-variable-warnings.patch b/debian/patches/post-9beta2/0212-ppc-fix-some-unused-variable-warnings.patch
deleted file mode 100644
index 510e5d3..0000000
--- a/debian/patches/post-9beta2/0212-ppc-fix-some-unused-variable-warnings.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 031aac9861dbd2d6e195f63e585cebe711db9d49 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Sat, 10 Nov 2012 13:16:29 +0000
-Subject: [PATCH 212/278] ppc: fix some unused variable warnings
-
-The third argument of OP_U8_ALTIVEC is evaluated at most once so
-there is no need for a potentially unused temporary variable.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/ppc/h264_altivec_template.c |   15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/libavcodec/ppc/h264_altivec_template.c b/libavcodec/ppc/h264_altivec_template.c
-index 0964bbe..b445f92 100644
---- a/libavcodec/ppc/h264_altivec_template.c
-+++ b/libavcodec/ppc/h264_altivec_template.c
-@@ -322,7 +322,7 @@ static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, i
-               pp1A, pp1B, pp2A, pp2B, pp3A, pp3B,
-               psumA, psumB, sumA, sumB;
- 
--    vec_u8 sum, vdst, fsum;
-+    vec_u8 sum, fsum;
- 
-     for (i = 0 ; i < 16 ; i ++) {
-         vec_u8 srcR1 = vec_ld(-2, src);
-@@ -423,9 +423,8 @@ static void PREFIX_h264_qpel16_h_lowpass_altivec(uint8_t * dst, uint8_t * src, i
-         sum = vec_packsu(sumA, sumB);
- 
-         ASSERT_ALIGNED(dst);
--        vdst = vec_ld(0, dst);
- 
--        OP_U8_ALTIVEC(fsum, sum, vdst);
-+        OP_U8_ALTIVEC(fsum, sum, vec_ld(0, dst));
- 
-         vec_st(fsum, 0, dst);
- 
-@@ -486,7 +485,7 @@ static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, i
-               srcP3ssA, srcP3ssB,
-               sum1A, sum1B, sum2A, sum2B, sum3A, sum3B;
- 
--    vec_u8 sum, vdst, fsum, srcP3a, srcP3b, srcP3;
-+    vec_u8 sum, fsum, srcP3a, srcP3b, srcP3;
- 
-     for (i = 0 ; i < 16 ; i++) {
-         srcP3a = vec_ld(0, srcbis += srcStride);
-@@ -532,9 +531,8 @@ static void PREFIX_h264_qpel16_v_lowpass_altivec(uint8_t * dst, uint8_t * src, i
-         sum = vec_packsu(sumA, sumB);
- 
-         ASSERT_ALIGNED(dst);
--        vdst = vec_ld(0, dst);
- 
--        OP_U8_ALTIVEC(fsum, sum, vdst);
-+        OP_U8_ALTIVEC(fsum, sum, vec_ld(0, dst));
- 
-         vec_st(fsum, 0, dst);
- 
-@@ -582,7 +580,7 @@ static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp,
-               pp3Ae, pp3Ao, pp3Be, pp3Bo, pp1cAe, pp1cAo, pp1cBe, pp1cBo,
-               pp32Ae, pp32Ao, pp32Be, pp32Bo, sumAe, sumAo, sumBe, sumBo,
-               ssumAe, ssumAo, ssumBe, ssumBo;
--    vec_u8 fsum, sumv, sum, vdst;
-+    vec_u8 fsum, sumv, sum;
-     vec_s16 ssume, ssumo;
- 
-     src -= (2 * srcStride);
-@@ -766,9 +764,8 @@ static void PREFIX_h264_qpel16_hv_lowpass_altivec(uint8_t * dst, int16_t * tmp,
-         sum = vec_perm(sumv, sumv, mperm);
- 
-         ASSERT_ALIGNED(dst);
--        vdst = vec_ld(0, dst);
- 
--        OP_U8_ALTIVEC(fsum, sum, vdst);
-+        OP_U8_ALTIVEC(fsum, sum, vec_ld(0, dst));
- 
-         vec_st(fsum, 0, dst);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0213-ppc-replace-pointer-casting-with-AV_COPY32.patch b/debian/patches/post-9beta2/0213-ppc-replace-pointer-casting-with-AV_COPY32.patch
deleted file mode 100644
index a60ddda..0000000
--- a/debian/patches/post-9beta2/0213-ppc-replace-pointer-casting-with-AV_COPY32.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From a384f6a7f73a8bd53046dd95a1ca0ac785d4add3 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Sat, 10 Nov 2012 13:21:52 +0000
-Subject: [PATCH 213/278] ppc: replace pointer casting with AV_COPY32
-
-This removes warnings about strict aliasing violations.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavcodec/ppc/h264_altivec.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c
-index 05a5c51..73e2adb 100644
---- a/libavcodec/ppc/h264_altivec.c
-+++ b/libavcodec/ppc/h264_altivec.c
-@@ -19,6 +19,7 @@
-  */
- 
- #include "libavutil/cpu.h"
-+#include "libavutil/intreadwrite.h"
- #include "libavutil/ppc/types_altivec.h"
- #include "libavutil/ppc/util_altivec.h"
- #include "libavcodec/dsputil.h"
-@@ -788,7 +789,7 @@ static inline vec_u8 h264_deblock_q1(register vec_u8 p0,
-     alphavec = vec_splat(alphavec, 0x0);                                                     \
-     mask = h264_deblock_mask(p0, p1, q0, q1, alphavec, betavec); /*if in block */            \
-                                                                                              \
--    *((int *)temp) = *((int *)tc0);                                                          \
-+    AV_COPY32(temp, tc0);                                                                    \
-     tc0vec = vec_ld(0, (signed char*)temp);                                                  \
-     tc0vec = vec_mergeh(tc0vec, tc0vec);                                                     \
-     tc0vec = vec_mergeh(tc0vec, tc0vec);                                                     \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0214-amr-set-channel_layout.patch b/debian/patches/post-9beta2/0214-amr-set-channel_layout.patch
deleted file mode 100644
index e8bce9d..0000000
--- a/debian/patches/post-9beta2/0214-amr-set-channel_layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 5595368bcc6df7d307876bc051f41a8c72f38ce9 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 11:07:16 -0400
-Subject: [PATCH 214/278] amr: set channel_layout
-
----
- libavformat/amr.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/amr.c b/libavformat/amr.c
-index cc4842e..ba91d7c 100644
---- a/libavformat/amr.c
-+++ b/libavformat/amr.c
-@@ -25,6 +25,8 @@ Write and read amr data according to RFC3267, http://www.ietf.org/rfc/rfc3267.tx
- Only mono files are supported.
- 
- */
-+
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- 
-@@ -97,6 +99,7 @@ static int amr_read_header(AVFormatContext *s)
-         st->codec->sample_rate = 8000;
-     }
-     st->codec->channels   = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-     avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0215-apc-set-channel-layout.patch b/debian/patches/post-9beta2/0215-apc-set-channel-layout.patch
deleted file mode 100644
index be6a2fe..0000000
--- a/debian/patches/post-9beta2/0215-apc-set-channel-layout.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 39f0e9b8c6f7d99cbf0a3c1784eb6f20bf88ac3a Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 11:25:52 -0400
-Subject: [PATCH 215/278] apc: set channel layout
-
----
- libavformat/apc.c |   12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/libavformat/apc.c b/libavformat/apc.c
-index 7ae2423..0b6c583 100644
---- a/libavformat/apc.c
-+++ b/libavformat/apc.c
-@@ -20,6 +20,8 @@
-  */
- 
- #include <string.h>
-+
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- 
- static int apc_probe(AVProbeData *p)
-@@ -58,9 +60,13 @@ static int apc_read_header(AVFormatContext *s)
-     /* initial predictor values for adpcm decoder */
-     avio_read(pb, st->codec->extradata, 2 * 4);
- 
--    st->codec->channels = 1;
--    if (avio_rl32(pb))
--        st->codec->channels = 2;
-+    if (avio_rl32(pb)) {
-+        st->codec->channels       = 2;
-+        st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+    } else {
-+        st->codec->channels       = 1;
-+        st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+    }
- 
-     st->codec->bits_per_coded_sample = 4;
-     st->codec->bit_rate = st->codec->bits_per_coded_sample * st->codec->channels
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0216-bethsoftvid-set-channel-layout.patch b/debian/patches/post-9beta2/0216-bethsoftvid-set-channel-layout.patch
deleted file mode 100644
index b74d29a..0000000
--- a/debian/patches/post-9beta2/0216-bethsoftvid-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b5d1a15d1b298f466c848c0454ef546ec135be14 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:05:36 -0400
-Subject: [PATCH 216/278] bethsoftvid: set channel layout
-
----
- libavformat/bethsoftvid.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
-index ece230c..3a102c0 100644
---- a/libavformat/bethsoftvid.c
-+++ b/libavformat/bethsoftvid.c
-@@ -27,6 +27,7 @@
-  * @see http://www.svatopluk.com/andux/docs/dfvid.html
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -239,6 +240,7 @@ static int vid_read_packet(AVFormatContext *s,
-                 st->codec->codec_type            = AVMEDIA_TYPE_AUDIO;
-                 st->codec->codec_id              = AV_CODEC_ID_PCM_U8;
-                 st->codec->channels              = 1;
-+                st->codec->channel_layout        = AV_CH_LAYOUT_MONO;
-                 st->codec->bits_per_coded_sample = 8;
-                 st->codec->sample_rate           = vid->sample_rate;
-                 st->codec->bit_rate              = 8 * st->codec->sample_rate;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0217-bfi-set-channel-layout.patch b/debian/patches/post-9beta2/0217-bfi-set-channel-layout.patch
deleted file mode 100644
index a67b232..0000000
--- a/debian/patches/post-9beta2/0217-bfi-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ff50d27a6391663be2332ec242de23131ac74034 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:06:41 -0400
-Subject: [PATCH 217/278] bfi: set channel layout
-
----
- libavformat/bfi.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/bfi.c b/libavformat/bfi.c
-index c520bea..e60bbf4 100644
---- a/libavformat/bfi.c
-+++ b/libavformat/bfi.c
-@@ -26,6 +26,7 @@
-  * @see http://wiki.multimedia.cx/index.php?title=BFI
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -96,6 +97,7 @@ static int bfi_read_header(AVFormatContext * s)
-     astream->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-     astream->codec->codec_id        = AV_CODEC_ID_PCM_U8;
-     astream->codec->channels        = 1;
-+    astream->codec->channel_layout  = AV_CH_LAYOUT_MONO;
-     astream->codec->bits_per_coded_sample = 8;
-     astream->codec->bit_rate        =
-         astream->codec->sample_rate * astream->codec->bits_per_coded_sample;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0218-bink-set-channel-layout.patch b/debian/patches/post-9beta2/0218-bink-set-channel-layout.patch
deleted file mode 100644
index 213b817..0000000
--- a/debian/patches/post-9beta2/0218-bink-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2fe804f316db5d58974d43f05299cc6d14b975ed Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:10:46 -0400
-Subject: [PATCH 218/278] bink: set channel layout
-
----
- libavformat/bink.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/bink.c b/libavformat/bink.c
-index 7254caf..5d3de14 100644
---- a/libavformat/bink.c
-+++ b/libavformat/bink.c
-@@ -28,6 +28,7 @@
-  *  http://wiki.multimedia.cx/index.php?title=Bink_Container
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -141,7 +142,13 @@ static int read_header(AVFormatContext *s)
-             flags = avio_rl16(pb);
-             ast->codec->codec_id = flags & BINK_AUD_USEDCT ?
-                                    AV_CODEC_ID_BINKAUDIO_DCT : AV_CODEC_ID_BINKAUDIO_RDFT;
--            ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1;
-+            if (flags & BINK_AUD_STEREO) {
-+                ast->codec->channels       = 2;
-+                ast->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+            } else {
-+                ast->codec->channels       = 1;
-+                ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+            }
-             ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
-             if (!ast->codec->extradata)
-                 return AVERROR(ENOMEM);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0219-bmv-set-channel-layout.patch b/debian/patches/post-9beta2/0219-bmv-set-channel-layout.patch
deleted file mode 100644
index c066027..0000000
--- a/debian/patches/post-9beta2/0219-bmv-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e8088d6e4b1255a8a5969ef925e4eb3a01f0988b Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:12:35 -0400
-Subject: [PATCH 219/278] bmv: set channel layout
-
----
- libavformat/bmv.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/bmv.c b/libavformat/bmv.c
-index fe5db3f..ce157e8 100644
---- a/libavformat/bmv.c
-+++ b/libavformat/bmv.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- 
-@@ -58,6 +59,7 @@ static int bmv_read_header(AVFormatContext *s)
-     ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-     ast->codec->codec_id        = AV_CODEC_ID_BMV_AUDIO;
-     ast->codec->channels        = 2;
-+    ast->codec->channel_layout  = AV_CH_LAYOUT_STEREO;
-     ast->codec->sample_rate     = 22050;
-     avpriv_set_pts_info(ast, 16, 1, 22050);
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0220-cdxl-set-channel-layout.patch b/debian/patches/post-9beta2/0220-cdxl-set-channel-layout.patch
deleted file mode 100644
index ca3eb56..0000000
--- a/debian/patches/post-9beta2/0220-cdxl-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0d09a5848f49d37d77980f28cde9ad1987ce1eb4 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:49:11 -0400
-Subject: [PATCH 220/278] cdxl: set channel layout
-
----
- libavformat/cdxl.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c
-index d61cbd9..a2cba52 100644
---- a/libavformat/cdxl.c
-+++ b/libavformat/cdxl.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/parseutils.h"
- #include "libavutil/opt.h"
-@@ -101,7 +102,13 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
-             st->codec->codec_type    = AVMEDIA_TYPE_AUDIO;
-             st->codec->codec_tag     = 0;
-             st->codec->codec_id      = AV_CODEC_ID_PCM_S8;
--            st->codec->channels      = cdxl->header[1] & 0x10 ? 2 : 1;
-+            if (cdxl->header[1] & 0x10) {
-+                st->codec->channels       = 2;
-+                st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+            } else {
-+                st->codec->channels       = 1;
-+                st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+            }
-             st->codec->sample_rate   = cdxl->sample_rate;
-             st->start_time           = 0;
-             cdxl->audio_stream_index = st->index;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0221-daud-set-channel-layout.patch b/debian/patches/post-9beta2/0221-daud-set-channel-layout.patch
deleted file mode 100644
index e8392ea..0000000
--- a/debian/patches/post-9beta2/0221-daud-set-channel-layout.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a05a63785c4769a1f3c3cddcc876c5acb6cf4c83 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:55:12 -0400
-Subject: [PATCH 221/278] daud: set channel layout
-
-Update FATE reference due to WAVE channel mask now being set correctly.
----
- libavformat/daud.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/daud.c b/libavformat/daud.c
-index dda83f9..3ceb958 100644
---- a/libavformat/daud.c
-+++ b/libavformat/daud.c
-@@ -18,6 +18,8 @@
-  * License along with Libav; if not, write to the Free Software
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
-+
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- 
- static int daud_header(AVFormatContext *s) {
-@@ -28,6 +30,7 @@ static int daud_header(AVFormatContext *s) {
-     st->codec->codec_id = AV_CODEC_ID_PCM_S24DAUD;
-     st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
-     st->codec->channels = 6;
-+    st->codec->channel_layout = AV_CH_LAYOUT_5POINT1;
-     st->codec->sample_rate = 96000;
-     st->codec->bit_rate = 3 * 6 * 96000 * 8;
-     st->codec->block_align = 3 * 6;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0222-dsicin-set-channel-layout.patch b/debian/patches/post-9beta2/0222-dsicin-set-channel-layout.patch
deleted file mode 100644
index c1a191f..0000000
--- a/debian/patches/post-9beta2/0222-dsicin-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 49e7af06f2fc68c9031cf7b67fe1cba066e2ace2 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:56:51 -0400
-Subject: [PATCH 222/278] dsicin: set channel layout
-
----
- libavformat/dsicin.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
-index 8cba461..ecc8c0b 100644
---- a/libavformat/dsicin.c
-+++ b/libavformat/dsicin.c
-@@ -24,6 +24,7 @@
-  * Delphine Software International CIN file demuxer
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -131,6 +132,7 @@ static int cin_read_header(AVFormatContext *s)
-     st->codec->codec_id = AV_CODEC_ID_DSICINAUDIO;
-     st->codec->codec_tag = 0;  /* no tag */
-     st->codec->channels = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->sample_rate = 22050;
-     st->codec->bits_per_coded_sample = 8;
-     st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0223-dv-set-channel-layout.patch b/debian/patches/post-9beta2/0223-dv-set-channel-layout.patch
deleted file mode 100644
index 9cc0c34..0000000
--- a/debian/patches/post-9beta2/0223-dv-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d5ca70b10302b47c70c6bc25400125b30d2ef619 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 12:59:32 -0400
-Subject: [PATCH 223/278] dv: set channel layout
-
----
- libavformat/dv.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/dv.c b/libavformat/dv.c
-index 5ce73f7..1730972 100644
---- a/libavformat/dv.c
-+++ b/libavformat/dv.c
-@@ -33,6 +33,7 @@
- #include "internal.h"
- #include "libavcodec/dv_profile.h"
- #include "libavcodec/dvdata.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/mathematics.h"
- #include "dv.h"
-@@ -246,6 +247,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
-         }
-         c->ast[i]->codec->sample_rate = dv_audio_frequency[freq];
-         c->ast[i]->codec->channels    = 2;
-+        c->ast[i]->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-         c->ast[i]->codec->bit_rate    = 2 * dv_audio_frequency[freq] * 16;
-         c->ast[i]->start_time         = 0;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0224-flvdec-set-channel-layout.patch b/debian/patches/post-9beta2/0224-flvdec-set-channel-layout.patch
deleted file mode 100644
index 4451852..0000000
--- a/debian/patches/post-9beta2/0224-flvdec-set-channel-layout.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 644d8d2e5abcad4e6cd2d5761b4f97813fbda96f Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 13:31:40 -0400
-Subject: [PATCH 224/278] flvdec: set channel layout
-
----
- libavformat/flvdec.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
-index 868cc6b..7d5ea56 100644
---- a/libavformat/flvdec.c
-+++ b/libavformat/flvdec.c
-@@ -25,6 +25,7 @@
-  */
- 
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/dict.h"
- #include "libavutil/opt.h"
- #include "libavutil/intfloat.h"
-@@ -749,6 +750,8 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
-         bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
-         if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample) {
-             st->codec->channels              = channels;
-+            st->codec->channel_layout        = channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                               AV_CH_LAYOUT_STEREO;
-             st->codec->sample_rate           = sample_rate;
-             st->codec->bits_per_coded_sample = bits_per_coded_sample;
-         }
-@@ -794,6 +797,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
-                 avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
-                                              st->codec->extradata_size * 8, 1);
-                 st->codec->channels = cfg.channels;
-+                st->codec->channel_layout = 0;
-                 if (cfg.ext_sample_rate)
-                     st->codec->sample_rate = cfg.ext_sample_rate;
-                 else
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0225-gsmdec-set-channel-layout.patch b/debian/patches/post-9beta2/0225-gsmdec-set-channel-layout.patch
deleted file mode 100644
index 09ee1ce..0000000
--- a/debian/patches/post-9beta2/0225-gsmdec-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From d4a105ae5c1b0c6118872c8b729c3ac751281ed0 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 13:51:42 -0400
-Subject: [PATCH 225/278] gsmdec: set channel layout
-
----
- libavformat/gsmdec.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/gsmdec.c b/libavformat/gsmdec.c
-index f0cb279..f9ecbaf 100644
---- a/libavformat/gsmdec.c
-+++ b/libavformat/gsmdec.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/mathematics.h"
- #include "libavutil/opt.h"
- #include "avformat.h"
-@@ -64,6 +65,7 @@ static int gsm_read_header(AVFormatContext *s)
-     st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-     st->codec->codec_id    = s->iformat->raw_codec_id;
-     st->codec->channels    = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->sample_rate = c->sample_rate;
-     st->codec->bit_rate    = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0226-gxfdec-set-channel-layout-when-applicable.patch b/debian/patches/post-9beta2/0226-gxfdec-set-channel-layout-when-applicable.patch
deleted file mode 100644
index 2fa5944..0000000
--- a/debian/patches/post-9beta2/0226-gxfdec-set-channel-layout-when-applicable.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From f6c3adde41921082964055193efbcf58195bf457 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 14:00:04 -0400
-Subject: [PATCH 226/278] gxfdec: set channel layout when applicable
-
----
- libavformat/gxf.c |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/libavformat/gxf.c b/libavformat/gxf.c
-index 2593c06..6feb3c3 100644
---- a/libavformat/gxf.c
-+++ b/libavformat/gxf.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/common.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -119,6 +120,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
-             st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-             st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
-             st->codec->channels = 1;
-+            st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-             st->codec->sample_rate = 48000;
-             st->codec->bit_rate = 3 * 1 * 48000 * 8;
-             st->codec->block_align = 3 * 1;
-@@ -128,6 +130,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
-             st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-             st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
-             st->codec->channels = 1;
-+            st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-             st->codec->sample_rate = 48000;
-             st->codec->bit_rate = 2 * 1 * 48000 * 8;
-             st->codec->block_align = 2 * 1;
-@@ -137,6 +140,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
-             st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-             st->codec->codec_id = AV_CODEC_ID_AC3;
-             st->codec->channels = 2;
-+            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-             st->codec->sample_rate = 48000;
-             break;
-         // timecode tracks:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0227-idroqdec-set-channel-layout.patch b/debian/patches/post-9beta2/0227-idroqdec-set-channel-layout.patch
deleted file mode 100644
index cf8eb30..0000000
--- a/debian/patches/post-9beta2/0227-idroqdec-set-channel-layout.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 73e2007f3d435dec6a5ddb6a47e706cc419eb7cd Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 14:03:43 -0400
-Subject: [PATCH 227/278] idroqdec: set channel layout
-
----
- libavformat/idroqdec.c |   10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
-index 521f586..eeaafec 100644
---- a/libavformat/idroqdec.c
-+++ b/libavformat/idroqdec.c
-@@ -27,6 +27,7 @@
-  *   http://www.csse.monash.edu.au/~timf/
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -175,7 +176,14 @@ static int roq_read_packet(AVFormatContext *s,
-                 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-                 st->codec->codec_id = AV_CODEC_ID_ROQ_DPCM;
-                 st->codec->codec_tag = 0;  /* no tag */
--                st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;
-+                if (chunk_type == RoQ_SOUND_STEREO) {
-+                    st->codec->channels       = 2;
-+                    st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+                } else {
-+                    st->codec->channels       = 1;
-+                    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+                }
-+                roq->audio_channels    = st->codec->channels;
-                 st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;
-                 st->codec->bits_per_coded_sample = 16;
-                 st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0228-iff-set-channel-layout.patch b/debian/patches/post-9beta2/0228-iff-set-channel-layout.patch
deleted file mode 100644
index d8a8df9..0000000
--- a/debian/patches/post-9beta2/0228-iff-set-channel-layout.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 024e03701c706d3976348b9f50a1af7db2137a39 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 14:05:45 -0400
-Subject: [PATCH 228/278] iff: set channel layout
-
----
- libavformat/iff.c |   10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/iff.c b/libavformat/iff.c
-index c2bc283..ab22e11 100644
---- a/libavformat/iff.c
-+++ b/libavformat/iff.c
-@@ -29,6 +29,7 @@
-  * http://wiki.multimedia.cx/index.php?title=IFF
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/dict.h"
- #include "avformat.h"
-@@ -120,6 +121,7 @@ static int iff_read_header(AVFormatContext *s)
-         return AVERROR(ENOMEM);
- 
-     st->codec->channels = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     avio_skip(pb, 8);
-     // codec_tag used by ByteRun1 decoder to distinguish progressive (PBM) and interlaced (ILBM) content
-     st->codec->codec_tag = avio_rl32(pb);
-@@ -154,7 +156,13 @@ static int iff_read_header(AVFormatContext *s)
-         case ID_CHAN:
-             if (data_size < 4)
-                 return AVERROR_INVALIDDATA;
--            st->codec->channels = (avio_rb32(pb) < 6) ? 1 : 2;
-+            if (avio_rb32(pb) < 6) {
-+                st->codec->channels       = 1;
-+                st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+            } else {
-+                st->codec->channels       = 2;
-+                st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+            }
-             break;
- 
-         case ID_CMAP:
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0229-ipmovie-set-channel-layout.patch b/debian/patches/post-9beta2/0229-ipmovie-set-channel-layout.patch
deleted file mode 100644
index fabb82d..0000000
--- a/debian/patches/post-9beta2/0229-ipmovie-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 41a2d9590d89c3f240b1ef875649852197d945eb Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 16:44:46 -0400
-Subject: [PATCH 229/278] ipmovie: set channel layout
-
----
- libavformat/ipmovie.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
-index b567fb2..60ae939 100644
---- a/libavformat/ipmovie.c
-+++ b/libavformat/ipmovie.c
-@@ -32,6 +32,7 @@
-  * up and sending out the chunks.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -600,6 +601,8 @@ static int ipmovie_read_header(AVFormatContext *s)
-         st->codec->codec_id = ipmovie->audio_type;
-         st->codec->codec_tag = 0;  /* no tag */
-         st->codec->channels = ipmovie->audio_channels;
-+        st->codec->channel_layout = st->codec->channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                               AV_CH_LAYOUT_STEREO;
-         st->codec->sample_rate = ipmovie->audio_sample_rate;
-         st->codec->bits_per_coded_sample = ipmovie->audio_bits;
-         st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0230-iss-set-channel-layout.patch b/debian/patches/post-9beta2/0230-iss-set-channel-layout.patch
deleted file mode 100644
index 8c320bc..0000000
--- a/debian/patches/post-9beta2/0230-iss-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 43711312831504c42d2db3bbeafc893883bee911 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 16:45:48 -0400
-Subject: [PATCH 230/278] iss: set channel layout
-
----
- libavformat/iss.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/iss.c b/libavformat/iss.c
-index 14f64d2..3f7f4fe 100644
---- a/libavformat/iss.c
-+++ b/libavformat/iss.c
-@@ -26,6 +26,7 @@
-  * @see http://wiki.multimedia.cx/index.php?title=FunCom_ISS
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- #include "libavutil/avstring.h"
-@@ -94,7 +95,13 @@ static av_cold int iss_read_header(AVFormatContext *s)
-         return AVERROR(ENOMEM);
-     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-     st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_ISS;
--    st->codec->channels = stereo ? 2 : 1;
-+    if (stereo) {
-+        st->codec->channels       = 2;
-+        st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+    } else {
-+        st->codec->channels       = 1;
-+        st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+    }
-     st->codec->sample_rate = 44100;
-     if(rate_divisor > 0)
-          st->codec->sample_rate /= rate_divisor;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0231-jvdec-set-channel-layout.patch b/debian/patches/post-9beta2/0231-jvdec-set-channel-layout.patch
deleted file mode 100644
index b4e7856..0000000
--- a/debian/patches/post-9beta2/0231-jvdec-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 16:47:15 -0400
-Subject: [PATCH 231/278] jvdec: set channel layout
-
----
- libavformat/jvdec.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
-index 47a6142..cf9df8c 100644
---- a/libavformat/jvdec.c
-+++ b/libavformat/jvdec.c
-@@ -25,6 +25,7 @@
-  * @author Peter Ross <pross at xvid.org>
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -91,6 +92,7 @@ static int read_header(AVFormatContext *s)
-     ast->codec->codec_tag   = 0; /* no fourcc */
-     ast->codec->sample_rate = avio_rl16(pb);
-     ast->codec->channels    = 1;
-+    ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
- 
-     avio_skip(pb, 10);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0232-mm-set-channel-layout.patch b/debian/patches/post-9beta2/0232-mm-set-channel-layout.patch
deleted file mode 100644
index 5eba1c9..0000000
--- a/debian/patches/post-9beta2/0232-mm-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 87199d34db5d79ad85c0801b29db0709c08f458c Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 16:52:57 -0400
-Subject: [PATCH 232/278] mm: set channel layout
-
----
- libavformat/mm.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mm.c b/libavformat/mm.c
-index 13f33a2..83539fa 100644
---- a/libavformat/mm.c
-+++ b/libavformat/mm.c
-@@ -31,6 +31,7 @@
-  *  http://wiki.multimedia.cx/index.php?title=American_Laser_Games_MM
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -124,6 +125,7 @@ static int read_header(AVFormatContext *s)
-         st->codec->codec_tag = 0; /* no fourcc */
-         st->codec->codec_id = AV_CODEC_ID_PCM_U8;
-         st->codec->channels = 1;
-+        st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-         st->codec->sample_rate = 8000;
-         avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0233-mmf-set-channel-layout.patch b/debian/patches/post-9beta2/0233-mmf-set-channel-layout.patch
deleted file mode 100644
index 06c46e1..0000000
--- a/debian/patches/post-9beta2/0233-mmf-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f24b0b1b6cc3357637570d28f9a9fa285bec1770 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 16:56:48 -0400
-Subject: [PATCH 233/278] mmf: set channel layout
-
----
- libavformat/mmf.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/mmf.c b/libavformat/mmf.c
-index 06d4a2b..20570f2 100644
---- a/libavformat/mmf.c
-+++ b/libavformat/mmf.c
-@@ -18,6 +18,8 @@
-  * License along with Libav; if not, write to the Free Software
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
-+
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- #include "avio_internal.h"
-@@ -249,6 +251,7 @@ static int mmf_read_header(AVFormatContext *s)
-     st->codec->codec_id = AV_CODEC_ID_ADPCM_YAMAHA;
-     st->codec->sample_rate = rate;
-     st->codec->channels = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->bits_per_coded_sample = 4;
-     st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0234-mpc7-set-channel-layout.patch b/debian/patches/post-9beta2/0234-mpc7-set-channel-layout.patch
deleted file mode 100644
index 9971c7e..0000000
--- a/debian/patches/post-9beta2/0234-mpc7-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f6c6e5aac12edd02f5c62e2efa0d8f5af161eb88 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:03:19 -0400
-Subject: [PATCH 234/278] mpc7: set channel layout
-
----
- libavformat/mpc.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mpc.c b/libavformat/mpc.c
-index fbf8e92..5e771ae 100644
---- a/libavformat/mpc.c
-+++ b/libavformat/mpc.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavcodec/get_bits.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -91,6 +92,7 @@ static int mpc_read_header(AVFormatContext *s)
-     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-     st->codec->codec_id = AV_CODEC_ID_MUSEPACK7;
-     st->codec->channels = 2;
-+    st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-     st->codec->bits_per_coded_sample = 16;
- 
-     st->codec->extradata_size = 16;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0235-mvi-set-channel-layout.patch b/debian/patches/post-9beta2/0235-mvi-set-channel-layout.patch
deleted file mode 100644
index fbe9115..0000000
--- a/debian/patches/post-9beta2/0235-mvi-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 66d7ceb4aa0a17c72de9a63748953d53a1e95a12 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:17:19 -0400
-Subject: [PATCH 235/278] mvi: set channel layout
-
----
- libavformat/mvi.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mvi.c b/libavformat/mvi.c
-index c5aee5a..10ec8bb 100644
---- a/libavformat/mvi.c
-+++ b/libavformat/mvi.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- 
-@@ -81,6 +82,7 @@ static int read_header(AVFormatContext *s)
-     ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-     ast->codec->codec_id        = AV_CODEC_ID_PCM_U8;
-     ast->codec->channels        = 1;
-+    ast->codec->channel_layout  = AV_CH_LAYOUT_MONO;
-     ast->codec->bits_per_coded_sample = 8;
-     ast->codec->bit_rate        = ast->codec->sample_rate * 8;
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0236-mxg-set-channel-layout.patch b/debian/patches/post-9beta2/0236-mxg-set-channel-layout.patch
deleted file mode 100644
index 5ce077b..0000000
--- a/debian/patches/post-9beta2/0236-mxg-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From cc57228e31ace7ab112b7fd86b31cc11dfb405f0 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:22:05 -0400
-Subject: [PATCH 236/278] mxg: set channel layout
-
----
- libavformat/mxg.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/mxg.c b/libavformat/mxg.c
-index 09653ee..8959134 100644
---- a/libavformat/mxg.c
-+++ b/libavformat/mxg.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavcodec/mjpeg.h"
- #include "avformat.h"
-@@ -56,6 +57,7 @@ static int mxg_read_header(AVFormatContext *s)
-     audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-     audio_st->codec->codec_id = AV_CODEC_ID_PCM_ALAW;
-     audio_st->codec->channels = 1;
-+    audio_st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     audio_st->codec->sample_rate = 8000;
-     audio_st->codec->bits_per_coded_sample = 8;
-     audio_st->codec->block_align = 1;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0237-nuv-set-channel-layout.patch b/debian/patches/post-9beta2/0237-nuv-set-channel-layout.patch
deleted file mode 100644
index 28c273a..0000000
--- a/debian/patches/post-9beta2/0237-nuv-set-channel-layout.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 232e9c4c4bed38d54c9c55efb8ffc2b12d55b427 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:35:20 -0400
-Subject: [PATCH 237/278] nuv: set channel layout
-
----
- libavformat/nuv.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/nuv.c b/libavformat/nuv.c
-index fce96b4..2cbf348 100644
---- a/libavformat/nuv.c
-+++ b/libavformat/nuv.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/intfloat.h"
- #include "avformat.h"
-@@ -99,6 +100,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
-                     ast->codec->sample_rate = avio_rl32(pb);
-                     ast->codec->bits_per_coded_sample = avio_rl32(pb);
-                     ast->codec->channels = avio_rl32(pb);
-+                    ast->codec->channel_layout = 0;
-                     ast->codec->codec_id =
-                         ff_wav_codec_get_id(ast->codec->codec_tag,
-                                          ast->codec->bits_per_coded_sample);
-@@ -179,6 +181,7 @@ static int nuv_header(AVFormatContext *s) {
-         ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-         ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
-         ast->codec->channels = 2;
-+        ast->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-         ast->codec->sample_rate = 44100;
-         ast->codec->bit_rate = 2 * 2 * 44100 * 8;
-         ast->codec->block_align = 2 * 2;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0238-oggparsespeex-validate-channel-count-and-set-channel.patch b/debian/patches/post-9beta2/0238-oggparsespeex-validate-channel-count-and-set-channel.patch
deleted file mode 100644
index 5b39899..0000000
--- a/debian/patches/post-9beta2/0238-oggparsespeex-validate-channel-count-and-set-channel.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From d4088efbe22f2e4f8fc10d63bb50835779a702be Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:39:30 -0400
-Subject: [PATCH 238/278] oggparsespeex: validate channel count and set
- channel layout
-
----
- libavformat/oggparsespeex.c |    7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
-index 11b50d5..42480a3 100644
---- a/libavformat/oggparsespeex.c
-+++ b/libavformat/oggparsespeex.c
-@@ -25,6 +25,7 @@
- #include <stdlib.h>
- #include "libavutil/bswap.h"
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavcodec/get_bits.h"
- #include "libavcodec/bytestream.h"
- #include "avformat.h"
-@@ -59,6 +60,12 @@ static int speex_header(AVFormatContext *s, int idx) {
- 
-         st->codec->sample_rate = AV_RL32(p + 36);
-         st->codec->channels = AV_RL32(p + 48);
-+        if (st->codec->channels < 1 || st->codec->channels > 2) {
-+            av_log(s, AV_LOG_ERROR, "invalid channel count. Speex must be mono or stereo.\n");
-+            return AVERROR_INVALIDDATA;
-+        }
-+        st->codec->channel_layout = st->codec->channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                               AV_CH_LAYOUT_STEREO;
- 
-         spxp->packet_size  = AV_RL32(p + 56);
-         frames_per_packet  = AV_RL32(p + 64);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0239-omadec-set-channel-layout.patch b/debian/patches/post-9beta2/0239-omadec-set-channel-layout.patch
deleted file mode 100644
index a13bfef..0000000
--- a/debian/patches/post-9beta2/0239-omadec-set-channel-layout.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c9759eb426ea997822bf5e6cc43bb24b249e9e25 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:53:39 -0400
-Subject: [PATCH 239/278] omadec: set channel layout
-
----
- libavformat/omadec.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/omadec.c b/libavformat/omadec.c
-index 022942d..9b22999 100644
---- a/libavformat/omadec.c
-+++ b/libavformat/omadec.c
-@@ -40,6 +40,7 @@
-  * CODEC SUPPORT: Only ATRAC3 codec is currently supported!
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- #include "libavutil/intreadwrite.h"
-@@ -312,6 +313,7 @@ static int oma_read_header(AVFormatContext *s)
-             framesize = (codec_params & 0x3FF) * 8;
-             jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */
-             st->codec->channels    = 2;
-+            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-             st->codec->sample_rate = samplerate;
-             st->codec->bit_rate    = st->codec->sample_rate * framesize * 8 / 1024;
- 
-@@ -346,6 +348,7 @@ static int oma_read_header(AVFormatContext *s)
-         case OMA_CODECID_LPCM:
-             /* PCM 44.1 kHz 16 bit stereo big-endian */
-             st->codec->channels = 2;
-+            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-             st->codec->sample_rate = 44100;
-             framesize = 1024;
-             /* bit rate = sample rate x PCM block align (= 4) x 8 */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0240-psxstr-set-channel-layout.patch b/debian/patches/post-9beta2/0240-psxstr-set-channel-layout.patch
deleted file mode 100644
index 87908d0..0000000
--- a/debian/patches/post-9beta2/0240-psxstr-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b5e3e77711c6a4bef8b343d4d419e7ca67425fbc Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:56:19 -0400
-Subject: [PATCH 240/278] psxstr: set channel layout
-
----
- libavformat/psxstr.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
-index 800d9cb..633d61d 100644
---- a/libavformat/psxstr.c
-+++ b/libavformat/psxstr.c
-@@ -29,6 +29,7 @@
-  * RIFF headers, followed by CD sectors.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -219,7 +220,13 @@ static int str_read_packet(AVFormatContext *s,
-                 st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-                 st->codec->codec_id    = AV_CODEC_ID_ADPCM_XA;
-                 st->codec->codec_tag   = 0;  /* no fourcc */
--                st->codec->channels    = (fmt&1)?2:1;
-+                if (fmt & 1) {
-+                    st->codec->channels       = 2;
-+                    st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+                } else {
-+                    st->codec->channels       = 1;
-+                    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+                }
-                 st->codec->sample_rate = (fmt&4)?18900:37800;
-             //    st->codec->bit_rate = 0; //FIXME;
-                 st->codec->block_align = 128;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0241-qcp-set-channel-layout.patch b/debian/patches/post-9beta2/0241-qcp-set-channel-layout.patch
deleted file mode 100644
index 2960d46..0000000
--- a/debian/patches/post-9beta2/0241-qcp-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 444b79c18acc057082a2fbdd8d0bedefafbea5fd Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 17:57:25 -0400
-Subject: [PATCH 241/278] qcp: set channel layout
-
----
- libavformat/qcp.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/qcp.c b/libavformat/qcp.c
-index bde5990..30d362f 100644
---- a/libavformat/qcp.c
-+++ b/libavformat/qcp.c
-@@ -27,6 +27,7 @@
-  *     http://tools.ietf.org/html/rfc3625
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- 
-@@ -96,6 +97,7 @@ static int qcp_read_header(AVFormatContext *s)
- 
-     st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-     st->codec->channels   = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     avio_read(pb, buf, 16);
-     if (is_qcelp_13k_guid(buf)) {
-         st->codec->codec_id = AV_CODEC_ID_QCELP;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0242-rmdec-set-channel-layout-for-RA-version-3.patch b/debian/patches/post-9beta2/0242-rmdec-set-channel-layout-for-RA-version-3.patch
deleted file mode 100644
index 747f764..0000000
--- a/debian/patches/post-9beta2/0242-rmdec-set-channel-layout-for-RA-version-3.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 60a585304c285f44a233a4721238d5ad81697627 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:01:27 -0400
-Subject: [PATCH 242/278] rmdec: set channel layout for RA version 3
-
----
- libavformat/rmdec.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
-index 07d218e..aff21fb 100644
---- a/libavformat/rmdec.c
-+++ b/libavformat/rmdec.c
-@@ -20,6 +20,7 @@
-  */
- 
- #include "libavutil/avstring.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/dict.h"
- #include "avformat.h"
-@@ -140,6 +141,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
-             avio_skip(pb, header_size + startpos - avio_tell(pb));
-         st->codec->sample_rate = 8000;
-         st->codec->channels = 1;
-+        st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-         st->codec->codec_id = AV_CODEC_ID_RA_144;
-         ast->deint_id = DEINT_ID_INT0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0243-rsodec-set-channel-layout.patch b/debian/patches/post-9beta2/0243-rsodec-set-channel-layout.patch
deleted file mode 100644
index 570c6b2..0000000
--- a/debian/patches/post-9beta2/0243-rsodec-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ce842029ce97ea3eb49854fc71ad288246eb76d1 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:18:37 -0400
-Subject: [PATCH 243/278] rsodec: set channel layout
-
----
- libavformat/rsodec.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
-index f5bcebb..c3016ca 100644
---- a/libavformat/rsodec.c
-+++ b/libavformat/rsodec.c
-@@ -20,6 +20,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -63,6 +64,7 @@ static int rso_read_header(AVFormatContext *s)
-     st->codec->codec_tag    = id;
-     st->codec->codec_id     = codec;
-     st->codec->channels     = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->sample_rate  = rate;
- 
-     avpriv_set_pts_info(st, 64, 1, rate);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0244-rtpdec_amr-set-channel-layout.patch b/debian/patches/post-9beta2/0244-rtpdec_amr-set-channel-layout.patch
deleted file mode 100644
index 33d1cf2..0000000
--- a/debian/patches/post-9beta2/0244-rtpdec_amr-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c1ac602d53ab250fd1ef37867e18191c55cc5e4f Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:24:45 -0400
-Subject: [PATCH 244/278] rtpdec_amr: set channel layout
-
----
- libavformat/rtpdec_amr.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
-index cc43e31..1e60287 100644
---- a/libavformat/rtpdec_amr.c
-+++ b/libavformat/rtpdec_amr.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "rtpdec_formats.h"
- #include "libavutil/avstring.h"
-@@ -77,6 +78,7 @@ static int amr_handle_packet(AVFormatContext *ctx,
-         av_log(ctx, AV_LOG_ERROR, "Only mono AMR is supported\n");
-         return AVERROR_INVALIDDATA;
-     }
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
- 
-     /* The AMR RTP packet consists of one header byte, followed
-      * by one TOC byte for each AMR frame in the packet, followed
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0245-sierravmd-set-channel-layout.patch b/debian/patches/post-9beta2/0245-sierravmd-set-channel-layout.patch
deleted file mode 100644
index 875f9ff..0000000
--- a/debian/patches/post-9beta2/0245-sierravmd-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a634896cf81b8d057a526d6ad24eb9bdfe46a855 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:32:13 -0400
-Subject: [PATCH 245/278] sierravmd: set channel layout
-
----
- libavformat/sierravmd.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
-index 6490fdd..359282c 100644
---- a/libavformat/sierravmd.c
-+++ b/libavformat/sierravmd.c
-@@ -27,6 +27,7 @@
-  *   http://www.pcisys.net/~melanson/codecs/
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -132,7 +133,13 @@ static int vmd_read_header(AVFormatContext *s)
-         st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-         st->codec->codec_id = AV_CODEC_ID_VMDAUDIO;
-         st->codec->codec_tag = 0;  /* no fourcc */
--        st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;
-+        if (vmd->vmd_header[811] & 0x80) {
-+            st->codec->channels       = 2;
-+            st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+        } else {
-+            st->codec->channels       = 1;
-+            st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+        }
-         st->codec->sample_rate = vmd->sample_rate;
-         st->codec->block_align = AV_RL16(&vmd->vmd_header[806]);
-         if (st->codec->block_align & 0x8000) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0246-siff-set-channel-layout.patch b/debian/patches/post-9beta2/0246-siff-set-channel-layout.patch
deleted file mode 100644
index c60aa9b..0000000
--- a/debian/patches/post-9beta2/0246-siff-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 57e590e4b8b94238800b36695f07d5cf4a4832ac Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:36:08 -0400
-Subject: [PATCH 246/278] siff: set channel layout
-
----
- libavformat/siff.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/siff.c b/libavformat/siff.c
-index 02af80b..8ba7c60 100644
---- a/libavformat/siff.c
-+++ b/libavformat/siff.c
-@@ -19,6 +19,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -78,6 +79,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
-     ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
-     ast->codec->codec_id        = AV_CODEC_ID_PCM_U8;
-     ast->codec->channels        = 1;
-+    ast->codec->channel_layout  = AV_CH_LAYOUT_MONO;
-     ast->codec->bits_per_coded_sample = 8;
-     ast->codec->sample_rate     = c->rate;
-     avpriv_set_pts_info(ast, 16, 1, c->rate);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0247-smacker-set-channel-layout.patch b/debian/patches/post-9beta2/0247-smacker-set-channel-layout.patch
deleted file mode 100644
index feaf852..0000000
--- a/debian/patches/post-9beta2/0247-smacker-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bfccd76adb514f6bf3dd4bf7f429ca58000f513e Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:36:49 -0400
-Subject: [PATCH 247/278] smacker: set channel layout
-
----
- libavformat/smacker.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/smacker.c b/libavformat/smacker.c
-index dcca1af..17c7c52 100644
---- a/libavformat/smacker.c
-+++ b/libavformat/smacker.c
-@@ -24,6 +24,7 @@
-  */
- 
- #include "libavutil/bswap.h"
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -191,7 +192,13 @@ static int smacker_read_header(AVFormatContext *s)
-             } else {
-                 ast[i]->codec->codec_id = AV_CODEC_ID_PCM_U8;
-             }
--            ast[i]->codec->channels = (smk->aflags[i] & SMK_AUD_STEREO) ? 2 : 1;
-+            if (smk->aflags[i] & SMK_AUD_STEREO) {
-+                ast[i]->codec->channels       = 2;
-+                ast[i]->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+            } else {
-+                ast[i]->codec->channels       = 1;
-+                ast[i]->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+            }
-             ast[i]->codec->sample_rate = smk->rates[i];
-             ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8;
-             if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == AV_CODEC_ID_PCM_U8)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0248-sol-set-channel-layout.patch b/debian/patches/post-9beta2/0248-sol-set-channel-layout.patch
deleted file mode 100644
index 62861c1..0000000
--- a/debian/patches/post-9beta2/0248-sol-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1c7587728c81fcb8209ae079a1bc0ccc6b03b4c2 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:38:29 -0400
-Subject: [PATCH 248/278] sol: set channel layout
-
----
- libavformat/sol.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/sol.c b/libavformat/sol.c
-index da84600..92599b1 100644
---- a/libavformat/sol.c
-+++ b/libavformat/sol.c
-@@ -23,6 +23,7 @@
-  * Based on documents from Game Audio Player and own research
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -116,6 +117,8 @@ static int sol_read_header(AVFormatContext *s)
-     st->codec->codec_tag = id;
-     st->codec->codec_id = codec;
-     st->codec->channels = channels;
-+    st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                AV_CH_LAYOUT_STEREO;
-     st->codec->sample_rate = rate;
-     avpriv_set_pts_info(st, 64, 1, rate);
-     return 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0249-swfdec-set-channel-layout.patch b/debian/patches/post-9beta2/0249-swfdec-set-channel-layout.patch
deleted file mode 100644
index 2373784..0000000
--- a/debian/patches/post-9beta2/0249-swfdec-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a3949fe11fc73ef45f87ec045cc2c0a6f19a4052 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:42:26 -0400
-Subject: [PATCH 249/278] swfdec: set channel layout
-
----
- libavformat/swfdec.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
-index ff44452..f105c14 100644
---- a/libavformat/swfdec.c
-+++ b/libavformat/swfdec.c
-@@ -20,6 +20,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "swf.h"
- 
-@@ -139,7 +140,13 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
-             if (!ast)
-                 return -1;
-             ast->id = -1; /* -1 to avoid clash with video stream ch_id */
--            ast->codec->channels = 1 + (v&1);
-+            if (v & 1) {
-+                ast->codec->channels       = 2;
-+                ast->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+            } else {
-+                ast->codec->channels       = 1;
-+                ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+            }
-             ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
-             ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
-             ast->need_parsing = AVSTREAM_PARSE_FULL;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0250-tiertexseq-set-channel-layout.patch b/debian/patches/post-9beta2/0250-tiertexseq-set-channel-layout.patch
deleted file mode 100644
index 53e374d..0000000
--- a/debian/patches/post-9beta2/0250-tiertexseq-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7f348bd764e1ff85054f1da5291f18c0e7f8f39b Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:44:20 -0400
-Subject: [PATCH 250/278] tiertexseq: set channel layout
-
----
- libavformat/tiertexseq.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
-index 5582890..45300f9 100644
---- a/libavformat/tiertexseq.c
-+++ b/libavformat/tiertexseq.c
-@@ -24,6 +24,7 @@
-  * Tiertex Limited SEQ file demuxer
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "avformat.h"
- #include "internal.h"
- 
-@@ -231,6 +232,7 @@ static int seq_read_header(AVFormatContext *s)
-     st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
-     st->codec->codec_tag = 0;  /* no tag */
-     st->codec->channels = 1;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->sample_rate = SEQ_SAMPLE_RATE;
-     st->codec->bits_per_coded_sample = 16;
-     st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0251-tmv-set-channel-layout.patch b/debian/patches/post-9beta2/0251-tmv-set-channel-layout.patch
deleted file mode 100644
index 4402d1a..0000000
--- a/debian/patches/post-9beta2/0251-tmv-set-channel-layout.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a94b0267f2e12861b6f78388cdeba29f1240be48 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:45:49 -0400
-Subject: [PATCH 251/278] tmv: set channel layout
-
----
- libavformat/tmv.c |    9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/libavformat/tmv.c b/libavformat/tmv.c
-index 100e12f..103ac4a 100644
---- a/libavformat/tmv.c
-+++ b/libavformat/tmv.c
-@@ -26,6 +26,7 @@
-  * @see http://www.oldskool.org/pc/8088_Corruption
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -112,7 +113,13 @@ static int tmv_read_header(AVFormatContext *s)
- 
-     ast->codec->codec_type            = AVMEDIA_TYPE_AUDIO;
-     ast->codec->codec_id              = AV_CODEC_ID_PCM_U8;
--    ast->codec->channels              = features & TMV_STEREO ? 2 : 1;
-+    if (features & TMV_STEREO) {
-+        ast->codec->channels       = 2;
-+        ast->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+    } else {
-+        ast->codec->channels       = 1;
-+        ast->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+    }
-     ast->codec->bits_per_coded_sample = 8;
-     ast->codec->bit_rate              = ast->codec->sample_rate *
-                                         ast->codec->bits_per_coded_sample;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0252-wc3movie-set-channel-layout.patch b/debian/patches/post-9beta2/0252-wc3movie-set-channel-layout.patch
deleted file mode 100644
index ac976cb..0000000
--- a/debian/patches/post-9beta2/0252-wc3movie-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2ce7f820d46aa268c3f903674c993362f875890d Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:49:09 -0400
-Subject: [PATCH 252/278] wc3movie: set channel layout
-
----
- libavformat/wc3movie.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
-index 117e4ea..c894253 100644
---- a/libavformat/wc3movie.c
-+++ b/libavformat/wc3movie.c
-@@ -27,6 +27,7 @@
-  *   http://www.pcisys.net/~melanson/codecs/
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/dict.h"
- #include "avformat.h"
-@@ -183,6 +184,7 @@ static int wc3_read_header(AVFormatContext *s)
-     st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
-     st->codec->codec_tag = 1;
-     st->codec->channels = WC3_AUDIO_CHANNELS;
-+    st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-     st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;
-     st->codec->sample_rate = WC3_SAMPLE_RATE;
-     st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0253-westwood_aud-set-channel-layout.patch b/debian/patches/post-9beta2/0253-westwood_aud-set-channel-layout.patch
deleted file mode 100644
index 1a36806..0000000
--- a/debian/patches/post-9beta2/0253-westwood_aud-set-channel-layout.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 7b48d93e8abb8736f52548d02ca5d6137d441ba4 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:50:41 -0400
-Subject: [PATCH 253/278] westwood_aud: set channel layout
-
----
- libavformat/westwood_aud.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
-index 806aea6..2a06c29 100644
---- a/libavformat/westwood_aud.c
-+++ b/libavformat/westwood_aud.c
-@@ -33,6 +33,7 @@
-  * qualify a file. Refer to wsaud_probe() for the precise parameters.
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -120,6 +121,8 @@ static int wsaud_read_header(AVFormatContext *s)
-     avpriv_set_pts_info(st, 64, 1, sample_rate);
-     st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
-     st->codec->channels    = channels;
-+    st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
-+                                                AV_CH_LAYOUT_STEREO;
-     st->codec->sample_rate = sample_rate;
- 
-     return 0;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0254-wtv-set-channel-layout-for-mpeg-audio.patch b/debian/patches/post-9beta2/0254-wtv-set-channel-layout-for-mpeg-audio.patch
deleted file mode 100644
index 461f35e..0000000
--- a/debian/patches/post-9beta2/0254-wtv-set-channel-layout-for-mpeg-audio.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 935fbb66ef325019ee5a64d1efae69282c68d050 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:55:43 -0400
-Subject: [PATCH 254/278] wtv: set channel layout for mpeg audio
-
----
- libavformat/wtv.c |   11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/libavformat/wtv.c b/libavformat/wtv.c
-index 57d239e..7bb421b 100644
---- a/libavformat/wtv.c
-+++ b/libavformat/wtv.c
-@@ -25,6 +25,7 @@
-  * @author Peter Ross <pross at xvid.org>
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "libavutil/intfloat.h"
- #include "libavutil/dict.h"
-@@ -618,8 +619,14 @@ static void parse_mpeg1waveformatex(AVStream *st)
- 
-     /* dwHeadMode */
-     switch (AV_RL16(st->codec->extradata + 6)) {
--    case 1 : case 2 : case 4 : st->codec->channels = 2; break;
--    case 8 :                   st->codec->channels = 1; break;
-+    case 1 :
-+    case 2 :
-+    case 4 : st->codec->channels       = 2;
-+             st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
-+             break;
-+    case 8 : st->codec->channels       = 1;
-+             st->codec->channel_layout = AV_CH_LAYOUT_MONO;
-+             break;
-     }
- }
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0255-yop-set-channel-layout.patch b/debian/patches/post-9beta2/0255-yop-set-channel-layout.patch
deleted file mode 100644
index 8929971..0000000
--- a/debian/patches/post-9beta2/0255-yop-set-channel-layout.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From b9629acb6b647b31b8b4e3932e836189bd03e5b9 Mon Sep 17 00:00:00 2001
-From: Justin Ruggles <justin.ruggles at gmail.com>
-Date: Sat, 7 Apr 2012 18:59:00 -0400
-Subject: [PATCH 255/278] yop: set channel layout
-
----
- libavformat/yop.c |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libavformat/yop.c b/libavformat/yop.c
-index 51d088b..351938b 100644
---- a/libavformat/yop.c
-+++ b/libavformat/yop.c
-@@ -22,6 +22,7 @@
-  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-  */
- 
-+#include "libavutil/channel_layout.h"
- #include "libavutil/intreadwrite.h"
- #include "avformat.h"
- #include "internal.h"
-@@ -74,6 +75,7 @@ static int yop_read_header(AVFormatContext *s)
-     audio_dec->codec_type   = AVMEDIA_TYPE_AUDIO;
-     audio_dec->codec_id     = AV_CODEC_ID_ADPCM_IMA_APC;
-     audio_dec->channels     = 1;
-+    audio_dec->channels     = AV_CH_LAYOUT_MONO;
-     audio_dec->sample_rate  = 22050;
- 
-     // Video
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0256-hlsenc-stand-alone-hls-segmenter.patch b/debian/patches/post-9beta2/0256-hlsenc-stand-alone-hls-segmenter.patch
deleted file mode 100644
index 15f7d68..0000000
--- a/debian/patches/post-9beta2/0256-hlsenc-stand-alone-hls-segmenter.patch
+++ /dev/null
@@ -1,404 +0,0 @@
-From 22a0827dff29a94e7fd07ad2782f169b2703c70d Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Fri, 26 Oct 2012 16:36:56 +0200
-Subject: [PATCH 256/278] hlsenc: stand alone hls segmenter
-
-Simplifies usage but has higher latency.
----
- doc/muxers.texi          |   21 +++
- libavformat/Makefile     |    1 +
- libavformat/allformats.c |    2 +-
- libavformat/hlsenc.c     |  324 ++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 347 insertions(+), 1 deletion(-)
- create mode 100644 libavformat/hlsenc.c
-
-diff --git a/doc/muxers.texi b/doc/muxers.texi
-index 4bb6d56..570041d 100644
---- a/doc/muxers.texi
-+++ b/doc/muxers.texi
-@@ -90,6 +90,27 @@ avconv -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc -
- 
- See also the @ref{crc} muxer.
- 
-+ at anchor{hls}
-+ at section hls
-+
-+Apple HTTP Live Streaming muxer that segments MPEG-TS according to
-+the HTTP Live Streaming specification.
-+
-+It creates a playlist file and numbered segment files. The output
-+filename specifies the playlist filename; the segment filenames
-+receive the same basename as the playlist, a sequential number and
-+a .ts extension.
-+
-+ at example
-+avconv -i in.nut out.m3u8
-+ at end example
-+
-+ at table @option
-+ at item -hls_time segment length in seconds
-+ at item -hls_list_size maximum number of playlist entries
-+ at item -hls_wrap number after which index wraps
-+ at end table
-+
- @anchor{image2}
- @section image2
- 
-diff --git a/libavformat/Makefile b/libavformat/Makefile
-index ed030bd..c589316 100644
---- a/libavformat/Makefile
-+++ b/libavformat/Makefile
-@@ -111,6 +111,7 @@ OBJS-$(CONFIG_H263_MUXER)                += rawenc.o
- OBJS-$(CONFIG_H264_DEMUXER)              += h264dec.o rawdec.o
- OBJS-$(CONFIG_H264_MUXER)                += rawenc.o
- OBJS-$(CONFIG_HLS_DEMUXER)               += hls.o
-+OBJS-$(CONFIG_HLS_MUXER)                 += hlsenc.o mpegtsenc.o
- OBJS-$(CONFIG_IDCIN_DEMUXER)             += idcin.o
- OBJS-$(CONFIG_IFF_DEMUXER)               += iff.o
- OBJS-$(CONFIG_ILBC_DEMUXER)              += ilbc.o
-diff --git a/libavformat/allformats.c b/libavformat/allformats.c
-index 39daec7..c7c4be9 100644
---- a/libavformat/allformats.c
-+++ b/libavformat/allformats.c
-@@ -106,7 +106,7 @@ void av_register_all(void)
-     REGISTER_MUXDEMUX (H261, h261);
-     REGISTER_MUXDEMUX (H263, h263);
-     REGISTER_MUXDEMUX (H264, h264);
--    REGISTER_DEMUXER  (HLS, hls);
-+    REGISTER_MUXDEMUX (HLS, hls);
-     REGISTER_DEMUXER  (IDCIN, idcin);
-     REGISTER_DEMUXER  (IFF, iff);
-     REGISTER_MUXDEMUX (ILBC, ilbc);
-diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
-new file mode 100644
-index 0000000..88f47e0
---- /dev/null
-+++ b/libavformat/hlsenc.c
-@@ -0,0 +1,324 @@
-+/*
-+ * Apple HTTP Live Streaming segmenter
-+ * Copyright (c) 2012, Luca Barbato
-+ *
-+ * This file is part of Libav.
-+ *
-+ * Libav is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * Libav is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with Libav; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#include <float.h>
-+
-+#include "libavutil/mathematics.h"
-+#include "libavutil/parseutils.h"
-+#include "libavutil/avstring.h"
-+#include "libavutil/opt.h"
-+#include "libavutil/log.h"
-+
-+#include "avformat.h"
-+#include "internal.h"
-+
-+typedef struct ListEntry {
-+    char  name[1024];
-+    int   duration;
-+    struct ListEntry *next;
-+} ListEntry;
-+
-+typedef struct HLSContext {
-+    const AVClass *class;  // Class for private options.
-+    int number;
-+    AVOutputFormat *oformat;
-+    AVFormatContext *avf;
-+    float time;            // Set by a private option.
-+    int  size;             // Set by a private option.
-+    int  wrap;             // Set by a private option.
-+    int64_t recording_time;
-+    int has_video;
-+    int64_t start_pts;
-+    int64_t end_pts;
-+    ListEntry *list;
-+    ListEntry *end_list;
-+    char *basename;
-+    AVIOContext *pb;
-+} HLSContext;
-+
-+static int hls_mux_init(AVFormatContext *s)
-+{
-+    HLSContext *hls = s->priv_data;
-+    AVFormatContext *oc;
-+    int i;
-+
-+    hls->avf = oc = avformat_alloc_context();
-+    if (!oc)
-+        return AVERROR(ENOMEM);
-+
-+    oc->oformat            = hls->oformat;
-+    oc->interrupt_callback = s->interrupt_callback;
-+
-+    for (i = 0; i < s->nb_streams; i++) {
-+        AVStream *st;
-+        if (!(st = avformat_new_stream(oc, NULL)))
-+            return AVERROR(ENOMEM);
-+        avcodec_copy_context(st->codec, s->streams[i]->codec);
-+        st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
-+    }
-+
-+    return 0;
-+}
-+
-+static int append_entry(HLSContext *hls, uint64_t duration)
-+{
-+    ListEntry *en = av_malloc(sizeof(*en));
-+
-+    if (!en)
-+        return AVERROR(ENOMEM);
-+
-+    av_get_frame_filename(en->name, sizeof(en->name), hls->basename,
-+                          hls->number -1);
-+
-+    en->duration = duration;
-+    en->next     = NULL;
-+
-+    if (!hls->list)
-+        hls->list = en;
-+    else
-+        hls->end_list->next = en;
-+
-+    hls->end_list = en;
-+
-+    if (hls->number >= hls->size) {
-+        en = hls->list;
-+        hls->list = en->next;
-+        av_free(en);
-+    }
-+
-+    return 0;
-+}
-+
-+static void free_entries(HLSContext *hls)
-+{
-+    ListEntry *p = hls->list, *en;
-+
-+    while(p) {
-+        en = p;
-+        p = p->next;
-+        av_free(en);
-+    }
-+}
-+
-+static int hls_window(AVFormatContext *s, int last)
-+{
-+    HLSContext *hls = s->priv_data;
-+    ListEntry *en;
-+    int ret = 0;
-+
-+    if ((ret = avio_open2(&hls->pb, s->filename, AVIO_FLAG_WRITE,
-+                          &s->interrupt_callback, NULL)) < 0)
-+        goto fail;
-+
-+    avio_printf(hls->pb, "#EXTM3U\n");
-+    avio_printf(hls->pb, "#EXT-X-VERSION:3\n");
-+    avio_printf(hls->pb, "#EXT-X-TARGETDURATION:%d\n", (int)hls->time);
-+    avio_printf(hls->pb, "#EXT-X-MEDIA-SEQUENCE:%d\n",
-+                FFMAX(0, hls->number - hls->size));
-+
-+    for (en = hls->list; en; en = en->next) {
-+        avio_printf(hls->pb, "#EXTINF:%d,\n", en->duration);
-+        avio_printf(hls->pb, "%s\n", en->name);
-+    }
-+
-+    if (last)
-+        avio_printf(hls->pb, "#EXT-X-ENDLIST\n");
-+
-+fail:
-+    avio_closep(&hls->pb);
-+    return ret;
-+}
-+
-+static int hls_start(AVFormatContext *s)
-+{
-+    HLSContext *c = s->priv_data;
-+    AVFormatContext *oc = c->avf;
-+    int err = 0;
-+
-+    if (c->wrap)
-+        c->number %= c->wrap;
-+
-+    if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
-+                              c->basename, c->number++) < 0)
-+        return AVERROR(EINVAL);
-+
-+    if ((err = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE,
-+                          &s->interrupt_callback, NULL)) < 0)
-+        return err;
-+
-+    if (oc->oformat->priv_class && oc->priv_data)
-+        av_opt_set(oc->priv_data, "mpegts_flags", "resend_headers", 0);
-+
-+    return 0;
-+}
-+
-+static int hls_write_header(AVFormatContext *s)
-+{
-+    HLSContext *hls = s->priv_data;
-+    int ret, i;
-+    char *p;
-+    const char *pattern = "%d.ts";
-+    int basename_size = strlen(s->filename) + strlen(pattern);
-+
-+    hls->number      = 0;
-+
-+    hls->recording_time = hls->time * 1000000;
-+    hls->start_pts      = AV_NOPTS_VALUE;
-+
-+    for (i = 0; i < s->nb_streams; i++)
-+        hls->has_video +=
-+            s->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO;
-+
-+    if (hls->has_video > 1)
-+        av_log(s, AV_LOG_WARNING,
-+               "More than a single video stream present, "
-+               "expect issues decoding it.\n");
-+
-+    hls->oformat = av_guess_format("mpegts", NULL, NULL);
-+
-+    if (!hls->oformat) {
-+        ret = AVERROR_MUXER_NOT_FOUND;
-+        goto fail;
-+    }
-+
-+    hls->basename = av_malloc(basename_size);
-+
-+    if (!hls->basename) {
-+        ret = AVERROR(ENOMEM);
-+        goto fail;
-+    }
-+
-+    strcpy(hls->basename, s->filename);
-+
-+    p = strrchr(hls->basename, '.');
-+
-+    if (p)
-+        *p = '\0';
-+
-+    av_strlcat(hls->basename, "%d.ts", basename_size);
-+
-+    if ((ret = hls_mux_init(s)) < 0)
-+        goto fail;
-+
-+    if ((ret = hls_start(s)) < 0)
-+        goto fail;
-+
-+    if ((ret = avformat_write_header(hls->avf, NULL)) < 0)
-+        return ret;
-+
-+
-+fail:
-+    if (ret) {
-+        av_free(hls->basename);
-+        if (hls->avf)
-+            avformat_free_context(hls->avf);
-+    }
-+    return ret;
-+}
-+
-+static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
-+{
-+    HLSContext *hls = s->priv_data;
-+    AVFormatContext *oc = hls->avf;
-+    AVStream *st = s->streams[pkt->stream_index];
-+    int64_t end_pts = hls->recording_time * hls->number;
-+    int ret;
-+
-+    if (hls->start_pts == AV_NOPTS_VALUE) {
-+        hls->start_pts = pkt->pts;
-+        hls->end_pts   = pkt->pts;
-+    }
-+    end_pts += hls->start_pts;
-+
-+    if ((hls->has_video && st->codec->codec_type == AVMEDIA_TYPE_VIDEO)      &&
-+        av_compare_ts(pkt->pts, st->time_base, end_pts, AV_TIME_BASE_Q) >= 0 &&
-+        pkt->flags & AV_PKT_FLAG_KEY) {
-+
-+        append_entry(hls, av_rescale(pkt->pts - hls->end_pts,
-+                                     st->time_base.num,
-+                                     st->time_base.den));
-+        hls->end_pts = pkt->pts;
-+
-+        av_write_frame(oc, NULL); /* Flush any buffered data */
-+        avio_close(oc->pb);
-+
-+        ret = hls_start(s);
-+
-+        if (ret)
-+            return ret;
-+
-+        oc = hls->avf;
-+
-+        if ((ret = hls_window(s, 0)) < 0)
-+            return ret;
-+    }
-+
-+    ret = ff_write_chained(oc, pkt->stream_index, pkt, s);
-+
-+    return ret;
-+}
-+
-+static int hls_write_trailer(struct AVFormatContext *s)
-+{
-+    HLSContext *hls = s->priv_data;
-+    AVFormatContext *oc = hls->avf;
-+
-+    av_write_trailer(oc);
-+    avio_closep(&oc->pb);
-+    avformat_free_context(oc);
-+    av_free(hls->basename);
-+    hls_window(s, 1);
-+
-+    free_entries(hls);
-+    avio_close(hls->pb);
-+    return 0;
-+}
-+
-+#define OFFSET(x) offsetof(HLSContext, x)
-+#define E AV_OPT_FLAG_ENCODING_PARAM
-+static const AVOption options[] = {
-+    {"hls_time",      "segment length in seconds",               OFFSET(time),    AV_OPT_TYPE_FLOAT,  {.dbl = 2},     0, FLT_MAX, E},
-+    {"hls_list_size", "maximum number of playlist entries",      OFFSET(size),    AV_OPT_TYPE_INT,    {.i64 = 5},     0, INT_MAX, E},
-+    {"hls_wrap",      "number after which the index wraps",      OFFSET(wrap),    AV_OPT_TYPE_INT,    {.i64 = 0},     0, INT_MAX, E},
-+    { NULL },
-+};
-+
-+static const AVClass hls_class = {
-+    .class_name = "hls muxer",
-+    .item_name  = av_default_item_name,
-+    .option     = options,
-+    .version    = LIBAVUTIL_VERSION_INT,
-+};
-+
-+
-+AVOutputFormat ff_hls_muxer = {
-+    .name           = "hls",
-+    .long_name      = NULL_IF_CONFIG_SMALL("hls"),
-+    .extensions     = "m3u8",
-+    .priv_data_size = sizeof(HLSContext),
-+    .audio_codec    = AV_CODEC_ID_MP2,
-+    .video_codec    = AV_CODEC_ID_MPEG2VIDEO,
-+    .flags          = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
-+    .write_header   = hls_write_header,
-+    .write_packet   = hls_write_packet,
-+    .write_trailer  = hls_write_trailer,
-+    .priv_class     = &hls_class,
-+};
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0257-pixdesc-add-av_pix_fmt_get_chroma_sub_sample.patch b/debian/patches/post-9beta2/0257-pixdesc-add-av_pix_fmt_get_chroma_sub_sample.patch
deleted file mode 100644
index 0a8d61e..0000000
--- a/debian/patches/post-9beta2/0257-pixdesc-add-av_pix_fmt_get_chroma_sub_sample.patch
+++ /dev/null
@@ -1,232 +0,0 @@
-From c1a02e884ac785033baab356a5437adf057a4189 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Mon, 12 Nov 2012 01:25:43 +0100
-Subject: [PATCH 257/278] pixdesc: add av_pix_fmt_get_chroma_sub_sample
-
-Deprecate avcodec_get_chroma_sub_sample.
----
- cmdutils.c                 |    4 +++-
- libavcodec/avcodec.h       |    6 +++++-
- libavcodec/ffv1enc.c       |    4 ++--
- libavcodec/libtheoraenc.c  |    3 ++-
- libavcodec/mpegvideo.c     |    9 +++++----
- libavcodec/mpegvideo_enc.c |   10 ++++++----
- libavcodec/tiffenc.c       |    4 ++--
- libavcodec/utils.c         |    3 ++-
- libavcodec/vp3.c           |    3 ++-
- libavutil/pixdesc.c        |   12 ++++++++++++
- libavutil/pixdesc.h        |   14 ++++++++++++++
- 11 files changed, 55 insertions(+), 17 deletions(-)
-
-diff --git a/cmdutils.c b/cmdutils.c
-index 630301f..2329120 100644
---- a/cmdutils.c
-+++ b/cmdutils.c
-@@ -1322,7 +1322,9 @@ static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbu
-      */
-     memset(buf->base[0], 128, ret);
- 
--    avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
-+    av_pix_fmt_get_chroma_sub_sample(s->pix_fmt,
-+                                     &h_chroma_shift, &v_chroma_shift);
-+
-     for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
-         const int h_shift = i==0 ? 0 : h_chroma_shift;
-         const int v_shift = i==0 ? 0 : v_chroma_shift;
-diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
-index d5968f9..58ea1bc 100644
---- a/libavcodec/avcodec.h
-+++ b/libavcodec/avcodec.h
-@@ -4285,7 +4285,11 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
-  * @{
-  */
- 
--void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
-+/**
-+ * @deprecated Use av_pix_fmt_get_chroma_sub_sample
-+ */
-+
-+void attribute_deprecated avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
- 
- /**
-  * Return a value representing the fourCC code associated to the
-diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
-index efc1b11..8c6fc9a 100644
---- a/libavcodec/ffv1enc.c
-+++ b/libavcodec/ffv1enc.c
-@@ -725,8 +725,8 @@ static av_cold int ffv1_encode_init(AVCodecContext *avctx)
-     if (!s->transparency)
-         s->plane_count = 2;
- 
--    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift,
--                                  &s->chroma_v_shift);
-+    av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift,
-+                                     &s->chroma_v_shift);
- 
-     s->picture_number = 0;
- 
-diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
-index 6c4eddf..469c6fd 100644
---- a/libavcodec/libtheoraenc.c
-+++ b/libavcodec/libtheoraenc.c
-@@ -197,7 +197,8 @@ static av_cold int encode_init(AVCodecContext* avc_context)
-         av_log(avc_context, AV_LOG_ERROR, "Unsupported pix_fmt\n");
-         return -1;
-     }
--    avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
-+    av_pix_fmt_get_chroma_sub_sample(avc_context->pix_fmt,
-+                                     &h->uv_hshift, &h->uv_vshift);
- 
-     if (avc_context->flags & CODEC_FLAG_QSCALE) {
-         /* to be constant with the libvorbis implementation, clip global_quality to 0 - 10
-diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
-index af9e040..8a48d99 100644
---- a/libavcodec/mpegvideo.c
-+++ b/libavcodec/mpegvideo.c
-@@ -867,8 +867,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s)
- 
-     if (s->width && s->height) {
-         /* set chroma shifts */
--        avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &s->chroma_x_shift,
--                                      &s->chroma_y_shift);
-+        av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
-+                                         &s->chroma_x_shift,
-+                                         &s->chroma_y_shift);
- 
-         /* convert fourcc to upper case */
-         s->codec_tag          = avpriv_toupper4(s->avctx->codec_tag);
-@@ -1781,8 +1782,8 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
-                                    (s->codec_id == AV_CODEC_ID_H264 ? 0 : 1);
-         s->low_delay = 0; // needed to see the vectors without trashing the buffers
- 
--        avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
--                                      &h_chroma_shift, &v_chroma_shift);
-+        av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
-+                                         &h_chroma_shift, &v_chroma_shift);
-         for (i = 0; i < 3; i++) {
-             memcpy(s->visualization_buffer[i], pict->data[i],
-                    (i == 0) ? pict->linesize[i] * height:
-diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
-index d2719fe..7c92ad2 100644
---- a/libavcodec/mpegvideo_enc.c
-+++ b/libavcodec/mpegvideo_enc.c
-@@ -29,6 +29,7 @@
- 
- #include "libavutil/intmath.h"
- #include "libavutil/mathematics.h"
-+#include "libavutil/pixdesc.h"
- #include "libavutil/opt.h"
- #include "avcodec.h"
- #include "dsputil.h"
-@@ -601,8 +602,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
-     if (avctx->inter_quant_bias != FF_DEFAULT_QUANT_BIAS)
-         s->inter_quant_bias = avctx->inter_quant_bias;
- 
--    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,
--                                  &chroma_v_shift);
-+    av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,
-+                                     &chroma_v_shift);
- 
-     if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
-         s->avctx->time_base.den > (1 << 16) - 1) {
-@@ -994,8 +995,9 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
-             // empty
-         } else {
-             int h_chroma_shift, v_chroma_shift;
--            avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &h_chroma_shift,
--                                          &v_chroma_shift);
-+            av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
-+                                             &h_chroma_shift,
-+                                             &v_chroma_shift);
- 
-             for (i = 0; i < 3; i++) {
-                 int src_stride = pic_arg->linesize[i];
-diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
-index 9811404..8162c40 100644
---- a/libavcodec/tiffenc.c
-+++ b/libavcodec/tiffenc.c
-@@ -270,8 +270,8 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
-     case AV_PIX_FMT_YUV410P:
-     case AV_PIX_FMT_YUV411P:
-         s->photometric_interpretation = 6;
--        avcodec_get_chroma_sub_sample(avctx->pix_fmt,
--                &shift_h, &shift_v);
-+        av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt,
-+                                         &shift_h, &shift_v);
-         s->bpp = 8 + (16 >> (shift_h + shift_v));
-         s->subsampling[0] = 1 << shift_h;
-         s->subsampling[1] = 1 << shift_v;
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 8c203b9..054dc69 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -427,7 +427,8 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
-         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
-         const int pixel_size = desc->comp[0].step_minus1 + 1;
- 
--        avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
-+        av_pix_fmt_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift,
-+                                         &v_chroma_shift);
- 
-         avcodec_align_dimensions2(s, &w, &h, stride_align);
- 
-diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
-index 90532cb..e812759 100644
---- a/libavcodec/vp3.c
-+++ b/libavcodec/vp3.c
-@@ -1687,7 +1687,8 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
-     for (i = 0; i < 3; i++)
-         s->qps[i] = -1;
- 
--    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift);
-+    av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift,
-+                                     &s->chroma_y_shift);
- 
-     s->y_superblock_width = (s->width + 31) / 32;
-     s->y_superblock_height = (s->height + 31) / 32;
-diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
-index bc446b1..d0889b4 100644
---- a/libavutil/pixdesc.c
-+++ b/libavutil/pixdesc.c
-@@ -1454,3 +1454,15 @@ enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc)
- 
-     return desc - av_pix_fmt_descriptors;
- }
-+
-+int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
-+                                     int *h_shift, int *v_shift)
-+{
-+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-+    if (!desc)
-+        return AVERROR(ENOSYS);
-+    *h_shift = desc->log2_chroma_w;
-+    *v_shift = desc->log2_chroma_h;
-+
-+    return 0;
-+}
-diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
-index 7da17bc..a944c66 100644
---- a/libavutil/pixdesc.h
-+++ b/libavutil/pixdesc.h
-@@ -203,4 +203,18 @@ const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev);
-  */
- enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);
- 
-+/**
-+ * Utility function to access log2_chroma_w log2_chroma_h from
-+ * the pixel format AVPixFmtDescriptor.
-+ *
-+ * @param[in]  pix_fmt the pixel format
-+ * @param[out] h_shift store log2_chroma_h
-+ * @param[out] v_shift store log2_chroma_w
-+ *
-+ * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format
-+ */
-+int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
-+                                     int *h_shift, int *v_shift);
-+
-+
- #endif /* AVUTIL_PIXDESC_H */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0258-avcodec-remove-ff_is_hwaccel_pix_fmt.patch b/debian/patches/post-9beta2/0258-avcodec-remove-ff_is_hwaccel_pix_fmt.patch
deleted file mode 100644
index be57224..0000000
--- a/debian/patches/post-9beta2/0258-avcodec-remove-ff_is_hwaccel_pix_fmt.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From cc085993f42cc01f394c2ce867397179bdf17cca Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Mon, 12 Nov 2012 01:25:44 +0100
-Subject: [PATCH 258/278] avcodec: remove ff_is_hwaccel_pix_fmt
-
-It is used only in one place and is unlikely it would be needed
-elsewhere.
----
- libavcodec/imgconvert.c |    6 ------
- libavcodec/internal.h   |    5 -----
- libavcodec/utils.c      |    8 +++++++-
- 3 files changed, 7 insertions(+), 12 deletions(-)
-
-diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
-index fd30dc4..dacf3c4 100644
---- a/libavcodec/imgconvert.c
-+++ b/libavcodec/imgconvert.c
-@@ -415,12 +415,6 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
-     *v_shift = desc->log2_chroma_h;
- }
- 
--int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
--{
--    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
--    return desc->flags & PIX_FMT_HWACCEL;
--}
--
- int avpicture_fill(AVPicture *picture, uint8_t *ptr,
-                    enum AVPixelFormat pix_fmt, int width, int height)
- {
-diff --git a/libavcodec/internal.h b/libavcodec/internal.h
-index 231d4b6..0f624e2 100644
---- a/libavcodec/internal.h
-+++ b/libavcodec/internal.h
-@@ -86,11 +86,6 @@ struct AVCodecDefault {
- };
- 
- /**
-- * Determine whether pix_fmt is a hardware accelerated format.
-- */
--int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt);
--
--/**
-  * Return the hardware accelerated codec for codec codec_id and
-  * pixel format pix_fmt.
-  *
-diff --git a/libavcodec/utils.c b/libavcodec/utils.c
-index 054dc69..06f4fc9 100644
---- a/libavcodec/utils.c
-+++ b/libavcodec/utils.c
-@@ -628,9 +628,15 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
-     return 0;
- }
- 
-+static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
-+{
-+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-+    return desc->flags & PIX_FMT_HWACCEL;
-+}
-+
- enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
- {
--    while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt))
-+    while (*fmt != AV_PIX_FMT_NONE && is_hwaccel_pix_fmt(*fmt))
-         ++fmt;
-     return fmt[0];
- }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0259-libtheoraenc-add-missing-pixdesc.h-header.patch b/debian/patches/post-9beta2/0259-libtheoraenc-add-missing-pixdesc.h-header.patch
deleted file mode 100644
index 78e1078..0000000
--- a/debian/patches/post-9beta2/0259-libtheoraenc-add-missing-pixdesc.h-header.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 83f9ed42ec696cedd7b84f255968a5888f749fc9 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Tue, 13 Nov 2012 17:42:13 +0100
-Subject: [PATCH 259/278] libtheoraenc: add missing pixdesc.h header
-
-Was left out from c1a02e884ac785033baab356a5437adf057a4189.
----
- libavcodec/libtheoraenc.c |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
-index 469c6fd..e57310a 100644
---- a/libavcodec/libtheoraenc.c
-+++ b/libavcodec/libtheoraenc.c
-@@ -33,6 +33,7 @@
- /* Libav includes */
- #include "libavutil/common.h"
- #include "libavutil/intreadwrite.h"
-+#include "libavutil/pixdesc.h"
- #include "libavutil/log.h"
- #include "libavutil/base64.h"
- #include "avcodec.h"
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0260-x86-h264_weight_10bit-port-to-cpuflags.patch b/debian/patches/post-9beta2/0260-x86-h264_weight_10bit-port-to-cpuflags.patch
deleted file mode 100644
index 4850d7e..0000000
--- a/debian/patches/post-9beta2/0260-x86-h264_weight_10bit-port-to-cpuflags.patch
+++ /dev/null
@@ -1,282 +0,0 @@
-From 5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sun, 15 Jul 2012 15:44:39 +0200
-Subject: [PATCH 260/278] x86: h264_weight_10bit: port to cpuflags
-
----
- libavcodec/x86/h264_weight_10bit.asm |  132 ++++++++++++++++++----------------
- 1 file changed, 69 insertions(+), 63 deletions(-)
-
-diff --git a/libavcodec/x86/h264_weight_10bit.asm b/libavcodec/x86/h264_weight_10bit.asm
-index 20d26a4..3b09e42 100644
---- a/libavcodec/x86/h264_weight_10bit.asm
-+++ b/libavcodec/x86/h264_weight_10bit.asm
-@@ -48,7 +48,7 @@ SECTION .text
-     movifnidn r5d, r5m
- %endmacro
- 
--%macro WEIGHT_SETUP 1
-+%macro WEIGHT_SETUP 0
-     mova       m0, [pw_1]
-     movd       m2, r3m
-     pslld      m0, m2       ; 1<<log2_denom
-@@ -59,19 +59,19 @@ SECTION .text
-     pshufd     m3, m3, 0
-     mova       m4, [pw_pixel_max]
-     paddw      m2, [sq_1]   ; log2_denom+1
--%ifnidn %1, sse4
-+%if notcpuflag(sse4)
-     pxor       m7, m7
- %endif
- %endmacro
- 
--%macro WEIGHT_OP 2-3
--%if %0==2
--    mova        m5, [r0+%2]
-+%macro WEIGHT_OP 1-2
-+%if %0==1
-+    mova        m5, [r0+%1]
-     punpckhwd   m6, m5, m0
-     punpcklwd   m5, m0
- %else
--    movq        m5, [r0+%2]
--    movq        m6, [r0+%3]
-+    movq        m5, [r0+%1]
-+    movq        m6, [r0+%2]
-     punpcklwd   m5, m0
-     punpcklwd   m6, m0
- %endif
-@@ -79,7 +79,7 @@ SECTION .text
-     pmaddwd     m6, m3
-     psrad       m5, m2
-     psrad       m6, m2
--%ifidn %1, sse4
-+%if cpuflag(sse4)
-     packusdw    m5, m6
-     pminsw      m5, m4
- %else
-@@ -88,14 +88,14 @@ SECTION .text
- %endif
- %endmacro
- 
--%macro WEIGHT_FUNC_DBL 1
--cglobal h264_weight_16_10_%1
-+%macro WEIGHT_FUNC_DBL 0
-+cglobal h264_weight_16_10
-     WEIGHT_PROLOGUE
--    WEIGHT_SETUP %1
-+    WEIGHT_SETUP
- .nextrow:
--    WEIGHT_OP %1,  0
-+    WEIGHT_OP  0
-     mova [r0   ], m5
--    WEIGHT_OP %1, 16
-+    WEIGHT_OP 16
-     mova [r0+16], m5
-     add       r0, r1
-     dec       r2d
-@@ -103,17 +103,18 @@ cglobal h264_weight_16_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--WEIGHT_FUNC_DBL sse2
--WEIGHT_FUNC_DBL sse4
-+INIT_XMM sse2
-+WEIGHT_FUNC_DBL
-+INIT_XMM sse4
-+WEIGHT_FUNC_DBL
- 
- 
--%macro WEIGHT_FUNC_MM 1
--cglobal h264_weight_8_10_%1
-+%macro WEIGHT_FUNC_MM 0
-+cglobal h264_weight_8_10
-     WEIGHT_PROLOGUE
--    WEIGHT_SETUP %1
-+    WEIGHT_SETUP
- .nextrow:
--    WEIGHT_OP  %1, 0
-+    WEIGHT_OP   0
-     mova     [r0], m5
-     add        r0, r1
-     dec        r2d
-@@ -121,19 +122,20 @@ cglobal h264_weight_8_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--WEIGHT_FUNC_MM sse2
--WEIGHT_FUNC_MM sse4
-+INIT_XMM sse2
-+WEIGHT_FUNC_MM
-+INIT_XMM sse4
-+WEIGHT_FUNC_MM
- 
- 
--%macro WEIGHT_FUNC_HALF_MM 1
--cglobal h264_weight_4_10_%1
-+%macro WEIGHT_FUNC_HALF_MM 0
-+cglobal h264_weight_4_10
-     WEIGHT_PROLOGUE
-     sar         r2d, 1
--    WEIGHT_SETUP %1
-+    WEIGHT_SETUP
-     lea         r3, [r1*2]
- .nextrow:
--    WEIGHT_OP   %1, 0, r1
-+    WEIGHT_OP    0, r1
-     movh      [r0], m5
-     movhps [r0+r1], m5
-     add         r0, r3
-@@ -142,9 +144,10 @@ cglobal h264_weight_4_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--WEIGHT_FUNC_HALF_MM sse2
--WEIGHT_FUNC_HALF_MM sse4
-+INIT_XMM sse2
-+WEIGHT_FUNC_HALF_MM
-+INIT_XMM sse4
-+WEIGHT_FUNC_HALF_MM
- 
- 
- ;-----------------------------------------------------------------------------
-@@ -168,7 +171,7 @@ DECLARE_REG_TMP 7
-     movifnidn t0d, r7m
- %endmacro
- 
--%macro BIWEIGHT_SETUP 1
-+%macro BIWEIGHT_SETUP 0
-     lea        t0, [t0*4+1] ; (offset<<2)+1
-     or         t0, 1
-     shl        r6, 16
-@@ -182,23 +185,23 @@ DECLARE_REG_TMP 7
-     pshufd     m5, m5, 0
-     mova       m3, [pw_pixel_max]
-     movifnidn r3d, r3m
--%ifnidn %1, sse4
-+%if notcpuflag(sse4)
-     pxor       m7, m7
- %endif
- %endmacro
- 
--%macro BIWEIGHT 2-3
--%if %0==2
--    mova       m0, [r0+%2]
--    mova       m1, [r1+%2]
-+%macro BIWEIGHT 1-2
-+%if %0==1
-+    mova       m0, [r0+%1]
-+    mova       m1, [r1+%1]
-     punpckhwd  m2, m0, m1
-     punpcklwd  m0, m1
- %else
--    movq       m0, [r0+%2]
--    movq       m1, [r1+%2]
-+    movq       m0, [r0+%1]
-+    movq       m1, [r1+%1]
-     punpcklwd  m0, m1
--    movq       m2, [r0+%3]
--    movq       m1, [r1+%3]
-+    movq       m2, [r0+%2]
-+    movq       m1, [r1+%2]
-     punpcklwd  m2, m1
- %endif
-     pmaddwd    m0, m4
-@@ -207,7 +210,7 @@ DECLARE_REG_TMP 7
-     paddd      m2, m5
-     psrad      m0, m6
-     psrad      m2, m6
--%ifidn %1, sse4
-+%if cpuflag(sse4)
-     packusdw   m0, m2
-     pminsw     m0, m3
- %else
-@@ -216,14 +219,14 @@ DECLARE_REG_TMP 7
- %endif
- %endmacro
- 
--%macro BIWEIGHT_FUNC_DBL 1
--cglobal h264_biweight_16_10_%1
-+%macro BIWEIGHT_FUNC_DBL 0
-+cglobal h264_biweight_16_10
-     BIWEIGHT_PROLOGUE
--    BIWEIGHT_SETUP %1
-+    BIWEIGHT_SETUP
- .nextrow:
--    BIWEIGHT  %1,  0
-+    BIWEIGHT   0
-     mova [r0   ], m0
--    BIWEIGHT  %1, 16
-+    BIWEIGHT  16
-     mova [r0+16], m0
-     add       r0, r2
-     add       r1, r2
-@@ -232,16 +235,17 @@ cglobal h264_biweight_16_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--BIWEIGHT_FUNC_DBL sse2
--BIWEIGHT_FUNC_DBL sse4
-+INIT_XMM sse2
-+BIWEIGHT_FUNC_DBL
-+INIT_XMM sse4
-+BIWEIGHT_FUNC_DBL
- 
--%macro BIWEIGHT_FUNC 1
--cglobal h264_biweight_8_10_%1
-+%macro BIWEIGHT_FUNC 0
-+cglobal h264_biweight_8_10
-     BIWEIGHT_PROLOGUE
--    BIWEIGHT_SETUP %1
-+    BIWEIGHT_SETUP
- .nextrow:
--    BIWEIGHT %1, 0
-+    BIWEIGHT  0
-     mova   [r0], m0
-     add      r0, r2
-     add      r1, r2
-@@ -250,18 +254,19 @@ cglobal h264_biweight_8_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--BIWEIGHT_FUNC sse2
--BIWEIGHT_FUNC sse4
-+INIT_XMM sse2
-+BIWEIGHT_FUNC
-+INIT_XMM sse4
-+BIWEIGHT_FUNC
- 
--%macro BIWEIGHT_FUNC_HALF 1
--cglobal h264_biweight_4_10_%1
-+%macro BIWEIGHT_FUNC_HALF 0
-+cglobal h264_biweight_4_10
-     BIWEIGHT_PROLOGUE
--    BIWEIGHT_SETUP %1
-+    BIWEIGHT_SETUP
-     sar        r3d, 1
-     lea        r4, [r2*2]
- .nextrow:
--    BIWEIGHT    %1, 0, r2
-+    BIWEIGHT     0, r2
-     movh   [r0   ], m0
-     movhps [r0+r2], m0
-     add         r0, r4
-@@ -271,6 +276,7 @@ cglobal h264_biweight_4_10_%1
-     REP_RET
- %endmacro
- 
--INIT_XMM
--BIWEIGHT_FUNC_HALF sse2
--BIWEIGHT_FUNC_HALF sse4
-+INIT_XMM sse2
-+BIWEIGHT_FUNC_HALF
-+INIT_XMM sse4
-+BIWEIGHT_FUNC_HALF
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0261-Drop-broken-and-unused-CABAC-test-program.patch b/debian/patches/post-9beta2/0261-Drop-broken-and-unused-CABAC-test-program.patch
deleted file mode 100644
index 2e003da..0000000
--- a/debian/patches/post-9beta2/0261-Drop-broken-and-unused-CABAC-test-program.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From da39cac8def7ea73cad2fa2b611209663c7abe2c Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Fri, 5 Oct 2012 12:12:52 +0200
-Subject: [PATCH 261/278] Drop broken and unused CABAC test program.
-
----
- libavcodec/Makefile |    3 +-
- libavcodec/cabac.c  |  147 ---------------------------------------------------
- 2 files changed, 1 insertion(+), 149 deletions(-)
-
-diff --git a/libavcodec/Makefile b/libavcodec/Makefile
-index 4d14aea..775cabe 100644
---- a/libavcodec/Makefile
-+++ b/libavcodec/Makefile
-@@ -676,8 +676,7 @@ SKIPHEADERS-$(HAVE_W32THREADS)         += w32pthreads.h
- 
- EXAMPLES = api
- 
--TESTPROGS = cabac                                                       \
--            dct                                                         \
-+TESTPROGS = dct                                                         \
-             fft                                                         \
-             fft-fixed                                                   \
-             golomb                                                      \
-diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
-index bd7d949..02d2911 100644
---- a/libavcodec/cabac.c
-+++ b/libavcodec/cabac.c
-@@ -162,150 +162,3 @@ void ff_init_cabac_states(CABACContext *c){
-       ff_h264_last_coeff_flag_offset_8x8[i] = last_coeff_flag_offset_8x8[i];
-     }
- }
--
--#ifdef TEST
--#define SIZE 10240
--
--#include "libavutil/lfg.h"
--#include "avcodec.h"
--#include "cabac.h"
--
--static inline void put_cabac_bit(CABACContext *c, int b){
--    put_bits(&c->pb, 1, b);
--    for(;c->outstanding_count; c->outstanding_count--){
--        put_bits(&c->pb, 1, 1-b);
--    }
--}
--
--static inline void renorm_cabac_encoder(CABACContext *c){
--    while(c->range < 0x100){
--        //FIXME optimize
--        if(c->low<0x100){
--            put_cabac_bit(c, 0);
--        }else if(c->low<0x200){
--            c->outstanding_count++;
--            c->low -= 0x100;
--        }else{
--            put_cabac_bit(c, 1);
--            c->low -= 0x200;
--        }
--
--        c->range+= c->range;
--        c->low += c->low;
--    }
--}
--
--static void put_cabac(CABACContext *c, uint8_t * const state, int bit){
--    int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state];
--
--    if(bit == ((*state)&1)){
--        c->range -= RangeLPS;
--        *state    = h264_mps_state[*state];
--    }else{
--        c->low += c->range - RangeLPS;
--        c->range = RangeLPS;
--    }
--
--    renorm_cabac_encoder(c);
--}
--
--/**
-- * @param bit 0 -> write zero bit, !=0 write one bit
-- */
--static void put_cabac_bypass(CABACContext *c, int bit){
--    c->low += c->low;
--
--    if(bit){
--        c->low += c->range;
--    }
--//FIXME optimize
--    if(c->low<0x200){
--        put_cabac_bit(c, 0);
--    }else if(c->low<0x400){
--        c->outstanding_count++;
--        c->low -= 0x200;
--    }else{
--        put_cabac_bit(c, 1);
--        c->low -= 0x400;
--    }
--}
--
--/**
-- *
-- * @return the number of bytes written
-- */
--static int put_cabac_terminate(CABACContext *c, int bit){
--    c->range -= 2;
--
--    if(!bit){
--        renorm_cabac_encoder(c);
--    }else{
--        c->low += c->range;
--        c->range= 2;
--
--        renorm_cabac_encoder(c);
--
--        assert(c->low <= 0x1FF);
--        put_cabac_bit(c, c->low>>9);
--        put_bits(&c->pb, 2, ((c->low>>7)&3)|1);
--
--        flush_put_bits(&c->pb); //FIXME FIXME FIXME XXX wrong
--    }
--
--    return (put_bits_count(&c->pb)+7)>>3;
--}
--
--int main(void){
--    CABACContext c;
--    uint8_t b[9*SIZE];
--    uint8_t r[9*SIZE];
--    int i;
--    uint8_t state[10]= {0};
--    AVLFG prng;
--
--    av_lfg_init(&prng, 1);
--    ff_init_cabac_encoder(&c, b, SIZE);
--    ff_init_cabac_states(&c);
--
--    for(i=0; i<SIZE; i++){
--        r[i] = av_lfg_get(&prng) % 7;
--    }
--
--    for(i=0; i<SIZE; i++){
--START_TIMER
--        put_cabac_bypass(&c, r[i]&1);
--STOP_TIMER("put_cabac_bypass")
--    }
--
--    for(i=0; i<SIZE; i++){
--START_TIMER
--        put_cabac(&c, state, r[i]&1);
--STOP_TIMER("put_cabac")
--    }
--
--    put_cabac_terminate(&c, 1);
--
--    ff_init_cabac_decoder(&c, b, SIZE);
--
--    memset(state, 0, sizeof(state));
--
--    for(i=0; i<SIZE; i++){
--START_TIMER
--        if( (r[i]&1) != get_cabac_bypass(&c) )
--            av_log(NULL, AV_LOG_ERROR, "CABAC bypass failure at %d\n", i);
--STOP_TIMER("get_cabac_bypass")
--    }
--
--    for(i=0; i<SIZE; i++){
--START_TIMER
--        if( (r[i]&1) != get_cabac(&c, state) )
--            av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i);
--STOP_TIMER("get_cabac")
--    }
--    if(!get_cabac_terminate(&c))
--        av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n");
--
--    return 0;
--}
--
--#endif /* TEST */
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0262-x86-mmx2-mmxext-in-asm-constructs.patch b/debian/patches/post-9beta2/0262-x86-mmx2-mmxext-in-asm-constructs.patch
deleted file mode 100644
index 2eb2e5c..0000000
--- a/debian/patches/post-9beta2/0262-x86-mmx2-mmxext-in-asm-constructs.patch
+++ /dev/null
@@ -1,1888 +0,0 @@
-From 26301caaa1aec5d71b564bff452147d6183370bf Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Tue, 10 Jul 2012 00:04:18 +0200
-Subject: [PATCH 262/278] x86: mmx2 ---> mmxext in asm constructs
-
----
- libavcodec/x86/ac3dsp.asm               |    4 +-
- libavcodec/x86/ac3dsp_init.c            |    4 +-
- libavcodec/x86/dsputil.asm              |    8 +--
- libavcodec/x86/dsputil_mmx.c            |   56 ++++++++--------
- libavcodec/x86/dsputilenc.asm           |    2 +-
- libavcodec/x86/dsputilenc_mmx.c         |    6 +-
- libavcodec/x86/h264_chromamc.asm        |   14 ++--
- libavcodec/x86/h264_chromamc_10bit.asm  |    4 +-
- libavcodec/x86/h264_deblock.asm         |   20 +++---
- libavcodec/x86/h264_deblock_10bit.asm   |    4 +-
- libavcodec/x86/h264_idct.asm            |   46 ++++++-------
- libavcodec/x86/h264_idct_10bit.asm      |    2 +-
- libavcodec/x86/h264_intrapred.asm       |   26 ++++----
- libavcodec/x86/h264_intrapred_10bit.asm |   20 +++---
- libavcodec/x86/h264_intrapred_init.c    |   80 +++++++++++------------
- libavcodec/x86/h264_weight.asm          |   12 ++--
- libavcodec/x86/h264dsp_init.c           |  107 ++++++++++++++++---------------
- libavcodec/x86/pngdsp.asm               |    2 +-
- libavcodec/x86/pngdsp_init.c            |    6 +-
- libavcodec/x86/rv34dsp.asm              |    6 +-
- libavcodec/x86/rv34dsp_init.c           |   10 +--
- libavcodec/x86/rv40dsp.asm              |    4 +-
- libavcodec/x86/rv40dsp_init.c           |   30 ++++-----
- libavcodec/x86/vc1dsp_init.c            |    6 +-
- libavcodec/x86/vp3dsp.asm               |    4 +-
- libavcodec/x86/vp3dsp_init.c            |   16 +++--
- libavcodec/x86/vp8dsp.asm               |   30 ++++-----
- libavcodec/x86/vp8dsp_init.c            |   86 ++++++++++++-------------
- libavutil/x86/x86util.asm               |    2 +-
- libswscale/x86/output.asm               |    4 +-
- libswscale/x86/swscale.c                |    8 +--
- 31 files changed, 317 insertions(+), 312 deletions(-)
-
-diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
-index 2c453c5..a5d9458 100644
---- a/libavcodec/x86/ac3dsp.asm
-+++ b/libavcodec/x86/ac3dsp.asm
-@@ -97,7 +97,7 @@ AC3_EXPONENT_MIN
-     por         %1, %2
-     pshuflw     %2, %1, q0001
-     por         %1, %2
--%elif cpuflag(mmx2)
-+%elif cpuflag(mmxext)
-     pshufw      %2, %1, q0032
-     por         %1, %2
-     pshufw      %2, %1, q0001
-@@ -153,7 +153,7 @@ cglobal ac3_max_msb_abs_int16, 2,2,5, src, len
- INIT_MMX mmx
- %define ABS2 ABS2_MMX
- AC3_MAX_MSB_ABS_INT16 or_abs
--INIT_MMX mmx2
-+INIT_MMX mmxext
- %define ABS2 ABS2_MMXEXT
- AC3_MAX_MSB_ABS_INT16 min_max
- INIT_XMM sse2
-diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c
-index 5008d65..b32145b 100644
---- a/libavcodec/x86/ac3dsp_init.c
-+++ b/libavcodec/x86/ac3dsp_init.c
-@@ -31,7 +31,7 @@ extern void ff_ac3_exponent_min_mmxext(uint8_t *exp, int num_reuse_blocks, int n
- extern void ff_ac3_exponent_min_sse2  (uint8_t *exp, int num_reuse_blocks, int nb_coefs);
- 
- extern int ff_ac3_max_msb_abs_int16_mmx  (const int16_t *src, int len);
--extern int ff_ac3_max_msb_abs_int16_mmx2 (const int16_t *src, int len);
-+extern int ff_ac3_max_msb_abs_int16_mmxext(const int16_t *src, int len);
- extern int ff_ac3_max_msb_abs_int16_sse2 (const int16_t *src, int len);
- extern int ff_ac3_max_msb_abs_int16_ssse3(const int16_t *src, int len);
- 
-@@ -182,7 +182,7 @@ av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
-     }
-     if (EXTERNAL_MMXEXT(mm_flags)) {
-         c->ac3_exponent_min = ff_ac3_exponent_min_mmxext;
--        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx2;
-+        c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmxext;
-     }
-     if (EXTERNAL_SSE(mm_flags)) {
-         c->float_to_fixed24 = ff_float_to_fixed24_sse;
-diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm
-index c9118a1..1a429ae 100644
---- a/libavcodec/x86/dsputil.asm
-+++ b/libavcodec/x86/dsputil.asm
-@@ -108,7 +108,7 @@ cglobal scalarproduct_and_madd_int16_%1, 4,4,8, v1, v2, v3, order, mul
- %endmacro
- 
- INIT_MMX
--SCALARPRODUCT mmx2
-+SCALARPRODUCT mmxext
- INIT_XMM
- SCALARPRODUCT sse2
- 
-@@ -327,8 +327,8 @@ APPLY_WINDOW_INT16 ssse3_atom, 0, 1
- APPLY_WINDOW_INT16 ssse3,      0, 1
- 
- 
--; void add_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top)
--cglobal add_hfyu_median_prediction_mmx2, 6,6,0, dst, top, diff, w, left, left_top
-+; void add_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top)
-+cglobal add_hfyu_median_prediction_mmxext, 6,6,0, dst, top, diff, w, left, left_top
-     movq    mm0, [topq]
-     movq    mm2, mm0
-     movd    mm4, [left_topq]
-@@ -804,7 +804,7 @@ ALIGN 128
-     mov        valh, vall
- %if %1 >= 8
-     movd        mm0, vald
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     pshufw      mm0, mm0, 0
- %else ; mmx
-     punpcklwd   mm0, mm0
-diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
-index 74559f4..71e10a8 100644
---- a/libavcodec/x86/dsputil_mmx.c
-+++ b/libavcodec/x86/dsputil_mmx.c
-@@ -2045,21 +2045,21 @@ PREFETCH(prefetch_3dnow, prefetch)
- 
- void ff_put_h264_chroma_mc8_rnd_mmx  (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
--void ff_avg_h264_chroma_mc8_rnd_mmx2 (uint8_t *dst, uint8_t *src,
--                                      int stride, int h, int x, int y);
-+void ff_avg_h264_chroma_mc8_rnd_mmxext(uint8_t *dst, uint8_t *src,
-+                                       int stride, int h, int x, int y);
- void ff_avg_h264_chroma_mc8_rnd_3dnow(uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
- void ff_put_h264_chroma_mc4_mmx      (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
--void ff_avg_h264_chroma_mc4_mmx2     (uint8_t *dst, uint8_t *src,
-+void ff_avg_h264_chroma_mc4_mmxext   (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- void ff_avg_h264_chroma_mc4_3dnow    (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
--void ff_put_h264_chroma_mc2_mmx2     (uint8_t *dst, uint8_t *src,
-+void ff_put_h264_chroma_mc2_mmxext   (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
--void ff_avg_h264_chroma_mc2_mmx2     (uint8_t *dst, uint8_t *src,
-+void ff_avg_h264_chroma_mc2_mmxext   (uint8_t *dst, uint8_t *src,
-                                       int stride, int h, int x, int y);
- 
- void ff_put_h264_chroma_mc8_rnd_ssse3(uint8_t *dst, uint8_t *src,
-@@ -2077,10 +2077,10 @@ void ff_ ## OP ## _h264_chroma_mc ## NUM ## _ ## DEPTH ## _ ## OPT      \
-                                       (uint8_t *dst, uint8_t *src,      \
-                                        int stride, int h, int x, int y);
- 
--CHROMA_MC(put, 2, 10, mmx2)
--CHROMA_MC(avg, 2, 10, mmx2)
--CHROMA_MC(put, 4, 10, mmx2)
--CHROMA_MC(avg, 4, 10, mmx2)
-+CHROMA_MC(put, 2, 10, mmxext)
-+CHROMA_MC(avg, 2, 10, mmxext)
-+CHROMA_MC(put, 4, 10, mmxext)
-+CHROMA_MC(avg, 4, 10, mmxext)
- CHROMA_MC(put, 8, 10, sse2)
- CHROMA_MC(avg, 8, 10, sse2)
- CHROMA_MC(put, 8, 10, avx)
-@@ -2283,13 +2283,13 @@ static void vector_clipf_sse(float *dst, const float *src,
- 
- #endif /* HAVE_INLINE_ASM */
- 
--int32_t ff_scalarproduct_int16_mmx2(const int16_t *v1, const int16_t *v2,
--                                    int order);
-+int32_t ff_scalarproduct_int16_mmxext(const int16_t *v1, const int16_t *v2,
-+                                      int order);
- int32_t ff_scalarproduct_int16_sse2(const int16_t *v1, const int16_t *v2,
-                                     int order);
--int32_t ff_scalarproduct_and_madd_int16_mmx2(int16_t *v1, const int16_t *v2,
--                                             const int16_t *v3,
--                                             int order, int mul);
-+int32_t ff_scalarproduct_and_madd_int16_mmxext(int16_t *v1, const int16_t *v2,
-+                                               const int16_t *v3,
-+                                               int order, int mul);
- int32_t ff_scalarproduct_and_madd_int16_sse2(int16_t *v1, const int16_t *v2,
-                                              const int16_t *v3,
-                                              int order, int mul);
-@@ -2313,9 +2313,9 @@ void ff_apply_window_int16_ssse3_atom(int16_t *output, const int16_t *input,
- void ff_bswap32_buf_ssse3(uint32_t *dst, const uint32_t *src, int w);
- void ff_bswap32_buf_sse2(uint32_t *dst, const uint32_t *src, int w);
- 
--void ff_add_hfyu_median_prediction_mmx2(uint8_t *dst, const uint8_t *top,
--                                        const uint8_t *diff, int w,
--                                        int *left, int *left_top);
-+void ff_add_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *top,
-+                                          const uint8_t *diff, int w,
-+                                          int *left, int *left_top);
- int  ff_add_hfyu_left_prediction_ssse3(uint8_t *dst, const uint8_t *src,
-                                        int w, int left);
- int  ff_add_hfyu_left_prediction_sse4(uint8_t *dst, const uint8_t *src,
-@@ -2548,24 +2548,24 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
- 
- #if HAVE_YASM
-     if (!high_bit_depth && CONFIG_H264CHROMA) {
--        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmx2;
--        c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmx2;
--        c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmx2;
--        c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmx2;
-+        c->avg_h264_chroma_pixels_tab[0] = ff_avg_h264_chroma_mc8_rnd_mmxext;
-+        c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_mmxext;
-+        c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_mmxext;
-+        c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_mmxext;
-     }
-     if (bit_depth == 10 && CONFIG_H264CHROMA) {
--        c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmx2;
--        c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmx2;
--        c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmx2;
--        c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmx2;
-+        c->put_h264_chroma_pixels_tab[2] = ff_put_h264_chroma_mc2_10_mmxext;
-+        c->avg_h264_chroma_pixels_tab[2] = ff_avg_h264_chroma_mc2_10_mmxext;
-+        c->put_h264_chroma_pixels_tab[1] = ff_put_h264_chroma_mc4_10_mmxext;
-+        c->avg_h264_chroma_pixels_tab[1] = ff_avg_h264_chroma_mc4_10_mmxext;
-     }
- 
-     /* slower than cmov version on AMD */
-     if (!(mm_flags & AV_CPU_FLAG_3DNOW))
--        c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmx2;
-+        c->add_hfyu_median_prediction = ff_add_hfyu_median_prediction_mmxext;
- 
--    c->scalarproduct_int16          = ff_scalarproduct_int16_mmx2;
--    c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmx2;
-+    c->scalarproduct_int16          = ff_scalarproduct_int16_mmxext;
-+    c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_mmxext;
- 
-     if (avctx->flags & CODEC_FLAG_BITEXACT) {
-         c->apply_window_int16 = ff_apply_window_int16_mmxext_ba;
-diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm
-index 6c4fb50..c5ba78a 100644
---- a/libavcodec/x86/dsputilenc.asm
-+++ b/libavcodec/x86/dsputilenc.asm
-@@ -265,7 +265,7 @@ HADAMARD8_DIFF_MMX mmx
- 
- %define ABS1 ABS1_MMXEXT
- %define HSUM HSUM_MMXEXT
--HADAMARD8_DIFF_MMX mmx2
-+HADAMARD8_DIFF_MMX mmxext
- 
- INIT_XMM
- %define ABS2 ABS2_MMXEXT
-diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
-index 883d965..e5d2473 100644
---- a/libavcodec/x86/dsputilenc_mmx.c
-+++ b/libavcodec/x86/dsputilenc_mmx.c
-@@ -1104,7 +1104,7 @@ int ff_hadamard8_diff16_##cpu(void *s, uint8_t *src1, uint8_t *src2, \
-                               int stride, int h);
- 
- hadamard_func(mmx)
--hadamard_func(mmx2)
-+hadamard_func(mmxext)
- hadamard_func(sse2)
- hadamard_func(ssse3)
- 
-@@ -1195,8 +1195,8 @@ void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
-         c->hadamard8_diff[1] = ff_hadamard8_diff_mmx;
- 
-         if (EXTERNAL_MMXEXT(mm_flags)) {
--            c->hadamard8_diff[0] = ff_hadamard8_diff16_mmx2;
--            c->hadamard8_diff[1] = ff_hadamard8_diff_mmx2;
-+            c->hadamard8_diff[0] = ff_hadamard8_diff16_mmxext;
-+            c->hadamard8_diff[1] = ff_hadamard8_diff_mmxext;
-         }
- 
-         if (EXTERNAL_SSE2(mm_flags)) {
-diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm
-index dc427d7..2dd4603 100644
---- a/libavcodec/x86/h264_chromamc.asm
-+++ b/libavcodec/x86/h264_chromamc.asm
-@@ -442,17 +442,17 @@ chroma_mc8_mmx_func put, vc1,  nornd_mmx
- chroma_mc8_mmx_func put, rv40, mmx
- chroma_mc4_mmx_func put, h264, mmx
- chroma_mc4_mmx_func put, rv40, mmx
--chroma_mc2_mmx_func put, h264, mmx2
-+chroma_mc2_mmx_func put, h264, mmxext
- 
- %define CHROMAMC_AVG  DIRECT_AVG
- %define CHROMAMC_AVG4 COPY_AVG
- %define PAVG          pavgb
--chroma_mc8_mmx_func avg, h264, rnd_mmx2
--chroma_mc8_mmx_func avg, vc1,  nornd_mmx2
--chroma_mc8_mmx_func avg, rv40, mmx2
--chroma_mc4_mmx_func avg, h264, mmx2
--chroma_mc4_mmx_func avg, rv40, mmx2
--chroma_mc2_mmx_func avg, h264, mmx2
-+chroma_mc8_mmx_func avg, h264, rnd_mmxext
-+chroma_mc8_mmx_func avg, vc1,  nornd_mmxext
-+chroma_mc8_mmx_func avg, rv40, mmxext
-+chroma_mc4_mmx_func avg, h264, mmxext
-+chroma_mc4_mmx_func avg, rv40, mmxext
-+chroma_mc2_mmx_func avg, h264, mmxext
- 
- %define PAVG          pavgusb
- chroma_mc8_mmx_func avg, h264, rnd_3dnow
-diff --git a/libavcodec/x86/h264_chromamc_10bit.asm b/libavcodec/x86/h264_chromamc_10bit.asm
-index 2619737..aec7678 100644
---- a/libavcodec/x86/h264_chromamc_10bit.asm
-+++ b/libavcodec/x86/h264_chromamc_10bit.asm
-@@ -253,7 +253,7 @@ INIT_XMM sse2
- CHROMA_MC8 put
- INIT_XMM avx
- CHROMA_MC8 put
--INIT_MMX mmx2
-+INIT_MMX mmxext
- CHROMA_MC4 put
- CHROMA_MC2 put
- 
-@@ -262,6 +262,6 @@ INIT_XMM sse2
- CHROMA_MC8 avg
- INIT_XMM avx
- CHROMA_MC8 avg
--INIT_MMX mmx2
-+INIT_MMX mmxext
- CHROMA_MC4 avg
- CHROMA_MC2 avg
-diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
-index f5de7c9..c124c4d 100644
---- a/libavcodec/x86/h264_deblock.asm
-+++ b/libavcodec/x86/h264_deblock.asm
-@@ -504,7 +504,7 @@ cglobal deblock_h_luma_8, 0,5
-     RET
- %endmacro ; DEBLOCK_LUMA
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- DEBLOCK_LUMA v8, 8
- INIT_XMM sse2
- DEBLOCK_LUMA v, 16
-@@ -783,11 +783,11 @@ DEBLOCK_LUMA_INTRA v
- INIT_XMM avx
- DEBLOCK_LUMA_INTRA v
- %if ARCH_X86_64 == 0
--INIT_MMX mmx2
-+INIT_MMX mmxext
- DEBLOCK_LUMA_INTRA v8
- %endif
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- 
- %macro CHROMA_V_START 0
-     dec    r2d      ; alpha-1
-@@ -818,7 +818,7 @@ cglobal deblock_v_chroma_8, 5,6
-     movq  m1, [t5+r1]
-     movq  m2, [r0]
-     movq  m3, [r0+r1]
--    call ff_chroma_inter_body_mmx2
-+    call ff_chroma_inter_body_mmxext
-     movq  [t5+r1], m1
-     movq  [r0], m2
-     RET
-@@ -842,7 +842,7 @@ cglobal deblock_h_chroma_8, 5,7
-     TRANSPOSE4x8_LOAD  bw, wd, dq, PASS8ROWS(t5, r0, r1, t6)
-     movq  buf0, m0
-     movq  buf1, m3
--    call ff_chroma_inter_body_mmx2
-+    call ff_chroma_inter_body_mmxext
-     movq  m0, buf0
-     movq  m3, buf1
-     TRANSPOSE8x4B_STORE PASS8ROWS(t5, r0, r1, t6)
-@@ -852,7 +852,7 @@ cglobal deblock_h_chroma_8, 5,7
-     RET
- 
- ALIGN 16
--ff_chroma_inter_body_mmx2:
-+ff_chroma_inter_body_mmxext:
-     LOAD_MASK  r2d, r3d
-     movd       m6, [r4] ; tc0
-     punpcklbw  m6, m6
-@@ -885,7 +885,7 @@ cglobal deblock_v_chroma_intra_8, 4,5
-     movq  m1, [t5+r1]
-     movq  m2, [r0]
-     movq  m3, [r0+r1]
--    call ff_chroma_intra_body_mmx2
-+    call ff_chroma_intra_body_mmxext
-     movq  [t5+r1], m1
-     movq  [r0], m2
-     RET
-@@ -896,12 +896,12 @@ cglobal deblock_v_chroma_intra_8, 4,5
- cglobal deblock_h_chroma_intra_8, 4,6
-     CHROMA_H_START
-     TRANSPOSE4x8_LOAD  bw, wd, dq, PASS8ROWS(t5, r0, r1, t6)
--    call ff_chroma_intra_body_mmx2
-+    call ff_chroma_intra_body_mmxext
-     TRANSPOSE8x4B_STORE PASS8ROWS(t5, r0, r1, t6)
-     RET
- 
- ALIGN 16
--ff_chroma_intra_body_mmx2:
-+ff_chroma_intra_body_mmxext:
-     LOAD_MASK r2d, r3d
-     movq   m5, m1
-     movq   m6, m2
-@@ -1025,7 +1025,7 @@ ff_chroma_intra_body_mmx2:
-     jl %%.b_idx_loop
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal h264_loop_filter_strength, 9, 9, 0, bs, nnz, ref, mv, bidir, edges, \
-                                             step, mask_mv0, mask_mv1, field
- %define b_idxq bidirq
-diff --git a/libavcodec/x86/h264_deblock_10bit.asm b/libavcodec/x86/h264_deblock_10bit.asm
-index e105c6c..3b81ef6 100644
---- a/libavcodec/x86/h264_deblock_10bit.asm
-+++ b/libavcodec/x86/h264_deblock_10bit.asm
-@@ -791,7 +791,7 @@ cglobal deblock_h_luma_intra_10, 4,7,8*(mmsize/16)
- %endmacro
- 
- %if ARCH_X86_64 == 0
--INIT_MMX mmx2
-+INIT_MMX mmxext
- DEBLOCK_LUMA
- DEBLOCK_LUMA_INTRA
- INIT_XMM sse2
-@@ -906,7 +906,7 @@ cglobal deblock_v_chroma_intra_10, 4,6-(mmsize/16),8*(mmsize/16)
- %endmacro
- 
- %if ARCH_X86_64 == 0
--INIT_MMX mmx2
-+INIT_MMX mmxext
- DEBLOCK_CHROMA
- %endif
- INIT_XMM sse2
-diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm
-index 5e779cb..cd1f545 100644
---- a/libavcodec/x86/h264_idct.asm
-+++ b/libavcodec/x86/h264_idct.asm
-@@ -286,14 +286,14 @@ cglobal h264_idct8_add_8_sse2, 3, 4, 10
- %endmacro
- 
- INIT_MMX
--; ff_h264_idct_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
--cglobal h264_idct_dc_add_8_mmx2, 3, 3, 0
-+; ff_h264_idct_dc_add_mmxext(uint8_t *dst, int16_t *block, int stride)
-+cglobal h264_idct_dc_add_8_mmxext, 3, 3, 0
-     DC_ADD_MMXEXT_INIT r1, r2
-     DC_ADD_MMXEXT_OP movh, r0, r2, r1
-     RET
- 
--; ff_h264_idct8_dc_add_mmx2(uint8_t *dst, int16_t *block, int stride)
--cglobal h264_idct8_dc_add_8_mmx2, 3, 3, 0
-+; ff_h264_idct8_dc_add_mmxext(uint8_t *dst, int16_t *block, int stride)
-+cglobal h264_idct8_dc_add_8_mmxext, 3, 3, 0
-     DC_ADD_MMXEXT_INIT r1, r2
-     DC_ADD_MMXEXT_OP mova, r0, r2, r1
-     lea          r0, [r0+r2*4]
-@@ -354,9 +354,9 @@ cglobal h264_idct8_add4_8_mmx, 5, 7 + npicregs, 0, dst, block_offset, block, str
-     ADD         rsp, pad
-     RET
- 
--; ff_h264_idct_add16_mmx2(uint8_t *dst, const int *block_offset,
--;                         DCTELEM *block, int stride, const uint8_t nnzc[6*8])
--cglobal h264_idct_add16_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-+; ff_h264_idct_add16_mmxext(uint8_t *dst, const int *block_offset,
-+;                           DCTELEM *block, int stride, const uint8_t nnzc[6*8])
-+cglobal h264_idct_add16_8_mmxext, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-     xor          r5, r5
- %ifdef PIC
-     lea     picregq, [scan8_mem]
-@@ -421,9 +421,10 @@ cglobal h264_idct_add16intra_8_mmx, 5, 7 + npicregs, 0, dst, block_offset, block
-     jl .nextblock
-     REP_RET
- 
--; ff_h264_idct_add16intra_mmx2(uint8_t *dst, const int *block_offset,
--;                              DCTELEM *block, int stride, const uint8_t nnzc[6*8])
--cglobal h264_idct_add16intra_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-+; ff_h264_idct_add16intra_mmxext(uint8_t *dst, const int *block_offset,
-+;                                DCTELEM *block, int stride,
-+;                                const uint8_t nnzc[6*8])
-+cglobal h264_idct_add16intra_8_mmxext, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-     xor          r5, r5
- %ifdef PIC
-     lea     picregq, [scan8_mem]
-@@ -463,9 +464,10 @@ cglobal h264_idct_add16intra_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, blo
-     jl .nextblock
-     REP_RET
- 
--; ff_h264_idct8_add4_mmx2(uint8_t *dst, const int *block_offset,
--;                         DCTELEM *block, int stride, const uint8_t nnzc[6*8])
--cglobal h264_idct8_add4_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-+; ff_h264_idct8_add4_mmxext(uint8_t *dst, const int *block_offset,
-+;                           DCTELEM *block, int stride,
-+;                           const uint8_t nnzc[6*8])
-+cglobal h264_idct8_add4_8_mmxext, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-     %assign pad 128+4-(stack_offset&7)
-     SUB         rsp, pad
- 
-@@ -620,7 +622,7 @@ cglobal h264_idct_add8_8_mmx, 5, 8 + npicregs, 0, dst1, block_offset, block, str
-     call         h264_idct_add8_mmx_plane
-     RET
- 
--h264_idct_add8_mmx2_plane:
-+h264_idct_add8_mmxext_plane:
- .nextblock:
-     movzx        r6, byte [scan8+r5]
-     movzx        r6, byte [r4+r6]
-@@ -661,9 +663,9 @@ h264_idct_add8_mmx2_plane:
-     jnz .nextblock
-     rep ret
- 
--; ff_h264_idct_add8_mmx2(uint8_t **dest, const int *block_offset,
--;                        DCTELEM *block, int stride, const uint8_t nnzc[6*8])
--cglobal h264_idct_add8_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-+; ff_h264_idct_add8_mmxext(uint8_t **dest, const int *block_offset,
-+;                          DCTELEM *block, int stride, const uint8_t nnzc[6*8])
-+cglobal h264_idct_add8_8_mmxext, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg
-     mov          r5, 16
-     add          r2, 512
- %if ARCH_X86_64
-@@ -672,7 +674,7 @@ cglobal h264_idct_add8_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, st
- %ifdef PIC
-     lea     picregq, [scan8_mem]
- %endif
--    call h264_idct_add8_mmx2_plane
-+    call h264_idct_add8_mmxext_plane
-     mov          r5, 32
-     add          r2, 384
- %if ARCH_X86_64
-@@ -680,12 +682,12 @@ cglobal h264_idct_add8_8_mmx2, 5, 8 + npicregs, 0, dst1, block_offset, block, st
- %else
-     add        r0mp, gprsize
- %endif
--    call h264_idct_add8_mmx2_plane
-+    call h264_idct_add8_mmxext_plane
-     RET
- 
- INIT_MMX
- ; r0 = uint8_t *dst, r2 = int16_t *block, r3 = int stride, r6=clobbered
--h264_idct_dc_add8_mmx2:
-+h264_idct_dc_add8_mmxext:
-     movd         m0, [r2   ]          ;  0 0 X D
-     punpcklwd    m0, [r2+32]          ;  x X d D
-     paddsw       m0, [pw_32]
-@@ -779,7 +781,7 @@ cglobal h264_idct_add16_8_sse2, 5, 5 + ARCH_X86_64, 8
- %else
-     add         r0, r0m
- %endif
--    call        h264_idct_dc_add8_mmx2
-+    call        h264_idct_dc_add8_mmxext
- .cycle%1end:
- %if %1 < 7
-     add         r2, 64
-@@ -828,7 +830,7 @@ cglobal h264_idct_add16intra_8_sse2, 5, 7 + ARCH_X86_64, 8
-     mov         r0, [r0]
-     add         r0, dword [r1+(%1&1)*8+64*(1+(%1>>1))]
- %endif
--    call        h264_idct_dc_add8_mmx2
-+    call        h264_idct_dc_add8_mmxext
- .cycle%1end:
- %if %1 == 1
-     add         r2, 384+64
-diff --git a/libavcodec/x86/h264_idct_10bit.asm b/libavcodec/x86/h264_idct_10bit.asm
-index b3b7df9..51965f0 100644
---- a/libavcodec/x86/h264_idct_10bit.asm
-+++ b/libavcodec/x86/h264_idct_10bit.asm
-@@ -178,7 +178,7 @@ IDCT_ADD16_10
-     mova [%1+%3  ], m4
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal h264_idct_dc_add_10,3,3
-     movd      m0, [r1]
-     paddd     m0, [pd_32]
-diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
-index 8faaaf4..c687249 100644
---- a/libavcodec/x86/h264_intrapred.asm
-+++ b/libavcodec/x86/h264_intrapred.asm
-@@ -120,7 +120,7 @@ cglobal pred16x16_horizontal_8, 2,3
- 
- INIT_MMX mmx
- PRED16x16_H
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_H
- INIT_XMM ssse3
- PRED16x16_H
-@@ -180,7 +180,7 @@ cglobal pred16x16_dc_8, 2,7
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_DC
- INIT_XMM sse2
- PRED16x16_DC
-@@ -229,7 +229,7 @@ cglobal pred16x16_tm_vp8_8, 2,5
- 
- INIT_MMX mmx
- PRED16x16_TM
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_TM
- 
- INIT_XMM sse2
-@@ -309,14 +309,14 @@ cglobal pred16x16_plane_%1_8, 2,9,7
-     movhlps      m1, m0
- %endif
-     paddw        m0, m1
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     PSHUFLW      m1, m0, 0xE
- %elif cpuflag(mmx)
-     mova         m1, m0
-     psrlq        m1, 32
- %endif
-     paddw        m0, m1
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     PSHUFLW      m1, m0, 0x1
- %elif cpuflag(mmx)
-     mova         m1, m0
-@@ -536,7 +536,7 @@ INIT_MMX mmx
- H264_PRED16x16_PLANE h264
- H264_PRED16x16_PLANE rv40
- H264_PRED16x16_PLANE svq3
--INIT_MMX mmx2
-+INIT_MMX mmxext
- H264_PRED16x16_PLANE h264
- H264_PRED16x16_PLANE rv40
- H264_PRED16x16_PLANE svq3
-@@ -582,7 +582,7 @@ cglobal pred8x8_plane_8, 2,9,7
-     paddw        m0, m1
- 
- %if notcpuflag(ssse3)
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     PSHUFLW      m1, m0, 0xE
- %elif cpuflag(mmx)
-     mova         m1, m0
-@@ -591,7 +591,7 @@ cglobal pred8x8_plane_8, 2,9,7
-     paddw        m0, m1
- %endif ; !ssse3
- 
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     PSHUFLW      m1, m0, 0x1
- %elif cpuflag(mmx)
-     mova         m1, m0
-@@ -716,7 +716,7 @@ ALIGN 16
- 
- INIT_MMX mmx
- H264_PRED8x8_PLANE
--INIT_MMX mmx2
-+INIT_MMX mmxext
- H264_PRED8x8_PLANE
- INIT_XMM sse2
- H264_PRED8x8_PLANE
-@@ -763,7 +763,7 @@ cglobal pred8x8_horizontal_8, 2,3
- 
- INIT_MMX mmx
- PRED8x8_H
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED8x8_H
- INIT_MMX ssse3
- PRED8x8_H
-@@ -941,7 +941,7 @@ cglobal pred8x8_tm_vp8_8, 2,6
- 
- INIT_MMX mmx
- PRED8x8_TM
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED8x8_TM
- 
- INIT_XMM sse2
-@@ -2442,7 +2442,7 @@ cglobal pred4x4_tm_vp8_8, 3,6
-     sub       r3d, r4d
-     movd      mm2, r1d
-     movd      mm4, r3d
--%if cpuflag(mmx2)
-+%if cpuflag(mmxext)
-     pshufw    mm2, mm2, 0
-     pshufw    mm4, mm4, 0
- %else
-@@ -2465,7 +2465,7 @@ cglobal pred4x4_tm_vp8_8, 3,6
- 
- INIT_MMX mmx
- PRED4x4_TM
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED4x4_TM
- 
- INIT_XMM ssse3
-diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm
-index eae45ae..1b7974b 100644
---- a/libavcodec/x86/h264_intrapred_10bit.asm
-+++ b/libavcodec/x86/h264_intrapred_10bit.asm
-@@ -182,7 +182,7 @@ PRED4x4_HD
-     HADDD   %1, %2
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal pred4x4_dc_10, 3, 3
-     sub    r0, r2
-     lea    r1, [r0+r2*2]
-@@ -261,7 +261,7 @@ PRED4x4_VL
- ;-----------------------------------------------------------------------------
- ; void pred4x4_horizontal_up(pixel *src, const pixel *topright, int stride)
- ;-----------------------------------------------------------------------------
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal pred4x4_horizontal_up_10, 3, 3
-     sub       r0, r2
-     lea       r1, [r0+r2*2]
-@@ -410,7 +410,7 @@ cglobal pred8x8_dc_10, 2, 6
-     RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED8x8_DC pshufw
- INIT_XMM sse2
- PRED8x8_DC pshuflw
-@@ -524,7 +524,7 @@ cglobal pred8x8l_128_dc_10, 4, 4
-     RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED8x8L_128_DC
- INIT_XMM sse2
- PRED8x8L_128_DC
-@@ -1007,7 +1007,7 @@ cglobal pred16x16_vertical_10, 2, 3
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_VERTICAL
- INIT_XMM sse2
- PRED16x16_VERTICAL
-@@ -1031,7 +1031,7 @@ cglobal pred16x16_horizontal_10, 2, 3
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_HORIZONTAL
- INIT_XMM sse2
- PRED16x16_HORIZONTAL
-@@ -1077,7 +1077,7 @@ cglobal pred16x16_dc_10, 2, 6
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_DC
- INIT_XMM sse2
- PRED16x16_DC
-@@ -1109,7 +1109,7 @@ cglobal pred16x16_top_dc_10, 2, 3
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_TOP_DC
- INIT_XMM sse2
- PRED16x16_TOP_DC
-@@ -1146,7 +1146,7 @@ cglobal pred16x16_left_dc_10, 2, 6
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_LEFT_DC
- INIT_XMM sse2
- PRED16x16_LEFT_DC
-@@ -1167,7 +1167,7 @@ cglobal pred16x16_128_dc_10, 2,3
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- PRED16x16_128_DC
- INIT_XMM sse2
- PRED16x16_128_DC
-diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
-index eebd137..454dd3f 100644
---- a/libavcodec/x86/h264_intrapred_init.c
-+++ b/libavcodec/x86/h264_intrapred_init.c
-@@ -27,7 +27,7 @@ void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-                                                     const uint8_t *topright, \
-                                                     ptrdiff_t stride);
- 
--PRED4x4(dc, 10, mmx2)
-+PRED4x4(dc, 10, mmxext)
- PRED4x4(down_left, 10, sse2)
- PRED4x4(down_left, 10, avx)
- PRED4x4(down_right, 10, sse2)
-@@ -38,7 +38,7 @@ PRED4x4(vertical_left, 10, avx)
- PRED4x4(vertical_right, 10, sse2)
- PRED4x4(vertical_right, 10, ssse3)
- PRED4x4(vertical_right, 10, avx)
--PRED4x4(horizontal_up, 10, mmx2)
-+PRED4x4(horizontal_up, 10, mmxext)
- PRED4x4(horizontal_down, 10, sse2)
- PRED4x4(horizontal_down, 10, ssse3)
- PRED4x4(horizontal_down, 10, avx)
-@@ -47,7 +47,7 @@ PRED4x4(horizontal_down, 10, avx)
- void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-                                                     ptrdiff_t stride);
- 
--PRED8x8(dc, 10, mmx2)
-+PRED8x8(dc, 10, mmxext)
- PRED8x8(dc, 10, sse2)
- PRED8x8(top_dc, 10, sse2)
- PRED8x8(plane, 10, sse2)
-@@ -62,7 +62,7 @@ void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
- 
- PRED8x8L(dc, 10, sse2)
- PRED8x8L(dc, 10, avx)
--PRED8x8L(128_dc, 10, mmx2)
-+PRED8x8L(128_dc, 10, mmxext)
- PRED8x8L(128_dc, 10, sse2)
- PRED8x8L(top_dc, 10, sse2)
- PRED8x8L(top_dc, 10, avx)
-@@ -88,42 +88,42 @@ PRED8x8L(horizontal_up, 10, avx)
- void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
-                                                       ptrdiff_t stride);
- 
--PRED16x16(dc, 10, mmx2)
-+PRED16x16(dc, 10, mmxext)
- PRED16x16(dc, 10, sse2)
--PRED16x16(top_dc, 10, mmx2)
-+PRED16x16(top_dc, 10, mmxext)
- PRED16x16(top_dc, 10, sse2)
--PRED16x16(128_dc, 10, mmx2)
-+PRED16x16(128_dc, 10, mmxext)
- PRED16x16(128_dc, 10, sse2)
--PRED16x16(left_dc, 10, mmx2)
-+PRED16x16(left_dc, 10, mmxext)
- PRED16x16(left_dc, 10, sse2)
--PRED16x16(vertical, 10, mmx2)
-+PRED16x16(vertical, 10, mmxext)
- PRED16x16(vertical, 10, sse2)
--PRED16x16(horizontal, 10, mmx2)
-+PRED16x16(horizontal, 10, mmxext)
- PRED16x16(horizontal, 10, sse2)
- 
- /* 8-bit versions */
- PRED16x16(vertical, 8, mmx)
- PRED16x16(vertical, 8, sse)
- PRED16x16(horizontal, 8, mmx)
--PRED16x16(horizontal, 8, mmx2)
-+PRED16x16(horizontal, 8, mmxext)
- PRED16x16(horizontal, 8, ssse3)
--PRED16x16(dc, 8, mmx2)
-+PRED16x16(dc, 8, mmxext)
- PRED16x16(dc, 8, sse2)
- PRED16x16(dc, 8, ssse3)
- PRED16x16(plane_h264, 8, mmx)
--PRED16x16(plane_h264, 8, mmx2)
-+PRED16x16(plane_h264, 8, mmxext)
- PRED16x16(plane_h264, 8, sse2)
- PRED16x16(plane_h264, 8, ssse3)
- PRED16x16(plane_rv40, 8, mmx)
--PRED16x16(plane_rv40, 8, mmx2)
-+PRED16x16(plane_rv40, 8, mmxext)
- PRED16x16(plane_rv40, 8, sse2)
- PRED16x16(plane_rv40, 8, ssse3)
- PRED16x16(plane_svq3, 8, mmx)
--PRED16x16(plane_svq3, 8, mmx2)
-+PRED16x16(plane_svq3, 8, mmxext)
- PRED16x16(plane_svq3, 8, sse2)
- PRED16x16(plane_svq3, 8, ssse3)
- PRED16x16(tm_vp8, 8, mmx)
--PRED16x16(tm_vp8, 8, mmx2)
-+PRED16x16(tm_vp8, 8, mmxext)
- PRED16x16(tm_vp8, 8, sse2)
- 
- PRED8x8(top_dc, 8, mmxext)
-@@ -131,14 +131,14 @@ PRED8x8(dc_rv40, 8, mmxext)
- PRED8x8(dc, 8, mmxext)
- PRED8x8(vertical, 8, mmx)
- PRED8x8(horizontal, 8, mmx)
--PRED8x8(horizontal, 8, mmx2)
-+PRED8x8(horizontal, 8, mmxext)
- PRED8x8(horizontal, 8, ssse3)
- PRED8x8(plane, 8, mmx)
--PRED8x8(plane, 8, mmx2)
-+PRED8x8(plane, 8, mmxext)
- PRED8x8(plane, 8, sse2)
- PRED8x8(plane, 8, ssse3)
- PRED8x8(tm_vp8, 8, mmx)
--PRED8x8(tm_vp8, 8, mmx2)
-+PRED8x8(tm_vp8, 8, mmxext)
- PRED8x8(tm_vp8, 8, sse2)
- PRED8x8(tm_vp8, 8, ssse3)
- 
-@@ -175,7 +175,7 @@ PRED4x4(vertical_right, 8, mmxext)
- PRED4x4(horizontal_up, 8, mmxext)
- PRED4x4(horizontal_down, 8, mmxext)
- PRED4x4(tm_vp8, 8, mmx)
--PRED4x4(tm_vp8, 8, mmx2)
-+PRED4x4(tm_vp8, 8, mmxext)
- PRED4x4(tm_vp8, 8, ssse3)
- PRED4x4(vertical_vp8, 8, mmxext)
- 
-@@ -210,10 +210,10 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
-         }
- 
-         if (EXTERNAL_MMXEXT(mm_flags)) {
--            h->pred16x16[HOR_PRED8x8            ] = ff_pred16x16_horizontal_8_mmx2;
--            h->pred16x16[DC_PRED8x8             ] = ff_pred16x16_dc_8_mmx2;
-+            h->pred16x16[HOR_PRED8x8            ] = ff_pred16x16_horizontal_8_mmxext;
-+            h->pred16x16[DC_PRED8x8             ] = ff_pred16x16_dc_8_mmxext;
-             if (chroma_format_idc == 1)
--                h->pred8x8[HOR_PRED8x8          ] = ff_pred8x8_horizontal_8_mmx2;
-+                h->pred8x8[HOR_PRED8x8          ] = ff_pred8x8_horizontal_8_mmxext;
-             h->pred8x8l [TOP_DC_PRED            ] = ff_pred8x8l_top_dc_8_mmxext;
-             h->pred8x8l [DC_PRED                ] = ff_pred8x8l_dc_8_mmxext;
-             h->pred8x8l [HOR_PRED               ] = ff_pred8x8l_horizontal_8_mmxext;
-@@ -243,20 +243,20 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
-                 }
-             }
-             if (codec_id == AV_CODEC_ID_VP8) {
--                h->pred16x16[PLANE_PRED8x8      ] = ff_pred16x16_tm_vp8_8_mmx2;
-+                h->pred16x16[PLANE_PRED8x8      ] = ff_pred16x16_tm_vp8_8_mmxext;
-                 h->pred8x8  [DC_PRED8x8         ] = ff_pred8x8_dc_rv40_8_mmxext;
--                h->pred8x8  [PLANE_PRED8x8      ] = ff_pred8x8_tm_vp8_8_mmx2;
--                h->pred4x4  [TM_VP8_PRED        ] = ff_pred4x4_tm_vp8_8_mmx2;
-+                h->pred8x8  [PLANE_PRED8x8      ] = ff_pred8x8_tm_vp8_8_mmxext;
-+                h->pred4x4  [TM_VP8_PRED        ] = ff_pred4x4_tm_vp8_8_mmxext;
-                 h->pred4x4  [VERT_PRED          ] = ff_pred4x4_vertical_vp8_8_mmxext;
-             } else {
-                 if (chroma_format_idc == 1)
--                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx2;
-+                    h->pred8x8  [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext;
-                 if (codec_id == AV_CODEC_ID_SVQ3) {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_svq3_8_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_svq3_8_mmxext;
-                 } else if (codec_id == AV_CODEC_ID_RV40) {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_rv40_8_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_rv40_8_mmxext;
-                 } else {
--                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_h264_8_mmx2;
-+                    h->pred16x16[PLANE_PRED8x8  ] = ff_pred16x16_plane_h264_8_mmxext;
-                 }
-             }
-         }
-@@ -320,20 +320,20 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
-         }
-     } else if (bit_depth == 10) {
-         if (EXTERNAL_MMXEXT(mm_flags)) {
--            h->pred4x4[DC_PRED             ] = ff_pred4x4_dc_10_mmx2;
--            h->pred4x4[HOR_UP_PRED         ] = ff_pred4x4_horizontal_up_10_mmx2;
-+            h->pred4x4[DC_PRED             ] = ff_pred4x4_dc_10_mmxext;
-+            h->pred4x4[HOR_UP_PRED         ] = ff_pred4x4_horizontal_up_10_mmxext;
- 
-             if (chroma_format_idc == 1)
--                h->pred8x8[DC_PRED8x8      ] = ff_pred8x8_dc_10_mmx2;
-+                h->pred8x8[DC_PRED8x8      ] = ff_pred8x8_dc_10_mmxext;
- 
--            h->pred8x8l[DC_128_PRED        ] = ff_pred8x8l_128_dc_10_mmx2;
-+            h->pred8x8l[DC_128_PRED        ] = ff_pred8x8l_128_dc_10_mmxext;
- 
--            h->pred16x16[DC_PRED8x8        ] = ff_pred16x16_dc_10_mmx2;
--            h->pred16x16[TOP_DC_PRED8x8    ] = ff_pred16x16_top_dc_10_mmx2;
--            h->pred16x16[DC_128_PRED8x8    ] = ff_pred16x16_128_dc_10_mmx2;
--            h->pred16x16[LEFT_DC_PRED8x8   ] = ff_pred16x16_left_dc_10_mmx2;
--            h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmx2;
--            h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmx2;
-+            h->pred16x16[DC_PRED8x8        ] = ff_pred16x16_dc_10_mmxext;
-+            h->pred16x16[TOP_DC_PRED8x8    ] = ff_pred16x16_top_dc_10_mmxext;
-+            h->pred16x16[DC_128_PRED8x8    ] = ff_pred16x16_128_dc_10_mmxext;
-+            h->pred16x16[LEFT_DC_PRED8x8   ] = ff_pred16x16_left_dc_10_mmxext;
-+            h->pred16x16[VERT_PRED8x8      ] = ff_pred16x16_vertical_10_mmxext;
-+            h->pred16x16[HOR_PRED8x8       ] = ff_pred16x16_horizontal_10_mmxext;
-         }
-         if (EXTERNAL_SSE2(mm_flags)) {
-             h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
-diff --git a/libavcodec/x86/h264_weight.asm b/libavcodec/x86/h264_weight.asm
-index bc3fb4b..46f5ddb 100644
---- a/libavcodec/x86/h264_weight.asm
-+++ b/libavcodec/x86/h264_weight.asm
-@@ -71,7 +71,7 @@ SECTION .text
- %endmacro
- 
- INIT_MMX
--cglobal h264_weight_16_mmx2, 6, 6, 0
-+cglobal h264_weight_16_mmxext, 6, 6, 0
-     WEIGHT_SETUP
- .nextrow:
-     WEIGHT_OP 0,  4
-@@ -96,7 +96,7 @@ cglobal h264_weight_%1_%3, 6, 6, %2
- %endmacro
- 
- INIT_MMX
--WEIGHT_FUNC_MM  8, 0, mmx2
-+WEIGHT_FUNC_MM  8, 0, mmxext
- INIT_XMM
- WEIGHT_FUNC_MM 16, 8, sse2
- 
-@@ -121,7 +121,7 @@ cglobal h264_weight_%1_%3, 6, 6, %2
- %endmacro
- 
- INIT_MMX
--WEIGHT_FUNC_HALF_MM 4, 0, mmx2
-+WEIGHT_FUNC_HALF_MM 4, 0, mmxext
- INIT_XMM
- WEIGHT_FUNC_HALF_MM 8, 8, sse2
- 
-@@ -175,7 +175,7 @@ WEIGHT_FUNC_HALF_MM 8, 8, sse2
- %endmacro
- 
- INIT_MMX
--cglobal h264_biweight_16_mmx2, 7, 8, 0
-+cglobal h264_biweight_16_mmxext, 7, 8, 0
-     BIWEIGHT_SETUP
-     movifnidn r3d, r3m
- .nextrow:
-@@ -210,7 +210,7 @@ cglobal h264_biweight_%1_%3, 7, 8, %2
- %endmacro
- 
- INIT_MMX
--BIWEIGHT_FUNC_MM  8, 0, mmx2
-+BIWEIGHT_FUNC_MM  8, 0, mmxext
- INIT_XMM
- BIWEIGHT_FUNC_MM 16, 8, sse2
- 
-@@ -239,7 +239,7 @@ cglobal h264_biweight_%1_%3, 7, 8, %2
- %endmacro
- 
- INIT_MMX
--BIWEIGHT_FUNC_HALF_MM 4, 0, mmx2
-+BIWEIGHT_FUNC_HALF_MM 4, 0, mmxext
- INIT_XMM
- BIWEIGHT_FUNC_HALF_MM 8, 8, sse2
- 
-diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
-index 913c362..d7257e6 100644
---- a/libavcodec/x86/h264dsp_init.c
-+++ b/libavcodec/x86/h264dsp_init.c
-@@ -33,9 +33,9 @@ void ff_h264_idct ## NUM ## _add_ ## DEPTH ## _ ## OPT(uint8_t *dst,    \
- 
- IDCT_ADD_FUNC(, 8, mmx)
- IDCT_ADD_FUNC(, 10, sse2)
--IDCT_ADD_FUNC(_dc, 8, mmx2)
--IDCT_ADD_FUNC(_dc, 10, mmx2)
--IDCT_ADD_FUNC(8_dc, 8, mmx2)
-+IDCT_ADD_FUNC(_dc, 8, mmxext)
-+IDCT_ADD_FUNC(_dc, 10, mmxext)
-+IDCT_ADD_FUNC(8_dc, 8, mmxext)
- IDCT_ADD_FUNC(8_dc, 10, sse2)
- IDCT_ADD_FUNC(8, 8, mmx)
- IDCT_ADD_FUNC(8, 8, sse2)
-@@ -51,16 +51,16 @@ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT       \
-      DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]);
- 
- IDCT_ADD_REP_FUNC(8, 4, 8, mmx)
--IDCT_ADD_REP_FUNC(8, 4, 8, mmx2)
-+IDCT_ADD_REP_FUNC(8, 4, 8, mmxext)
- IDCT_ADD_REP_FUNC(8, 4, 8, sse2)
- IDCT_ADD_REP_FUNC(8, 4, 10, sse2)
- IDCT_ADD_REP_FUNC(8, 4, 10, avx)
- IDCT_ADD_REP_FUNC(, 16, 8, mmx)
--IDCT_ADD_REP_FUNC(, 16, 8, mmx2)
-+IDCT_ADD_REP_FUNC(, 16, 8, mmxext)
- IDCT_ADD_REP_FUNC(, 16, 8, sse2)
- IDCT_ADD_REP_FUNC(, 16, 10, sse2)
- IDCT_ADD_REP_FUNC(, 16intra, 8, mmx)
--IDCT_ADD_REP_FUNC(, 16intra, 8, mmx2)
-+IDCT_ADD_REP_FUNC(, 16intra, 8, mmxext)
- IDCT_ADD_REP_FUNC(, 16intra, 8, sse2)
- IDCT_ADD_REP_FUNC(, 16intra, 10, sse2)
- IDCT_ADD_REP_FUNC(, 16, 10, avx)
-@@ -73,7 +73,7 @@ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT     \
-      DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]);
- 
- IDCT_ADD_REP_FUNC2(, 8, 8, mmx)
--IDCT_ADD_REP_FUNC2(, 8, 8, mmx2)
-+IDCT_ADD_REP_FUNC2(, 8, 8, mmxext)
- IDCT_ADD_REP_FUNC2(, 8, 8, sse2)
- IDCT_ADD_REP_FUNC2(, 8, 10, sse2)
- IDCT_ADD_REP_FUNC2(, 8, 10, avx)
-@@ -84,10 +84,11 @@ void ff_h264_luma_dc_dequant_idct_sse2(DCTELEM *output, DCTELEM *input, int qmul
- /***********************************/
- /* deblocking */
- 
--void ff_h264_loop_filter_strength_mmx2(int16_t bS[2][4][4], uint8_t nnz[40],
--                                       int8_t ref[2][40], int16_t mv[2][40][2],
--                                       int bidir, int edges, int step,
--                                       int mask_mv0, int mask_mv1, int field);
-+void ff_h264_loop_filter_strength_mmxext(int16_t bS[2][4][4], uint8_t nnz[40],
-+                                         int8_t ref[2][40],
-+                                         int16_t mv[2][40][2],
-+                                         int bidir, int edges, int step,
-+                                         int mask_mv0, int mask_mv1, int field);
- 
- #define LF_FUNC(DIR, TYPE, DEPTH, OPT)                                        \
- void ff_deblock_ ## DIR ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT(uint8_t *pix,  \
-@@ -102,12 +103,12 @@ void ff_deblock_ ## DIR ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT(uint8_t *pix,  \
-                                                                int beta);
- 
- #define LF_FUNCS(type, depth)                   \
--LF_FUNC(h,  chroma,       depth, mmx2)          \
--LF_IFUNC(h, chroma_intra, depth, mmx2)          \
--LF_FUNC(v,  chroma,       depth, mmx2)          \
--LF_IFUNC(v, chroma_intra, depth, mmx2)          \
--LF_FUNC(h,  luma,         depth, mmx2)          \
--LF_IFUNC(h, luma_intra,   depth, mmx2)          \
-+LF_FUNC(h,  chroma,       depth, mmxext)        \
-+LF_IFUNC(h, chroma_intra, depth, mmxext)        \
-+LF_FUNC(v,  chroma,       depth, mmxext)        \
-+LF_IFUNC(v, chroma_intra, depth, mmxext)        \
-+LF_FUNC(h,  luma,         depth, mmxext)        \
-+LF_IFUNC(h, luma_intra,   depth, mmxext)        \
- LF_FUNC(h,  luma,         depth, sse2)          \
- LF_IFUNC(h, luma_intra,   depth, sse2)          \
- LF_FUNC(v,  luma,         depth, sse2)          \
-@@ -129,26 +130,26 @@ LF_FUNCS(uint8_t,   8)
- LF_FUNCS(uint16_t, 10)
- 
- #if ARCH_X86_32
--LF_FUNC(v8, luma, 8, mmx2)
-+LF_FUNC(v8, luma, 8, mmxext)
- static void ff_deblock_v_luma_8_mmxext(uint8_t *pix, int stride, int alpha,
-                                        int beta, int8_t *tc0)
- {
-     if ((tc0[0] & tc0[1]) >= 0)
--        ff_deblock_v8_luma_8_mmx2(pix + 0, stride, alpha, beta, tc0);
-+        ff_deblock_v8_luma_8_mmxext(pix + 0, stride, alpha, beta, tc0);
-     if ((tc0[2] & tc0[3]) >= 0)
--        ff_deblock_v8_luma_8_mmx2(pix + 8, stride, alpha, beta, tc0 + 2);
-+        ff_deblock_v8_luma_8_mmxext(pix + 8, stride, alpha, beta, tc0 + 2);
- }
--LF_IFUNC(v8, luma_intra, 8, mmx2)
-+LF_IFUNC(v8, luma_intra, 8, mmxext)
- static void ff_deblock_v_luma_intra_8_mmxext(uint8_t *pix, int stride,
-                                              int alpha, int beta)
- {
--    ff_deblock_v8_luma_intra_8_mmx2(pix + 0, stride, alpha, beta);
--    ff_deblock_v8_luma_intra_8_mmx2(pix + 8, stride, alpha, beta);
-+    ff_deblock_v8_luma_intra_8_mmxext(pix + 0, stride, alpha, beta);
-+    ff_deblock_v8_luma_intra_8_mmxext(pix + 8, stride, alpha, beta);
- }
- #endif /* ARCH_X86_32 */
- 
--LF_FUNC(v,  luma,       10, mmx2)
--LF_IFUNC(v, luma_intra, 10, mmx2)
-+LF_FUNC(v,  luma,       10, mmxext)
-+LF_IFUNC(v, luma_intra, 10, mmxext)
- 
- /***********************************/
- /* weighted prediction */
-@@ -165,8 +166,8 @@ void ff_h264_biweight_ ## W ## _ ## OPT(uint8_t *dst, uint8_t *src,     \
-                                         int weights, int offset);
- 
- #define H264_BIWEIGHT_MMX(W)                    \
--    H264_WEIGHT(W, mmx2)                        \
--    H264_BIWEIGHT(W, mmx2)
-+    H264_WEIGHT(W, mmxext)                      \
-+    H264_BIWEIGHT(W, mmxext)
- 
- #define H264_BIWEIGHT_MMX_SSE(W)                \
-     H264_BIWEIGHT_MMX(W)                        \
-@@ -212,7 +213,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
-     int mm_flags = av_get_cpu_flags();
- 
-     if (chroma_format_idc == 1 && EXTERNAL_MMXEXT(mm_flags))
--        c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmx2;
-+        c->h264_loop_filter_strength = ff_h264_loop_filter_strength_mmxext;
- 
-     if (bit_depth == 8) {
-         if (EXTERNAL_MMX(mm_flags)) {
-@@ -230,33 +231,33 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
-                 c->h264_luma_dc_dequant_idct = ff_h264_luma_dc_dequant_idct_mmx;
- 
-             if (EXTERNAL_MMXEXT(mm_flags)) {
--                c->h264_idct_dc_add  = ff_h264_idct_dc_add_8_mmx2;
--                c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmx2;
--                c->h264_idct_add16   = ff_h264_idct_add16_8_mmx2;
--                c->h264_idct8_add4   = ff_h264_idct8_add4_8_mmx2;
-+                c->h264_idct_dc_add  = ff_h264_idct_dc_add_8_mmxext;
-+                c->h264_idct8_dc_add = ff_h264_idct8_dc_add_8_mmxext;
-+                c->h264_idct_add16   = ff_h264_idct_add16_8_mmxext;
-+                c->h264_idct8_add4   = ff_h264_idct8_add4_8_mmxext;
-                 if (chroma_format_idc == 1)
--                    c->h264_idct_add8 = ff_h264_idct_add8_8_mmx2;
--                c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmx2;
-+                    c->h264_idct_add8 = ff_h264_idct_add8_8_mmxext;
-+                c->h264_idct_add16intra = ff_h264_idct_add16intra_8_mmxext;
- 
--                c->h264_v_loop_filter_chroma       = ff_deblock_v_chroma_8_mmx2;
--                c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmx2;
-+                c->h264_v_loop_filter_chroma       = ff_deblock_v_chroma_8_mmxext;
-+                c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_mmxext;
-                 if (chroma_format_idc == 1) {
--                    c->h264_h_loop_filter_chroma       = ff_deblock_h_chroma_8_mmx2;
--                    c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmx2;
-+                    c->h264_h_loop_filter_chroma       = ff_deblock_h_chroma_8_mmxext;
-+                    c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_mmxext;
-                 }
- #if ARCH_X86_32
-                 c->h264_v_loop_filter_luma       = ff_deblock_v_luma_8_mmxext;
--                c->h264_h_loop_filter_luma       = ff_deblock_h_luma_8_mmx2;
-+                c->h264_h_loop_filter_luma       = ff_deblock_h_luma_8_mmxext;
-                 c->h264_v_loop_filter_luma_intra = ff_deblock_v_luma_intra_8_mmxext;
--                c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmx2;
-+                c->h264_h_loop_filter_luma_intra = ff_deblock_h_luma_intra_8_mmxext;
- #endif /* ARCH_X86_32 */
--                c->weight_h264_pixels_tab[0] = ff_h264_weight_16_mmx2;
--                c->weight_h264_pixels_tab[1] = ff_h264_weight_8_mmx2;
--                c->weight_h264_pixels_tab[2] = ff_h264_weight_4_mmx2;
-+                c->weight_h264_pixels_tab[0] = ff_h264_weight_16_mmxext;
-+                c->weight_h264_pixels_tab[1] = ff_h264_weight_8_mmxext;
-+                c->weight_h264_pixels_tab[2] = ff_h264_weight_4_mmxext;
- 
--                c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_mmx2;
--                c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_mmx2;
--                c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmx2;
-+                c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_mmxext;
-+                c->biweight_h264_pixels_tab[1] = ff_h264_biweight_8_mmxext;
-+                c->biweight_h264_pixels_tab[2] = ff_h264_biweight_4_mmxext;
- 
-                 if (EXTERNAL_SSE2(mm_flags)) {
-                     c->h264_idct8_add  = ff_h264_idct8_add_8_sse2;
-@@ -297,14 +298,14 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
-         if (EXTERNAL_MMX(mm_flags)) {
-             if (EXTERNAL_MMXEXT(mm_flags)) {
- #if ARCH_X86_32
--                c->h264_v_loop_filter_chroma       = ff_deblock_v_chroma_10_mmx2;
--                c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_mmx2;
--                c->h264_v_loop_filter_luma         = ff_deblock_v_luma_10_mmx2;
--                c->h264_h_loop_filter_luma         = ff_deblock_h_luma_10_mmx2;
--                c->h264_v_loop_filter_luma_intra   = ff_deblock_v_luma_intra_10_mmx2;
--                c->h264_h_loop_filter_luma_intra   = ff_deblock_h_luma_intra_10_mmx2;
-+                c->h264_v_loop_filter_chroma       = ff_deblock_v_chroma_10_mmxext;
-+                c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_10_mmxext;
-+                c->h264_v_loop_filter_luma         = ff_deblock_v_luma_10_mmxext;
-+                c->h264_h_loop_filter_luma         = ff_deblock_h_luma_10_mmxext;
-+                c->h264_v_loop_filter_luma_intra   = ff_deblock_v_luma_intra_10_mmxext;
-+                c->h264_h_loop_filter_luma_intra   = ff_deblock_h_luma_intra_10_mmxext;
- #endif /* ARCH_X86_32 */
--                c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmx2;
-+                c->h264_idct_dc_add = ff_h264_idct_dc_add_10_mmxext;
-                 if (EXTERNAL_SSE2(mm_flags)) {
-                     c->h264_idct_add     = ff_h264_idct_add_10_sse2;
-                     c->h264_idct8_dc_add = ff_h264_idct8_dc_add_10_sse2;
-diff --git a/libavcodec/x86/pngdsp.asm b/libavcodec/x86/pngdsp.asm
-index 1573363..c05f3da 100644
---- a/libavcodec/x86/pngdsp.asm
-+++ b/libavcodec/x86/pngdsp.asm
-@@ -166,7 +166,7 @@ cglobal add_png_paeth_prediction, 5, 7, %1, dst, src, top, w, bpp, end, cntr
-     RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- ADD_PAETH_PRED_FN 0
- 
- INIT_MMX ssse3
-diff --git a/libavcodec/x86/pngdsp_init.c b/libavcodec/x86/pngdsp_init.c
-index 213b854..2e858fa 100644
---- a/libavcodec/x86/pngdsp_init.c
-+++ b/libavcodec/x86/pngdsp_init.c
-@@ -23,8 +23,8 @@
- #include "libavutil/x86/cpu.h"
- #include "libavcodec/pngdsp.h"
- 
--void ff_add_png_paeth_prediction_mmx2 (uint8_t *dst, uint8_t *src,
--                                       uint8_t *top, int w, int bpp);
-+void ff_add_png_paeth_prediction_mmxext(uint8_t *dst, uint8_t *src,
-+                                        uint8_t *top, int w, int bpp);
- void ff_add_png_paeth_prediction_ssse3(uint8_t *dst, uint8_t *src,
-                                        uint8_t *top, int w, int bpp);
- void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1,
-@@ -41,7 +41,7 @@ void ff_pngdsp_init_x86(PNGDSPContext *dsp)
-         dsp->add_bytes_l2         = ff_add_bytes_l2_mmx;
- #endif
-     if (EXTERNAL_MMXEXT(flags))
--        dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmx2;
-+        dsp->add_paeth_prediction = ff_add_png_paeth_prediction_mmxext;
-     if (EXTERNAL_SSE2(flags))
-         dsp->add_bytes_l2         = ff_add_bytes_l2_sse2;
-     if (EXTERNAL_SSSE3(flags))
-diff --git a/libavcodec/x86/rv34dsp.asm b/libavcodec/x86/rv34dsp.asm
-index 2f12446..c099ac5 100644
---- a/libavcodec/x86/rv34dsp.asm
-+++ b/libavcodec/x86/rv34dsp.asm
-@@ -57,7 +57,7 @@ cglobal rv34_idct_%1, 1, 2, 0
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- %define IDCT_DC IDCT_DC_ROUND
- rv34_idct dc
- %define IDCT_DC IDCT_DC_NOROUND
-@@ -133,7 +133,7 @@ cglobal rv34_idct_dc_add, 3, 3
-     mova        mm5, [pd_512]           ; 0x200
- %endmacro
- 
--; ff_rv34_idct_add_mmx2(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
-+; ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
- %macro COL_TRANSFORM  4
-     pshufw      mm3, %2, 0xDD        ; col. 1,3,1,3
-     pshufw       %2, %2, 0x88        ; col. 0,2,0,2
-@@ -154,7 +154,7 @@ cglobal rv34_idct_dc_add, 3, 3
-     packuswb     %2, %2
-     movd         %1, %2
- %endmacro
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal rv34_idct_add, 3,3,0, d, s, b
-     ROW_TRANSFORM       bq
-     COL_TRANSFORM     [dq], mm0, [pw_col_coeffs+ 0], [pw_col_coeffs+ 8]
-diff --git a/libavcodec/x86/rv34dsp_init.c b/libavcodec/x86/rv34dsp_init.c
-index 305745a..6b6cf91 100644
---- a/libavcodec/x86/rv34dsp_init.c
-+++ b/libavcodec/x86/rv34dsp_init.c
-@@ -25,11 +25,11 @@
- #include "libavcodec/dsputil.h"
- #include "libavcodec/rv34dsp.h"
- 
--void ff_rv34_idct_dc_mmx2(DCTELEM *block);
--void ff_rv34_idct_dc_noround_mmx2(DCTELEM *block);
-+void ff_rv34_idct_dc_mmxext(DCTELEM *block);
-+void ff_rv34_idct_dc_noround_mmxext(DCTELEM *block);
- void ff_rv34_idct_dc_add_mmx(uint8_t *dst, ptrdiff_t stride, int dc);
- void ff_rv34_idct_dc_add_sse4(uint8_t *dst, ptrdiff_t stride, int dc);
--void ff_rv34_idct_add_mmx2(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
-+void ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, DCTELEM *block);
- 
- av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c, DSPContext *dsp)
- {
-@@ -38,8 +38,8 @@ av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c, DSPContext *dsp)
-     if (EXTERNAL_MMX(mm_flags))
-         c->rv34_idct_dc_add = ff_rv34_idct_dc_add_mmx;
-     if (EXTERNAL_MMXEXT(mm_flags)) {
--        c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmx2;
--        c->rv34_idct_add         = ff_rv34_idct_add_mmx2;
-+        c->rv34_inv_transform_dc = ff_rv34_idct_dc_noround_mmxext;
-+        c->rv34_idct_add         = ff_rv34_idct_add_mmxext;
-     }
-     if (EXTERNAL_SSE4(mm_flags))
-         c->rv34_idct_dc_add = ff_rv34_idct_dc_add_sse4;
-diff --git a/libavcodec/x86/rv40dsp.asm b/libavcodec/x86/rv40dsp.asm
-index 02267ef..7ec72be 100644
---- a/libavcodec/x86/rv40dsp.asm
-+++ b/libavcodec/x86/rv40dsp.asm
-@@ -240,7 +240,7 @@ INIT_MMX  mmx
- FILTER_V  put
- FILTER_H  put
- 
--INIT_MMX  mmx2
-+INIT_MMX  mmxext
- FILTER_V  avg
- FILTER_H  avg
- 
-@@ -486,7 +486,7 @@ cglobal rv40_weight_func_%1_%2, 6, 7, 8
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- RV40_WEIGHT   rnd,    8, 3
- RV40_WEIGHT   rnd,   16, 4
- RV40_WEIGHT   nornd,  8, 3
-diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
-index a7d92f7..a1dc22a 100644
---- a/libavcodec/x86/rv40dsp_init.c
-+++ b/libavcodec/x86/rv40dsp_init.c
-@@ -34,15 +34,15 @@
- #if HAVE_YASM
- void ff_put_rv40_chroma_mc8_mmx  (uint8_t *dst, uint8_t *src,
-                                   int stride, int h, int x, int y);
--void ff_avg_rv40_chroma_mc8_mmx2 (uint8_t *dst, uint8_t *src,
--                                  int stride, int h, int x, int y);
-+void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, uint8_t *src,
-+                                   int stride, int h, int x, int y);
- void ff_avg_rv40_chroma_mc8_3dnow(uint8_t *dst, uint8_t *src,
-                                   int stride, int h, int x, int y);
- 
- void ff_put_rv40_chroma_mc4_mmx  (uint8_t *dst, uint8_t *src,
-                                   int stride, int h, int x, int y);
--void ff_avg_rv40_chroma_mc4_mmx2 (uint8_t *dst, uint8_t *src,
--                                  int stride, int h, int x, int y);
-+void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, uint8_t *src,
-+                                   int stride, int h, int x, int y);
- void ff_avg_rv40_chroma_mc4_3dnow(uint8_t *dst, uint8_t *src,
-                                   int stride, int h, int x, int y);
- 
-@@ -55,7 +55,7 @@ void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *sr
-                                         int w1, int w2, ptrdiff_t stride); \
- void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
-                                         int w1, int w2, ptrdiff_t stride);
--DECLARE_WEIGHT(mmx2)
-+DECLARE_WEIGHT(mmxext)
- DECLARE_WEIGHT(sse2)
- DECLARE_WEIGHT(ssse3)
- 
-@@ -150,9 +150,9 @@ QPEL_MC_DECL(avg_, _sse2)
- 
- QPEL_MC_DECL(put_, _mmx)
- 
--#define ff_put_rv40_qpel_h_mmx2  ff_put_rv40_qpel_h_mmx
--#define ff_put_rv40_qpel_v_mmx2  ff_put_rv40_qpel_v_mmx
--QPEL_MC_DECL(avg_, _mmx2)
-+#define ff_put_rv40_qpel_h_mmxext  ff_put_rv40_qpel_h_mmx
-+#define ff_put_rv40_qpel_v_mmxext  ff_put_rv40_qpel_v_mmx
-+QPEL_MC_DECL(avg_, _mmxext)
- 
- #define ff_put_rv40_qpel_h_3dnow  ff_put_rv40_qpel_h_mmx
- #define ff_put_rv40_qpel_v_3dnow  ff_put_rv40_qpel_v_mmx
-@@ -206,14 +206,14 @@ void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
- #endif
-     }
-     if (EXTERNAL_MMXEXT(mm_flags)) {
--        c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_mmx2;
--        c->avg_chroma_pixels_tab[1] = ff_avg_rv40_chroma_mc4_mmx2;
--        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmx2;
--        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmx2;
--        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmx2;
--        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmx2;
-+        c->avg_chroma_pixels_tab[0]     = ff_avg_rv40_chroma_mc8_mmxext;
-+        c->avg_chroma_pixels_tab[1]     = ff_avg_rv40_chroma_mc4_mmxext;
-+        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_mmxext;
-+        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_mmxext;
-+        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_mmxext;
-+        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_mmxext;
- #if ARCH_X86_32
--        QPEL_MC_SET(avg_, _mmx2)
-+        QPEL_MC_SET(avg_, _mmxext)
- #endif
-     } else if (EXTERNAL_AMD3DNOW(mm_flags)) {
-         c->avg_chroma_pixels_tab[0] = ff_avg_rv40_chroma_mc8_3dnow;
-diff --git a/libavcodec/x86/vc1dsp_init.c b/libavcodec/x86/vc1dsp_init.c
-index c359c4a..230d06f 100644
---- a/libavcodec/x86/vc1dsp_init.c
-+++ b/libavcodec/x86/vc1dsp_init.c
-@@ -64,8 +64,8 @@ static void vc1_h_loop_filter16_sse4(uint8_t *src, int stride, int pq)
- 
- void ff_put_vc1_chroma_mc8_nornd_mmx  (uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
--void ff_avg_vc1_chroma_mc8_nornd_mmx2 (uint8_t *dst, uint8_t *src,
--                                       int stride, int h, int x, int y);
-+void ff_avg_vc1_chroma_mc8_nornd_mmxext(uint8_t *dst, uint8_t *src,
-+                                        int stride, int h, int x, int y);
- void ff_avg_vc1_chroma_mc8_nornd_3dnow(uint8_t *dst, uint8_t *src,
-                                        int stride, int h, int x, int y);
- void ff_put_vc1_chroma_mc8_nornd_ssse3(uint8_t *dst, uint8_t *src,
-@@ -99,7 +99,7 @@ av_cold void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
- 
-     if (mm_flags & AV_CPU_FLAG_MMXEXT) {
-         ASSIGN_LF(mmxext);
--        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmx2;
-+        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_mmxext;
-     } else if (mm_flags & AV_CPU_FLAG_3DNOW) {
-         dsp->avg_no_rnd_vc1_chroma_pixels_tab[0] = ff_avg_vc1_chroma_mc8_nornd_3dnow;
-     }
-diff --git a/libavcodec/x86/vp3dsp.asm b/libavcodec/x86/vp3dsp.asm
-index d300304..fc1e776 100644
---- a/libavcodec/x86/vp3dsp.asm
-+++ b/libavcodec/x86/vp3dsp.asm
-@@ -101,7 +101,7 @@ SECTION .text
-     mov  [r0+r3  -1], r2w
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal vp3_v_loop_filter, 3, 4
- %if ARCH_X86_64
-     movsxd        r1, r1d
-@@ -633,7 +633,7 @@ vp3_idct_funcs
-     movq   [r0+r3  ], m5
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal vp3_idct_dc_add, 3, 4
- %if ARCH_X86_64
-     movsxd        r1, r1d
-diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c
-index d91050e..bbe74ba 100644
---- a/libavcodec/x86/vp3dsp_init.c
-+++ b/libavcodec/x86/vp3dsp_init.c
-@@ -31,11 +31,13 @@ void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block);
- void ff_vp3_idct_put_sse2(uint8_t *dest, int line_size, DCTELEM *block);
- void ff_vp3_idct_add_sse2(uint8_t *dest, int line_size, DCTELEM *block);
- 
--void ff_vp3_idct_dc_add_mmx2(uint8_t *dest, int line_size,
--                             const DCTELEM *block);
-+void ff_vp3_idct_dc_add_mmxext(uint8_t *dest, int line_size,
-+                               const DCTELEM *block);
- 
--void ff_vp3_v_loop_filter_mmx2(uint8_t *src, int stride, int *bounding_values);
--void ff_vp3_h_loop_filter_mmx2(uint8_t *src, int stride, int *bounding_values);
-+void ff_vp3_v_loop_filter_mmxext(uint8_t *src, int stride,
-+                                 int *bounding_values);
-+void ff_vp3_h_loop_filter_mmxext(uint8_t *src, int stride,
-+                                 int *bounding_values);
- 
- av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags)
- {
-@@ -50,11 +52,11 @@ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags)
- #endif
- 
-     if (EXTERNAL_MMXEXT(cpuflags)) {
--        c->idct_dc_add = ff_vp3_idct_dc_add_mmx2;
-+        c->idct_dc_add = ff_vp3_idct_dc_add_mmxext;
- 
-         if (!(flags & CODEC_FLAG_BITEXACT)) {
--            c->v_loop_filter = ff_vp3_v_loop_filter_mmx2;
--            c->h_loop_filter = ff_vp3_h_loop_filter_mmx2;
-+            c->v_loop_filter = ff_vp3_v_loop_filter_mmxext;
-+            c->h_loop_filter = ff_vp3_h_loop_filter_mmxext;
-         }
-     }
- 
-diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm
-index 5dc4ca3..d732bf4 100644
---- a/libavcodec/x86/vp8dsp.asm
-+++ b/libavcodec/x86/vp8dsp.asm
-@@ -338,7 +338,7 @@ INIT_XMM ssse3
- FILTER_SSSE3 8
- 
- ; 4x4 block, H-only 4-tap filter
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal put_vp8_epel4_h4, 6, 6 + npicregs, 0, dst, dststride, src, srcstride, height, mx, picreg
-     shl       mxd, 4
- %ifdef PIC
-@@ -386,7 +386,7 @@ cglobal put_vp8_epel4_h4, 6, 6 + npicregs, 0, dst, dststride, src, srcstride, he
-     REP_RET
- 
- ; 4x4 block, H-only 6-tap filter
--INIT_MMX mmx2
-+INIT_MMX mmxext
- cglobal put_vp8_epel4_h6, 6, 6 + npicregs, 0, dst, dststride, src, srcstride, height, mx, picreg
-     lea       mxd, [mxq*3]
- %ifdef PIC
-@@ -673,7 +673,7 @@ cglobal put_vp8_epel%1_v6, 7, 7, 8, dst, dststride, src, srcstride, height, picr
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- FILTER_V 4
- INIT_XMM sse2
- FILTER_V 8
-@@ -769,7 +769,7 @@ cglobal put_vp8_bilinear%1_h, 6, 6 + npicregs, 7, dst, dststride, src, srcstride
-     REP_RET
- %endmacro
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- FILTER_BILINEAR 4
- INIT_XMM sse2
- FILTER_BILINEAR 8
-@@ -1611,7 +1611,7 @@ cglobal vp8_%1_loop_filter_simple, 3, %2, 8, dst, stride, flim, cntr
- INIT_MMX mmx
- SIMPLE_LOOPFILTER v, 4
- SIMPLE_LOOPFILTER h, 5
--INIT_MMX mmx2
-+INIT_MMX mmxext
- SIMPLE_LOOPFILTER v, 4
- SIMPLE_LOOPFILTER h, 5
- %endif
-@@ -1835,7 +1835,7 @@ cglobal vp8_%1_loop_filter16y_inner, 5, 5, 13, dst, stride, flimE, flimI, hevthr
-     psubusb          m6, m5          ; q2-q1
-     por              m6, m4          ; abs(q2-q1)
- 
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m4, m_flimI
-     pxor             m3, m3
-     psubusb          m0, m4
-@@ -1875,7 +1875,7 @@ cglobal vp8_%1_loop_filter16y_inner, 5, 5, 13, dst, stride, flimE, flimI, hevthr
-     psubusb          m1, m3          ; p1-p0
-     psubusb          m6, m2          ; p0-p1
-     por              m1, m6          ; abs(p1-p0)
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m6, m1
-     psubusb          m1, m4
-     psubusb          m6, m_hevthr
-@@ -1906,7 +1906,7 @@ cglobal vp8_%1_loop_filter16y_inner, 5, 5, 13, dst, stride, flimE, flimI, hevthr
-     psubusb          m1, m5          ; q0-q1
-     psubusb          m7, m4          ; q1-q0
-     por              m1, m7          ; abs(q1-q0)
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m7, m1
-     psubusb          m1, m6
-     psubusb          m7, m_hevthr
-@@ -2014,14 +2014,14 @@ cglobal vp8_%1_loop_filter16y_inner, 5, 5, 13, dst, stride, flimE, flimI, hevthr
- %else
-     mova             m6, m_maskres
- %endif
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m7, [pb_1]
- %else ; mmxext/sse2
-     pxor             m7, m7
- %endif
-     pand             m0, m6
-     pand             m1, m6
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     paddusb          m0, m7
-     pand             m1, [pb_FE]
-     pandn            m7, m0
-@@ -2097,7 +2097,7 @@ INNER_LOOPFILTER h, 16
- INNER_LOOPFILTER v,  8
- INNER_LOOPFILTER h,  8
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- INNER_LOOPFILTER v, 16
- INNER_LOOPFILTER h, 16
- INNER_LOOPFILTER v,  8
-@@ -2343,7 +2343,7 @@ cglobal vp8_%1_loop_filter16y_mbedge, 5, 5, 15, dst1, stride, flimE, flimI, hevt
-     psubusb          m6, m5          ; q2-q1
-     por              m6, m4          ; abs(q2-q1)
- 
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m4, m_flimI
-     pxor             m3, m3
-     psubusb          m0, m4
-@@ -2383,7 +2383,7 @@ cglobal vp8_%1_loop_filter16y_mbedge, 5, 5, 15, dst1, stride, flimE, flimI, hevt
-     psubusb          m1, m3          ; p1-p0
-     psubusb          m6, m2          ; p0-p1
-     por              m1, m6          ; abs(p1-p0)
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m6, m1
-     psubusb          m1, m4
-     psubusb          m6, m_hevthr
-@@ -2414,7 +2414,7 @@ cglobal vp8_%1_loop_filter16y_mbedge, 5, 5, 15, dst1, stride, flimE, flimI, hevt
-     psubusb          m1, m5          ; q0-q1
-     psubusb          m7, m4          ; q1-q0
-     por              m1, m7          ; abs(q1-q0)
--%if notcpuflag(mmx2)
-+%if notcpuflag(mmxext)
-     mova             m7, m1
-     psubusb          m1, m6
-     psubusb          m7, m_hevthr
-@@ -2755,7 +2755,7 @@ MBEDGE_LOOPFILTER h, 16
- MBEDGE_LOOPFILTER v,  8
- MBEDGE_LOOPFILTER h,  8
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- MBEDGE_LOOPFILTER v, 16
- MBEDGE_LOOPFILTER h, 16
- MBEDGE_LOOPFILTER v,  8
-diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c
-index 38ad0c7..bf5463f 100644
---- a/libavcodec/x86/vp8dsp_init.c
-+++ b/libavcodec/x86/vp8dsp_init.c
-@@ -30,16 +30,16 @@
- /*
-  * MC functions
-  */
--extern void ff_put_vp8_epel4_h4_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_epel4_h4_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                        uint8_t *src, ptrdiff_t srcstride,
-                                        int height, int mx, int my);
--extern void ff_put_vp8_epel4_h6_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_epel4_h6_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                        uint8_t *src, ptrdiff_t srcstride,
-                                        int height, int mx, int my);
--extern void ff_put_vp8_epel4_v4_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_epel4_v4_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                        uint8_t *src, ptrdiff_t srcstride,
-                                        int height, int mx, int my);
--extern void ff_put_vp8_epel4_v6_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_epel4_v6_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                        uint8_t *src, ptrdiff_t srcstride,
-                                        int height, int mx, int my);
- 
-@@ -81,7 +81,7 @@ extern void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride,
-                                        uint8_t *src, ptrdiff_t srcstride,
-                                        int height, int mx, int my);
- 
--extern void ff_put_vp8_bilinear4_h_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_bilinear4_h_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                           uint8_t *src, ptrdiff_t srcstride,
-                                           int height, int mx, int my);
- extern void ff_put_vp8_bilinear8_h_sse2  (uint8_t *dst, ptrdiff_t dststride,
-@@ -94,7 +94,7 @@ extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, ptrdiff_t dststride,
-                                           uint8_t *src, ptrdiff_t srcstride,
-                                           int height, int mx, int my);
- 
--extern void ff_put_vp8_bilinear4_v_mmx2  (uint8_t *dst, ptrdiff_t dststride,
-+extern void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, ptrdiff_t dststride,
-                                           uint8_t *src, ptrdiff_t srcstride,
-                                           int height, int mx, int my);
- extern void ff_put_vp8_bilinear8_v_sse2  (uint8_t *dst, ptrdiff_t dststride,
-@@ -140,16 +140,16 @@ static void ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \
- }
- 
- #if ARCH_X86_32
--TAP_W8 (mmx2,  epel, h4)
--TAP_W8 (mmx2,  epel, h6)
--TAP_W16(mmx2,  epel, h6)
--TAP_W8 (mmx2,  epel, v4)
--TAP_W8 (mmx2,  epel, v6)
--TAP_W16(mmx2,  epel, v6)
--TAP_W8 (mmx2,  bilinear, h)
--TAP_W16(mmx2,  bilinear, h)
--TAP_W8 (mmx2,  bilinear, v)
--TAP_W16(mmx2,  bilinear, v)
-+TAP_W8 (mmxext, epel, h4)
-+TAP_W8 (mmxext, epel, h6)
-+TAP_W16(mmxext, epel, h6)
-+TAP_W8 (mmxext, epel, v4)
-+TAP_W8 (mmxext, epel, v6)
-+TAP_W16(mmxext, epel, v6)
-+TAP_W8 (mmxext, bilinear, h)
-+TAP_W16(mmxext, bilinear, h)
-+TAP_W8 (mmxext, bilinear, v)
-+TAP_W16(mmxext, bilinear, v)
- #endif
- 
- TAP_W16(sse2,  epel, h6)
-@@ -178,13 +178,13 @@ static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT
- 
- #if ARCH_X86_32
- #define HVTAPMMX(x, y) \
--HVTAP(mmx2, 8, x, y,  4,  8) \
--HVTAP(mmx2, 8, x, y,  8, 16)
-+HVTAP(mmxext, 8, x, y,  4,  8) \
-+HVTAP(mmxext, 8, x, y,  8, 16)
- 
--HVTAP(mmx2, 8, 6, 6, 16, 16)
-+HVTAP(mmxext, 8, 6, 6, 16, 16)
- #else
- #define HVTAPMMX(x, y) \
--HVTAP(mmx2, 8, x, y,  4,  8)
-+HVTAP(mmxext, 8, x, y,  4,  8)
- #endif
- 
- HVTAPMMX(4, 4)
-@@ -219,10 +219,10 @@ static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \
-         dst, dststride, tmp, SIZE,      height,     mx, my); \
- }
- 
--HVBILIN(mmx2,  8,  4,  8)
-+HVBILIN(mmxext,  8,  4,  8)
- #if ARCH_X86_32
--HVBILIN(mmx2,  8,  8, 16)
--HVBILIN(mmx2,  8, 16, 16)
-+HVBILIN(mmxext,  8,  8, 16)
-+HVBILIN(mmxext,  8, 16, 16)
- #endif
- HVBILIN(sse2,  8,  8, 16)
- HVBILIN(sse2,  8, 16, 16)
-@@ -284,7 +284,7 @@ extern void ff_vp8_h_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, \
-                                                     int e, int i, int hvt);
- 
- DECLARE_LOOP_FILTER(mmx)
--DECLARE_LOOP_FILTER(mmx2)
-+DECLARE_LOOP_FILTER(mmxext)
- DECLARE_LOOP_FILTER(sse2)
- DECLARE_LOOP_FILTER(ssse3)
- DECLARE_LOOP_FILTER(sse4)
-@@ -352,26 +352,26 @@ av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c)
-     /* note that 4-tap width=16 functions are missing because w=16
-      * is only used for luma, and luma is always a copy or sixtap. */
-     if (mm_flags & AV_CPU_FLAG_MMXEXT) {
--        VP8_MC_FUNC(2, 4, mmx2);
--        VP8_BILINEAR_MC_FUNC(2, 4, mmx2);
-+        VP8_MC_FUNC(2, 4, mmxext);
-+        VP8_BILINEAR_MC_FUNC(2, 4, mmxext);
- #if ARCH_X86_32
--        VP8_LUMA_MC_FUNC(0, 16, mmx2);
--        VP8_MC_FUNC(1, 8, mmx2);
--        VP8_BILINEAR_MC_FUNC(0, 16, mmx2);
--        VP8_BILINEAR_MC_FUNC(1, 8, mmx2);
--
--        c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx2;
--        c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx2;
--
--        c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx2;
--        c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx2;
--        c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx2;
--        c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx2;
--
--        c->vp8_v_loop_filter16y       = ff_vp8_v_loop_filter16y_mbedge_mmx2;
--        c->vp8_h_loop_filter16y       = ff_vp8_h_loop_filter16y_mbedge_mmx2;
--        c->vp8_v_loop_filter8uv       = ff_vp8_v_loop_filter8uv_mbedge_mmx2;
--        c->vp8_h_loop_filter8uv       = ff_vp8_h_loop_filter8uv_mbedge_mmx2;
-+        VP8_LUMA_MC_FUNC(0, 16, mmxext);
-+        VP8_MC_FUNC(1, 8, mmxext);
-+        VP8_BILINEAR_MC_FUNC(0, 16, mmxext);
-+        VP8_BILINEAR_MC_FUNC(1,  8, mmxext);
-+
-+        c->vp8_v_loop_filter_simple   = ff_vp8_v_loop_filter_simple_mmxext;
-+        c->vp8_h_loop_filter_simple   = ff_vp8_h_loop_filter_simple_mmxext;
-+
-+        c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmxext;
-+        c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmxext;
-+        c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmxext;
-+        c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmxext;
-+
-+        c->vp8_v_loop_filter16y       = ff_vp8_v_loop_filter16y_mbedge_mmxext;
-+        c->vp8_h_loop_filter16y       = ff_vp8_h_loop_filter16y_mbedge_mmxext;
-+        c->vp8_v_loop_filter8uv       = ff_vp8_v_loop_filter8uv_mbedge_mmxext;
-+        c->vp8_h_loop_filter8uv       = ff_vp8_h_loop_filter8uv_mbedge_mmxext;
- #endif
-     }
- 
-diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
-index cf11183..40d8763 100644
---- a/libavutil/x86/x86util.asm
-+++ b/libavutil/x86/x86util.asm
-@@ -555,7 +555,7 @@
- %if mmsize == 16
-     pshuflw    %1, %2, (%3)*0x55
-     punpcklqdq %1, %1
--%elif cpuflag(mmx2)
-+%elif cpuflag(mmxext)
-     pshufw     %1, %2, (%3)*0x55
- %else
-     %ifnidn %1, %2
-diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
-index 23508b8..d137e6e 100644
---- a/libswscale/x86/output.asm
-+++ b/libswscale/x86/output.asm
-@@ -247,7 +247,7 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
- %endmacro
- 
- %if ARCH_X86_32
--INIT_MMX mmx2
-+INIT_MMX mmxext
- yuv2planeX_fn  8,  0, 7
- yuv2planeX_fn  9,  0, 5
- yuv2planeX_fn 10,  0, 5
-@@ -388,7 +388,7 @@ INIT_MMX mmx
- yuv2plane1_fn  8, 0, 5
- yuv2plane1_fn 16, 0, 3
- 
--INIT_MMX mmx2
-+INIT_MMX mmxext
- yuv2plane1_fn  9, 0, 3
- yuv2plane1_fn 10, 0, 3
- %endif
-diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
-index 571510a..c48e56d 100644
---- a/libswscale/x86/swscale.c
-+++ b/libswscale/x86/swscale.c
-@@ -250,7 +250,7 @@ extern void ff_yuv2planeX_ ## size ## _ ## opt(const int16_t *filter, int filter
-     VSCALEX_FUNC(10, opt)
- 
- #if ARCH_X86_32
--VSCALEX_FUNCS(mmx2);
-+VSCALEX_FUNCS(mmxext);
- #endif
- VSCALEX_FUNCS(sse2);
- VSCALEX_FUNCS(sse4);
-@@ -267,7 +267,7 @@ extern void ff_yuv2plane1_ ## size ## _ ## opt(const int16_t *src, uint8_t *dst,
-     VSCALE_FUNC(16, opt1)
- 
- #if ARCH_X86_32
--VSCALE_FUNCS(mmx, mmx2);
-+VSCALE_FUNCS(mmx, mmxext);
- #endif
- VSCALE_FUNCS(sse2, sse2);
- VSCALE_FUNC(16, sse4);
-@@ -360,7 +360,7 @@ switch(c->dstBpc){ \
-     if (EXTERNAL_MMX(cpu_flags)) {
-         ASSIGN_MMX_SCALE_FUNC(c->hyScale, c->hLumFilterSize, mmx, mmx);
-         ASSIGN_MMX_SCALE_FUNC(c->hcScale, c->hChrFilterSize, mmx, mmx);
--        ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMXEXT);
-+        ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmxext, cpu_flags & AV_CPU_FLAG_MMXEXT);
- 
-         switch (c->srcFormat) {
-         case AV_PIX_FMT_Y400A:
-@@ -393,7 +393,7 @@ switch(c->dstBpc){ \
-         }
-     }
-     if (EXTERNAL_MMXEXT(cpu_flags)) {
--        ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmx2, , 1);
-+        ASSIGN_VSCALEX_FUNC(c->yuv2planeX, mmxext, , 1);
-     }
- #endif /* ARCH_X86_32 */
- #define ASSIGN_SSE_SCALE_FUNC(hscalefn, filtersize, opt1, opt2) \
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0263-segment-fix-NULL-pointer-dereference-in-seg_write_he.patch b/debian/patches/post-9beta2/0263-segment-fix-NULL-pointer-dereference-in-seg_write_he.patch
deleted file mode 100644
index b480f06..0000000
--- a/debian/patches/post-9beta2/0263-segment-fix-NULL-pointer-dereference-in-seg_write_he.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e8769b37fe8a841c0d28d3686c6d3cdecc542bc7 Mon Sep 17 00:00:00 2001
-From: Xi Wang <xi.wang at gmail.com>
-Date: Wed, 14 Nov 2012 02:52:32 -0500
-Subject: [PATCH 263/278] segment: fix NULL pointer dereference in
- seg_write_header()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since the pointer `oc' is NULL, oc->oformat->name will cause a null
-pointer dereference.  This patch changes it to seg->oformat->name.
-
-Signed-off-by: Xi Wang <xi.wang at gmail.com>
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- libavformat/segment.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/segment.c b/libavformat/segment.c
-index fd52835..8afb41f 100644
---- a/libavformat/segment.c
-+++ b/libavformat/segment.c
-@@ -210,7 +210,7 @@ static int seg_write_header(AVFormatContext *s)
-     }
-     if (seg->oformat->flags & AVFMT_NOFILE) {
-         av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
--               oc->oformat->name);
-+               seg->oformat->name);
-         ret = AVERROR(EINVAL);
-         goto fail;
-     }
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0264-avutil-change-GET_UTF8-to-not-use-av_log2.patch b/debian/patches/post-9beta2/0264-avutil-change-GET_UTF8-to-not-use-av_log2.patch
deleted file mode 100644
index e7717fd..0000000
--- a/debian/patches/post-9beta2/0264-avutil-change-GET_UTF8-to-not-use-av_log2.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7ba0c1b390a6ea67ca5e9cbade3005285b51b70f Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Tue, 13 Nov 2012 15:49:39 +0000
-Subject: [PATCH 264/278] avutil: change GET_UTF8 to not use av_log2()
-
-This removes an inter-library dependency on ff_log2_tab causing
-linking errors in some configurations.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- libavutil/common.h |    9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/libavutil/common.h b/libavutil/common.h
-index 3465863..cc4df16 100644
---- a/libavutil/common.h
-+++ b/libavutil/common.h
-@@ -252,16 +252,17 @@ static av_always_inline av_const int av_popcount64_c(uint64_t x)
- #define GET_UTF8(val, GET_BYTE, ERROR)\
-     val= GET_BYTE;\
-     {\
--        int ones= 7 - av_log2(val ^ 255);\
--        if(ones==1)\
-+        uint32_t top = (val & 128) >> 1;\
-+        if ((val & 0xc0) == 0x80)\
-             ERROR\
--        val&= 127>>ones;\
--        while(--ones > 0){\
-+        while (val & top) {\
-             int tmp= GET_BYTE - 128;\
-             if(tmp>>6)\
-                 ERROR\
-             val= (val<<6) + tmp;\
-+            top <<= 5;\
-         }\
-+        val &= (top << 1) - 1;\
-     }
- 
- /**
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0265-ppc-do-not-pass-redundant-compiler-flags.patch b/debian/patches/post-9beta2/0265-ppc-do-not-pass-redundant-compiler-flags.patch
deleted file mode 100644
index dfe0930..0000000
--- a/debian/patches/post-9beta2/0265-ppc-do-not-pass-redundant-compiler-flags.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 7f1fcaf0e6488c92c0624ab112ec220dc3709de6 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Wed, 14 Nov 2012 00:07:13 +0000
-Subject: [PATCH 265/278] ppc: do not pass redundant compiler flags
-
-The -mpowerpc64 and -mpowerpc-gfxopt flags are implicitly set by
--mcpu as needed.  Passing them explicitly is redundant and can
-conflict with user-supplied flags.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
----
- configure |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/configure b/configure
-index 163b742..779b733 100755
---- a/configure
-+++ b/configure
-@@ -2505,20 +2505,20 @@ elif enabled ppc; then
-             disable altivec
-         ;;
-         g3|75*|ppc75*|powerpc75*)
--            cpuflags="-mcpu=750 -mpowerpc-gfxopt"
-+            cpuflags="-mcpu=750"
-             disable altivec
-         ;;
-         g4|745*|ppc745*|powerpc745*)
--            cpuflags="-mcpu=7450 -mpowerpc-gfxopt"
-+            cpuflags="-mcpu=7450"
-         ;;
-         74*|ppc74*|powerpc74*)
--            cpuflags="-mcpu=7400 -mpowerpc-gfxopt"
-+            cpuflags="-mcpu=7400"
-         ;;
-         g5|970|ppc970|powerpc970)
--            cpuflags="-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
-+            cpuflags="-mcpu=970"
-         ;;
-         power[3-7]*)
--            cpuflags="-mcpu=$cpu -mpowerpc-gfxopt -mpowerpc64"
-+            cpuflags="-mcpu=$cpu"
-         ;;
-         cell)
-             cpuflags="-mcpu=cell"
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0266-fate-Add-dependencies-for-aac-alac-amrnb-amrwb-atrac.patch b/debian/patches/post-9beta2/0266-fate-Add-dependencies-for-aac-alac-amrnb-amrwb-atrac.patch
deleted file mode 100644
index 563e746..0000000
--- a/debian/patches/post-9beta2/0266-fate-Add-dependencies-for-aac-alac-amrnb-amrwb-atrac.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From a3138ebfa85ec0d3aa7cbf8f2a09e40a220521cf Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 20 Oct 2012 01:12:18 +0200
-Subject: [PATCH 266/278] fate: Add dependencies for aac, alac, amrnb, amrwb,
- atrac tests
-
----
- tests/fate/aac.mak   |   11 ++++++++---
- tests/fate/alac.mak  |    2 +-
- tests/fate/amrnb.mak |    2 +-
- tests/fate/amrwb.mak |    2 +-
- tests/fate/atrac.mak |    8 +++++---
- 5 files changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak
-index ea738c5..e840bf0 100644
---- a/tests/fate/aac.mak
-+++ b/tests/fate/aac.mak
-@@ -53,9 +53,10 @@ fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
- fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
- fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
- 
-+FATE_AAC_CT_RAW = fate-aac-ct-sbr_i-ps_i.aac
-+
- FATE_AAC_CT = sbr_bc-ps_i.3gp  \
-               sbr_bic-ps_i.3gp \
--              sbr_i-ps_i.aac   \
-               sbr_bc-ps_bc.mp4 \
-               sbr_bc-ps_i.mp4  \
-               sbr_i-ps_bic.mp4 \
-@@ -71,7 +72,11 @@ FATE_AAC_LATM += fate-aac-latm_stereo_to_51
- fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
- fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
- 
--FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM)
-+FATE_AAC-$(call      DEMDEC, AAC,    AAC)      += $(FATE_AAC_CT_RAW)
-+FATE_AAC-$(call      DEMDEC, MOV,    AAC)      += $(FATE_AAC)
-+FATE_AAC_LATM-$(call DEMDEC, MPEGTS, AAC_LATM) += $(FATE_AAC_LATM)
-+
-+FATE_AAC_ALL = $(FATE_AAC-yes) $(FATE_AAC_LATM-yes)
- 
- $(FATE_AAC_ALL): CMP  = oneoff
- $(FATE_AAC_ALL): FUZZ = 2
-@@ -79,4 +84,4 @@ $(FATE_AAC_ALL): FUZZ = 2
- FATE_SAMPLES_AVCONV += $(FATE_AAC_ALL)
- 
- fate-aac: $(FATE_AAC_ALL)
--fate-aac-latm: $(FATE_AAC_LATM)
-+fate-aac-latm: $(FATE_AAC_LATM-yes)
-diff --git a/tests/fate/alac.mak b/tests/fate/alac.mak
-index b55b594..814a5b7 100644
---- a/tests/fate/alac.mak
-+++ b/tests/fate/alac.mak
-@@ -11,5 +11,5 @@ fate-alac-%: CMD = enc_dec_pcm mov wav s16le $(REF) -c alac $(OPTS)
- fate-alac-%: CMP = oneoff
- fate-alac-%: FUZZ = 0
- 
--FATE_SAMPLES_AVCONV += $(FATE_ALAC)
-+FATE_SAMPLES_AVCONV-$(call ENCDEC, ALAC, MOV) += $(FATE_ALAC)
- fate-alac: $(FATE_ALAC)
-diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak
-index 6e3f2a4..6dbba58 100644
---- a/tests/fate/amrnb.mak
-+++ b/tests/fate/amrnb.mak
-@@ -32,5 +32,5 @@ fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm
- 
- $(FATE_AMRNB): CMP = stddev
- 
--FATE_SAMPLES_AVCONV += $(FATE_AMRNB)
-+FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRNB) += $(FATE_AMRNB)
- fate-amrnb: $(FATE_AMRNB)
-diff --git a/tests/fate/amrwb.mak b/tests/fate/amrwb.mak
-index 0b7be72..99c2737 100644
---- a/tests/fate/amrwb.mak
-+++ b/tests/fate/amrwb.mak
-@@ -43,5 +43,5 @@ fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm
- 
- $(FATE_AMRWB): CMP = stddev
- 
--FATE_SAMPLES_AVCONV += $(FATE_AMRWB)
-+FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRWB) += $(FATE_AMRWB)
- fate-amrwb: $(FATE_AMRWB)
-diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak
-index 39b788a..3ac5553 100644
---- a/tests/fate/atrac.mak
-+++ b/tests/fate/atrac.mak
-@@ -1,4 +1,4 @@
--FATE_ATRAC1 += fate-atrac1
-+FATE_ATRAC1-$(call DEMDEC, AEA, ATRAC1) += fate-atrac1
- fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea
- fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm
- 
-@@ -14,11 +14,13 @@ FATE_ATRAC3 += fate-atrac3-3
- fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav
- fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm
- 
--FATE_ATRAC_ALL = $(FATE_ATRAC1) $(FATE_ATRAC3)
-+FATE_ATRAC3-$(call DEMDEC, WAV, ATRAC3) += $(FATE_ATRAC3)
-+
-+FATE_ATRAC_ALL = $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes)
- 
- $(FATE_ATRAC_ALL): CMP = oneoff
- 
- FATE_SAMPLES_AVCONV += $(FATE_ATRAC_ALL)
- 
- fate-atrac:  $(FATE_ATRAC_ALL)
--fate-atrac3: $(FATE_ATRAC3)
-+fate-atrac3: $(FATE_ATRAC3-yes)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0267-avformat-clarify-stream-id-for-muxing.patch b/debian/patches/post-9beta2/0267-avformat-clarify-stream-id-for-muxing.patch
deleted file mode 100644
index 84a8b66..0000000
--- a/debian/patches/post-9beta2/0267-avformat-clarify-stream-id-for-muxing.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3b4296f41473a5b39e84d7a49d480624c9c60040 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Sat, 10 Nov 2012 16:20:30 +0100
-Subject: [PATCH 267/278] avformat: clarify stream id for muxing
-
----
- libavformat/avformat.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/avformat.h b/libavformat/avformat.h
-index 3e10496..d1d4763 100644
---- a/libavformat/avformat.h
-+++ b/libavformat/avformat.h
-@@ -621,7 +621,7 @@ typedef struct AVStream {
-     /**
-      * Format-specific stream ID.
-      * decoding: set by libavformat
--     * encoding: set by the user
-+     * encoding: set by the user, replaced by libavformat if left unset
-      */
-     int id;
-     /**
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0268-rtp-set-the-payload-type-as-stream-id.patch b/debian/patches/post-9beta2/0268-rtp-set-the-payload-type-as-stream-id.patch
deleted file mode 100644
index 570fce9..0000000
--- a/debian/patches/post-9beta2/0268-rtp-set-the-payload-type-as-stream-id.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From 8034130e06b03859af9ce64f7ee653cd14df328d Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero at gentoo.org>
-Date: Sun, 11 Nov 2012 20:44:28 +0100
-Subject: [PATCH 268/278] rtp: set the payload type as stream id
-
-Support multiple video/audio streams with different format in the
-same session.
-
-Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
----
- libavformat/avformat.h     |    3 +++
- libavformat/internal.h     |    5 +++--
- libavformat/movenc.c       |   11 +++++++----
- libavformat/movenchint.c   |    2 +-
- libavformat/rtp.c          |    8 ++++++--
- libavformat/rtp.h          |    9 +++++++--
- libavformat/rtpenc.c       |   13 +++++++++++--
- libavformat/rtpenc_chain.c |   12 ++++++++++--
- libavformat/rtpenc_chain.h |    3 ++-
- libavformat/rtsp.c         |    3 ++-
- libavformat/sapenc.c       |    2 +-
- libavformat/sdp.c          |   21 +++++++++++++--------
- 12 files changed, 66 insertions(+), 26 deletions(-)
-
-diff --git a/libavformat/avformat.h b/libavformat/avformat.h
-index d1d4763..51635c4 100644
---- a/libavformat/avformat.h
-+++ b/libavformat/avformat.h
-@@ -1684,6 +1684,9 @@ int av_filename_number_test(const char *filename);
- /**
-  * Generate an SDP for an RTP session.
-  *
-+ * Note, this overwrites the id values of AVStreams in the muxer contexts
-+ * for getting unique dynamic payload types.
-+ *
-  * @param ac array of AVFormatContexts describing the RTP streams. If the
-  *           array is composed by only one context, such context can contain
-  *           multiple AVStreams (one AVStream per RTP stream). Otherwise,
-diff --git a/libavformat/internal.h b/libavformat/internal.h
-index 3ef46ea..01e3df3 100644
---- a/libavformat/internal.h
-+++ b/libavformat/internal.h
-@@ -124,7 +124,8 @@ int ff_url_join(char *str, int size, const char *proto,
-  *
-  * @param buff the buffer to append the SDP fragment to
-  * @param size the size of the buff buffer
-- * @param c the AVCodecContext of the media to describe
-+ * @param st the AVStream of the media to describe
-+ * @param idx the global stream index
-  * @param dest_addr the destination address of the media stream, may be NULL
-  * @param dest_type the destination address type, may be NULL
-  * @param port the destination port of the media stream, 0 if unknown
-@@ -132,7 +133,7 @@ int ff_url_join(char *str, int size, const char *proto,
-  * @param fmt the AVFormatContext, which might contain options modifying
-  *            the generated SDP
-  */
--void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
-+void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
-                         const char *dest_addr, const char *dest_type,
-                         int port, int ttl, AVFormatContext *fmt);
- 
-diff --git a/libavformat/movenc.c b/libavformat/movenc.c
-index 50371cd..3949520 100644
---- a/libavformat/movenc.c
-+++ b/libavformat/movenc.c
-@@ -1536,13 +1536,16 @@ static int mov_write_uuid_tag_psp(AVIOContext *pb, MOVTrack *mov)
-     return 0x34;
- }
- 
--static int mov_write_udta_sdp(AVIOContext *pb, AVFormatContext *ctx, int index)
-+static int mov_write_udta_sdp(AVIOContext *pb, MOVTrack *track)
- {
-+
-+    AVFormatContext *ctx = track->rtp_ctx;
-     char buf[1000] = "";
-     int len;
- 
--    ff_sdp_write_media(buf, sizeof(buf), ctx->streams[0]->codec, NULL, NULL, 0, 0, ctx);
--    av_strlcatf(buf, sizeof(buf), "a=control:streamid=%d\r\n", index);
-+    ff_sdp_write_media(buf, sizeof(buf), ctx->streams[0], track->src_track,
-+                       NULL, NULL, 0, 0, ctx);
-+    av_strlcatf(buf, sizeof(buf), "a=control:streamid=%d\r\n", track->track_id);
-     len = strlen(buf);
- 
-     avio_wb32(pb, len + 24);
-@@ -1573,7 +1576,7 @@ static int mov_write_trak_tag(AVIOContext *pb, MOVMuxContext *mov,
-     if (track->mode == MODE_PSP)
-         mov_write_uuid_tag_psp(pb,track);  // PSP Movies require this uuid box
-     if (track->tag == MKTAG('r','t','p',' '))
--        mov_write_udta_sdp(pb, track->rtp_ctx, track->track_id);
-+        mov_write_udta_sdp(pb, track);
-     if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO && track->mode == MODE_MOV) {
-         double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
-         if (0.0 != sample_aspect_ratio && 1.0 != sample_aspect_ratio)
-diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
-index 5ef90f1..02391b5 100644
---- a/libavformat/movenchint.c
-+++ b/libavformat/movenchint.c
-@@ -44,7 +44,7 @@ int ff_mov_init_hinting(AVFormatContext *s, int index, int src_index)
-     track->enc->codec_tag  = track->tag;
- 
-     ret = ff_rtp_chain_mux_open(&track->rtp_ctx, s, src_st, NULL,
--                                RTP_MAX_PACKET_SIZE);
-+                                RTP_MAX_PACKET_SIZE, src_index);
-     if (ret < 0)
-         goto fail;
- 
-diff --git a/libavformat/rtp.c b/libavformat/rtp.c
-index 4314c46..6512206 100644
---- a/libavformat/rtp.c
-+++ b/libavformat/rtp.c
-@@ -90,7 +90,8 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)
-     return -1;
- }
- 
--int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
-+int ff_rtp_get_payload_type(AVFormatContext *fmt,
-+                            AVCodecContext *codec, int idx)
- {
-     int i;
-     AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL;
-@@ -124,8 +125,11 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
-             return AVRtpPayloadTypes[i].pt;
-         }
- 
-+    if (idx < 0)
-+        idx = codec->codec_type == AVMEDIA_TYPE_AUDIO;
-+
-     /* dynamic payload type */
--    return RTP_PT_PRIVATE + (codec->codec_type == AVMEDIA_TYPE_AUDIO);
-+    return RTP_PT_PRIVATE + idx;
- }
- 
- const char *ff_rtp_enc_name(int payload_type)
-diff --git a/libavformat/rtp.h b/libavformat/rtp.h
-index 6df4ed4..f8d406e 100644
---- a/libavformat/rtp.h
-+++ b/libavformat/rtp.h
-@@ -25,13 +25,18 @@
- #include "libavcodec/avcodec.h"
- 
- /**
-- * Return the payload type for a given codec used in the given format context.
-+ * Return the payload type for a given stream used in the given format context.
-+ * Static payload types are derived from the codec.
-+ * Dynamic payload type are derived from the id field in AVStream.
-+ * The format context private option payload_type overrides both.
-  *
-  * @param fmt   The context of the format
-  * @param codec The context of the codec
-+ * @param idx   The stream index
-  * @return The payload type (the 'PT' field in the RTP header).
-  */
--int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec);
-+int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec,
-+                            int idx);
- 
- /**
-  * Initialize a codec context based on the payload type.
-diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
-index b17c465..babb2bb 100644
---- a/libavformat/rtpenc.c
-+++ b/libavformat/rtpenc.c
-@@ -101,8 +101,17 @@ static int rtp_write_header(AVFormatContext *s1)
-         return -1;
-     }
- 
--    if (s->payload_type < 0)
--        s->payload_type = ff_rtp_get_payload_type(s1, st->codec);
-+    if (s->payload_type < 0) {
-+        /* Re-validate non-dynamic payload types */
-+        if (st->id < RTP_PT_PRIVATE)
-+            st->id = ff_rtp_get_payload_type(s1, st->codec, -1);
-+
-+        s->payload_type = st->id;
-+    } else {
-+        /* private option takes priority */
-+        st->id = s->payload_type;
-+    }
-+
-     s->base_timestamp = av_get_random_seed();
-     s->timestamp = s->base_timestamp;
-     s->cur_timestamp = 0;
-diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
-index 3742099..adc432a 100644
---- a/libavformat/rtpenc_chain.c
-+++ b/libavformat/rtpenc_chain.c
-@@ -23,13 +23,15 @@
- #include "avio_internal.h"
- #include "rtpenc_chain.h"
- #include "avio_internal.h"
-+#include "rtp.h"
- #include "libavutil/opt.h"
- 
- int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
--                          AVStream *st, URLContext *handle, int packet_size)
-+                          AVStream *st, URLContext *handle, int packet_size,
-+                          int idx)
- {
-     AVFormatContext *rtpctx = NULL;
--    int ret;
-+    int ret, pt;
-     AVOutputFormat *rtp_format = av_guess_format("rtp", NULL, NULL);
-     uint8_t *rtpflags;
-     AVDictionary *opts = NULL;
-@@ -57,6 +59,12 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
-     rtpctx->max_delay = s->max_delay;
-     /* Copy other stream parameters. */
-     rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio;
-+    /* Get the payload type from the codec */
-+    if (st->id < RTP_PT_PRIVATE)
-+        rtpctx->streams[0]->id =
-+            ff_rtp_get_payload_type(rtpctx, st->codec, idx);
-+    else
-+        rtpctx->streams[0]->id = st->id;
- 
-     if (av_opt_get(s, "rtpflags", AV_OPT_SEARCH_CHILDREN, &rtpflags) >= 0)
-         av_dict_set(&opts, "rtpflags", rtpflags, AV_DICT_DONT_STRDUP_VAL);
-diff --git a/libavformat/rtpenc_chain.h b/libavformat/rtpenc_chain.h
-index 66b9e4c..4117239 100644
---- a/libavformat/rtpenc_chain.h
-+++ b/libavformat/rtpenc_chain.h
-@@ -26,6 +26,7 @@
- #include "url.h"
- 
- int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
--                          AVStream *st, URLContext *handle, int packet_size);
-+                          AVStream *st, URLContext *handle, int packet_size,
-+                          int id);
- 
- #endif /* AVFORMAT_RTPENC_CHAIN_H */
-diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
-index 44de4af..8142094 100644
---- a/libavformat/rtsp.c
-+++ b/libavformat/rtsp.c
-@@ -630,7 +630,8 @@ int ff_rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
-     if (s->oformat && CONFIG_RTSP_MUXER) {
-         int ret = ff_rtp_chain_mux_open(&rtsp_st->transport_priv, s, st,
-                                         rtsp_st->rtp_handle,
--                                        RTSP_TCP_MAX_PACKET_SIZE);
-+                                        RTSP_TCP_MAX_PACKET_SIZE,
-+                                        rtsp_st->stream_index);
-         /* Ownership of rtp_handle is passed to the rtp mux context */
-         rtsp_st->rtp_handle = NULL;
-         if (ret < 0)
-diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
-index 1575848..fd9be4f 100644
---- a/libavformat/sapenc.c
-+++ b/libavformat/sapenc.c
-@@ -151,7 +151,7 @@ static int sap_write_header(AVFormatContext *s)
-             ret = AVERROR(EIO);
-             goto fail;
-         }
--        ret = ff_rtp_chain_mux_open(&contexts[i], s, s->streams[i], fd, 0);
-+        ret = ff_rtp_chain_mux_open(&contexts[i], s, s->streams[i], fd, 0, i);
-         if (ret < 0)
-             goto fail;
-         s->streams[i]->priv_data = contexts[i];
-diff --git a/libavformat/sdp.c b/libavformat/sdp.c
-index 0f7eb2f..57044d4 100644
---- a/libavformat/sdp.c
-+++ b/libavformat/sdp.c
-@@ -590,12 +590,15 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
-     return buff;
- }
- 
--void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt)
-+void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
-+                        const char *dest_addr, const char *dest_type,
-+                        int port, int ttl, AVFormatContext *fmt)
- {
-+    AVCodecContext *c = st->codec;
-     const char *type;
-     int payload_type;
- 
--    payload_type = ff_rtp_get_payload_type(fmt, c);
-+    payload_type = ff_rtp_get_payload_type(fmt, c, idx);
- 
-     switch (c->codec_type) {
-         case AVMEDIA_TYPE_VIDEO   : type = "video"      ; break;
-@@ -617,7 +620,7 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
- {
-     AVDictionaryEntry *title = av_dict_get(ac[0]->metadata, "title", NULL, 0);
-     struct sdp_session_level s = { 0 };
--    int i, j, port, ttl, is_multicast;
-+    int i, j, port, ttl, is_multicast, index = 0;
-     char dst[32], dst_type[5];
- 
-     memset(buf, 0, size);
-@@ -656,10 +659,10 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
-                 ttl = 0;
-         }
-         for (j = 0; j < ac[i]->nb_streams; j++) {
--            ff_sdp_write_media(buf, size,
--                                  ac[i]->streams[j]->codec, dst[0] ? dst : NULL,
--                                  dst_type, (port > 0) ? port + j * 2 : 0, ttl,
--                                  ac[i]);
-+            ff_sdp_write_media(buf, size, ac[i]->streams[j], index++,
-+                               dst[0] ? dst : NULL, dst_type,
-+                               (port > 0) ? port + j * 2 : 0,
-+                               ttl, ac[i]);
-             if (port <= 0) {
-                 av_strlcatf(buf, size,
-                                    "a=control:streamid=%d\r\n", i + j);
-@@ -675,7 +678,9 @@ int av_sdp_create(AVFormatContext *ac[], int n_files, char *buf, int size)
-     return AVERROR(ENOSYS);
- }
- 
--void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt)
-+void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx,
-+                        const char *dest_addr, const char *dest_type,
-+                        int port, int ttl, AVFormatContext *fmt)
- {
- }
- #endif
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0269-bgmc-Fix-av_malloc-checks-in-ff_bgmc_init.patch b/debian/patches/post-9beta2/0269-bgmc-Fix-av_malloc-checks-in-ff_bgmc_init.patch
deleted file mode 100644
index 9ae3fab..0000000
--- a/debian/patches/post-9beta2/0269-bgmc-Fix-av_malloc-checks-in-ff_bgmc_init.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768 Mon Sep 17 00:00:00 2001
-From: Xi Wang <xi.wang at gmail.com>
-Date: Wed, 14 Nov 2012 13:45:24 -0500
-Subject: [PATCH 269/278] bgmc: Fix av_malloc checks in ff_bgmc_init()
-
-Signed-off-by: Xi Wang <xi.wang at gmail.com>
-Signed-off-by: Diego Biurrun <diego at biurrun.de>
----
- libavcodec/bgmc.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c
-index 08b1337..ec8cf9b 100644
---- a/libavcodec/bgmc.c
-+++ b/libavcodec/bgmc.c
-@@ -461,7 +461,7 @@ int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status)
-     *cf_lut        = av_malloc(sizeof(*cf_lut)        * LUT_BUFF * 16 * LUT_SIZE);
-     *cf_lut_status = av_malloc(sizeof(*cf_lut_status) * LUT_BUFF);
- 
--    if (!cf_lut || !cf_lut_status) {
-+    if (!*cf_lut || !*cf_lut_status) {
-         ff_bgmc_end(cf_lut, cf_lut_status);
-         av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
-         return AVERROR(ENOMEM);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0270-configure-Add-option-to-disable-all-command-line-pro.patch b/debian/patches/post-9beta2/0270-configure-Add-option-to-disable-all-command-line-pro.patch
deleted file mode 100644
index bef0956..0000000
--- a/debian/patches/post-9beta2/0270-configure-Add-option-to-disable-all-command-line-pro.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e28b7553aeab8aa0d590683a21a9a6ab113cb433 Mon Sep 17 00:00:00 2001
-From: Diego Biurrun <diego at biurrun.de>
-Date: Sat, 10 Nov 2012 18:10:59 +0100
-Subject: [PATCH 270/278] configure: Add option to disable all command line
- programs
-
----
- configure |   10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 779b733..261b0ac 100755
---- a/configure
-+++ b/configure
-@@ -101,12 +101,15 @@ Configuration options:
-   --enable-gray            enable full grayscale support (slower color)
-   --disable-swscale-alpha  disable alpha channel support in swscale
- 
--Component options:
--  --disable-doc            do not build documentation
-+Program options:
-+  --disable-programs       do not build command line programs
-   --disable-avconv         disable avconv build
-   --disable-avplay         disable avplay build
-   --disable-avprobe        disable avprobe build
-   --disable-avserver       disable avserver build
-+
-+Component options:
-+  --disable-doc            do not build documentation
-   --disable-avdevice       disable libavdevice build
-   --disable-avcodec        disable libavcodec build
-   --disable-avformat       disable libavformat build
-@@ -1945,6 +1948,9 @@ for opt do
-     ;;
-     --enable-debug=*) debuglevel="$optval"
-     ;;
-+    --disable-programs)
-+    disable $PROGRAM_LIST
-+    ;;
-     --disable-everything)
-     map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
-     ;;
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0271-doxygen-remove-obsolete-options-from-Doxyfile.patch b/debian/patches/post-9beta2/0271-doxygen-remove-obsolete-options-from-Doxyfile.patch
deleted file mode 100644
index 57ea126..0000000
--- a/debian/patches/post-9beta2/0271-doxygen-remove-obsolete-options-from-Doxyfile.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 116ae7285e2b5a9487b12c904b006c3c0063e83c Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Sun, 28 Oct 2012 00:43:12 +0200
-Subject: [PATCH 271/278] doxygen: remove obsolete options from Doxyfile
-
-The options USE_INLINE_TREES, SHOW_DIRECTORIES and HTML_ALIGN_MEMBERS
-became obsolete with doxygen 1.8.1 (releaded 2012-05-19). The generated
-outpu for older doxygen versions should not change since they were set
-to the default value.
----
- doc/Doxyfile |   17 -----------------
- 1 file changed, 17 deletions(-)
-
-diff --git a/doc/Doxyfile b/doc/Doxyfile
-index aa1f4e2..1a37021 100644
---- a/doc/Doxyfile
-+++ b/doc/Doxyfile
-@@ -489,12 +489,6 @@ MAX_INITIALIZER_LINES  = 30
- 
- SHOW_USED_FILES        = YES
- 
--# If the sources in your project are distributed over multiple directories
--# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
--# in the documentation. The default is NO.
--
--SHOW_DIRECTORIES       = NO
--
- # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
- # This will remove the Files entry from the Quick Index and from the
- # Folder Tree View (if specified). The default is YES.
-@@ -848,12 +842,6 @@ HTML_COLORSTYLE_GAMMA  = 80
- 
- HTML_TIMESTAMP         = YES
- 
--# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
--# files or namespaces will be aligned in HTML using tables. If set to
--# NO a bullet list will be used.
--
--HTML_ALIGN_MEMBERS     = YES
--
- # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
- # documentation will contain sections that can be hidden and shown after the
- # page has loaded. For this to work a browser that supports
-@@ -1034,11 +1022,6 @@ ENUM_VALUES_PER_LINE   = 4
- 
- GENERATE_TREEVIEW      = NO
- 
--# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
--# and Class Hierarchy pages using a tree view instead of an ordered list.
--
--USE_INLINE_TREES       = NO
--
- # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
- # used to set the initial width (in pixels) of the frame in which the tree
- # is shown.
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0272-configure-Check-for-Werror-parameters-on-clang.patch b/debian/patches/post-9beta2/0272-configure-Check-for-Werror-parameters-on-clang.patch
deleted file mode 100644
index a9c946e..0000000
--- a/debian/patches/post-9beta2/0272-configure-Check-for-Werror-parameters-on-clang.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 9eded0fe412e610ee8944681d5c554b723463e96 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Tue, 13 Nov 2012 19:01:51 +0200
-Subject: [PATCH 272/278] configure: Check for -Werror parameters on clang
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Martin Storsjö <martin at martin.st>
----
- configure |    2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure b/configure
-index 261b0ac..14a887e 100755
---- a/configure
-+++ b/configure
-@@ -3549,6 +3549,8 @@ elif enabled llvm_gcc; then
- elif enabled clang; then
-     check_cflags -mllvm -stack-alignment=16
-     check_cflags -Qunused-arguments
-+    check_cflags -Werror=implicit-function-declaration
-+    check_cflags -Werror=missing-prototypes
- elif enabled armcc; then
-     # 2523: use of inline assembler is deprecated
-     add_cflags -W${armcc_opt},--diag_suppress=2523
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0273-avserver-remove-daemon-mode.patch b/debian/patches/post-9beta2/0273-avserver-remove-daemon-mode.patch
deleted file mode 100644
index 5eb3c1e..0000000
--- a/debian/patches/post-9beta2/0273-avserver-remove-daemon-mode.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From ada51a334aeb1e378fe852c8b5eede9cbbd05f69 Mon Sep 17 00:00:00 2001
-From: Mans Rullgard <mans at mansr.com>
-Date: Wed, 25 Apr 2012 12:08:54 +0000
-Subject: [PATCH 273/278] avserver: remove daemon mode
-
-This code spews a multitude of warnings with glibc (unchecked
-return values), some of them possibly warranted.  Furthermore,
-the deamonisation is not suitable for use with typical startup
-scripts as it does not provide the PID of the daemon in any way.
-Users wishing to run avserver as a daemon can still do so using
-start-stop-daemon or equivalent tools.
-
-Signed-off-by: Mans Rullgard <mans at mansr.com>
-Signed-off-by: Janne Grunau <janne-libav at jannau.net>
----
- Changelog         |    1 +
- avserver.c        |   38 --------------------------------------
- doc/avserver.conf |    3 ---
- doc/avserver.texi |    8 +-------
- 4 files changed, 2 insertions(+), 48 deletions(-)
-
-diff --git a/Changelog b/Changelog
-index f8079d1..33e55a5 100644
---- a/Changelog
-+++ b/Changelog
-@@ -9,6 +9,7 @@ version <next>:
- version 9_beta2:
- - metadata (INFO tag) support in WAV muxer
- - support for building DLLs using MSVC
-+- remove avserver daemon mode
- 
- 
- version 9_beta1:
-diff --git a/avserver.c b/avserver.c
-index f9d85d8..649cbed 100644
---- a/avserver.c
-+++ b/avserver.c
-@@ -301,12 +301,10 @@ static int rtp_new_av_stream(HTTPContext *c,
-                              HTTPContext *rtsp_c);
- 
- static const char *my_program_name;
--static const char *my_program_dir;
- 
- static const char *config_filename = "/etc/avserver.conf";
- 
- static int avserver_debug;
--static int avserver_daemon;
- static int no_launch;
- static int need_to_start_children;
- 
-@@ -524,9 +522,6 @@ static void start_children(FFStream *feed)
-                     }
-                 }
- 
--                /* This is needed to make relative pathnames work */
--                chdir(my_program_dir);
--
-                 signal(SIGPIPE, SIG_DFL);
- 
-                 execvp(pathname, feed->child_argv);
-@@ -4081,8 +4076,6 @@ static int parse_ffconfig(const char *filename)
-             if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
-                 ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
-             }
--        } else if (!av_strcasecmp(cmd, "NoDaemon")) {
--            avserver_daemon = 0;
-         } else if (!av_strcasecmp(cmd, "RTSPPort")) {
-             get_arg(arg, sizeof(arg), &p);
-             val = atoi(arg);
-@@ -4655,7 +4648,6 @@ static void handle_child_exit(int sig)
- static void opt_debug(void)
- {
-     avserver_debug = 1;
--    avserver_daemon = 0;
-     logfilename[0] = '-';
- }
- 
-@@ -4686,8 +4678,6 @@ int main(int argc, char **argv)
-     show_banner();
- 
-     my_program_name = argv[0];
--    my_program_dir = getcwd(0, 0);
--    avserver_daemon = 1;
- 
-     parse_options(NULL, argc, argv, options, NULL);
- 
-@@ -4719,37 +4709,9 @@ int main(int argc, char **argv)
- 
-     compute_bandwidth();
- 
--    /* put the process in background and detach it from its TTY */
--    if (avserver_daemon) {
--        int pid;
--
--        pid = fork();
--        if (pid < 0) {
--            perror("fork");
--            exit(1);
--        } else if (pid > 0) {
--            /* parent : exit */
--            exit(0);
--        } else {
--            /* child */
--            setsid();
--            close(0);
--            open("/dev/null", O_RDWR);
--            if (strcmp(logfilename, "-") != 0) {
--                close(1);
--                dup(0);
--            }
--            close(2);
--            dup(0);
--        }
--    }
--
-     /* signal init */
-     signal(SIGPIPE, SIG_IGN);
- 
--    if (avserver_daemon)
--        chdir("/");
--
-     if (http_server() < 0) {
-         http_log("Could not start server\n");
-         exit(1);
-diff --git a/doc/avserver.conf b/doc/avserver.conf
-index e9724bb..e1cd9fb 100644
---- a/doc/avserver.conf
-+++ b/doc/avserver.conf
-@@ -25,9 +25,6 @@ MaxBandwidth 1000
- # '-' is the standard output.
- CustomLog -
- 
--# Suppress that if you want to launch avserver as a daemon.
--NoDaemon
--
- 
- ##################################################################
- # Definition of the live feeds. Each live feed contains one video
-diff --git a/doc/avserver.texi b/doc/avserver.texi
-index c023814..88e6221 100644
---- a/doc/avserver.texi
-+++ b/doc/avserver.texi
-@@ -31,11 +31,6 @@ several live feeds, streaming from files and time shifting on live feeds
- (you can seek to positions in the past on each live feed, provided you
- specify a big enough feed storage in avserver.conf).
- 
--avserver runs in daemon mode by default; that is, it puts itself in
--the background and detaches from its TTY, unless it is launched in
--debug mode or a NoDaemon option is specified in the configuration
--file.
--
- This documentation covers only the streaming aspects of avserver /
- avconv. All questions about parameters for avconv, codec questions,
- etc. are not covered here. Read @file{avconv.html} for more
-@@ -257,8 +252,7 @@ within the various <Stream> sections. Since avserver will not launch
- any avconv instances, you will have to launch them manually.
- @item -d
- Enable debug mode. This option increases log verbosity, directs log
--messages to stdout and causes avserver to run in the foreground
--rather than as a daemon.
-+messages to stdout.
- @end table
- @c man end
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0274-avserver-use-freopen-to-redirect-stdin-out-err-to-de.patch b/debian/patches/post-9beta2/0274-avserver-use-freopen-to-redirect-stdin-out-err-to-de.patch
deleted file mode 100644
index 9b439a3..0000000
--- a/debian/patches/post-9beta2/0274-avserver-use-freopen-to-redirect-stdin-out-err-to-de.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From a4cd2ad89aa67533ff69de49612c747825c3f96f Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Thu, 25 Oct 2012 14:54:48 +0200
-Subject: [PATCH 274/278] avserver: use freopen to redirect stdin/out/err to
- /dev/null
-
----
- avserver.c |   14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/avserver.c b/avserver.c
-index 649cbed..9f6b9d9 100644
---- a/avserver.c
-+++ b/avserver.c
-@@ -25,6 +25,7 @@
- #endif
- #include <string.h>
- #include <stdlib.h>
-+#include <stdio.h>
- #include "libavformat/avformat.h"
- // FIXME those are internal headers, avserver _really_ shouldn't use them
- #include "libavformat/ffm.h"
-@@ -513,13 +514,12 @@ static void start_children(FFStream *feed)
-                     close(i);
- 
-                 if (!avserver_debug) {
--                    i = open("/dev/null", O_RDWR);
--                    if (i != -1) {
--                        dup2(i, 0);
--                        dup2(i, 1);
--                        dup2(i, 2);
--                        close(i);
--                    }
-+                    if (!freopen("/dev/null", "r", stdin))
-+                        http_log("failed to redirect STDIN to /dev/null\n;");
-+                    if (!freopen("/dev/null", "w", stdout))
-+                        http_log("failed to redirect STDOUT to /dev/null\n;");
-+                    if (!freopen("/dev/null", "w", stderr))
-+                        http_log("failed to redirect STDERR to /dev/null\n;");
-                 }
- 
-                 signal(SIGPIPE, SIG_DFL);
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0275-mxfdec-fix-typo-in-mxf_read_seek.patch b/debian/patches/post-9beta2/0275-mxfdec-fix-typo-in-mxf_read_seek.patch
deleted file mode 100644
index b2cc6b5..0000000
--- a/debian/patches/post-9beta2/0275-mxfdec-fix-typo-in-mxf_read_seek.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c84cce5a99b85737154bf7559a4bf38593b54a75 Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Fri, 26 Oct 2012 20:01:43 +0200
-Subject: [PATCH 275/278] mxfdec: fix typo in mxf_read_seek()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Check the number of index tables before using byte offset based seeking
-instead of the index_tables pointer.
-
-Found by Måns Rullgård <mans at mansr.com>.
----
- libavformat/mxfdec.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
-index 8595d72..61b9c68 100644
---- a/libavformat/mxfdec.c
-+++ b/libavformat/mxfdec.c
-@@ -2210,7 +2210,7 @@ static int mxf_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
-     int ret;
-     MXFIndexTable *t;
- 
--    if (mxf->index_tables <= 0) {
-+    if (mxf->nb_index_tables <= 0) {
-     if (!s->bit_rate)
-         return AVERROR_INVALIDDATA;
-     if (sample_time < 0)
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0276-APIChanges-add-entry-for-av_read_packet-deprecation.patch b/debian/patches/post-9beta2/0276-APIChanges-add-entry-for-av_read_packet-deprecation.patch
deleted file mode 100644
index cb98a06..0000000
--- a/debian/patches/post-9beta2/0276-APIChanges-add-entry-for-av_read_packet-deprecation.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From bf5f46b4cc47b7a4568119f224057d4ff91b6cdd Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Thu, 25 Oct 2012 16:26:06 +0200
-Subject: [PATCH 276/278] APIChanges: add entry for av_read_packet deprecation
-
----
- doc/APIchanges |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/doc/APIchanges b/doc/APIchanges
-index a0756da..1c6247e 100644
---- a/doc/APIchanges
-+++ b/doc/APIchanges
-@@ -182,6 +182,10 @@ API changes, most recent first:
- 2012-04-05 - 5cc51a5 - lavu 51.26.0 - audioconvert.h
-   Add av_get_default_channel_layout()
- 
-+2012-03-20 - 3c90cc2 - lavfo 54.2.0
-+  Deprecate av_read_packet(), use av_read_frame() with
-+  AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN in AVFormatContext.flags
-+
- 2012-03-06 - 4d851f8 - lavu 51.25.0 - cpu.h
-   Add av_set_cpu_flags_mask().
- 
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0277-avserver-fix-constness-casting-warnings.patch b/debian/patches/post-9beta2/0277-avserver-fix-constness-casting-warnings.patch
deleted file mode 100644
index 401c3be..0000000
--- a/debian/patches/post-9beta2/0277-avserver-fix-constness-casting-warnings.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 39c4afd926944a716c3b11b321cea7f7c798e9e7 Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Thu, 25 Oct 2012 15:55:05 +0200
-Subject: [PATCH 277/278] avserver: fix constness casting warnings
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Use a different char* for extracting info string from the URL. The
-other pointer can be made const then which elimates the need for a
-cast and fixes the following warnings:
-warning: to be safe all intermediate pointers in cast from ‘char **’ to
-‘const char **’ must be ‘const’ qualified [-Wcast-qual]
----
- avserver.c |   21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/avserver.c b/avserver.c
-index 9f6b9d9..7b38c23 100644
---- a/avserver.c
-+++ b/avserver.c
-@@ -1478,7 +1478,8 @@ enum RedirType {
- /* parse http request and prepare header */
- static int http_parse_request(HTTPContext *c)
- {
--    char *p;
-+    const char *p;
-+    char *p1;
-     enum RedirType redir_type;
-     char cmd[32];
-     char info[1024], filename[1024];
-@@ -1489,10 +1490,10 @@ static int http_parse_request(HTTPContext *c)
-     FFStream *stream;
-     int i;
-     char ratebuf[32];
--    char *useragent = 0;
-+    const char *useragent = 0;
- 
-     p = c->buffer;
--    get_word(cmd, sizeof(cmd), (const char **)&p);
-+    get_word(cmd, sizeof(cmd), &p);
-     av_strlcpy(c->method, cmd, sizeof(c->method));
- 
-     if (!strcmp(cmd, "GET"))
-@@ -1502,7 +1503,7 @@ static int http_parse_request(HTTPContext *c)
-     else
-         return -1;
- 
--    get_word(url, sizeof(url), (const char **)&p);
-+    get_word(url, sizeof(url), &p);
-     av_strlcpy(c->url, url, sizeof(c->url));
- 
-     get_word(protocol, sizeof(protocol), (const char **)&p);
-@@ -1515,10 +1516,10 @@ static int http_parse_request(HTTPContext *c)
-         http_log("%s - - New connection: %s %s\n", inet_ntoa(c->from_addr.sin_addr), cmd, url);
- 
-     /* find the filename and the optional info string in the request */
--    p = strchr(url, '?');
--    if (p) {
--        av_strlcpy(info, p, sizeof(info));
--        *p = '\0';
-+    p1 = strchr(url, '?');
-+    if (p1) {
-+        av_strlcpy(info, p1, sizeof(info));
-+        *p1 = '\0';
-     } else
-         info[0] = '\0';
- 
-@@ -1635,7 +1636,7 @@ static int http_parse_request(HTTPContext *c)
-     }
- 
-     if (redir_type != REDIR_NONE) {
--        char *hostinfo = 0;
-+        const char *hostinfo = 0;
- 
-         for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
-             if (av_strncasecmp(p, "Host:", 5) == 0) {
-@@ -1764,7 +1765,7 @@ static int http_parse_request(HTTPContext *c)
-         if (!stream->is_feed) {
-             /* However it might be a status report from WMP! Let us log the
-              * data as it might come in handy one day. */
--            char *logline = 0;
-+            const char *logline = 0;
-             int client_id = 0;
- 
-             for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
--- 
-1.7.9.5
-
diff --git a/debian/patches/post-9beta2/0278-avserver-replace-av_read_packet-with-av_read_frame.patch b/debian/patches/post-9beta2/0278-avserver-replace-av_read_packet-with-av_read_frame.patch
deleted file mode 100644
index b8884cf..0000000
--- a/debian/patches/post-9beta2/0278-avserver-replace-av_read_packet-with-av_read_frame.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 566de8cde29d999fd05c477158adbd580b8522c7 Mon Sep 17 00:00:00 2001
-From: Janne Grunau <janne-libav at jannau.net>
-Date: Thu, 25 Oct 2012 16:19:16 +0200
-Subject: [PATCH 278/278] avserver: replace av_read_packet with av_read_frame
-
----
- avserver.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/avserver.c b/avserver.c
-index 7b38c23..ad7bc78 100644
---- a/avserver.c
-+++ b/avserver.c
-@@ -3562,6 +3562,8 @@ static void extract_mpeg4_header(AVFormatContext *infile)
-     AVStream *st;
-     const uint8_t *p;
- 
-+    infile->flags |= AVFMT_FLAG_NOFILLIN | AVFMT_FLAG_NOPARSE;
-+
-     mpeg4_count = 0;
-     for(i=0;i<infile->nb_streams;i++) {
-         st = infile->streams[i];
-@@ -3575,7 +3577,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
- 
-     printf("MPEG4 without extra data: trying to find header in %s\n", infile->filename);
-     while (mpeg4_count > 0) {
--        if (av_read_packet(infile, &pkt) < 0)
-+        if (av_read_frame(infile, &pkt) < 0)
-             break;
-         st = infile->streams[pkt.stream_index];
-         if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
--- 
-1.7.9.5
-
diff --git a/debian/patches/series b/debian/patches/series
index 5af429f..3199e41 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,281 +1 @@
 03-disable-configuration-warnings.patch
-
-# post-9beta2 patches to sync ot current master
-post-9beta2/0001-lzo-Use-AV_COPY-U-macros-where-appropriate.patch
-post-9beta2/0002-Remove-need-for-padding-in-av_memcpy_backptr.patch
-post-9beta2/0003-av_memcpy_backptr-Drop-no-longer-necessary-malloc-pa.patch
-post-9beta2/0004-dfa-use-av_memcpy_backptr-where-previously-impossibl.patch
-post-9beta2/0005-doxygen-Build-Doxygen-documentation-in-the-doc-subdi.patch
-post-9beta2/0006-Move-Doxyfile-into-the-doc-subdirectory.patch
-post-9beta2/0007-lavc-use-the-correct-API-version-guard-macro-for-avc.patch
-post-9beta2/0008-atrac3-return-an-error-if-extradata_size-is-not-a-sp.patch
-post-9beta2/0009-lavc-fix-documentation-for-AVCodecContext.delay.patch
-post-9beta2/0010-lavc-initialize-output-AVFrame-before-decoding.patch
-post-9beta2/0011-avconv-remove-now-unneeded-calls-to-avcodec_get_fram.patch
-post-9beta2/0012-g.723.1-add-missing-CODEC_CAP_DR1.patch
-post-9beta2/0013-asfdec-cosmetics-reformat-ff_asf_parse_packet.patch
-post-9beta2/0014-smoothstreamingenc-Don-t-assume-streams-start-from-t.patch
-post-9beta2/0015-configure-generalise-64-bit-test.patch
-post-9beta2/0016-configure-detect-mips64-automatically.patch
-post-9beta2/0017-configure-detect-ppc64-automatically.patch
-post-9beta2/0018-configure-detect-parisc64-automatically.patch
-post-9beta2/0019-avutil-Move-memcpy_backptr-to-mem.c.patch
-post-9beta2/0020-avutil-Make-LZO-decoder-code-configure-time-selectab.patch
-post-9beta2/0021-rawvideo-use-a-specific-read_header.patch
-post-9beta2/0022-g722-refactor-out-of-rawdec.c.patch
-post-9beta2/0023-pcmdec-remove-dependency-from-rawdec.patch
-post-9beta2/0024-rawdec-remove-ff_raw_read_header.patch
-post-9beta2/0025-avfilter-fix-graphparser-memleaks-on-error-paths.patch
-post-9beta2/0026-avconv-fix-bitrate-report-when-writing-to-dev-null.patch
-post-9beta2/0027-pcmdec-change-default-of-channels-parameter-to-1.patch
-post-9beta2/0028-ffv1-set-the-range-coder-state-in-decode_slice_heade.patch
-post-9beta2/0029-pcm-change-references-to-raw-to-pcm.patch
-post-9beta2/0030-build-Include-HEADERS-yes-in-the-HEADERS-variable.patch
-post-9beta2/0031-configure-recognise-more-sparc-variants-as-cpu-argum.patch
-post-9beta2/0032-configure-sanitise-sparc-vis-check.patch
-post-9beta2/0033-h263-avoid-memcpys-over-array-bound-in-motion-vector.patch
-post-9beta2/0034-doxygen-Drop-some-pointless-entries-from-PREDEFINED-.patch
-post-9beta2/0035-doxygen-Add-av_alloc_size-to-list-of-predefined-macr.patch
-post-9beta2/0036-cook-cosmetics-Better-name-for-ccpl-COOKSubpacket-me.patch
-post-9beta2/0037-cook-cosmetics-Better-names-for-joint_decode-functio.patch
-post-9beta2/0038-cook-Remove-senseless-maybe_reformat_buffer32-functi.patch
-post-9beta2/0039-cook-Remove-some-silly-Doxygen-comments.patch
-post-9beta2/0040-ivi_common-Drop-unused-function-parameter-from-decod.patch
-post-9beta2/0041-doc-git-howto-Clarify-comment-about-pushing-series-o.patch
-post-9beta2/0042-configure-fix-tests-for-2-arg-math-functions.patch
-post-9beta2/0043-buffersink-remove-stray-semicolon-after-function-def.patch
-post-9beta2/0044-af_channelmap-remove-stray-enum-declaration.patch
-post-9beta2/0045-network-use-HAVE_THREADS-instead-of-local-hack.patch
-post-9beta2/0046-udp-use-socklen_t-where-appropriate.patch
-post-9beta2/0047-avserver-use-socklen_t-where-appropriate.patch
-post-9beta2/0048-avio-fix-pointer-type-mismatches-in-avio_enum_protoc.patch
-post-9beta2/0049-amrwbdec-fix-invalid-pointer-arithmetic.patch
-post-9beta2/0050-h264-fix-invalid-pointer-arithmetic.patch
-post-9beta2/0051-vp8-fix-memset-crossing-array-boundary.patch
-post-9beta2/0052-configure-detect-sparc64-automatically.patch
-post-9beta2/0053-assdec-fix-qsort-callback-signature.patch
-post-9beta2/0054-nutenc-K-R-formatting-cosmetics.patch
-post-9beta2/0055-yuv4mpeg-reject-unsupported-codecs.patch
-post-9beta2/0056-rtpdec-Cosmetic-cleanup.patch
-post-9beta2/0057-lavc-add-CODEC_CAP_DR1-to-all-video-decoders-missing.patch
-post-9beta2/0058-nutenc-verbosely-report-unsupported-negative-pts.patch
-post-9beta2/0059-nut-support-textual-data.patch
-post-9beta2/0060-rtsp-Avoid-a-cast-when-calling-strtol.patch
-post-9beta2/0061-aacenc-Drop-some-unused-function-arguments.patch
-post-9beta2/0062-cmdutils-Conditionally-compile-libswscale-related-bi.patch
-post-9beta2/0063-avconv-Drop-unused-function-argument-from-do_video_s.patch
-post-9beta2/0064-fate-Add-shorthands-for-acodec-PCM-and-ADPCM-tests.patch
-post-9beta2/0065-fate-ac3-Place-E-AC-3-tests-and-AC-3-tests-in-differ.patch
-post-9beta2/0066-fate-ac3-Add-dependencies.patch
-post-9beta2/0067-indeo3-remove-duplicate-capabilities-line.patch
-post-9beta2/0068-lavr-add-general-API-usage-doxy.patch
-post-9beta2/0069-lavr-document-upper-bound-on-number-of-output-sample.patch
-post-9beta2/0070-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
-post-9beta2/0071-lpc-Add-a-function-for-calculating-reflection-coeffi.patch
-post-9beta2/0072-avcodec-Add-a-RFC-3389-comfort-noise-codec.patch
-post-9beta2/0073-lavfi-add-ashowinfo-filter.patch
-post-9beta2/0074-dv-use-AVStream.index-instead-of-abusing-AVStream.id.patch
-post-9beta2/0075-dv-fix-indentation.patch
-post-9beta2/0076-Remove-usage-of-INIT_AVX-in-h264_intrapred_10bit.asm.patch
-post-9beta2/0077-Remove-INIT_AVX-from-x86inc.asm.patch
-post-9beta2/0078-x86-use-PRED4x4-8x8-8x8L-16x16-macros-to-declare-int.patch
-post-9beta2/0079-Use-ptrdiff_t-instead-of-int-for-intra-pred-stride-f.patch
-post-9beta2/0080-FATE-fix-AD-PCM-test-dependencies-broken-in-e519990.patch
-post-9beta2/0081-configure-rewrite-print_config-function-using-awk.patch
-post-9beta2/0082-swscale-support-gray-to-9bit-and-10bit-formats.patch
-post-9beta2/0083-pixfmt-support-more-yuva-formats.patch
-post-9beta2/0084-configure-fix-print_config-with-broke-awks.patch
-post-9beta2/0085-cngdec-Update-the-LPC-coefficients-after-averaging-t.patch
-post-9beta2/0086-cngdec-Fix-the-memset-size-to-cover-the-full-array.patch
-post-9beta2/0087-cngdec-Make-the-dbov-variable-have-the-right-unit.patch
-post-9beta2/0088-cngdec-Allow-flushing-the-decoder.patch
-post-9beta2/0089-cng-Reindent-some-incorrectly-indented-lines.patch
-post-9beta2/0090-x86-include-x86inc.asm-in-x86util.asm.patch
-post-9beta2/0091-x86-yasm-Use-complete-source-path-for-macro-helper-i.patch
-post-9beta2/0092-x86-mmx2-mmxext-in-comments-and-messages.patch
-post-9beta2/0093-x86-mmx2-mmxext-in-variable-names.patch
-post-9beta2/0094-x86-MMX2-MMXEXT-in-macro-names.patch
-post-9beta2/0095-x86-fmtconvert-port-to-cpuflags.patch
-post-9beta2/0096-x86-fmtconvert-Refactor-cvtps2pi-emulation-through-c.patch
-post-9beta2/0097-x86-Fix-assembly-with-NASM.patch
-post-9beta2/0098-aacdec-Drop-some-unused-function-arguments.patch
-post-9beta2/0099-swscale-do-not-forget-to-swap-data-in-formats-with-d.patch
-post-9beta2/0100-x86-mmx2-mmxext-in-function-names.patch
-post-9beta2/0101-x86-h264_chromamc_10bit-drop-pointless-PAVG-define.patch
-post-9beta2/0102-x86-Move-optimization-suffix-to-end-of-function-name.patch
-post-9beta2/0103-avconv_opt-cmdutils-Add-missing-function-parameter-D.patch
-post-9beta2/0104-fate-add-ac3-eac3-tests-to-FATE_SAMPLES_AVCONV.patch
-post-9beta2/0105-lavc-move-SANE_NB_CHANNELS-to-internal.h-and-use-it-.patch
-post-9beta2/0106-lavc-check-channel-count-after-decoder-init.patch
-post-9beta2/0107-dca_parser-allow-the-parser-to-change-the-sample-rat.patch
-post-9beta2/0108-amrnbdec-set-channels-channel_layout-and-sample_rate.patch
-post-9beta2/0109-amrwbdec-set-channels-channel_layout-and-sample_rate.patch
-post-9beta2/0110-g722dec-set-channel-layout-at-initialization-instead.patch
-post-9beta2/0111-dsicinaudio-set-channels-and-channel-layout.patch
-post-9beta2/0112-atrac1-do-not-keep-a-copy-of-channel-count-in-the-pr.patch
-post-9beta2/0113-bmvaudio-set-channel-layout-at-init-rather-than-vali.patch
-post-9beta2/0114-cook-use-AVCodecContext.channels-instead-of-keeping-.patch
-post-9beta2/0115-cook-remove-unneeded-COOKContext-variable-bit_rate.patch
-post-9beta2/0116-cook-remove-unneeded-COOKContext-variable-sample_rat.patch
-post-9beta2/0117-cook-reverse-a-condition-so-that-the-code-makes-more.patch
-post-9beta2/0118-cook-use-av_get_channel_layout_nb_channels-instead-o.patch
-post-9beta2/0119-cook-move-samples_per_frame-from-COOKSubpacket-to-wh.patch
-post-9beta2/0120-cook-use-av_dlog-for-debug-logging-instead-of-av_log.patch
-post-9beta2/0121-dcadec-allow-the-decoder-to-change-the-channel-layou.patch
-post-9beta2/0122-flacdec-use-av_samples_-functions-for-sample-buffer-.patch
-post-9beta2/0123-flacdec-allow-mid-stream-channel-layout-change.patch
-post-9beta2/0124-flacdec-do-not-warn-on-sample-rate-change.patch
-post-9beta2/0125-g726dec-set-channel-layout-at-initialization-instead.patch
-post-9beta2/0126-g726dec-do-not-validate-sample-rate.patch
-post-9beta2/0127-libgsmdec-always-set-channel-layout-and-sample-rate-.patch
-post-9beta2/0128-gsmdec-always-set-channel-layout-and-sample-rate-at-.patch
-post-9beta2/0129-imc-set-channels-to-1-instead-of-validating-it.patch
-post-9beta2/0130-dpcm-use-AVCodecContext.channels-instead-of-keeping-.patch
-post-9beta2/0131-libilbc-set-channel-layout.patch
-post-9beta2/0132-libopencore-amr-set-channel-layout-for-amr-nb-or-if-.patch
-post-9beta2/0133-nellymoserdec-set-channels-to-1.patch
-post-9beta2/0134-qcelpdec-set-channel-layout.patch
-post-9beta2/0135-qdm2-make-sure-channels-is-not-0-and-set-channel-lay.patch
-post-9beta2/0136-qdm2-remove-unneeded-checks-for-channel-count.patch
-post-9beta2/0137-ra144dec-set-channel-layout.patch
-post-9beta2/0138-ra288dec-set-channel-layout.patch
-post-9beta2/0139-shorten-validate-that-the-channel-count-in-the-heade.patch
-post-9beta2/0140-sipr-set-channel-layout.patch
-post-9beta2/0141-truespeech-set-channel-layout.patch
-post-9beta2/0142-twinvq-validate-that-channels-is-not-0.patch
-post-9beta2/0143-twinvq-set-channel-layout.patch
-post-9beta2/0144-twinvq-validate-sample-rate-code.patch
-post-9beta2/0145-vmdaudio-set-channel-layout.patch
-post-9beta2/0146-wma-do-not-keep-private-copies-of-some-AVCodecContex.patch
-post-9beta2/0147-wmapro-use-AVCodecContext.channels-instead-of-keepin.patch
-post-9beta2/0148-wmavoice-set-channel-layout.patch
-post-9beta2/0149-ws-snd1-set-channel-layout.patch
-post-9beta2/0150-decode_audio3-initialize-AVFrame.patch
-post-9beta2/0151-doc-Point-to-the-new-location-of-the-c99-to-c89-tool.patch
-post-9beta2/0152-a64-remove-interleaved-mode.patch
-post-9beta2/0153-rtpdec-factorize-identical-code-used-in-several-hand.patch
-post-9beta2/0154-audiointerleave-deobfuscate-a-function-call.patch
-post-9beta2/0155-lavc-add-some-AVPacket-doxy.patch
-post-9beta2/0156-rtpdec_vp8-Don-t-parse-fields-that-aren-t-used.patch
-post-9beta2/0157-dv1394-Swap-the-min-and-max-values-of-the-standard-o.patch
-post-9beta2/0158-x86inc-Only-define-program_name-if-the-macro-is-unse.patch
-post-9beta2/0159-x86util-Add-cpuflags_mmxext-alias-for-cpuflags_mmx2.patch
-post-9beta2/0160-x86-ac3dsp-port-to-cpuflags.patch
-post-9beta2/0161-x86-PMINUB-port-to-cpuflags.patch
-post-9beta2/0162-PGS-subtitles-Expose-forced-flag.patch
-post-9beta2/0163-parser-Move-Doxygen-documentation-to-the-header-file.patch
-post-9beta2/0164-x86-Refactor-PSWAPD-fallback-implementations-and-por.patch
-post-9beta2/0165-vf_drawtext-do-not-use-deprecated-av_tree_node_size.patch
-post-9beta2/0166-crc-move-doxy-to-the-header.patch
-post-9beta2/0167-avconv-do-not-free-muxed-packet-on-streamcopy.patch
-post-9beta2/0168-lavf-clarify-the-lifetime-of-demuxed-packets.patch
-post-9beta2/0169-lavf-fix-av_interleaved_write_frame-doxy.patch
-post-9beta2/0170-matroskadec-do-not-use-avpacket-internals.patch
-post-9beta2/0171-doc-add-apidoc-target-for-doxygen-API-documentation.patch
-post-9beta2/0172-rtmp-Use-av_strlcat-instead-of-strncat.patch
-post-9beta2/0173-x86-vc1dsp-port-to-cpuflags.patch
-post-9beta2/0174-x86-PABSW-port-to-cpuflags.patch
-post-9beta2/0175-x86-h264qpel-Only-define-mmxext-QPEL-functions-if-H2.patch
-post-9beta2/0176-build-The-A64-muxer-depends-on-rawenc.o-for-ff_raw_w.patch
-post-9beta2/0177-fate-aac-Place-LATM-tests-and-general-AAC-tests-in-d.patch
-post-9beta2/0178-flacenc-use-a-separate-buffer-for-byte-swapping-for-.patch
-post-9beta2/0179-lavu-add-av_ctz-for-trailing-zero-bit-count.patch
-post-9beta2/0180-flacenc-remove-wasted-trailing-0-bits.patch
-post-9beta2/0181-flacenc-use-uint64_t-for-bit-counts.patch
-post-9beta2/0182-flacdsp-move-lpc-encoding-from-FLAC-encoder-to-FLACD.patch
-post-9beta2/0183-flacenc-add-24-bit-encoding.patch
-post-9beta2/0184-flacenc-use-RICE2-entropy-coding-mode-for-24-bit.patch
-post-9beta2/0185-FATE-rename-FLAC-tests-from-flac-to-flac-16.patch
-post-9beta2/0186-FATE-add-a-24-bit-FLAC-encoding-test.patch
-post-9beta2/0187-x86-avresample-Add-missing-colons-to-assembly-labels.patch
-post-9beta2/0188-fate-aac-cosmetics-Group-AAC-LATM-tests-together.patch
-post-9beta2/0189-fate-atrac-Place-atrac1-and-atrac3-tests-in-differen.patch
-post-9beta2/0190-libopencore-amr-Check-the-return-value-of-amr_decode.patch
-post-9beta2/0191-libvpxenc-Allow-enabling-constrained-quality-CQ-mode.patch
-post-9beta2/0192-x86-h264_intrapred-port-to-cpuflags.patch
-post-9beta2/0193-rtpenc_aac-Fix-calculation-of-the-header-size.patch
-post-9beta2/0194-add-24-bit-FLAC-encoding-to-Changelog.patch
-post-9beta2/0195-avconv-rescale-packet-duration-to-muxer-time-base-wh.patch
-post-9beta2/0196-flacenc-ensure-the-order-is-within-the-min-max-range.patch
-post-9beta2/0197-x86-h264_qpel_10bit-port-to-cpuflags.patch
-post-9beta2/0198-x86-PALIGNR-port-to-cpuflags.patch
-post-9beta2/0199-x86-h264_qpel_10bit-drop-unused-parameter-from-MC10-.patch
-post-9beta2/0200-x86inc-Set-program_name-outside-of-x86inc.asm.patch
-post-9beta2/0201-configure-add-lavu-dependency-to-lavr-lavfi-.pc-file.patch
-post-9beta2/0202-mss2-fix-handling-of-unmasked-implicit-WMV9-rectangl.patch
-post-9beta2/0203-mss2-reindent-after-last-commit.patch
-post-9beta2/0204-mss2-prevent-potential-uninitialized-reads.patch
-post-9beta2/0205-lavu-rename-audioconvert.-to-channel_layout.-and-dep.patch
-post-9beta2/0206-Include-libavutil-channel_layout.h-instead-of-libavu.patch
-post-9beta2/0207-doc-git-howto-Leave-reviewers-time-to-react-before-p.patch
-post-9beta2/0208-x86-Require-an-assembler-able-to-cope-with-AVX-instr.patch
-post-9beta2/0209-build-Drop-AVX-assembly-ifdefs.patch
-post-9beta2/0210-binkaudio-set-channel-layout.patch
-post-9beta2/0211-configure-remove-support-for-n-flag-in-print_enabled.patch
-post-9beta2/0212-ppc-fix-some-unused-variable-warnings.patch
-post-9beta2/0213-ppc-replace-pointer-casting-with-AV_COPY32.patch
-post-9beta2/0214-amr-set-channel_layout.patch
-post-9beta2/0215-apc-set-channel-layout.patch
-post-9beta2/0216-bethsoftvid-set-channel-layout.patch
-post-9beta2/0217-bfi-set-channel-layout.patch
-post-9beta2/0218-bink-set-channel-layout.patch
-post-9beta2/0219-bmv-set-channel-layout.patch
-post-9beta2/0220-cdxl-set-channel-layout.patch
-post-9beta2/0221-daud-set-channel-layout.patch
-post-9beta2/0222-dsicin-set-channel-layout.patch
-post-9beta2/0223-dv-set-channel-layout.patch
-post-9beta2/0224-flvdec-set-channel-layout.patch
-post-9beta2/0225-gsmdec-set-channel-layout.patch
-post-9beta2/0226-gxfdec-set-channel-layout-when-applicable.patch
-post-9beta2/0227-idroqdec-set-channel-layout.patch
-post-9beta2/0228-iff-set-channel-layout.patch
-post-9beta2/0229-ipmovie-set-channel-layout.patch
-post-9beta2/0230-iss-set-channel-layout.patch
-post-9beta2/0231-jvdec-set-channel-layout.patch
-post-9beta2/0232-mm-set-channel-layout.patch
-post-9beta2/0233-mmf-set-channel-layout.patch
-post-9beta2/0234-mpc7-set-channel-layout.patch
-post-9beta2/0235-mvi-set-channel-layout.patch
-post-9beta2/0236-mxg-set-channel-layout.patch
-post-9beta2/0237-nuv-set-channel-layout.patch
-post-9beta2/0238-oggparsespeex-validate-channel-count-and-set-channel.patch
-post-9beta2/0239-omadec-set-channel-layout.patch
-post-9beta2/0240-psxstr-set-channel-layout.patch
-post-9beta2/0241-qcp-set-channel-layout.patch
-post-9beta2/0242-rmdec-set-channel-layout-for-RA-version-3.patch
-post-9beta2/0243-rsodec-set-channel-layout.patch
-post-9beta2/0244-rtpdec_amr-set-channel-layout.patch
-post-9beta2/0245-sierravmd-set-channel-layout.patch
-post-9beta2/0246-siff-set-channel-layout.patch
-post-9beta2/0247-smacker-set-channel-layout.patch
-post-9beta2/0248-sol-set-channel-layout.patch
-post-9beta2/0249-swfdec-set-channel-layout.patch
-post-9beta2/0250-tiertexseq-set-channel-layout.patch
-post-9beta2/0251-tmv-set-channel-layout.patch
-post-9beta2/0252-wc3movie-set-channel-layout.patch
-post-9beta2/0253-westwood_aud-set-channel-layout.patch
-post-9beta2/0254-wtv-set-channel-layout-for-mpeg-audio.patch
-post-9beta2/0255-yop-set-channel-layout.patch
-post-9beta2/0256-hlsenc-stand-alone-hls-segmenter.patch
-post-9beta2/0257-pixdesc-add-av_pix_fmt_get_chroma_sub_sample.patch
-post-9beta2/0258-avcodec-remove-ff_is_hwaccel_pix_fmt.patch
-post-9beta2/0259-libtheoraenc-add-missing-pixdesc.h-header.patch
-post-9beta2/0260-x86-h264_weight_10bit-port-to-cpuflags.patch
-post-9beta2/0261-Drop-broken-and-unused-CABAC-test-program.patch
-post-9beta2/0262-x86-mmx2-mmxext-in-asm-constructs.patch
-post-9beta2/0263-segment-fix-NULL-pointer-dereference-in-seg_write_he.patch
-post-9beta2/0264-avutil-change-GET_UTF8-to-not-use-av_log2.patch
-post-9beta2/0265-ppc-do-not-pass-redundant-compiler-flags.patch
-post-9beta2/0266-fate-Add-dependencies-for-aac-alac-amrnb-amrwb-atrac.patch
-post-9beta2/0267-avformat-clarify-stream-id-for-muxing.patch
-post-9beta2/0268-rtp-set-the-payload-type-as-stream-id.patch
-post-9beta2/0269-bgmc-Fix-av_malloc-checks-in-ff_bgmc_init.patch
-post-9beta2/0270-configure-Add-option-to-disable-all-command-line-pro.patch
-post-9beta2/0271-doxygen-remove-obsolete-options-from-Doxyfile.patch
-post-9beta2/0272-configure-Check-for-Werror-parameters-on-clang.patch
-post-9beta2/0273-avserver-remove-daemon-mode.patch
-post-9beta2/0274-avserver-use-freopen-to-redirect-stdin-out-err-to-de.patch
-post-9beta2/0275-mxfdec-fix-typo-in-mxf_read_seek.patch
-post-9beta2/0276-APIChanges-add-entry-for-av_read_packet-deprecation.patch
-post-9beta2/0277-avserver-fix-constness-casting-warnings.patch
-post-9beta2/0278-avserver-replace-av_read_packet-with-av_read_frame.patch

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list