diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-02 22:59:04 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-02 22:59:04 +0000 |
commit | 228ca70d485e2660c2e381d7112cbcca65c156a0 (patch) | |
tree | f7ab4303f2daa68c76271787a60d50cb1ada2e46 /libfaad2/sbr_huff.c | |
parent | eb1dee5cbf86fba8d5081bae6071cc4a4fd68306 (diff) | |
download | mpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.bz2 mpv-228ca70d485e2660c2e381d7112cbcca65c156a0.tar.xz |
update to the 2.0 release of faad, patch by adland
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12528 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/sbr_huff.c')
-rw-r--r-- | libfaad2/sbr_huff.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/libfaad2/sbr_huff.c b/libfaad2/sbr_huff.c index c5fe86ae82..efbbaaa111 100644 --- a/libfaad2/sbr_huff.c +++ b/libfaad2/sbr_huff.c @@ -1,6 +1,6 @@ /* ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding -** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com +** Copyright (C) 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com ** ** 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 @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: sbr_huff.c,v 1.7 2003/09/09 18:37:32 menno Exp $ +** $Id: sbr_huff.c,v 1.2 2003/10/03 22:22:27 alex Exp $ **/ #include "common.h" @@ -220,7 +220,7 @@ static const int8_t t_huffman_noise_bal_3_0dB[24][2] = { }; -INLINE int16_t sbr_huff_dec(bitfile *ld, sbr_huff_tab t_huff) +static INLINE int16_t sbr_huff_dec(bitfile *ld, sbr_huff_tab t_huff) { uint8_t bit; int16_t index = 0; @@ -241,17 +241,10 @@ void sbr_envelope(bitfile *ld, sbr_info *sbr, uint8_t ch) int8_t delta = 0; sbr_huff_tab t_huff, f_huff; -#ifdef DRM - if (sbr->Is_DRM_SBR) - sbr->amp_res[ch] = sbr->bs_amp_res; + if ((sbr->L_E[ch] == 1) && (sbr->bs_frame_class[ch] == FIXFIX)) + sbr->amp_res[ch] = 0; else -#endif - { - if ((sbr->L_E[ch] == 1) && (sbr->bs_frame_class[ch] == FIXFIX)) - sbr->amp_res[ch] = 0; - else - sbr->amp_res[ch] = sbr->bs_amp_res; - } + sbr->amp_res[ch] = sbr->bs_amp_res; if ((sbr->bs_coupling) && (ch == 1)) { @@ -284,19 +277,19 @@ void sbr_envelope(bitfile *ld, sbr_info *sbr, uint8_t ch) { if (sbr->amp_res[ch]) { - sbr->E[ch][0][env] = (faad_getbits(ld, 5 + sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 5 DEBUGVAR(1,272,"sbr_envelope(): bs_data_env")) << delta); } else { - sbr->E[ch][0][env] = (faad_getbits(ld, 6 + sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 6 DEBUGVAR(1,273,"sbr_envelope(): bs_data_env")) << delta); } } else { if (sbr->amp_res[ch]) { - sbr->E[ch][0][env] = (faad_getbits(ld, 6 + sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 6 DEBUGVAR(1,274,"sbr_envelope(): bs_data_env")) << delta); } else { - sbr->E[ch][0][env] = (faad_getbits(ld, 7 + sbr->E[ch][0][env] = (uint16_t)(faad_getbits(ld, 7 DEBUGVAR(1,275,"sbr_envelope(): bs_data_env")) << delta); } } |