/*
* libmad - MPEG audio decoder library
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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.
*
* You should have received a copy of the GNU General Public License
* 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.10 2004/01/23 09:41:32 rob Exp $
*/
# ifdef HAVE_CONFIG_H
# include "config.h"
# endif
# include "global.h"
# include "huffman.h"
/*
* These are the Huffman code words for Layer III.
* The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
*
* These tables support decoding up to 4 Huffman code bits at a time.
*/
# 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 } }
# 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
union huffquad const hufftabA[] = {
/* 0000 */ PTR(16, 2),
/* 0001 */ PTR(20, 2),
/* 0010 */ PTR(24, 1),
/* 0011 */ PTR(26, 1),
/* 0100 */ V(0, 0, 1, 0, 4),
/* 0101 */ V(0, 0, 0, 1, 4),
/* 0110 */ V(0, 1, 0, 0, 4),
/* 0111 */ V(1, 0, 0, 0, 4),
/* 1000 */ V(0, 0, 0, 0, 1),
/* 1001 */ V(0, 0, 0, 0, 1),
/* 1010 */ V(0, 0, 0, 0, 1),
/* 1011 */ V(0, 0, 0, 0, 1),
/* 1100 */ V(0, 0, 0, 0, 1),
/* 1101 */ V(0, 0, 0, 0, 1),
/* 1110 */ V(0, 0, 0, 0, 1),
/* 1111 */ V(0, 0, 0, 0, 1),
/* 0000 ... */
/* 00 */ V(1, 0, 1, 1, 2), /* 16 */
/* 01 */ V(1, 1, 1, 1, 2),
/* 10 */ V(1, 1, 0, 1, 2),
/* 11 */ V(1, 1, 1, 0, 2),
/* 0001 ... */
/* 00 */ V(0, 1, 1, 1, 2), /* 20 */
/* 01 */ V(0, 1, 0, 1, 2),
/* 10 */ V(1, 0, 0, 1, 1),
/* 11 */ V(1, 0, 0, 1, 1),
/* 0010 ... */
/* 0 */ V(0, 1, 1, 0, 1), /* 24 */
/* 1 */ V(0, 0, 1, 1, 1),
/* 0011 ... */
/* 0 */ V(1, 0, 1, 0, 1), /* 26 */
/* 1 */ V(1, 1, 0, 0, 1)
};
static
union huffquad const hufftabB[] = {
/* 0000 */ V(1, 1, 1, 1, 4),
/* 0001 */ V(1, 1, 1, 0, 4),
/* 0010 */ V(1, 1, 0, 1, 4),
/* 0011 */ V(1, 1, 0, 0, 4),
/* 0100 */ V(1, 0, 1, 1, 4),
/* 0101 */ V(1, 0, 1, 0, 4),
/* 0110 */ V(1, 0, 0, 1, 4),
/* 0111 */ V(1, 0, 0, 0, 4),
/* 1000 */ V(0, 1, 1, 1, 4),
/* 1001 */ V(0, 1, 1, 0, 4),
/* 1010 */ V(0, 1, 0, 1, 4),
/* 1011 */ V(0, 1, 0, 0, 4),
/* 1100 */ V(0, 0, 1, 1, 4),
/* 1101 */ V(0, 0, 1, 0, 4),
/* 1110 */ V(0, 0, 0, 1, 4),
/* 1111 */ V(0, 0, 0, 0, 4)
};
# undef V
# undef PTR
# 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 } }
# 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
union huffpair const hufftab0[] = {
/* */ V(0, 0, 0)
};
static
union huffpair const hufftab1[] = {
/* 000 */ V(1, 1, 3),
/* 001 */ V(0, 1, 3),
/* 010 */ V(1, 0, 2),
/* 011 */ V(1, 0, 2),
/* 100 */ V(0, 0, 1),
/* 101 */ V(0, 0, 1),
/* 110 */ V(0, 0, 1),
/* 111 */ V(0, 0, 1)
};
static
union huffpair const hufftab2[] = {
/* 000 */ PTR(8, 3),
/* 001 */ V(1, 1, 3),
/* 010 */ V(0, 1, 3),
/* 011 */ V(1, 0, 3),
/* 100 */ V(0, 0, 1),
/* 101 */ V(0, 0, 1),
/* 110 */ V(0, 0, 1),
/* 111 */ V(0, 0, 1),
/* 000 ... */
/* 000 */ V(2, 2, 3), /* 8 */
/* 001 */ V(0, 2, 3),
/* 010 */ V(1, 2, 2),
/* 011 */ V(1, 2, 2),
/* 100 */ V(2, 1, 2),
/* 101 */ V(2, 1, 2),
/* 110 */ V(2, 0, 2),
/* 111 */ V(2, 0, 2)
};
static
union huffpair const hufftab3[] = {
/* 000 */ PTR(8, 3),
/* 001 */ V(1, 0, 3),
/* 010 */ V(1, 1, 2),
/* 011 */ V(1, 1, 2),
/* 100 */ V(0, 1, 2),
/* 101 */ V(0, 1, 2),
/* 110 */ V(0, 0, 2),
/* 111 */ V(0, 0, 2),
/* 000 ... */
/* 000 */ V(2, 2, 3), /* 8 */
/* 001 */ V(0, 2, 3),
/* 010 */ V(1, 2, 2),
/* 011 */ V(1, 2, 2),
/* 100 */ V(2, 1, 2),
/* 101 */ V(2, 1, 2),
/* 110 */ V(2, 0, 2),
/* 111 */ V(2, 0, 2)
};
static
union huffpair const hufftab5[] = {
/* 000 */ PTR(8, 4),
/* 001 */ V(1, 1, 3),
/* 010 */ V(0, 1, 3),
/* 011 */ V(1, 0, 3),
/* 100 */ V(0, 0, 1),
/* 101 */ V(0, 0, 1),
/* 110 */ V(0, 0, 1),
/* 111 */ V(0, 0, 1),
/* 000 ... */
/* 0000 */ PTR(24, 1), /* 8 */
/* 0001 */ V(3, 2, 4),
/* 0010 */ V(3, 1, 3),
/* 0011 */ V(3, 1, 3),
/* 0100 */ V(1, 3, 4),
/* 0101 */ V(0, 3, 4),
/* 0110 */ V(3, 0, 4),
/* 0111 */ V(2, 2, 4),
/* 1000 */ V(1, 2, 3),
/* 1001 */ V(1, 2, 3),
/* 1010 */ V(2, 1, 3),
/* 1011 */ V(2, 1, 3),
/* 1100 */ V(0, 2, 3),
/* 1101 */ V(0, 2, 3),
/* 1110 */ V(2, 0, 3),
/* 1111 */ V(2, 0, 3),
/* 000 0000 ... */
/* 0 */ V(3, 3, 1), /* 24 */
/* 1 */ V(2, 3, 1)
};
static
union huffpair const hufftab6[] = {
/* 0000 */ PTR(16, 3),
/* 0001 */ PTR(24, 1),
/* 0010 */ PTR(26, 1),
/* 0011 */ V(1, 2, 4),
/* 0100 */ V(2, 1, 4),
/* 0101 */ V(2, 0, 4),
/* 0110 */ V(0, 1, 3),
/* 0111 */ V(0, 1, 3),
/* 1000 */ V(1, 1, 2),
/* 1001 */ V(1, 1, 2),
/* 1010 */ V(1, 1, 2),
/* 1011 */ V(1, 1, 2),
/* 1100 */ V(1, 0, 3),
/* 1101 */ V(1, 0, 3),
/* 1110 */ V(0, 0, 3),
/* 1111 */ V(0, 0, 3),
/* 0000 ... */
/* 000 */ V(3, 3, 3), /* 16 */
/* 001 */ V(0, 3, 3),
/* 010 */ V(2, 3, 2),
/* 011 */ V(2, 3, 2),
/* 100 */ V(3, 2, 2),
/* 101 */ V(3, 2, 2),
/* 110 */ V(3, 0, 2),
/* 111 */ V(3, 0, 2),
/* 0001 ... */
/* 0 */ V(1, 3, 1), /* 24 */
/* 1 */ V(3, 1, 1),
/* 0010 ... */
/* 0 */ V(2, 2, 1), /* 26 */
/* 1 */ V(0, 2, 1)
};
static
union huffpair const hufftab7[] = {
/* 0000 */ PTR(16, 4),
/* 0001 */ PTR(32, 4),
/* 0010 */ PTR(48, 2),
/* 0011 */ V(1, 1, 4),
/* 0100 */ V(0, 1, 3),
/* 0101 */ V(0, 1, 3),
/* 0110 */ V(1, 0, 3),
/* 0111 */ V(1, 0, 3),
/* 1000 */ V(0, 0, 1),
/* 1001 */ V(0, 0, 1),
/* 1010 */ V(0, 0, 1),
/* 1011 */ V(0, 0, 1),
/* 1100 */ V(0, 0, 1),
/* 1101 */ V(0, 0, 1),
/* 1110 */ V(0, 0, 1),
/* 1111 */ V(0, 0, 1),
/* 0000 ... */
/* 0000 */ PTR(52, 2), /* 16 */
/* 0001 */ PTR(56, 1),
/* 0010 */ PTR(58, 1),
/* 0011 */ V(1, 5, 4),
/* 0100 */ V(5, 1, 4),
/* 0101 */ PTR(60, 1),
/* 0110 */ V(5, 0, 4),
/* 0111 */ PTR(62, 1),
/* 1000 */ V(2, 4, 4),
/* 1001 */ V(4, 2, 4),
/* 1010 */ V(1, 4, 3),
/* 1011 */ V(1, 4, 3),
/* 1100 */ V(4, 1, 3),
/* 1101 */ V(4, 1, 3),
/* 1110 */ V(4, 0, 3),
/* 1111 */ V(4, 0, 3),
/* 0001 ... */
/* 0000 */ V(0, 4, 4), /* 32 */
/* 0001 */ V(2, 3, 4),
/* 0010 */ V(3, 2, 4),
/* 0011 */ V(0, 3, 4),
/* 0100 */ V(1, 3, 3),
/* 0101 */ V(1, 3, 3),
/* 0110 */ V(3, 1, 3),
/* 0111 */ V(3, 1, 3),
/* 1000 */ V(3, 0, 3),
/* 1001 */ V(3, 0, 3),
/* 1010 */ V(2, 2, 3),
/* 1011 */ V(2, 2, 3),
/* 1100 */ V(1, 2, 2),
/* 1101 */ V(1, 2, 2),
/* 1110 */ V(1, 2, 2),
/* 1111 */ V(1, 2, 2),
/* 0010 ... */
/* 00 */ V(2, 1, 1), /* 48 */
/* 01 */ V(
没有合适的资源?快使用搜索试试~ 我知道了~
android音频解码Libmad.so
共61个文件
h:16个
c:12个
dat:5个
2星 需积分: 47 68 下载量 116 浏览量
2015-06-20
15:02:35
上传
评论
收藏 427KB RAR 举报
温馨提示
android音频解码库libmad,不过需要用android的NDK开发环境和了解JNI接口编写才能重新封装需要的接口!
资源推荐
资源详情
资源评论
收起资源包目录
libmad.rar (61个子文件)
libmad
libmad
msvc++
mad.h 26KB
Makefile.am 975B
libmad.dsp 5KB
config.h 4KB
Makefile.in 8KB
frame.h 4KB
decoder.h 3KB
config.guess 42KB
version.c 2KB
mkinstalldirs 2KB
config.sub 30KB
imdct_l_arm.S 34KB
huffman.c 71KB
layer3.h 1KB
COPYING 18KB
VERSION 106B
aclocal.m4 238KB
qc_table.dat 4KB
fixed.h 13KB
rq_table.dat 474KB
INSTALL 8KB
mad.h 26KB
minimad.c 6KB
install-sh 6KB
timer.c 10KB
Makefile.am 4KB
stream.h 4KB
sf_table.dat 6KB
fixed.c 2KB
configure 713KB
CREDITS 4KB
android
config.h 4KB
missing 10KB
mad.h.sed 991B
bit.h 2KB
D.dat 26KB
COPYRIGHT 918B
libmad.list.in 550B
CHANGES 11KB
huffman.h 2KB
decoder.c 11KB
depcomp 13KB
synth.c 24KB
config.h.in 4KB
Android.mk 440B
synth.h 2KB
layer12.h 1KB
configure.ac 10KB
frame.c 12KB
layer3.c 69KB
version.h 2KB
TODO 2KB
imdct_s.dat 3KB
timer.h 3KB
Makefile.in 27KB
layer12.c 13KB
bit.c 7KB
README 10KB
ltmain.sh 178KB
stream.c 4KB
global.h 2KB
共 61 条
- 1
资源评论
- zyfhongyang2019-02-26下载后怎么用?都是源码
- youchendong2016-11-01我曹,说好的.so文件,坑比啊
- 叫小威2015-11-17不是我想要的
- xianiaole2015-07-03很好,正是我需要的
- pc91612016-01-29草,骗人的,就是libmad的源码,根本就没有编译后的so
心如_明镜
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功