comparison wmadec.c @ 1343:1fd083c620d6 libavcodec

moved frame_count to wmadeccontext
author al3x
date Fri, 04 Jul 2003 20:32:04 +0000
parents f574934c4219
children 610617f1dbd0
comparison
equal deleted inserted replaced
1342:f574934c4219 1343:1fd083c620d6
109 /* lsp_to_curve tables */ 109 /* lsp_to_curve tables */
110 float lsp_cos_table[BLOCK_MAX_SIZE]; 110 float lsp_cos_table[BLOCK_MAX_SIZE];
111 float lsp_pow_e_table[256]; 111 float lsp_pow_e_table[256];
112 float lsp_pow_m_table1[(1 << LSP_POW_BITS)]; 112 float lsp_pow_m_table1[(1 << LSP_POW_BITS)];
113 float lsp_pow_m_table2[(1 << LSP_POW_BITS)]; 113 float lsp_pow_m_table2[(1 << LSP_POW_BITS)];
114
115 #ifdef TRACE
116 int frame_count;
117 #endif
114 } WMADecodeContext; 118 } WMADecodeContext;
115 119
116 typedef struct CoefVLCTable { 120 typedef struct CoefVLCTable {
117 int n; /* total number of codes */ 121 int n; /* total number of codes */
118 const uint32_t *huffcodes; /* VLC bit values */ 122 const uint32_t *huffcodes; /* VLC bit values */
123 static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len); 127 static void wma_lsp_to_curve_init(WMADecodeContext *s, int frame_len);
124 128
125 #include "wmadata.h" 129 #include "wmadata.h"
126 130
127 #ifdef TRACE 131 #ifdef TRACE
128 int frame_count = 0;
129
130 static void dump_shorts(const char *name, const short *tab, int n) 132 static void dump_shorts(const char *name, const short *tab, int n)
131 { 133 {
132 int i; 134 int i;
133 135
134 tprintf("%s[%d]:\n", name, n); 136 tprintf("%s[%d]:\n", name, n);
692 int coef_nb_bits, total_gain, parse_exponents; 694 int coef_nb_bits, total_gain, parse_exponents;
693 float window[BLOCK_MAX_SIZE * 2]; 695 float window[BLOCK_MAX_SIZE * 2];
694 int nb_coefs[MAX_CHANNELS]; 696 int nb_coefs[MAX_CHANNELS];
695 float mdct_norm; 697 float mdct_norm;
696 698
697 tprintf("***decode_block: %d:%d\n", frame_count - 1, s->block_num); 699 #ifdef TRACE
700 tprintf("***decode_block: %d:%d\n", s->frame_count - 1, s->block_num);
701 #endif
698 702
699 /* compute current block length */ 703 /* compute current block length */
700 if (s->use_variable_block_len) { 704 if (s->use_variable_block_len) {
701 n = av_log2(s->nb_block_sizes - 1) + 1; 705 n = av_log2(s->nb_block_sizes - 1) + 1;
702 706
1125 { 1129 {
1126 int ret, i, n, a, ch, incr; 1130 int ret, i, n, a, ch, incr;
1127 int16_t *ptr; 1131 int16_t *ptr;
1128 float *iptr; 1132 float *iptr;
1129 1133
1130 tprintf("***decode_frame: %d size=%d\n", frame_count++, s->frame_len); 1134 #ifdef TRACE
1135 tprintf("***decode_frame: %d size=%d\n", s->frame_count++, s->frame_len);
1136 #endif
1131 1137
1132 /* read each block */ 1138 /* read each block */
1133 s->block_num = 0; 1139 s->block_num = 0;
1134 s->block_pos = 0; 1140 s->block_pos = 0;
1135 for(;;) { 1141 for(;;) {