summaryrefslogtreecommitdiff
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 0bcd684f66..6510d981fa 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -464,7 +464,7 @@ static void compute_exp_strategy(uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNEL
for(i=1;i<NB_BLOCKS;i++) {
exp_diff = calc_exp_diff(exp[i][ch], exp[i-1][ch], N/2);
#ifdef DEBUG
- printf("exp_diff=%d\n", exp_diff);
+ av_log(AV_LOG_DEBUG, "exp_diff=%d\n", exp_diff);
#endif
if (exp_diff > EXP_DIFF_THRESHOLD)
exp_strategy[i][ch] = EXP_NEW;
@@ -580,11 +580,11 @@ static int encode_exp(uint8_t encoded_exp[N/2],
}
#if defined(DEBUG)
- printf("exponents: strategy=%d\n", exp_strategy);
+ av_log(AV_LOG_DEBUG, "exponents: strategy=%d\n", exp_strategy);
for(i=0;i<=nb_groups * group_size;i++) {
- printf("%d ", encoded_exp[i]);
+ av_log(AV_LOG_DEBUG, "%d ", encoded_exp[i]);
}
- printf("\n");
+ av_log(AV_LOG_DEBUG, "\n");
#endif
return 4 + (nb_groups / 3) * 7;
@@ -746,7 +746,7 @@ static int compute_bit_allocation(AC3EncodeContext *s,
bit_alloc(s, bap, encoded_exp, exp_strategy, frame_bits, csnroffst, 0) < 0)
csnroffst -= SNR_INC1;
if (csnroffst < 0) {
- fprintf(stderr, "Yack, Error !!!\n");
+ av_log(NULL, AV_LOG_ERROR, "Yack, Error !!!\n");
return -1;
}
while ((csnroffst + SNR_INC1) <= 63 &&
@@ -1021,7 +1021,7 @@ static void output_audio_block(AC3EncodeContext *s,
#if defined(DEBUG)
{
static int count = 0;
- printf("Block #%d (%d)\n", block_num, count++);
+ av_log(AV_LOG_DEBUG, "Block #%d (%d)\n", block_num, count++);
}
#endif
/* exponent strategy */