--- a52dec-0.7.4.orig/debian/README.source +++ a52dec-0.7.4/debian/README.source @@ -0,0 +1,57 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new + +where is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete + +You may need to run quilt pop -a to unapply patches first before running +this command. --- a52dec-0.7.4.orig/debian/changelog +++ a52dec-0.7.4/debian/changelog @@ -0,0 +1,221 @@ +a52dec (0.7.4-17) unstable; urgency=low + + * Apply patches provided by Handbrake.fr: + - A00-a52-state-t-public.patch + - A01-thread-safe.patch + - A04-modern-gcc-cflags.patch + * Bump standards version, no changes needed + * Bump debhelper to compat level 9 to pickup hardening flags and install + in multi-arch directories + + -- Reinhard Tartler Thu, 13 Feb 2014 01:55:54 +0000 + +a52dec (0.7.4-16) unstable; urgency=low + + * Team upload. + + [ Alessio Treglia ] + * Get rid of unneded *.la files (Closes: #621145). + * Add debian/source/format, set packaging format to 1.0. + * debian/control: + - Correct team's name. + - Bump Standards. + * Update debian/copyright to the latest DEP-5 SVN rev.174. + + [ Fabian Greffrath ] + * Remove myself from uploaders. + + -- Alessio Treglia Fri, 06 May 2011 12:20:03 +0200 + +a52dec (0.7.4-15) unstable; urgency=low + + [ Dmitrijs Ledkovs ] + * adding ubuntu_50_fix_imdct_error_msg.diff (cf. LP: #441693) + * debian/control: + + bump policy version, no change required. + + update email address. + * Ubuntu vendor patch + + [ Fabian Greffrath ] + * 03-link-against-lm.diff: Do not link the static libao.a against -lm, + this is about to fail. (Closes: #618082) + * 04-libtoolize.diff: Drop, use dh-autoreconf instead. + * ubuntu_50_fix_imdct_error_msg.diff: Rename to + 50_fix_imdct_error_msg.diff (Closes: #441693). + + [ Stefan Potyra ] + * debian/patches/03-link-against-lm.diff: importing patch applied + + -- Reinhard Tartler Tue, 15 Mar 2011 07:42:10 +0100 + +a52dec (0.7.4-14) unstable; urgency=low + + [ Reinhard Tartler ] + * add missing ',', Closes: #566385 + + [ Fabian Greffrath ] + * Fix debian/watch file, thanks Artur R. Czechowski (Closes: #570508). + + -- Reinhard Tartler Wed, 17 Mar 2010 19:41:30 +0100 + +a52dec (0.7.4-13) unstable; urgency=low + + [ Dmitrijs Ledkovs ] + * Converted patches from dpatch to quilt. + * Updated packaging to dh7 + * Updated debian/copyright to DEP5 + * Modified patches headers using DEP-3 + * Converted to source format 3.0 (quilt) + * Added quilt's .pc directory to git ignore + * Added misc:Depends to -dev package + * Bumped Standards Version to 3.8.3 + * Reshuffled patches with libtoolize patch last in the series + * Added myself to Uploaders + * Added git-dch options to gbp.conf + + [ Fabian Greffrath ] + * Wrapped Uploaders, Build-Depends and Depends fields. + * Updated my email address. + * Instead of override_dh_auto_clean, remove config.sub and + config.guess from debian/clean (from the right directory). + + -- Dmitrijs Ledkovs Mon, 07 Dec 2009 15:05:29 +0000 + +a52dec (0.7.4-12) unstable; urgency=low + + [ Loic Minier ] + * Let liba52-0.7.4-dev depend on ${shlibs:Depends}; thanks Niko Tyni. + Closes: #553226, thanks Manoj Srivastava. + + [ Fabian Greffrath ] + * debian/control: + + Removed the "XS-" prefix from the Vcs-Svn and Vcs-Browser fields and + let them point to the current GIT repository. + + Added Homepage field, removed links from package descriptions. + * debian/lintian/liba52-0.7.4-dev, debian/rules: + + Removed lintian overrides file. + * debian/rules: + + Fixed debian-rules-ignores-make-clean-error. + + Changed to copy /usr/share/misc/config.{sub,guess} in place just before + the ./configure call and remove the files in the clean target. + * debian/watch: + + Fixed to watch only for versions beginning with a digit. + * debian/patches/04-link-against-lm.dpatch: New patch to explicitly link + against -lm, Closes: #553595 (FTBFS with binutils-gold). + + -- Fabian Greffrath Tue, 03 Nov 2009 10:14:30 +0100 + +a52dec (0.7.4-11) unstable; urgency=low + + [ Sam Hocevar ] + + * debian/control: + + Set pkg-multimedia-maintainers as main maintainer, added Fabian + Greffrath and myself as uploaders. + + Added VCS fields. + + Uncapitalised short descriptions. + + -- Sam Hocevar (Debian packages) Sat, 17 Mar 2007 12:26:48 +0100 + +a52dec (0.7.4-10) unstable; urgency=low + + * Taking over a52dec from Daniel. + + -- Fabian Greffrath Sun, 21 Jan 2007 18:00:00 +0100 + +a52dec (0.7.4-9) unstable; urgency=low + + * Adjusted copyright. + + -- Daniel Baumann Fri, 19 Jan 2007 10:39:00 +0100 + +a52dec (0.7.4-8) unstable; urgency=low + + * Minor cleanups. + + -- Daniel Baumann Fri, 19 Jan 2007 09:54:00 +0100 + +a52dec (0.7.4-7) unstable; urgency=low + + * Forgot to set the soname hack (Closes: #401636). + + -- Daniel Baumann Tue, 5 Dec 2006 01:05:00 +0100 + +a52dec (0.7.4-6) unstable; urgency=low + + * Forgot to disable -preferer-non-pic after libtoolizing (Closes: #401590). + + -- Daniel Baumann Mon, 4 Dec 2006 21:40:00 +0100 + +a52dec (0.7.4-5) unstable; urgency=low + + * Re-libtoolizing required for building on kfreebsd (Closes: #267501). + + -- Daniel Baumann Mon, 4 Dec 2006 12:17:00 +0100 + +a52dec (0.7.4-4) unstable; urgency=low + + * Manually including liba52/a52_internal.h into liba52-0.7.4-dev + (Closes: #381600). + + -- Daniel Baumann Mon, 7 Aug 2006 16:49:00 +0200 + +a52dec (0.7.4-3) unstable; urgency=low + + * New email address. + * Bumped policy version. + + -- Daniel Baumann Thu, 6 Jul 2006 11:30:00 +0200 + +a52dec (0.7.4-2) unstable; urgency=low + + * New maintainer (Closes: #361300). + * Remade debian directory, using dpatch for patch management. + * Addjusted package sections. + + -- Daniel Baumann Sat, 8 Apr 2006 10:09:00 +0100 + +a52dec (0.7.4-1) unstable; urgency=low + + * New upstream version. + * Conflict/Provide/Replace liba52-dev, used since 0.7.3-2, does not + allow the new -dev package to replace the one from version 0.7.3. + Please enlighten me! + + -- Mikael Hedin Tue, 6 Aug 2002 14:01:33 +0200 + +a52dec (0.7.3-3) unstable; urgency=low + + * Remove -prefer-non-pic (closese: #152347) + + -- Mikael Hedin Thu, 11 Jul 2002 00:59:52 +0200 + +a52dec (0.7.3-2) unstable; urgency=low + + * Build with -enable-shared (closes: #125951, #143243). After some + contemplation and contact with upstream I decided to use -revision + @VERSION@, this way there will be no problem with API changes. + * Produce new packages, liba52-0.7-3{-dev} for the shared library and + header things. + + -- Mikael Hedin Tue, 2 Jul 2002 15:29:47 +0200 + +a52dec (0.7.3-1) unstable; urgency=low + + * New upstream. + + -- Mikael Hedin Mon, 11 Mar 2002 20:27:52 +0100 + +a52dec (0.7.2-1) unstable; urgency=low + + * Fixed description of a52dec (closes: #123674). + * New upstream version. + * liba52/bitstream.c:43 Changed to a cast to long (closes: #123355). + + -- Mikael Hedin Tue, 18 Dec 2001 22:48:42 +0100 + +a52dec (0.7.1b-1) unstable; urgency=low + + * Initial Release. + + -- Mikael Hedin Thu, 4 Oct 2001 20:51:49 +0200 --- a52dec-0.7.4.orig/debian/compat +++ a52dec-0.7.4/debian/compat @@ -0,0 +1 @@ +9 --- a52dec-0.7.4.orig/debian/control +++ a52dec-0.7.4/debian/control @@ -0,0 +1,40 @@ +Source: a52dec +Section: sound +Priority: optional +Maintainer: Debian Multimedia Maintainers +Uploaders: Reinhard Tartler , + Sam Hocevar (Debian packages) , + Dmitrijs Ledkovs +Build-Depends: dh-autoreconf, + quilt (>= 0.46-7), + debhelper (>= 9~) +Standards-Version: 3.9.5 +Vcs-Git: git://git.debian.org/pkg-multimedia/a52dec.git +Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/a52dec.git;a=summary +Homepage: http://liba52.sourceforge.net/ + +Package: liba52-0.7.4 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: library for decoding ATSC A/52 streams + liba52 is a free library for decoding ATSC A/52 streams. The A/52 standard is + used in a variety of applications, including digital television and DVD. It is + also known as AC-3. + +Package: liba52-0.7.4-dev +Section: libdevel +Architecture: any +Depends: liba52-0.7.4 (= ${binary:Version}), + ${shlibs:Depends}, + ${misc:Depends} +Conflicts: a52dec, a52dec-dev, liba52-dev +Replaces: a52dec, a52dec-dev, liba52-dev +Provides: a52dec, a52dec-dev, liba52-dev +Description: library for decoding ATSC A/52 streams (development) + liba52 is a free library for decoding ATSC A/52 streams. The A/52 standard is + used in a variety of applications, including digital television and DVD. It is + also known as AC-3. + . + This package contains the development files. --- a52dec-0.7.4.orig/debian/copyright +++ a52dec-0.7.4/debian/copyright @@ -0,0 +1,30 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 +Upstream-Name: liba52 +Source: http://liba52.sourceforge.net +Copyright: 2000-2002, Michel Lespinasse + 1999-2000, Aaron Holtzman + +Files: * +Copyright: 2000-2002, Michel Lespinasse + 1999-2000, Aaron Holtzman +License: GPL-2+ + +Files: debian/* +Copyright: 2009, Dmitrijs Ledkovs + 2007-2009, Fabian Greffrath + 2006-2007, Daniel Baumann +License: GPL-2+ + +License: GPL-2+ + a52dec is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + a52dec 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 General Public License for more details. +Comment: On Debian systems the full text of the GNU General Public + License can be found in the `/usr/share/common-licenses/GPL-2' file. --- a52dec-0.7.4.orig/debian/gbp.conf +++ a52dec-0.7.4/debian/gbp.conf @@ -0,0 +1,6 @@ +[DEFAULT] +pristine-tar = True +[git-dch] +git-log = --no-merges +meta-closes = Closes|LP + --- a52dec-0.7.4.orig/debian/liba52-0.7.4-dev.docs +++ a52dec-0.7.4/debian/liba52-0.7.4-dev.docs @@ -0,0 +1,3 @@ +AUTHORS +TODO +doc/liba52.txt --- a52dec-0.7.4.orig/debian/liba52-0.7.4-dev.install +++ a52dec-0.7.4/debian/liba52-0.7.4-dev.install @@ -0,0 +1,6 @@ +/usr/bin +/usr/include/* +/usr/lib/*/*.a +/usr/lib/*/liba52.so +/usr/share/man +liba52/a52_internal.h /usr/include/a52dec --- a52dec-0.7.4.orig/debian/liba52-0.7.4.docs +++ a52dec-0.7.4/debian/liba52-0.7.4.docs @@ -0,0 +1,5 @@ +AUTHORS +HISTORY +NEWS +README +TODO --- a52dec-0.7.4.orig/debian/liba52-0.7.4.install +++ a52dec-0.7.4/debian/liba52-0.7.4.install @@ -0,0 +1 @@ +/usr/lib/*/liba52-*.so --- a52dec-0.7.4.orig/debian/rules +++ a52dec-0.7.4/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ --with quilt,autoreconf + +override_dh_auto_configure: + dh_auto_configure -- --enable-shared --- a52dec-0.7.4.orig/debian/watch +++ a52dec-0.7.4/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://liba52.sourceforge.net/downloads.html /files/a52dec-([\d.]*)\.tar\.gz --- a52dec-0.7.4.orig/debian/patches/01-enable-pic.diff +++ a52dec-0.7.4/debian/patches/01-enable-pic.diff @@ -0,0 +1,23 @@ +Description: Disabling -prefer-non-pic which enables -fPIC +Bug-Debian: http://bugs.debian.org/401590 +Author: Daniel Baumann , Dmitrijs Ledkovs + + +--- + liba52/configure.incl | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +Index: a52dec-deb/liba52/configure.incl +=================================================================== +--- a52dec-deb.orig/liba52/configure.incl 2009-12-05 02:52:12.000000000 +0000 ++++ a52dec-deb/liba52/configure.incl 2009-12-05 03:23:45.000000000 +0000 +@@ -1,9 +1,6 @@ + AC_SUBST([LIBA52_CFLAGS]) + AC_SUBST([LIBA52_LIBS]) + +-dnl avoid -fPIC when possible +-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic" +- + AC_ARG_ENABLE([double], + [ --enable-double use double-precision samples]) + if test x"$enable_double" = x"yes"; then --- a52dec-0.7.4.orig/debian/patches/02-soname.diff +++ a52dec-0.7.4/debian/patches/02-soname.diff @@ -0,0 +1,21 @@ +Description: Sets the soname to liba52-$(VERSION).so +Bug-Debian: http://bugs.debian.org/401636 +Author: Daniel Baumann , Dmitrijs Ledkovs + + +--- + liba52/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: a52dec-deb/liba52/Makefile.am +=================================================================== +--- a52dec-deb.orig/liba52/Makefile.am 2009-12-05 02:52:12.000000000 +0000 ++++ a52dec-deb/liba52/Makefile.am 2009-12-05 03:23:47.000000000 +0000 +@@ -4,6 +4,6 @@ + + liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c + liba52_la_LIBADD = @LIBA52_LIBS@ -lm +-liba52_la_LDFLAGS = -no-undefined ++liba52_la_LDFLAGS = -no-undefined -release @VERSION@ + + EXTRA_DIST = configure.incl a52_internal.h bitstream.h tables.h --- a52dec-0.7.4.orig/debian/patches/03-link-against-lm.diff +++ a52dec-0.7.4/debian/patches/03-link-against-lm.diff @@ -0,0 +1,31 @@ +Description: Explicitely link against -lm +Bug-Debian: http://bugs.debian.org/553595 +Author: Fabian Greffrath , Dmitrijs Ledkovs + +--- + libao/Makefile.am | 1 + + src/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,9 +1,9 @@ +-CFLAGS = @A52DEC_CFLAGS@ ++AM_CFLAGS = @A52DEC_CFLAGS@ + + bin_PROGRAMS = a52dec extract_a52 + a52dec_SOURCES = a52dec.c getopt.c gettimeofday.c + a52dec_LDADD = $(top_builddir)/liba52/liba52.la \ +- $(top_builddir)/libao/libao.a @LIBAO_LIBS@ ++ $(top_builddir)/libao/libao.a @LIBAO_LIBS@ -lm + extract_a52_SOURCES = extract_a52.c getopt.c + + man_MANS = a52dec.1 extract_a52.1 +--- a/liba52/Makefile.am ++++ b/liba52/Makefile.am +@@ -1,4 +1,4 @@ +-CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@ ++AM_CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@ + + lib_LTLIBRARIES = liba52.la + --- a52dec-0.7.4.orig/debian/patches/50_fix_imdct_error_msg.diff +++ a52dec-0.7.4/debian/patches/50_fix_imdct_error_msg.diff @@ -0,0 +1,19 @@ +Description: This patch removes annoying (useless) message on stderr. This is a +vendor patch for eveyone that derives from Ubuntu. +Origin: https://bugs.edge.launchpad.net/ubuntu/+source/a52dec/+bug/124951/comments/1 +Bug-Ubuntu: https://bugs.edge.launchpad.net/ubuntu/+source/a52dec/+bug/124951 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441693 +Forwarded: not-needed +Index: lucid/liba52/imdct.c +=================================================================== +--- lucid.orig/liba52/imdct.c 2009-12-24 06:49:48.000000000 +0200 ++++ lucid/liba52/imdct.c 2009-12-24 07:06:26.000000000 +0200 +@@ -425,7 +425,7 @@ + } else + #endif + { +- fprintf (stderr, "No accelerated IMDCT transform found\n"); ++ // fprintf (stderr, "No accelerated IMDCT transform found\n"); + ifft128 = ifft128_c; + ifft64 = ifft64_c; + } --- a52dec-0.7.4.orig/debian/patches/A00-a52-state-t-public.patch +++ a52dec-0.7.4/debian/patches/A00-a52-state-t-public.patch @@ -0,0 +1,155 @@ +From: Rodeo +Origin: https://github.com/HandBrake/HandBrake/blob/master/contrib/a52dec/A00-a52-state-t-public.patch + +diff -Naur a52dec.old/include/a52.h a52dec.new/include/a52.h +--- a52dec.old/include/a52.h 2002-01-28 06:37:54.000000000 +0100 ++++ a52dec.new/include/a52.h 2012-07-16 14:13:35.000000000 +0200 +@@ -30,7 +30,71 @@ + typedef double sample_t; + #endif + +-typedef struct a52_state_s a52_state_t; ++typedef struct { ++ uint8_t bai; /* fine SNR offset, fast gain */ ++ uint8_t deltbae; /* delta bit allocation exists */ ++ int8_t deltba[50]; /* per-band delta bit allocation */ ++} ba_t; ++ ++typedef struct { ++ uint8_t exp[256]; /* decoded channel exponents */ ++ int8_t bap[256]; /* derived channel bit allocation */ ++} expbap_t; ++ ++typedef struct { ++ uint8_t fscod; /* sample rate */ ++ uint8_t halfrate; /* halfrate factor */ ++ uint8_t acmod; /* coded channels */ ++ uint8_t lfeon; /* coded lfe channel */ ++ sample_t clev; /* centre channel mix level */ ++ sample_t slev; /* surround channels mix level */ ++ ++ int output; /* type of output */ ++ sample_t level; /* output level */ ++ sample_t bias; /* output bias */ ++ ++ int dynrnge; /* apply dynamic range */ ++ sample_t dynrng; /* dynamic range */ ++ void * dynrngdata; /* dynamic range callback funtion and data */ ++ sample_t (* dynrngcall) (sample_t range, void * dynrngdata); ++ ++ uint8_t chincpl; /* channel coupled */ ++ uint8_t phsflginu; /* phase flags in use (stereo only) */ ++ uint8_t cplstrtmant; /* coupling channel start mantissa */ ++ uint8_t cplendmant; /* coupling channel end mantissa */ ++ uint32_t cplbndstrc; /* coupling band structure */ ++ sample_t cplco[5][18]; /* coupling coordinates */ ++ ++ /* derived information */ ++ uint8_t cplstrtbnd; /* coupling start band (for bit allocation) */ ++ uint8_t ncplbnd; /* number of coupling bands */ ++ ++ uint8_t rematflg; /* stereo rematrixing */ ++ ++ uint8_t endmant[5]; /* channel end mantissa */ ++ ++ uint16_t bai; /* bit allocation information */ ++ ++ uint32_t * buffer_start; ++ uint16_t lfsr_state; /* dither state */ ++ uint32_t bits_left; ++ uint32_t current_word; ++ ++ uint8_t csnroffst; /* coarse SNR offset */ ++ ba_t cplba; /* coupling bit allocation parameters */ ++ ba_t ba[5]; /* channel bit allocation parameters */ ++ ba_t lfeba; /* lfe bit allocation parameters */ ++ ++ uint8_t cplfleak; /* coupling fast leak init */ ++ uint8_t cplsleak; /* coupling slow leak init */ ++ ++ expbap_t cpl_expbap; ++ expbap_t fbw_expbap[5]; ++ expbap_t lfe_expbap; ++ ++ sample_t * samples; ++ int downmixed; ++} a52_state_t; + + #define A52_CHANNEL 0 + #define A52_MONO 1 +diff -Naur a52dec.old/liba52/a52_internal.h a52dec.new/liba52/a52_internal.h +--- a52dec.old/liba52/a52_internal.h 2002-07-28 03:52:06.000000000 +0200 ++++ a52dec.new/liba52/a52_internal.h 2012-07-16 14:11:47.000000000 +0200 +@@ -21,72 +21,6 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-typedef struct { +- uint8_t bai; /* fine SNR offset, fast gain */ +- uint8_t deltbae; /* delta bit allocation exists */ +- int8_t deltba[50]; /* per-band delta bit allocation */ +-} ba_t; +- +-typedef struct { +- uint8_t exp[256]; /* decoded channel exponents */ +- int8_t bap[256]; /* derived channel bit allocation */ +-} expbap_t; +- +-struct a52_state_s { +- uint8_t fscod; /* sample rate */ +- uint8_t halfrate; /* halfrate factor */ +- uint8_t acmod; /* coded channels */ +- uint8_t lfeon; /* coded lfe channel */ +- sample_t clev; /* centre channel mix level */ +- sample_t slev; /* surround channels mix level */ +- +- int output; /* type of output */ +- sample_t level; /* output level */ +- sample_t bias; /* output bias */ +- +- int dynrnge; /* apply dynamic range */ +- sample_t dynrng; /* dynamic range */ +- void * dynrngdata; /* dynamic range callback funtion and data */ +- sample_t (* dynrngcall) (sample_t range, void * dynrngdata); +- +- uint8_t chincpl; /* channel coupled */ +- uint8_t phsflginu; /* phase flags in use (stereo only) */ +- uint8_t cplstrtmant; /* coupling channel start mantissa */ +- uint8_t cplendmant; /* coupling channel end mantissa */ +- uint32_t cplbndstrc; /* coupling band structure */ +- sample_t cplco[5][18]; /* coupling coordinates */ +- +- /* derived information */ +- uint8_t cplstrtbnd; /* coupling start band (for bit allocation) */ +- uint8_t ncplbnd; /* number of coupling bands */ +- +- uint8_t rematflg; /* stereo rematrixing */ +- +- uint8_t endmant[5]; /* channel end mantissa */ +- +- uint16_t bai; /* bit allocation information */ +- +- uint32_t * buffer_start; +- uint16_t lfsr_state; /* dither state */ +- uint32_t bits_left; +- uint32_t current_word; +- +- uint8_t csnroffst; /* coarse SNR offset */ +- ba_t cplba; /* coupling bit allocation parameters */ +- ba_t ba[5]; /* channel bit allocation parameters */ +- ba_t lfeba; /* lfe bit allocation parameters */ +- +- uint8_t cplfleak; /* coupling fast leak init */ +- uint8_t cplsleak; /* coupling slow leak init */ +- +- expbap_t cpl_expbap; +- expbap_t fbw_expbap[5]; +- expbap_t lfe_expbap; +- +- sample_t * samples; +- int downmixed; +-}; +- + #define LEVEL_PLUS6DB 2.0 + #define LEVEL_PLUS3DB 1.4142135623730951 + #define LEVEL_3DB 0.7071067811865476 --- a52dec-0.7.4.orig/debian/patches/A01-thread-safe.patch +++ a52dec-0.7.4/debian/patches/A01-thread-safe.patch @@ -0,0 +1,465 @@ +From: Rodeo +Origin: https://github.com/HandBrake/HandBrake/blob/master/contrib/a52dec/A01-thread-safe.patch + +diff -Naur a52dec.old/include/a52.h a52dec.new/include/a52.h +--- a52dec.old/include/a52.h 2012-07-16 14:24:14.000000000 +0200 ++++ a52dec.new/include/a52.h 2012-07-16 14:31:37.000000000 +0200 +@@ -42,6 +42,11 @@ + } expbap_t; + + typedef struct { ++ sample_t real; ++ sample_t imag; ++} complex_t; ++ ++typedef struct { + uint8_t fscod; /* sample rate */ + uint8_t halfrate; /* halfrate factor */ + uint8_t acmod; /* coded channels */ +@@ -94,6 +99,20 @@ + + sample_t * samples; + int downmixed; ++ ++ /* Root values for IFFT */ ++ sample_t * roots16; // size 3 ++ sample_t * roots32; // size 7 ++ sample_t * roots64; // size 15 ++ sample_t * roots128; // size 31 ++ ++ /* Twiddle factors for IMDCT */ ++ complex_t * pre1; // size 128 ++ complex_t * post1; // size 64 ++ complex_t * pre2; // size 64 ++ complex_t * post2; // size 32 ++ ++ sample_t * a52_imdct_window; // size 256 + } a52_state_t; + + #define A52_CHANNEL 0 +diff -Naur a52dec.old/liba52/a52_internal.h a52dec.new/liba52/a52_internal.h +--- a52dec.old/liba52/a52_internal.h 2012-07-16 14:24:14.000000000 +0200 ++++ a52dec.new/liba52/a52_internal.h 2012-07-16 14:28:33.000000000 +0200 +@@ -49,6 +49,6 @@ + sample_t clev, sample_t slev); + void a52_upmix (sample_t * samples, int acmod, int output); + +-void a52_imdct_init (uint32_t mm_accel); +-void a52_imdct_256 (sample_t * data, sample_t * delay, sample_t bias); +-void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias); ++void a52_imdct_init (a52_state_t * state, uint32_t mm_accel); ++void a52_imdct_256 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias); ++void a52_imdct_512 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias); +diff -Naur a52dec.old/liba52/imdct.c a52dec.new/liba52/imdct.c +--- a52dec.old/liba52/imdct.c 2012-07-16 14:24:14.000000000 +0200 ++++ a52dec.new/liba52/imdct.c 2012-07-16 14:33:00.000000000 +0200 +@@ -40,11 +40,6 @@ + #include "a52_internal.h" + #include "mm_accel.h" + +-typedef struct complex_s { +- sample_t real; +- sample_t imag; +-} complex_t; +- + static uint8_t fftorder[] = { + 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176, + 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88, +@@ -56,22 +51,8 @@ + 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86 + }; + +-/* Root values for IFFT */ +-static sample_t roots16[3]; +-static sample_t roots32[7]; +-static sample_t roots64[15]; +-static sample_t roots128[31]; +- +-/* Twiddle factors for IMDCT */ +-static complex_t pre1[128]; +-static complex_t post1[64]; +-static complex_t pre2[64]; +-static complex_t post2[32]; +- +-static sample_t a52_imdct_window[256]; +- +-static void (* ifft128) (complex_t * buf); +-static void (* ifft64) (complex_t * buf); ++static void (* ifft128) (a52_state_t * state, complex_t * buf); ++static void (* ifft64) (a52_state_t * state, complex_t * buf); + + static inline void ifft2 (complex_t * buf) + { +@@ -167,7 +148,7 @@ + a1.imag += tmp4; \ + } while (0) + +-static inline void ifft8 (complex_t * buf) ++static inline void ifft8 (a52_state_t * state, complex_t * buf) + { + double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; + +@@ -175,7 +156,7 @@ + ifft2 (buf + 4); + ifft2 (buf + 6); + BUTTERFLY_ZERO (buf[0], buf[2], buf[4], buf[6]); +- BUTTERFLY_HALF (buf[1], buf[3], buf[5], buf[7], roots16[1]); ++ BUTTERFLY_HALF (buf[1], buf[3], buf[5], buf[7], state->roots16[1]); + } + + static void ifft_pass (complex_t * buf, sample_t * weight, int n) +@@ -205,66 +186,66 @@ + } while (--i); + } + +-static void ifft16 (complex_t * buf) ++static void ifft16 (a52_state_t * state, complex_t * buf) + { +- ifft8 (buf); ++ ifft8 (state, buf); + ifft4 (buf + 8); + ifft4 (buf + 12); +- ifft_pass (buf, roots16 - 4, 4); ++ ifft_pass (buf, state->roots16 - 4, 4); + } + +-static void ifft32 (complex_t * buf) ++static void ifft32 (a52_state_t * state, complex_t * buf) + { +- ifft16 (buf); +- ifft8 (buf + 16); +- ifft8 (buf + 24); +- ifft_pass (buf, roots32 - 8, 8); ++ ifft16 (state, buf); ++ ifft8 (state, buf + 16); ++ ifft8 (state, buf + 24); ++ ifft_pass (buf, state->roots32 - 8, 8); + } + +-static void ifft64_c (complex_t * buf) ++static void ifft64_c (a52_state_t * state, complex_t * buf) + { +- ifft32 (buf); +- ifft16 (buf + 32); +- ifft16 (buf + 48); +- ifft_pass (buf, roots64 - 16, 16); ++ ifft32 (state, buf); ++ ifft16 (state, buf + 32); ++ ifft16 (state, buf + 48); ++ ifft_pass (buf, state->roots64 - 16, 16); + } + +-static void ifft128_c (complex_t * buf) ++static void ifft128_c (a52_state_t * state, complex_t * buf) + { +- ifft32 (buf); +- ifft16 (buf + 32); +- ifft16 (buf + 48); +- ifft_pass (buf, roots64 - 16, 16); ++ ifft32 (state, buf); ++ ifft16 (state, buf + 32); ++ ifft16 (state, buf + 48); ++ ifft_pass (buf, state->roots64 - 16, 16); + +- ifft32 (buf + 64); +- ifft32 (buf + 96); +- ifft_pass (buf, roots128 - 32, 32); ++ ifft32 (state, buf + 64); ++ ifft32 (state, buf + 96); ++ ifft_pass (buf, state->roots128 - 32, 32); + } + +-void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias) ++void a52_imdct_512 (a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias) + { + int i, k; + sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; +- const sample_t * window = a52_imdct_window; ++ const sample_t * window = state->a52_imdct_window; + complex_t buf[128]; + + for (i = 0; i < 128; i++) { + k = fftorder[i]; +- t_r = pre1[i].real; +- t_i = pre1[i].imag; ++ t_r = state->pre1[i].real; ++ t_i = state->pre1[i].imag; + + buf[i].real = t_i * data[255-k] + t_r * data[k]; + buf[i].imag = t_r * data[255-k] - t_i * data[k]; + } + +- ifft128 (buf); ++ ifft128 (state, buf); + + /* Post IFFT complex multiply plus IFFT complex conjugate*/ + /* Window and convert to real valued signal */ + for (i = 0; i < 64; i++) { + /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */ +- t_r = post1[i].real; +- t_i = post1[i].imag; ++ t_r = state->post1[i].real; ++ t_i = state->post1[i].imag; + + a_r = t_r * buf[i].real + t_i * buf[i].imag; + a_i = t_i * buf[i].real - t_r * buf[i].imag; +@@ -285,18 +266,18 @@ + } + } + +-void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias) ++void a52_imdct_256(a52_state_t * state, sample_t * data, sample_t * delay, sample_t bias) + { + int i, k; + sample_t t_r, t_i, a_r, a_i, b_r, b_i, c_r, c_i, d_r, d_i, w_1, w_2; +- const sample_t * window = a52_imdct_window; ++ const sample_t * window = state->a52_imdct_window; + complex_t buf1[64], buf2[64]; + + /* Pre IFFT complex multiply plus IFFT cmplx conjugate */ + for (i = 0; i < 64; i++) { + k = fftorder[i]; +- t_r = pre2[i].real; +- t_i = pre2[i].imag; ++ t_r = state->pre2[i].real; ++ t_i = state->pre2[i].imag; + + buf1[i].real = t_i * data[254-k] + t_r * data[k]; + buf1[i].imag = t_r * data[254-k] - t_i * data[k]; +@@ -305,15 +286,15 @@ + buf2[i].imag = t_r * data[255-k] - t_i * data[k+1]; + } + +- ifft64 (buf1); +- ifft64 (buf2); ++ ifft64 (state, buf1); ++ ifft64 (state, buf2); + + /* Post IFFT complex multiply */ + /* Window and convert to real valued signal */ + for (i = 0; i < 32; i++) { + /* y1[n] = z1[n] * (xcos2[n] + j * xs in2[n]) ; */ +- t_r = post2[i].real; +- t_i = post2[i].imag; ++ t_r = state->post2[i].real; ++ t_i = state->post2[i].imag; + + a_r = t_r * buf1[i].real + t_i * buf1[i].imag; + a_i = t_i * buf1[i].real - t_r * buf1[i].imag; +@@ -362,7 +343,7 @@ + return bessel; + } + +-void a52_imdct_init (uint32_t mm_accel) ++void a52_imdct_init (a52_state_t * state, uint32_t mm_accel) + { + int i, k; + double sum; +@@ -371,50 +352,50 @@ + sum = 0; + for (i = 0; i < 256; i++) { + sum += besselI0 (i * (256 - i) * (5 * M_PI / 256) * (5 * M_PI / 256)); +- a52_imdct_window[i] = sum; ++ state->a52_imdct_window[i] = sum; + } + sum++; + for (i = 0; i < 256; i++) +- a52_imdct_window[i] = sqrt (a52_imdct_window[i] / sum); ++ state->a52_imdct_window[i] = sqrt (state->a52_imdct_window[i] / sum); + + for (i = 0; i < 3; i++) +- roots16[i] = cos ((M_PI / 8) * (i + 1)); ++ state->roots16[i] = cos ((M_PI / 8) * (i + 1)); + + for (i = 0; i < 7; i++) +- roots32[i] = cos ((M_PI / 16) * (i + 1)); ++ state->roots32[i] = cos ((M_PI / 16) * (i + 1)); + + for (i = 0; i < 15; i++) +- roots64[i] = cos ((M_PI / 32) * (i + 1)); ++ state->roots64[i] = cos ((M_PI / 32) * (i + 1)); + + for (i = 0; i < 31; i++) +- roots128[i] = cos ((M_PI / 64) * (i + 1)); ++ state->roots128[i] = cos ((M_PI / 64) * (i + 1)); + + for (i = 0; i < 64; i++) { + k = fftorder[i] / 2 + 64; +- pre1[i].real = cos ((M_PI / 256) * (k - 0.25)); +- pre1[i].imag = sin ((M_PI / 256) * (k - 0.25)); ++ state->pre1[i].real = cos ((M_PI / 256) * (k - 0.25)); ++ state->pre1[i].imag = sin ((M_PI / 256) * (k - 0.25)); + } + + for (i = 64; i < 128; i++) { + k = fftorder[i] / 2 + 64; +- pre1[i].real = -cos ((M_PI / 256) * (k - 0.25)); +- pre1[i].imag = -sin ((M_PI / 256) * (k - 0.25)); ++ state->pre1[i].real = -cos ((M_PI / 256) * (k - 0.25)); ++ state->pre1[i].imag = -sin ((M_PI / 256) * (k - 0.25)); + } + + for (i = 0; i < 64; i++) { +- post1[i].real = cos ((M_PI / 256) * (i + 0.5)); +- post1[i].imag = sin ((M_PI / 256) * (i + 0.5)); ++ state->post1[i].real = cos ((M_PI / 256) * (i + 0.5)); ++ state->post1[i].imag = sin ((M_PI / 256) * (i + 0.5)); + } + + for (i = 0; i < 64; i++) { + k = fftorder[i] / 4; +- pre2[i].real = cos ((M_PI / 128) * (k - 0.25)); +- pre2[i].imag = sin ((M_PI / 128) * (k - 0.25)); ++ state->pre2[i].real = cos ((M_PI / 128) * (k - 0.25)); ++ state->pre2[i].imag = sin ((M_PI / 128) * (k - 0.25)); + } + + for (i = 0; i < 32; i++) { +- post2[i].real = cos ((M_PI / 128) * (i + 0.5)); +- post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); ++ state->post2[i].real = cos ((M_PI / 128) * (i + 0.5)); ++ state->post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); + } + + #ifdef LIBA52_DJBFFT +diff -Naur a52dec.old/liba52/parse.c a52dec.new/liba52/parse.c +--- a52dec.old/liba52/parse.c 2012-07-16 14:24:14.000000000 +0200 ++++ a52dec.new/liba52/parse.c 2012-07-16 14:33:00.000000000 +0200 +@@ -56,16 +56,53 @@ + a52_state_t * state; + int i; + +- state = malloc (sizeof (a52_state_t)); ++ state = calloc (1, sizeof (a52_state_t)); + if (state == NULL) + return NULL; + + state->samples = memalign (16, 256 * 12 * sizeof (sample_t)); + if (state->samples == NULL) { +- free (state); +- return NULL; ++ goto fail; + } + ++ /* Root values for IFFT */ ++ state->roots16 = memalign (16, 3 * sizeof (sample_t)); ++ if (state->roots16 == NULL) ++ goto fail; ++ ++ state->roots32 = memalign (16, 7 * sizeof (sample_t)); ++ if (state->roots32 == NULL) ++ goto fail; ++ ++ state->roots64 = memalign (16, 15 * sizeof (sample_t)); ++ if (state->roots64 == NULL) ++ goto fail; ++ ++ state->roots128 = memalign (16, 31 * sizeof (sample_t)); ++ if (state->roots128 == NULL) ++ goto fail; ++ ++ /* Twiddle factors for IMDCT */ ++ state->pre1 = memalign (16, 128 * sizeof (complex_t)); ++ if (state->pre1 == NULL) ++ goto fail; ++ ++ state->post1 = memalign (16, 64 * sizeof (complex_t)); ++ if (state->post1 == NULL) ++ goto fail; ++ ++ state->pre2 = memalign (16, 64 * sizeof (complex_t)); ++ if (state->pre2 == NULL) ++ goto fail; ++ ++ state->post2 = memalign (16, 32 * sizeof (complex_t)); ++ if (state->post2 == NULL) ++ goto fail; ++ ++ state->a52_imdct_window = memalign (16, 256 * sizeof (sample_t)); ++ if (state->a52_imdct_window == NULL) ++ goto fail; ++ + for (i = 0; i < 256 * 12; i++) + state->samples[i] = 0; + +@@ -73,9 +110,27 @@ + + state->lfsr_state = 1; + +- a52_imdct_init (mm_accel); ++ a52_imdct_init (state, mm_accel); + + return state; ++ ++fail: ++ if ( state ) ++ { ++ free (state->a52_imdct_window); ++ free (state->post2); ++ free (state->pre2); ++ free (state->post1); ++ free (state->pre1); ++ free (state->roots128); ++ free (state->roots64); ++ free (state->roots32); ++ free (state->roots16); ++ free (state->samples); ++ free (state); ++ } ++ return NULL; ++ + } + + sample_t * a52_samples (a52_state_t * state) +@@ -825,7 +880,7 @@ + state->dynrng, 0, 7); + for (i = 7; i < 256; i++) + (samples-256)[i] = 0; +- a52_imdct_512 (samples - 256, samples + 1536 - 256, state->bias); ++ a52_imdct_512 (state, samples - 256, samples + 1536 - 256, state->bias); + } else { + /* just skip the LFE coefficients */ + coeff_get (state, samples + 1280, &state->lfe_expbap, &quantizer, +@@ -854,10 +909,10 @@ + + if (coeff[i]) { + if (blksw[i]) +- a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, ++ a52_imdct_256 (state, samples + 256 * i, samples + 1536 + 256 * i, + bias); + else +- a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, ++ a52_imdct_512 (state, samples + 256 * i, samples + 1536 + 256 * i, + bias); + } else { + int j; +@@ -883,11 +938,11 @@ + + if (blksw[0]) + for (i = 0; i < nfchans; i++) +- a52_imdct_256 (samples + 256 * i, samples + 1536 + 256 * i, ++ a52_imdct_256 (state, samples + 256 * i, samples + 1536 + 256 * i, + state->bias); + else + for (i = 0; i < nfchans; i++) +- a52_imdct_512 (samples + 256 * i, samples + 1536 + 256 * i, ++ a52_imdct_512 (state, samples + 256 * i, samples + 1536 + 256 * i, + state->bias); + } + +@@ -896,6 +951,15 @@ + + void a52_free (a52_state_t * state) + { ++ free (state->a52_imdct_window); ++ free (state->post2); ++ free (state->pre2); ++ free (state->post1); ++ free (state->pre1); ++ free (state->roots128); ++ free (state->roots64); ++ free (state->roots32); ++ free (state->roots16); + free (state->samples); + free (state); + } --- a52dec-0.7.4.orig/debian/patches/A04-modern-gcc-cflags.patch +++ a52dec-0.7.4/debian/patches/A04-modern-gcc-cflags.patch @@ -0,0 +1,22 @@ +From: Rodeo +Origin: https://github.com/HandBrake/HandBrake/blob/master/contrib/a52dec/A04-modern-gcc-cflags.patch + +--- a52dec/configure.in.bak Thu Nov 28 00:00:22 2013 ++++ a52dec/configure.in Thu Nov 28 00:03:20 2013 +@@ -34,11 +34,11 @@ + case "$host" in + i?86-* | k?-*) + case "$host" in +- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";; +- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";; +- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";; +- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";; +- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";; ++ i386-*) OPT_CFLAGS="$CFLAGS -mtune=i386";; ++ i486-*) OPT_CFLAGS="$CFLAGS -mtune=i486";; ++ i586-*) OPT_CFLAGS="$CFLAGS -mtune=pentium";; ++ i686-*) OPT_CFLAGS="$CFLAGS -mtune=pentiumpro";; ++ k6-*) OPT_CFLAGS="$CFLAGS -mtune=k6";; + esac + AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);; + sparc-* | sparc64-*) --- a52dec-0.7.4.orig/debian/patches/series +++ a52dec-0.7.4/debian/patches/series @@ -0,0 +1,7 @@ +01-enable-pic.diff +02-soname.diff +03-link-against-lm.diff +50_fix_imdct_error_msg.diff +A00-a52-state-t-public.patch +A01-thread-safe.patch +A04-modern-gcc-cflags.patch --- a52dec-0.7.4.orig/debian/source/format +++ a52dec-0.7.4/debian/source/format @@ -0,0 +1 @@ +1.0