ref: 2185b5977a87bbd73bf4ff2dd20cf411827bfe0d
parent: cde1d3c828a2783331fa9aceda0ae97f190b7cbc
author: menno <menno>
date: Sat Feb 5 15:00:23 EST 2000
Psych changed and pulse coding updated
--- a/aac_qc.c
+++ b/aac_qc.c
@@ -421,6 +421,11 @@
{
int i, bits = 0;
+ if (quantInfo->block_type==ONLY_SHORT_WINDOW)
+ quantInfo->pulseInfo.pulse_data_present = 0;
+ else
+ PulseCoder(quantInfo, quant);
+
/* find a good method to section the scalefactor bands into huffman codebook sections */
bit_search(quant, /* Quantized spectral values */
quantInfo); /* Quantization information */
@@ -788,11 +793,9 @@
calc_noise(quantInfo, p_spectrum[0], quant, requant, noise, allowed_dist[0],
&over_noise, &tot_noise, &max_noise);
- if (quantInfo->block_type==ONLY_SHORT_WINDOW)
- quantInfo->pulseInfo.pulse_data_present = 0;
- else
- PulseCoder(quantInfo, quant);
count_bits(quantInfo, quant, output_book_vector);
+ if (quantInfo->block_type!=ONLY_SHORT_WINDOW)
+ PulseDecoder(quantInfo, quant);
// for( sb=0; sb< quantInfo -> nr_of_sfb; sb++ ) {
// printf("%d error: %.4f all.dist.: %.4f energy: %.4f\n", sb,
--- a/psych.c
+++ b/psych.c
@@ -52,9 +52,9 @@
Source file:
-$Id: psych.c,v 1.34 2000/02/05 15:09:33 menno Exp $
-$Id: psych.c,v 1.34 2000/02/05 15:09:33 menno Exp $
-$Id: psych.c,v 1.34 2000/02/05 15:09:33 menno Exp $
+$Id: psych.c,v 1.35 2000/02/05 20:00:23 menno Exp $
+$Id: psych.c,v 1.35 2000/02/05 20:00:23 menno Exp $
+$Id: psych.c,v 1.35 2000/02/05 20:00:23 menno Exp $
**********************************************************************/
@@ -985,7 +985,7 @@
else if( p1 == NPART_LONG ) p2 = 0;
for(b = 0; b < part_tbl_long->len; b++) {
- temp = psy_min( psy_stvar_long->nb[p1+b],2.0*psy_stvar_long->nb[p2+b]);
+ temp = psy_min( psy_stvar_long->nb[p1+b], 2.0*psy_stvar_long->nb[p2+b]);
if (temp > 0.01)
psy_stvar_long->nb[p1+b] = temp;
}
@@ -992,7 +992,7 @@
/* added by T. Araki (1997.10.16) */
for(b = 0; b < part_tbl_short->len; b++){
- temp = psy_min( psy_stvar_short->nb[0][b], 2.0*psy_stvar_short->last7_nb[b]);
+ temp = psy_min( psy_stvar_short->nb[0][b], 1.0*psy_stvar_short->last7_nb[b]);
if (temp > 0.01)
psy_stvar_short->nb[0][b] = temp;
}
@@ -1003,7 +1003,7 @@
for(i = 1; i < MAX_SHORT_WINDOWS; i++){
for(b = 0; b < part_tbl_short->len; b++){
- temp = psy_min( psy_stvar_short->nb[i][b],2.0*psy_stvar_short->nb[i - 1][b]);
+ temp = psy_min( psy_stvar_short->nb[i][b], 1.0*psy_stvar_short->nb[i - 1][b]);
if (temp > 0.01)
psy_stvar_short->nb[i][b] = temp;
}