aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmad
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-04 23:19:57 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-04 23:19:57 +0000
commite2d2baece9230967d8f1d5fdb5259515c2fb03c7 (patch)
tree0e0e0470e22eb21a60cf694cbaad199aadc5e242 /src/libmad
parent7be523c015a18ffcfbdd9511e225609729b25a0c (diff)
downloadmpd-e2d2baece9230967d8f1d5fdb5259515c2fb03c7.tar.gz
mpd-e2d2baece9230967d8f1d5fdb5259515c2fb03c7.tar.xz
mpd-e2d2baece9230967d8f1d5fdb5259515c2fb03c7.zip
update to 0.15.1 of libmad and libid3tag
git-svn-id: https://svn.musicpd.org/mpd/trunk@196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/libmad')
-rw-r--r--src/libmad/CHANGES29
-rw-r--r--src/libmad/COPYRIGHT2
-rw-r--r--src/libmad/CREDITS20
-rw-r--r--src/libmad/D.dat4
-rw-r--r--src/libmad/Makefile.am6
-rw-r--r--src/libmad/README4
-rw-r--r--src/libmad/TODO5
-rw-r--r--src/libmad/VERSION8
-rw-r--r--src/libmad/bit.c4
-rw-r--r--src/libmad/bit.h4
-rw-r--r--src/libmad/config.h.in10
-rw-r--r--src/libmad/configure.ac7
-rw-r--r--src/libmad/decoder.c4
-rw-r--r--src/libmad/decoder.h4
-rw-r--r--src/libmad/fixed.c4
-rw-r--r--src/libmad/fixed.h21
-rw-r--r--src/libmad/frame.c7
-rw-r--r--src/libmad/frame.h4
-rw-r--r--src/libmad/global.h4
-rw-r--r--src/libmad/huffman.c33
-rw-r--r--src/libmad/huffman.h4
-rw-r--r--src/libmad/imdct_l_arm.S2
-rw-r--r--src/libmad/imdct_s.dat4
-rw-r--r--src/libmad/layer12.c50
-rw-r--r--src/libmad/layer12.h4
-rw-r--r--src/libmad/layer3.c204
-rw-r--r--src/libmad/layer3.h4
-rw-r--r--src/libmad/mad.h.sed4
-rw-r--r--src/libmad/minimad.c14
-rw-r--r--src/libmad/qc_table.dat4
-rw-r--r--src/libmad/rq_table.dat4
-rw-r--r--src/libmad/sf_table.dat4
-rw-r--r--src/libmad/stream.c5
-rw-r--r--src/libmad/stream.h5
-rw-r--r--src/libmad/synth.c4
-rw-r--r--src/libmad/synth.h4
-rw-r--r--src/libmad/timer.c4
-rw-r--r--src/libmad/timer.h4
-rw-r--r--src/libmad/version.c4
-rw-r--r--src/libmad/version.h8
40 files changed, 404 insertions, 120 deletions
diff --git a/src/libmad/CHANGES b/src/libmad/CHANGES
index 92f97678f..9291760b9 100644
--- a/src/libmad/CHANGES
+++ b/src/libmad/CHANGES
@@ -1,11 +1,28 @@
libmad - MPEG audio decoder library
- Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
- $Id: CHANGES,v 1.1 2003/08/14 03:57:13 shank Exp $
+ $Id: CHANGES,v 1.14 2004/02/17 02:02:03 rob Exp $
===============================================================================
+Version 0.15.1 (beta)
+
+ * Updated to autoconf 2.59, automake 1.8.2, libtool 1.5.2.
+
+ * Replaced Layer III IMDCT routine with one based on a faster algorithm,
+ improving both speed and accuracy.
+
+ * Improved portability of the Huffman table initialization.
+
+ * Fixed a problem that could result in an assertion failure in layer3.c
+ due to an invalid Layer III free format bitrate.
+
+ * Improved the robustness of Layer II bitrate/mode combinations, and added
+ a new MAD_ERROR_BADMODE error enum. The allowability of low-bitrate
+ stereo streams is influenced by the --enable-strict-iso option to
+ `configure'.
+
Version 0.15.0 (beta)
* Updated to autoconf 2.57, automake 1.7.5, libtool 1.4.3.
@@ -98,7 +115,7 @@ Version 0.13.0 (beta)
* Eliminated `+' from asm constraints under Intel for better compatibility
with some compilers.
- * Fixed a PIC-related problem in libmad/imdct_l_arm.S.
+ * Fixed a PIC-related problem in imdct_l_arm.S.
* Eliminated a static variable to make libmad thread-safe.
@@ -196,9 +213,9 @@ Version 0.12.0 (alpha)
* Further developed the async API; arbitrary messages can now be passed to
the subsidiary decoding process.
- * Streamlined libmad/timer.c and extended its interface. It now has
- support for video frame/field lengths, including output support for
- drop-frame encoding.
+ * Streamlined timer.c and extended its interface. It now has support for
+ video frame/field lengths, including output support for drop-frame
+ encoding.
* Replaced many constant integer preprocessor defines with enums.
diff --git a/src/libmad/COPYRIGHT b/src/libmad/COPYRIGHT
index 1e923530b..ed91d2bac 100644
--- a/src/libmad/COPYRIGHT
+++ b/src/libmad/COPYRIGHT
@@ -1,6 +1,6 @@
libmad - MPEG audio decoder library
- Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/libmad/CREDITS b/src/libmad/CREDITS
index 3a7003a04..72ec72eda 100644
--- a/src/libmad/CREDITS
+++ b/src/libmad/CREDITS
@@ -1,8 +1,8 @@
libmad - MPEG audio decoder library
- Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
- $Id: CREDITS,v 1.1 2003/08/14 03:57:13 shank Exp $
+ $Id: CREDITS,v 1.5 2004/02/17 02:02:03 rob Exp $
===============================================================================
@@ -19,12 +19,20 @@ CONTRIBUTORS
Anonymous
2002/03/15: frame.c
- Reported problem with use of reserved emphasis value.
+ 2003/08/31: layer12.c
+ - Suggested support for certain disallowed bitrate/mode
+ combinations.
Niek Albers <info@daansystems.com>
2003/04/21: layer3.c
- Reported runtime uninitialized use of `ptr' in designating
ancillary bits after a decoding error.
+ Christian Biere <cbiere@users.sourceforge.net>
+ 2003/02/01: frame.c
+ - Reported assertion failure in layer3.c due to an
+ invalid/unsupported Layer III free format bitrate.
+
David Blythe <blythe@routefree.com>
2001/01/30: fixed.h
- Provided initial PowerPC fixed-point assembly.
@@ -33,6 +41,10 @@ CONTRIBUTORS
2000/09/20: imdct_l_arm.S
- Suggested patch for a.out compatibility.
+ Brian Cameron <Brian.Cameron@sun.com>
+ 2003/07/02: huffman.c
+ - Suggested changes for improved portability.
+
Joshua Haberman <joshua@haberman.com>
2001/08/10: decoder.c, huffman.c
- Suggested portability fixes.
@@ -41,6 +53,10 @@ CONTRIBUTORS
2002/05/04: sf_table.dat, layer12.c
- Reported problem with use of (missing) scalefactor index 63.
+ Felix von Leitner <felix-mad@fefe.de>
+ 2003/01/21: fixed.h
+ - Suggested Intel scaling alternative for possible speedup.
+
Andre McCurdy <armccurdy@yahoo.co.uk>
2000/08/10: imdct_l_arm.S
- ARM optimized assembly replacement for III_imdct_l().
diff --git a/src/libmad/D.dat b/src/libmad/D.dat
index c4ddbed5d..4a7fa4fa9 100644
--- a/src/libmad/D.dat
+++ b/src/libmad/D.dat
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: D.dat,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: D.dat,v 1.9 2004/01/23 09:41:32 rob Exp $
*/
/*
diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am
index ef8551bf3..833a02e75 100644
--- a/src/libmad/Makefile.am
+++ b/src/libmad/Makefile.am
@@ -1,6 +1,6 @@
##
## libmad - MPEG audio decoder library
-## Copyright (C) 2000-2003 Underbit Technologies, Inc.
+## Copyright (C) 2000-2004 Underbit Technologies, Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## $Id: Makefile.am,v 1.1 2003/08/14 03:57:13 shank Exp $
+## $Id: Makefile.am,v 1.23 2004/02/17 02:02:03 rob Exp $
##
## Process this file with automake to produce Makefile.in
@@ -96,7 +96,7 @@ CLEANFILES = mad.h
## then set AGE to 0.
version_current = 2
-version_revision = 0
+version_revision = 1
version_age = 2
version_info = $(version_current):$(version_revision):$(version_age)
diff --git a/src/libmad/README b/src/libmad/README
index 2bf564c84..b3f15ea40 100644
--- a/src/libmad/README
+++ b/src/libmad/README
@@ -1,8 +1,8 @@
libmad - MPEG audio decoder library
- Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
- $Id: README,v 1.1 2003/08/14 03:57:13 shank Exp $
+ $Id: README,v 1.4 2004/01/23 09:41:32 rob Exp $
===============================================================================
diff --git a/src/libmad/TODO b/src/libmad/TODO
index b3e8ba358..1ea107c24 100644
--- a/src/libmad/TODO
+++ b/src/libmad/TODO
@@ -1,8 +1,8 @@
libmad - MPEG audio decoder library
- Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ Copyright (C) 2000-2004 Underbit Technologies, Inc.
- $Id: TODO,v 1.1 2003/08/14 03:57:13 shank Exp $
+ $Id: TODO,v 1.3 2004/02/05 09:02:39 rob Exp $
===============================================================================
@@ -57,7 +57,6 @@ libmad Layer I:
- check frame length sanity
libmad Layer II:
- - check legal bitrate/mode combinations
- check frame length sanity
libmad Layer III:
diff --git a/src/libmad/VERSION b/src/libmad/VERSION
index a844b7b58..d4e8f64aa 100644
--- a/src/libmad/VERSION
+++ b/src/libmad/VERSION
@@ -1,7 +1,7 @@
-0.15.0b
+0.15.1b
configure.ac:24
version.h:25-28
-msvc++/config.h:115
-msvc++/mad.h:38-41
+msvc++/config.h:99,105,120
+msvc++/mad.h:41-44
-Makefile.am:89-91
+Makefile.am:98-100
diff --git a/src/libmad/bit.c b/src/libmad/bit.c
index 597422a22..c2bfb243c 100644
--- a/src/libmad/bit.c
+++ b/src/libmad/bit.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: bit.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: bit.c,v 1.12 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/bit.h b/src/libmad/bit.h
index 6960727a2..5a51570b2 100644
--- a/src/libmad/bit.h
+++ b/src/libmad/bit.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: bit.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_BIT_H
diff --git a/src/libmad/config.h.in b/src/libmad/config.h.in
index ec79167a8..2a9671cd2 100644
--- a/src/libmad/config.h.in
+++ b/src/libmad/config.h.in
@@ -118,14 +118,16 @@
/* Version number of package */
#undef VERSION
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
#undef inline
-#endif
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
diff --git a/src/libmad/configure.ac b/src/libmad/configure.ac
index aaba8d044..568cd227c 100644
--- a/src/libmad/configure.ac
+++ b/src/libmad/configure.ac
@@ -1,7 +1,7 @@
dnl -*- m4 -*-
dnl
dnl libmad - MPEG audio decoder library
-dnl Copyright (C) 2000-2003 Underbit Technologies, Inc.
+dnl Copyright (C) 2000-2004 Underbit Technologies, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -17,11 +17,11 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
-AC_REVISION([$Id: configure.ac,v 1.1 2003/08/14 03:57:13 shank Exp $])dnl
+AC_REVISION([$Id: configure.ac,v 1.9 2004/01/23 09:41:32 rob Exp $])dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([MPEG Audio Decoder], [0.15.0b], [support@underbit.com], [libmad])
+AC_INIT([MPEG Audio Decoder], [0.15.1b], [support@underbit.com], [libmad])
AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([decoder.h])
@@ -212,6 +212,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
+AC_C_BIGENDIAN
AC_TYPE_PID_T
AC_CHECK_SIZEOF(int, 2)
diff --git a/src/libmad/decoder.c b/src/libmad/decoder.c
index 926e95c49..6d6df0db5 100644
--- a/src/libmad/decoder.c
+++ b/src/libmad/decoder.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: decoder.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: decoder.c,v 1.22 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/decoder.h b/src/libmad/decoder.h
index 6b1c8235f..f0ad758dd 100644
--- a/src/libmad/decoder.h
+++ b/src/libmad/decoder.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: decoder.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: decoder.h,v 1.17 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_DECODER_H
diff --git a/src/libmad/fixed.c b/src/libmad/fixed.c
index 21f2364e4..9785466f6 100644
--- a/src/libmad/fixed.c
+++ b/src/libmad/fixed.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: fixed.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/fixed.h b/src/libmad/fixed.h
index 241e7f95e..4b58abf56 100644
--- a/src/libmad/fixed.h
+++ b/src/libmad/fixed.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: fixed.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: fixed.h,v 1.38 2004/02/17 02:02:03 rob Exp $
*/
# ifndef LIBMAD_FIXED_H
@@ -208,7 +208,22 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
: "cc"); \
__result; \
})
-# else
+# elif defined(OPT_INTEL)
+/*
+ * Alternate Intel scaling that may or may not perform better.
+ */
+# define mad_f_scale64(hi, lo) \
+ ({ mad_fixed_t __result; \
+ asm ("shrl %3,%1\n\t" \
+ "shll %4,%2\n\t" \
+ "orl %2,%1" \
+ : "=rm" (__result) \
+ : "0" (lo), "r" (hi), \
+ "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \
+ : "cc"); \
+ __result; \
+ })
+# else
# define mad_f_scale64(hi, lo) \
({ mad_fixed_t __result; \
asm ("shrdl %3,%2,%1" \
diff --git a/src/libmad/frame.c b/src/libmad/frame.c
index 8c3342e98..0cb3d0f33 100644
--- a/src/libmad/frame.c
+++ b/src/libmad/frame.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $
*/
# ifdef HAVE_CONFIG_H
@@ -376,7 +376,8 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
/* calculate free bit rate */
if (header->bitrate == 0) {
- if ((stream->freerate == 0 || !stream->sync) &&
+ if ((stream->freerate == 0 || !stream->sync ||
+ (header->layer == MAD_LAYER_III && stream->freerate > 640000)) &&
free_bitrate(stream, header) == -1)
goto fail;
diff --git a/src/libmad/frame.h b/src/libmad/frame.h
index 5e5fe716d..3f5bf37ef 100644
--- a/src/libmad/frame.h
+++ b/src/libmad/frame.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: frame.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: frame.h,v 1.20 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_FRAME_H
diff --git a/src/libmad/global.h b/src/libmad/global.h
index afd9a4809..a6debfd8b 100644
--- a/src/libmad/global.h
+++ b/src/libmad/global.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: global.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_GLOBAL_H
diff --git a/src/libmad/huffman.c b/src/libmad/huffman.c
index 2a52e9237..a230a9c10 100644
--- a/src/libmad/huffman.c
+++ b/src/libmad/huffman.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: huffman.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
@@ -34,13 +34,19 @@
* These tables support decoding up to 4 Huffman code bits at a time.
*/
-# if defined(__GNUC__)
-# define PTR(offs, bits) { ptr: { 0, bits, offs } }
-# define V(v, w, x, y, hlen) { value: { 1, hlen, v, w, x, y } }
+# if defined(__GNUC__) || \
+ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
+# define PTR(offs, bits) { .ptr = { 0, bits, offs } }
+# define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } }
# else
# define PTR(offs, bits) { { 0, bits, offs } }
-# define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \
- (x << 2) | (y << 3) } }
+# if defined(WORDS_BIGENDIAN)
+# define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \
+ (x << 9) | (y << 8) } }
+# else
+# define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \
+ (x << 2) | (y << 3) } }
+# endif
# endif
static
@@ -106,12 +112,17 @@ union huffquad const hufftabB[] = {
# undef V
# undef PTR
-# if defined(__GNUC__)
-# define PTR(offs, bits) { ptr: { 0, bits, offs } }
-# define V(x, y, hlen) { value: { 1, hlen, x, y } }
+# if defined(__GNUC__) || \
+ (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
+# define PTR(offs, bits) { .ptr = { 0, bits, offs } }
+# define V(x, y, hlen) { .value = { 1, hlen, x, y } }
# else
# define PTR(offs, bits) { { 0, bits, offs } }
-# define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } }
+# if defined(WORDS_BIGENDIAN)
+# define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } }
+# else
+# define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } }
+# endif
# endif
static
diff --git a/src/libmad/huffman.h b/src/libmad/huffman.h
index e7099276a..6325db44a 100644
--- a/src/libmad/huffman.h
+++ b/src/libmad/huffman.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: huffman.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: huffman.h,v 1.11 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_HUFFMAN_H
diff --git a/src/libmad/imdct_l_arm.S b/src/libmad/imdct_l_arm.S
index 963792831..badec5bcb 100644
--- a/src/libmad/imdct_l_arm.S
+++ b/src/libmad/imdct_l_arm.S
@@ -22,7 +22,7 @@
*
*****************************************************************************
*
-* $Id: imdct_l_arm.S,v 1.1 2003/08/14 03:57:13 shank Exp $
+* $Id: imdct_l_arm.S,v 1.7 2001/03/25 20:03:34 rob Rel $
*
* 2001/03/24: Andre McCurdy <armccurdy@yahoo.co.uk>
* - Corrected PIC unsafe loading of address of 'imdct36_long_karray'
diff --git a/src/libmad/imdct_s.dat b/src/libmad/imdct_s.dat
index 73ea91f08..476710eaf 100644
--- a/src/libmad/imdct_s.dat
+++ b/src/libmad/imdct_s.dat
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: imdct_s.dat,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $
*/
/* 0 */ { MAD_F(0x09bd7ca0) /* 0.608761429 */,
diff --git a/src/libmad/layer12.c b/src/libmad/layer12.c
index d14122a85..6981f9ce1 100644
--- a/src/libmad/layer12.c
+++ b/src/libmad/layer12.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: layer12.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: layer12.c,v 1.17 2004/02/05 09:02:39 rob Exp $
*/
# ifdef HAVE_CONFIG_H
@@ -341,20 +341,44 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
if (header->flags & MAD_FLAG_LSF_EXT)
index = 4;
+ else if (header->flags & MAD_FLAG_FREEFORMAT)
+ goto freeformat;
else {
- switch (nch == 2 ? header->bitrate / 2 : header->bitrate) {
- case 32000:
- case 48000:
- index = (header->samplerate == 32000) ? 3 : 2;
- break;
+ unsigned long bitrate_per_channel;
- case 56000:
- case 64000:
- case 80000:
- index = 0;
- break;
+ bitrate_per_channel = header->bitrate;
+ if (nch == 2) {
+ bitrate_per_channel /= 2;
- default:
+# if defined(OPT_STRICT)
+ /*
+ * ISO/IEC 11172-3 allows only single channel mode for 32, 48, 56, and
+ * 80 kbps bitrates in Layer II, but some encoders ignore this
+ * restriction. We enforce it if OPT_STRICT is defined.
+ */
+ if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) {
+ stream->error = MAD_ERROR_BADMODE;
+ return -1;
+ }
+# endif
+ }
+ else { /* nch == 1 */
+ if (bitrate_per_channel > 192000) {
+ /*
+ * ISO/IEC 11172-3 does not allow single channel mode for 224, 256,
+ * 320, or 384 kbps bitrates in Layer II.
+ */
+ stream->error = MAD_ERROR_BADMODE;
+ return -1;
+ }
+ }
+
+ if (bitrate_per_channel <= 48000)
+ index = (header->samplerate == 32000) ? 3 : 2;
+ else if (bitrate_per_channel <= 80000)
+ index = 0;
+ else {
+ freeformat:
index = (header->samplerate == 48000) ? 0 : 1;
}
}
diff --git a/src/libmad/layer12.h b/src/libmad/layer12.h
index 273d6ac79..e1c499696 100644
--- a/src/libmad/layer12.h
+++ b/src/libmad/layer12.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: layer12.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_LAYER12_H
diff --git a/src/libmad/layer3.c b/src/libmad/layer3.c
index e1b073c71..4e5d3fa02 100644
--- a/src/libmad/layer3.c
+++ b/src/libmad/layer3.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: layer3.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: layer3.c,v 1.43 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
@@ -1575,6 +1575,193 @@ void III_aliasreduce(mad_fixed_t xr[576], int lines)
# if defined(ASO_IMDCT)
void III_imdct_l(mad_fixed_t const [18], mad_fixed_t [36], unsigned int);
# else
+# if 1
+static
+void fastsdct(mad_fixed_t const x[9], mad_fixed_t y[18])
+{
+ mad_fixed_t a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12;
+ mad_fixed_t a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25;
+ mad_fixed_t m0, m1, m2, m3, m4, m5, m6, m7;
+
+ enum {
+ c0 = MAD_F(0x1f838b8d), /* 2 * cos( 1 * PI / 18) */
+ c1 = MAD_F(0x1bb67ae8), /* 2 * cos( 3 * PI / 18) */
+ c2 = MAD_F(0x18836fa3), /* 2 * cos( 4 * PI / 18) */
+ c3 = MAD_F(0x1491b752), /* 2 * cos( 5 * PI / 18) */
+ c4 = MAD_F(0x0af1d43a), /* 2 * cos( 7 * PI / 18) */
+ c5 = MAD_F(0x058e86a0), /* 2 * cos( 8 * PI / 18) */
+ c6 = -MAD_F(0x1e11f642) /* 2 * cos(16 * PI / 18) */
+ };
+
+ a0 = x[3] + x[5];
+ a1 = x[3] - x[5];
+ a2 = x[6] + x[2];
+ a3 = x[6] - x[2];
+ a4 = x[1] + x[7];
+ a5 = x[1] - x[7];
+ a6 = x[8] + x[0];
+ a7 = x[8] - x[0];
+
+ a8 = a0 + a2;
+ a9 = a0 - a2;
+ a10 = a0 - a6;
+ a11 = a2 - a6;
+ a12 = a8 + a6;
+ a13 = a1 - a3;
+ a14 = a13 + a7;
+ a15 = a3 + a7;
+ a16 = a1 - a7;
+ a17 = a1 + a3;
+
+ m0 = mad_f_mul(a17, -c3);
+ m1 = mad_f_mul(a16, -c0);
+ m2 = mad_f_mul(a15, -c4);
+ m3 = mad_f_mul(a14, -c1);
+ m4 = mad_f_mul(a5, -c1);
+ m5 = mad_f_mul(a11, -c6);
+ m6 = mad_f_mul(a10, -c5);
+ m7 = mad_f_mul(a9, -c2);
+
+ a18 = x[4] + a4;
+ a19 = 2 * x[4] - a4;
+ a20 = a19 + m5;
+ a21 = a19 - m5;
+ a22 = a19 + m6;
+ a23 = m4 + m2;
+ a24 = m4 - m2;
+ a25 = m4 + m1;
+
+ /* output to every other slot for convenience */
+
+ y[ 0] = a18 + a12;
+ y[ 2] = m0 - a25;
+ y[ 4] = m7 - a20;
+ y[ 6] = m3;
+ y[ 8] = a21 - m6;
+ y[10] = a24 - m1;
+ y[12] = a12 - 2 * a18;
+ y[14] = a23 + m0;
+ y[16] = a22 + m7;
+}
+
+static inline
+void sdctII(mad_fixed_t const x[18], mad_fixed_t X[18])
+{
+ mad_fixed_t tmp[9];
+ int i;
+
+ /* scale[i] = 2 * cos(PI * (2 * i + 1) / (2 * 18)) */
+ static mad_fixed_t const scale[9] = {
+ MAD_F(0x1fe0d3b4), MAD_F(0x1ee8dd47), MAD_F(0x1d007930),
+ MAD_F(0x1a367e59), MAD_F(0x16a09e66), MAD_F(0x125abcf8),
+ MAD_F(0x0d8616bc), MAD_F(0x08483ee1), MAD_F(0x02c9fad7)
+ };
+
+ /* divide the 18-point SDCT-II into two 9-point SDCT-IIs */
+
+ /* even input butterfly */
+
+ for (i = 0; i < 9; i += 3) {
+ tmp[i + 0] = x[i + 0] + x[18 - (i + 0) - 1];
+ tmp[i + 1] = x[i + 1] + x[18 - (i + 1) - 1];
+ tmp[i + 2] = x[i + 2] + x[18 - (i + 2) - 1];
+ }
+
+ fastsdct(tmp, &X[0]);
+
+ /* odd input butterfly and scaling */
+
+ for (i = 0; i < 9; i += 3) {
+ tmp[i + 0] = mad_f_mul(x[i + 0] - x[18 - (i + 0) - 1], scale[i + 0]);
+ tmp[i + 1] = mad_f_mul(x[i + 1] - x[18 - (i + 1) - 1], scale[i + 1]);
+ tmp[i + 2] = mad_f_mul(x[i + 2] - x[18 - (i + 2) - 1], scale[i + 2]);
+ }
+
+ fastsdct(tmp, &X[1]);
+
+ /* output accumulation */
+
+ for (i = 3; i < 18; i += 8) {
+ X[i + 0] -= X[(i + 0) - 2];
+ X[i + 2] -= X[(i + 2) - 2];
+ X[i + 4] -= X[(i + 4) - 2];
+ X[i + 6] -= X[(i + 6) - 2];
+ }
+}
+
+static inline
+void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18])
+{
+ mad_fixed_t tmp[18];
+ int i;
+
+ /* scale[i] = 2 * cos(PI * (2 * i + 1) / (4 * 18)) */
+ static mad_fixed_t const scale[18] = {
+ MAD_F(0x1ff833fa), MAD_F(0x1fb9ea93), MAD_F(0x1f3dd120),
+ MAD_F(0x1e84d969), MAD_F(0x1d906bcf), MAD_F(0x1c62648b),
+ MAD_F(0x1afd100f), MAD_F(0x1963268b), MAD_F(0x1797c6a4),
+ MAD_F(0x159e6f5b), MAD_F(0x137af940), MAD_F(0x11318ef3),
+ MAD_F(0x0ec6a507), MAD_F(0x0c3ef153), MAD_F(0x099f61c5),
+ MAD_F(0x06ed12c5), MAD_F(0x042d4544), MAD_F(0x0165547c)
+ };
+
+ /* scaling */
+
+ for (i = 0; i < 18; i += 3) {
+ tmp[i + 0] = mad_f_mul(y[i + 0], scale[i + 0]);
+ tmp[i + 1] = mad_f_mul(y[i + 1], scale[i + 1]);
+ tmp[i + 2] = mad_f_mul(y[i + 2], scale[i + 2]);
+ }
+
+ /* SDCT-II */
+
+ sdctII(tmp, X);
+
+ /* scale reduction and output accumulation */
+
+ X[0] /= 2;
+ for (i = 1; i < 17; i += 4) {
+ X[i + 0] = X[i + 0] / 2 - X[(i + 0) - 1];
+ X[i + 1] = X[i + 1] / 2 - X[(i + 1) - 1];
+ X[i + 2] = X[i + 2] / 2 - X[(i + 2) - 1];
+ X[i + 3] = X[i + 3] / 2 - X[(i + 3) - 1];
+ }
+ X[17] = X[17] / 2 - X[16];
+}
+
+/*
+ * NAME: imdct36
+ * DESCRIPTION: perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm
+ */
+static inline
+void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36])
+{
+ mad_fixed_t tmp[18];
+ int i;
+
+ /* DCT-IV */
+
+ dctIV(x, tmp);
+
+ /* convert 18-point DCT-IV to 36-point IMDCT */
+
+ for (i = 0; i < 9; i += 3) {
+ y[i + 0] = tmp[9 + (i + 0)];
+ y[i + 1] = tmp[9 + (i + 1)];
+ y[i + 2] = tmp[9 + (i + 2)];
+ }
+ for (i = 9; i < 27; i += 3) {
+ y[i + 0] = -tmp[36 - (9 + (i + 0)) - 1];
+ y[i + 1] = -tmp[36 - (9 + (i + 1)) - 1];
+ y[i + 2] = -tmp[36 - (9 + (i + 2)) - 1];
+ }
+ for (i = 27; i < 36; i += 3) {
+ y[i + 0] = -tmp[(i + 0) - 27];
+ y[i + 1] = -tmp[(i + 1) - 27];
+ y[i + 2] = -tmp[(i + 2) - 27];
+ }
+}
+# else
/*
* NAME: imdct36
* DESCRIPTION: perform X[18]->x[36] IMDCT
@@ -1865,6 +2052,7 @@ void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36])
x[26] = x[27] = MAD_F_MLZ(hi, lo) + t5;
}
+# endif
/*
* NAME: III_imdct_l()
@@ -1929,7 +2117,11 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36],
break;
case 1: /* start block */
- for (i = 0; i < 18; ++i) z[i] = mad_f_mul(z[i], window_l[i]);
+ for (i = 0; i < 18; i += 3) {
+ z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
+ z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
+ z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
+ }
/* (i = 18; i < 24; ++i) z[i] unchanged */
for (i = 24; i < 30; ++i) z[i] = mad_f_mul(z[i], window_s[i - 18]);
for (i = 30; i < 36; ++i) z[i] = 0;
@@ -1939,7 +2131,11 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36],
for (i = 0; i < 6; ++i) z[i] = 0;
for (i = 6; i < 12; ++i) z[i] = mad_f_mul(z[i], window_s[i - 6]);
/* (i = 12; i < 18; ++i) z[i] unchanged */
- for (i = 18; i < 36; ++i) z[i] = mad_f_mul(z[i], window_l[i]);
+ for (i = 18; i < 36; i += 3) {
+ z[i + 0] = mad_f_mul(z[i + 0], window_l[i + 0]);
+ z[i + 1] = mad_f_mul(z[i + 1], window_l[i + 1]);
+ z[i + 2] = mad_f_mul(z[i + 2], window_l[i + 2]);
+ }
break;
}
}
diff --git a/src/libmad/layer3.h b/src/libmad/layer3.h
index 07ab47805..2504d461a 100644
--- a/src/libmad/layer3.h
+++ b/src/libmad/layer3.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: layer3.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $
*/
# ifndef LIBMAD_LAYER3_H
diff --git a/src/libmad/mad.h.sed b/src/libmad/mad.h.sed
index 2691b951e..702878547 100644
--- a/src/libmad/mad.h.sed
+++ b/src/libmad/mad.h.sed
@@ -1,6 +1,6 @@
#
# libmad - MPEG audio decoder library
-# Copyright (C) 2000-2003 Underbit Technologies, Inc.
+# Copyright (C) 2000-2004 Underbit Technologies, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# $Id: mad.h.sed,v 1.1 2003/08/14 03:57:13 shank Exp $
+# $Id: mad.h.sed,v 1.9 2004/01/23 09:41:32 rob Exp $
#
/^\/\*$/{
diff --git a/src/libmad/minimad.c b/src/libmad/minimad.c
index bb4f7154a..ac412ae44 100644
--- a/src/libmad/minimad.c
+++ b/src/libmad/minimad.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: minimad.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: minimad.c,v 1.4 2004/01/23 09:41:32 rob Exp $
*/
# include <stdio.h>
@@ -163,8 +163,8 @@ enum mad_flow output(void *data,
/*
* This is the error callback function. It is called whenever a decoding
* error occurs. The error is indicated by stream->error; the list of
- * possible MAD_ERROR_* errors can be found in the mad.h (or
- * libmad/stream.h) header file.
+ * possible MAD_ERROR_* errors can be found in the mad.h (or stream.h)
+ * header file.
*/
static
@@ -184,9 +184,9 @@ enum mad_flow error(void *data,
}
/*
- * This is the function called by main() above to perform all the
- * decoding. It instantiates a decoder object and configures it with the
- * input, output, and error callback functions above. A single call to
+ * This is the function called by main() above to perform all the decoding.
+ * It instantiates a decoder object and configures it with the input,
+ * output, and error callback functions above. A single call to
* mad_decoder_run() continues until a callback function returns
* MAD_FLOW_STOP (to stop decoding) or MAD_FLOW_BREAK (to stop decoding and
* signal an error).
diff --git a/src/libmad/qc_table.dat b/src/libmad/qc_table.dat
index 67a159b25..35a22234f 100644
--- a/src/libmad/qc_table.dat
+++ b/src/libmad/qc_table.dat
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: qc_table.dat,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: qc_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
*/
/*
diff --git a/src/libmad/rq_table.dat b/src/libmad/rq_table.dat
index 47010085f..059c4f318 100644
--- a/src/libmad/rq_table.dat
+++ b/src/libmad/rq_table.dat
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: rq_table.dat,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: rq_table.dat,v 1.7 2004/01/23 09:41:32 rob Exp $
*/
/*
diff --git a/src/libmad/sf_table.dat b/src/libmad/sf_table.dat
index 2a234bf38..db1484a0e 100644
--- a/src/libmad/sf_table.dat
+++ b/src/libmad/sf_table.dat
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: sf_table.dat,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: sf_table.dat,v 1.7 2004/01/23 09:41:33 rob Exp $
*/
/*
diff --git a/src/libmad/stream.c b/src/libmad/stream.c
index 1813019f6..8bb4d6a49 100644
--- a/src/libmad/stream.c
+++ b/src/libmad/stream.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: stream.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: stream.c,v 1.12 2004/02/05 09:02:39 rob Exp $
*/
# ifdef HAVE_CONFIG_H
@@ -145,6 +145,7 @@ char const *mad_stream_errorstr(struct mad_stream const *stream)
case MAD_ERROR_BADCRC: return "CRC check failed";
case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value";
case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index";
+ case MAD_ERROR_BADMODE: return "bad bitrate/mode combination";
case MAD_ERROR_BADFRAMELEN: return "bad frame length";
case MAD_ERROR_BADBIGVALUES: return "bad big_values count";
case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type";
diff --git a/src/libmad/stream.h b/src/libmad/stream.h
index 337ae2305..8bff8b49d 100644
--- a/src/libmad/stream.h
+++ b/src/libmad/stream.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: stream.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $
*/
# ifndef LIBMAD_STREAM_H
@@ -44,6 +44,7 @@ enum mad_error {
MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */
MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */
MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */
+ MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */
MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */
MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */
MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */
diff --git a/src/libmad/synth.c b/src/libmad/synth.c
index df6b52e41..1d28d438c 100644
--- a/src/libmad/synth.c
+++ b/src/libmad/synth.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: synth.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: synth.c,v 1.25 2004/01/23 09:41:33 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/synth.h b/src/libmad/synth.h
index 223350100..8ae4bc95e 100644
--- a/src/libmad/synth.h
+++ b/src/libmad/synth.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: synth.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $
*/
# ifndef LIBMAD_SYNTH_H
diff --git a/src/libmad/timer.c b/src/libmad/timer.c
index c2819e2fd..4b909aba9 100644
--- a/src/libmad/timer.c
+++ b/src/libmad/timer.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: timer.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: timer.c,v 1.18 2004/01/23 09:41:33 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/timer.h b/src/libmad/timer.h
index 7cee42c4a..eb4542bb9 100644
--- a/src/libmad/timer.h
+++ b/src/libmad/timer.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: timer.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: timer.h,v 1.16 2004/01/23 09:41:33 rob Exp $
*/
# ifndef LIBMAD_TIMER_H
diff --git a/src/libmad/version.c b/src/libmad/version.c
index ce06888ba..e643fa71e 100644
--- a/src/libmad/version.c
+++ b/src/libmad/version.c
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: version.c,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $
*/
# ifdef HAVE_CONFIG_H
diff --git a/src/libmad/version.h b/src/libmad/version.h
index 70f8cd76a..d215d4c10 100644
--- a/src/libmad/version.h
+++ b/src/libmad/version.h
@@ -1,6 +1,6 @@
/*
* libmad - MPEG audio decoder library
- * Copyright (C) 2000-2003 Underbit Technologies, Inc.
+ * Copyright (C) 2000-2004 Underbit Technologies, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: version.h,v 1.1 2003/08/14 03:57:13 shank Exp $
+ * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $
*/
# ifndef LIBMAD_VERSION_H
@@ -24,7 +24,7 @@
# define MAD_VERSION_MAJOR 0
# define MAD_VERSION_MINOR 15
-# define MAD_VERSION_PATCH 0
+# define MAD_VERSION_PATCH 1
# define MAD_VERSION_EXTRA " (beta)"
# define MAD_VERSION_STRINGIZE(str) #str
@@ -35,7 +35,7 @@
MAD_VERSION_STRING(MAD_VERSION_PATCH) \
MAD_VERSION_EXTRA
-# define MAD_PUBLISHYEAR "2000-2003"
+# define MAD_PUBLISHYEAR "2000-2004"
# define MAD_AUTHOR "Underbit Technologies, Inc."
# define MAD_EMAIL "info@underbit.com"