streo mp3 player see: http://mbed.org/users/okini3939/notebook/I2S_AUDIO

Dependencies:   FatFileSystemCpp I2SSlave TLV320 mbed

Fork of madplayer by Andreas Grün

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers huffman.h Source File

huffman.h

00001 /*
00002  * libmad - MPEG audio decoder library
00003  * Copyright (C) 2000-2004 Underbit Technologies, Inc.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  * $Id: huffman.h,v 1.1 2010/11/23 20:12:57 andy Exp $
00020  */
00021 
00022 # ifndef LIBMAD_HUFFMAN_H
00023 # define LIBMAD_HUFFMAN_H
00024 
00025 union huffquad {
00026   struct {
00027     unsigned short final  :  1;
00028     unsigned short bits   :  3;
00029     unsigned short offset : 12;
00030   } ptr;
00031   struct {
00032     unsigned short final  :  1;
00033     unsigned short hlen   :  3;
00034     unsigned short v      :  1;
00035     unsigned short w      :  1;
00036     unsigned short x      :  1;
00037     unsigned short y      :  1;
00038   } value;
00039   unsigned short final    :  1;
00040 };
00041 
00042 union huffpair {
00043   struct {
00044     unsigned short final  :  1;
00045     unsigned short bits   :  3;
00046     unsigned short offset : 12;
00047   } ptr;
00048   struct {
00049     unsigned short final  :  1;
00050     unsigned short hlen   :  3;
00051     unsigned short x      :  4;
00052     unsigned short y      :  4;
00053   } value;
00054   unsigned short final    :  1;
00055 };
00056 
00057 struct hufftable {
00058   union huffpair const *table;
00059   unsigned short linbits;
00060   unsigned short startbits;
00061 };
00062 
00063 extern union huffquad const *const mad_huff_quad_table[2];
00064 extern struct hufftable const mad_huff_pair_table[32];
00065 
00066 # endif