aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2010-12-14 14:50:45 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-12-14 14:50:45 +0000
commit22c0b03c8f9c978b3dbf086ee367d449ec111b43 (patch)
tree2ffb9953d096bc79b8a9e134219b4bd74ddab3f1 /libavcodec/ac3enc.c
parent1fda2c10f640d9706d0ae0eda815e8f723a1d35d (diff)
downloadffmpeg-22c0b03c8f9c978b3dbf086ee367d449ec111b43.tar.gz
Remove unneeded debugging messages.
Originally committed as revision 25952 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 3fc6864e20..6c0dcb8170 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -24,7 +24,7 @@
* The simplest AC-3 encoder.
*/
//#define DEBUG
-//#define DEBUG_BITALLOC
+
#include "libavcore/audioconvert.h"
#include "libavutil/crc.h"
#include "avcodec.h"
@@ -256,7 +256,6 @@ static void compute_exp_strategy(uint8_t exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CH
exp_strategy[0][ch] = EXP_NEW;
for(i=1;i<AC3_MAX_BLOCKS;i++) {
exp_diff = calc_exp_diff(exp[i][ch], exp[i-1][ch], AC3_MAX_COEFS);
- dprintf(NULL, "exp_diff=%d\n", exp_diff);
if (exp_diff > EXP_DIFF_THRESHOLD)
exp_strategy[i][ch] = EXP_NEW;
else
@@ -358,14 +357,6 @@ static int encode_exp(uint8_t encoded_exp[AC3_MAX_COEFS],
k += group_size;
}
-#if defined(DEBUG)
- av_log(NULL, AV_LOG_DEBUG, "exponents: strategy=%d\n", exp_strategy);
- for(i=0;i<=nb_groups * group_size;i++) {
- av_log(NULL, AV_LOG_DEBUG, "%d ", encoded_exp[i]);
- }
- av_log(NULL, AV_LOG_DEBUG, "\n");
-#endif
-
return 4 + (nb_groups / 3) * 7;
}
@@ -474,11 +465,6 @@ static int bit_alloc(AC3EncodeContext *s,
s->nb_coefs[ch]);
}
}
-#if 0
- printf("csnr=%d fsnr=%d frame_bits=%d diff=%d\n",
- coarse_snr_offset, fine_snr_offset, frame_bits,
- 16 * s->frame_size - ((frame_bits + 7) & ~7));
-#endif
return 16 * s->frame_size - frame_bits;
}
@@ -593,22 +579,7 @@ static int compute_bit_allocation(AC3EncodeContext *s,
s->coarse_snr_offset = coarse_snr_offset;
for(ch=0;ch<s->channels;ch++)
s->fine_snr_offset[ch] = fine_snr_offset;
-#if defined(DEBUG_BITALLOC)
- {
- int j;
-
- for(i=0;i<6;i++) {
- for(ch=0;ch<s->channels;ch++) {
- printf("Block #%d Ch%d:\n", i, ch);
- printf("bap=");
- for(j=0;j<s->nb_coefs[ch];j++) {
- printf("%d ",bap[i][ch][j]);
- }
- printf("\n");
- }
- }
- }
-#endif
+
return 0;
}
@@ -861,12 +832,6 @@ static void output_audio_block(AC3EncodeContext *s,
}
}
-#if defined(DEBUG)
- {
- static int count = 0;
- av_log(NULL, AV_LOG_DEBUG, "Block #%d (%d)\n", block_num, count++);
- }
-#endif
/* exponent strategy */
for(ch=0;ch<s->fbw_channels;ch++) {
put_bits(&s->pb, 2, exp_strategy[ch]);