Home | History | Annotate | Download | only in src

Lines Matching refs:config

287   if (hAacEnc->config->audioMuxVersion==2) {
301 void FDKaacEnc_AacInitDefaultConfig(AACENC_CONFIG *config)
304 FDKmemclear(config, sizeof(AACENC_CONFIG));
307 config->anc_Rate = 0; /* no ancillary data */
308 config->ancDataBitRate = 0; /* no additional consumed bitrate */
311 config->bitRate = -1; /* bitrate must be set*/
312 config->averageBits = -1; /* instead of bitrate/s we can configure bits/superframe */
313 config->bitrateMode = 0;
314 config->bandWidth = 0; /* get bandwidth from table */
315 config->useTns = TNS_ENABLE_MASK; /* tns enabled completly */
316 config->usePns = 1; /* depending on channelBitrate this might be set to 0 later */
317 config->useIS = 1; /* Intensity Stereo Configuration */
318 config->framelength = -1; /* Framesize not configured */
319 config->syntaxFlags = 0; /* default syntax with no specialities */
320 config->epConfig = -1; /* no ER syntax -> no additional error protection */
321 config->nSubFrames = 1; /* default, no sub frames */
322 config->channelOrder = CH_ORDER_MPEG; /* Use MPEG channel ordering. */
323 config->channelMode = MODE_UNKNOWN;
324 config->minBitsPerFrame = -1; /* minum number of bits in each AU */
325 config->maxBitsPerFrame = -1; /* minum number of bits in each AU */
326 config->bitreservoir = -1; /* default, uninitialized value */
327 config->audioMuxVersion = -1; /* audio mux version not configured */
413 AACENC_CONFIG *config, /* pre-initialized config struct */
426 if (config==NULL)
431 /* check config structure */
432 if (config->nChannels < 1 || config->nChannels > (8)) {
437 switch (config->sampleRate)
457 if (config
465 config->sampleRate,
466 config->framelength,
467 config->nChannels,
468 FDKaacEnc_GetChannelModeConfiguration(config->channelMode)->nChannelsEff,
469 config->bitRate,
470 config->averageBits,
472 config->bitrateMode,
473 config->nSubFrames
474 ) != config->bitRate
475 && !((config->bitrateMode>=1) && (config->bitrateMode<=5))
481 if (config->syntaxFlags & AC_ER_VCB11) {
484 if (config->syntaxFlags & AC_ER_HCR) {
489 switch (config->framelength)
492 if ( config->audioObjectType == AOT_ER_AAC_LD
493 || config->audioObjectType == AOT_ER_AAC_ELD )
500 if ( config->audioObjectType != AOT_ER_AAC_LD
501 && config->audioObjectType != AOT_ER_AAC_ELD )
510 if (config->anc_Rate != 0) {
512 ErrorStatus = FDKaacEnc_InitCheckAncillary(config->bitRate,
513 config->framelength,
514 config->anc_Rate,
516 config->sampleRate);
522 config->ancDataBitRate += ( (hAacEnc->ancillaryBitsPerFrame * config->sampleRate) / config->framelength );
530 FIXP_DBL tmp = fDivNorm(config->framelength, config->sampleRate, &q_res);
531 encBitrate = (config->bitRate/*-config->ancDataBitRate*/)- (INT)(config->nChannels*8000);
533 config->maxAncBytesPerAU = FDKmin( (256), FDKmax(0,(INT)(fMultDiv2(tmp, (FIXP_DBL)(encBitrate<<sc))>>(-q_res+sc-1+3))) );
536 /* bind config to hAacEnc->config */
537 hAacEnc->config = config;
540 hAacEnc->bitrateMode = (AACENC_BITRATE_MODE)config->bitrateMode;
542 hAacEnc->encoderMode = config->channelMode;
544 ErrorStatus = FDKaacEnc_InitChannelMapping(hAacEnc->encoderMode, config->channelOrder, &hAacEnc->channelMapping);
550 ErrorStatus = FDKaacEnc_DetermineBandWidth(&hAacEnc->config->bandWidth,
551 config->bandWidth,
552 config->bitRate - config->ancDataBitRate,
554 config->sampleRate,
555 config->framelength,
561 hAacEnc->bandwidth90dB = (INT)hAacEnc->config->bandWidth;
563 tnsMask = config->useTns ? TNS_ENABLE_MASK : 0x0;
564 psyBitrate = config->bitRate - config->ancDataBitRate;
570 config->audioObjectType,
576 config->audioObjectType,
578 config->sampleRate,
579 config->framelength,
583 config->usePns,
584 config->useIS,
585 config->syntaxFlags,
599 if ((config->bitrateMode>=1) && (config->bitrateMode<=5)) {
603 qcInit.maxBits = (config->maxBitsPerFrame!=-1) ? fixMin(qcInit.maxBits, config->maxBitsPerFrame) : qcInit.maxBits;
605 qcInit.minBits = (config->minBitsPerFrame!=-1) ? config->minBitsPerFrame : 0;
613 qcInit.bitRes = (config->bitreservoir!=-1) ? FDKmin(config->bitreservoir, maxBitres) : maxBitres;
616 qcInit.maxBits = (config->maxBitsPerFrame!=-1) ? fixMin(qcInit.maxBits, config->maxBitsPerFrame) : qcInit.maxBits;
620 qcInit.minBits = (config->minBitsPerFrame!=-1) ? fixMax(qcInit.minBits, config->minBitsPerFrame) : qcInit.minBits;
624 qcInit.sampleRate = config->sampleRate;
625 qcInit.advancedBitsToPe = isLowDelay(config->audioObjectType) ? 1 : 0 ;
626 qcInit.nSubFrames = config->nSubFrames;
627 qcInit.padding.paddingRest = config->sampleRate;
629 /* Calc meanPe: qcInit.meanPe = 10.0f * FRAME_LEN_LONG * hAacEnc->bandwidth90dB/(config->sampleRate/2.0f); */
630 bw_ratio = fDivNorm((FIXP_DBL)(10*config->framelength*hAacEnc->bandwidth90dB), (FIXP_DBL)(config->sampleRate), &qbw);
638 switch(config->bitrateMode){
668 qcInit.invQuant = (config->useRequant)?2:0;
677 if ( (config->audioObjectType == AOT_ER_AAC_LD) || (config->audioObjectType == AOT_ER_AAC_ELD) ) {
685 qcInit.bitrate = config->bitRate - config->ancDataBitRate;
693 hAacEnc->aot = hAacEnc->config->audioObjectType;
777 hAacEnc->config->syntaxFlags,
778 hAacEnc->config->epConfig);
806 hAacEnc->config->syntaxFlags,
808 hAacEnc->config->epConfig );
844 if ((extPayload[n].dataSize>>3) <= hAacEnc->config->maxAncBytesPerAU) {
864 hAacEnc->config->syntaxFlags,
866 hAacEnc->config->epConfig );
876 if (!(hAacEnc->config->syntaxFlags & (AC_SCALABLE|AC_ER))) {
893 hAacEnc->config->bitRate,
894 hAacEnc->config->sampleRate,
895 hAacEnc->config->framelength);
898 avgTotalBits *= hAacEnc->config->nSubFrames;
916 hAacEnc->config->syntaxFlags,
917 hAacEnc->config->epConfig);
938 hAacEnc->config->syntaxFlags,
939 hAacEnc->config->epConfig);
969 hAacEnc->config->syntaxFlags,
970 hAacEnc->config->epConfig);