comparison faac.c @ 2841:bceeca1bb30f libavcodec

vbr audio encode patch by (Justin Ruggles: jruggle, earthlink net) with changes by me int->float as video uses float too remove silent cliping to some per codec range, this should result in an error instead remove change to utils.c as its inconsistant with video
author michael
date Sun, 21 Aug 2005 20:27:00 +0000
parents 5fb6572ca817
children ef2149182f1c
comparison
equal deleted inserted replaced
2840:22eec5a1b043 2841:bceeca1bb30f
54 /* put the options in the configuration struct */ 54 /* put the options in the configuration struct */
55 faac_cfg->aacObjectType = LOW; 55 faac_cfg->aacObjectType = LOW;
56 faac_cfg->mpegVersion = MPEG4; 56 faac_cfg->mpegVersion = MPEG4;
57 faac_cfg->useTns = 0; 57 faac_cfg->useTns = 0;
58 faac_cfg->allowMidside = 1; 58 faac_cfg->allowMidside = 1;
59 faac_cfg->bitRate = avctx->bit_rate; 59 faac_cfg->bitRate = avctx->bit_rate / avctx->channels;
60 if(avctx->flags & CODEC_FLAG_QSCALE) {
61 faac_cfg->bitRate = 0;
62 faac_cfg->quantqual = avctx->global_quality / FF_QP2LAMBDA;
63 }
60 faac_cfg->outputFormat = 0; 64 faac_cfg->outputFormat = 0;
61 faac_cfg->inputFormat = FAAC_INPUT_16BIT; 65 faac_cfg->inputFormat = FAAC_INPUT_16BIT;
62 66
63 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) { 67 if (!faacEncSetConfiguration(s->faac_handle, faac_cfg)) {
64 av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n"); 68 av_log(avctx, AV_LOG_ERROR, "libfaac doesn't support this output format!\n");