Mercurial > mplayer.hg
comparison libmpdemux/mp3_hdr.c @ 5806:ef85f6de947c
mp_mp3_get_lsf() added - to get decomp. frame size
author | arpi |
---|---|
date | Wed, 24 Apr 2002 00:49:06 +0000 |
parents | a21735031d6a |
children | e29f95ed5d36 |
comparison
equal
deleted
inserted
replaced
5805:c63b519bd183 | 5806:ef85f6de947c |
---|---|
13 { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,}, | 13 { {0,32,48,56,64,80,96,112,128,144,160,176,192,224,256,}, |
14 {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,}, | 14 {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,}, |
15 {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,} } | 15 {0,8,16,24,32,40,48,56,64,80,96,112,128,144,160,} } |
16 }; | 16 }; |
17 static long freqs[9] = { 44100, 48000, 32000, 22050, 24000, 16000 , 11025 , 12000 , 8000 }; | 17 static long freqs[9] = { 44100, 48000, 32000, 22050, 24000, 16000 , 11025 , 12000 , 8000 }; |
18 | |
19 int mp_mp3_get_lsf(unsigned char* hbuf){ | |
20 unsigned long newhead = | |
21 hbuf[0] << 24 | | |
22 hbuf[1] << 16 | | |
23 hbuf[2] << 8 | | |
24 hbuf[3]; | |
25 if( newhead & ((long)1<<20) ) { | |
26 return (newhead & ((long)1<<19)) ? 0x0 : 0x1; | |
27 } | |
28 return 1; | |
29 } | |
18 | 30 |
19 /* | 31 /* |
20 * return frame size or -1 (bad frame) | 32 * return frame size or -1 (bad frame) |
21 */ | 33 */ |
22 int mp_decode_mp3_header(unsigned char* hbuf){ | 34 int mp_decode_mp3_header(unsigned char* hbuf){ |