MP3 Player. You can change fwd/rev speed and skip. see: http://mbed.org/users/okini3939/notebook/lpc4088_madplayer/
Dependencies: I2SSlave SDFileSystem TLV320 mbed
madplayer/huffman.h@0:8ba6230eefbd, 2014-02-18 (annotated)
- Committer:
- okini3939
- Date:
- Tue Feb 18 00:22:50 2014 +0000
- Revision:
- 0:8ba6230eefbd
1st build
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
okini3939 | 0:8ba6230eefbd | 1 | /* |
okini3939 | 0:8ba6230eefbd | 2 | * libmad - MPEG audio decoder library |
okini3939 | 0:8ba6230eefbd | 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. |
okini3939 | 0:8ba6230eefbd | 4 | * |
okini3939 | 0:8ba6230eefbd | 5 | * This program is free software; you can redistribute it and/or modify |
okini3939 | 0:8ba6230eefbd | 6 | * it under the terms of the GNU General Public License as published by |
okini3939 | 0:8ba6230eefbd | 7 | * the Free Software Foundation; either version 2 of the License, or |
okini3939 | 0:8ba6230eefbd | 8 | * (at your option) any later version. |
okini3939 | 0:8ba6230eefbd | 9 | * |
okini3939 | 0:8ba6230eefbd | 10 | * This program is distributed in the hope that it will be useful, |
okini3939 | 0:8ba6230eefbd | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
okini3939 | 0:8ba6230eefbd | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
okini3939 | 0:8ba6230eefbd | 13 | * GNU General Public License for more details. |
okini3939 | 0:8ba6230eefbd | 14 | * |
okini3939 | 0:8ba6230eefbd | 15 | * You should have received a copy of the GNU General Public License |
okini3939 | 0:8ba6230eefbd | 16 | * along with this program; if not, write to the Free Software |
okini3939 | 0:8ba6230eefbd | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
okini3939 | 0:8ba6230eefbd | 18 | * |
okini3939 | 0:8ba6230eefbd | 19 | * $Id: huffman.h,v 1.1 2010/11/23 20:12:57 andy Exp $ |
okini3939 | 0:8ba6230eefbd | 20 | */ |
okini3939 | 0:8ba6230eefbd | 21 | |
okini3939 | 0:8ba6230eefbd | 22 | # ifndef LIBMAD_HUFFMAN_H |
okini3939 | 0:8ba6230eefbd | 23 | # define LIBMAD_HUFFMAN_H |
okini3939 | 0:8ba6230eefbd | 24 | |
okini3939 | 0:8ba6230eefbd | 25 | union huffquad { |
okini3939 | 0:8ba6230eefbd | 26 | struct { |
okini3939 | 0:8ba6230eefbd | 27 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 28 | unsigned short bits : 3; |
okini3939 | 0:8ba6230eefbd | 29 | unsigned short offset : 12; |
okini3939 | 0:8ba6230eefbd | 30 | } ptr; |
okini3939 | 0:8ba6230eefbd | 31 | struct { |
okini3939 | 0:8ba6230eefbd | 32 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 33 | unsigned short hlen : 3; |
okini3939 | 0:8ba6230eefbd | 34 | unsigned short v : 1; |
okini3939 | 0:8ba6230eefbd | 35 | unsigned short w : 1; |
okini3939 | 0:8ba6230eefbd | 36 | unsigned short x : 1; |
okini3939 | 0:8ba6230eefbd | 37 | unsigned short y : 1; |
okini3939 | 0:8ba6230eefbd | 38 | } value; |
okini3939 | 0:8ba6230eefbd | 39 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 40 | }; |
okini3939 | 0:8ba6230eefbd | 41 | |
okini3939 | 0:8ba6230eefbd | 42 | union huffpair { |
okini3939 | 0:8ba6230eefbd | 43 | struct { |
okini3939 | 0:8ba6230eefbd | 44 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 45 | unsigned short bits : 3; |
okini3939 | 0:8ba6230eefbd | 46 | unsigned short offset : 12; |
okini3939 | 0:8ba6230eefbd | 47 | } ptr; |
okini3939 | 0:8ba6230eefbd | 48 | struct { |
okini3939 | 0:8ba6230eefbd | 49 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 50 | unsigned short hlen : 3; |
okini3939 | 0:8ba6230eefbd | 51 | unsigned short x : 4; |
okini3939 | 0:8ba6230eefbd | 52 | unsigned short y : 4; |
okini3939 | 0:8ba6230eefbd | 53 | } value; |
okini3939 | 0:8ba6230eefbd | 54 | unsigned short final : 1; |
okini3939 | 0:8ba6230eefbd | 55 | }; |
okini3939 | 0:8ba6230eefbd | 56 | |
okini3939 | 0:8ba6230eefbd | 57 | struct hufftable { |
okini3939 | 0:8ba6230eefbd | 58 | union huffpair const *table; |
okini3939 | 0:8ba6230eefbd | 59 | unsigned short linbits; |
okini3939 | 0:8ba6230eefbd | 60 | unsigned short startbits; |
okini3939 | 0:8ba6230eefbd | 61 | }; |
okini3939 | 0:8ba6230eefbd | 62 | |
okini3939 | 0:8ba6230eefbd | 63 | extern union huffquad const *const mad_huff_quad_table[2]; |
okini3939 | 0:8ba6230eefbd | 64 | extern struct hufftable const mad_huff_pair_table[32]; |
okini3939 | 0:8ba6230eefbd | 65 | |
okini3939 | 0:8ba6230eefbd | 66 | # endif |