diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-03 17:05:03 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-03 17:05:03 +0100 |
commit | 0c1c574cd2f0984121e418d6e20d5d6357fc54fa (patch) | |
tree | e703e9e5de7ab36f7f6ac4d85dabc6130047878b | |
parent | 789bdc3270fa537914eacc77208a194c9eed2e53 (diff) | |
download | fdk-aac-0c1c574cd2f0984121e418d6e20d5d6357fc54fa.tar.gz fdk-aac-0c1c574cd2f0984121e418d6e20d5d6357fc54fa.tar.bz2 fdk-aac-0c1c574cd2f0984121e418d6e20d5d6357fc54fa.zip |
Cleanup bootup screen
-rw-r--r-- | libAACenc/src/aacenc.cpp | 32 | ||||
-rw-r--r-- | libAACenc/src/aacenc_lib.cpp | 38 | ||||
-rw-r--r-- | libMpegTPEnc/src/tpenc_dab.cpp | 12 | ||||
-rw-r--r-- | src/dabplus-enc.cpp | 15 |
4 files changed, 52 insertions, 45 deletions
diff --git a/libAACenc/src/aacenc.cpp b/libAACenc/src/aacenc.cpp index 16e28a2..96668cc 100644 --- a/libAACenc/src/aacenc.cpp +++ b/libAACenc/src/aacenc.cpp @@ -137,7 +137,7 @@ INT FDKaacEnc_LimitBitrate( do { prevBitRate = bitRate; averageBitsPerFrame = (bitRate*(frameLength>>shift)) / (coreSamplingRate>>shift) / nSubFrames; - fprintf(stderr, "FDKaacEnc_LimitBitrate(): averageBitsPerFrame=%d, prevBitRate=%d, nSubFrames=%d\n", averageBitsPerFrame, prevBitRate, bitRate); + //fprintf(stderr, "FDKaacEnc_LimitBitrate(): averageBitsPerFrame=%d, prevBitRate=%d, nSubFrames=%d\n", averageBitsPerFrame, prevBitRate, bitRate); if (pAverageBitsPerFrame != NULL) { *pAverageBitsPerFrame = averageBitsPerFrame; @@ -145,27 +145,23 @@ INT FDKaacEnc_LimitBitrate( if (hTpEnc != NULL) { transportBits = transportEnc_GetStaticBits(hTpEnc, averageBitsPerFrame); - //if(hTpEnc->transportFmt == TT_DABPLUS) { - fprintf(stderr, "FDKaacEnc_LimitBitrate(): hTpEnc != NULL\n"); - //transportBits += - //} } else { /* Assume some worst case */ transportBits = 208; } - fprintf(stderr, "FDKaacEnc_LimitBitrate(): transportBits=%d, FDKmax(%d, %d)\n", transportBits, bitRate, - ((((40 * nChannels) + transportBits) * (coreSamplingRate)) / frameLength)); + //fprintf(stderr, "FDKaacEnc_LimitBitrate(): transportBits=%d, FDKmax(%d, %d)\n", transportBits, bitRate, + // ((((40 * nChannels) + transportBits) * (coreSamplingRate)) / frameLength)); bitRate = FDKmax(bitRate, ((((40 * nChannels) + transportBits) * (coreSamplingRate)) / frameLength) ); FDK_ASSERT(bitRate >= 0); - fprintf(stderr, "FDKaacEnc_LimitBitrate(): FDKmin(%d, %d)\n", bitRate, ((nChannelsEff * MIN_BUFSIZE_PER_EFF_CHAN)*(coreSamplingRate>>shift)) / (frameLength>>shift)); + //fprintf(stderr, "FDKaacEnc_LimitBitrate(): FDKmin(%d, %d)\n", bitRate, ((nChannelsEff * MIN_BUFSIZE_PER_EFF_CHAN)*(coreSamplingRate>>shift)) / (frameLength>>shift)); bitRate = FDKmin(bitRate, ((nChannelsEff * MIN_BUFSIZE_PER_EFF_CHAN)*(coreSamplingRate>>shift)) / (frameLength>>shift)) ; FDK_ASSERT(bitRate >= 0); } while (prevBitRate != bitRate && iter++ < 3) ; - fprintf(stderr, "FDKaacEnc_LimitBitrate(): bitRate=%d\n", bitRate); + //fprintf(stderr, "FDKaacEnc_LimitBitrate(): bitRate=%d\n", bitRate); return bitRate; } @@ -452,13 +448,13 @@ AAC_ENCODER_ERROR FDKaacEnc_Initialize(HANDLE_AAC_ENC hAacEnc, } //config->nSubFrames = frames_per_superframe; - fprintf(stderr, "DAB+ superframe size=%d\n", superframe_size); - config->bitRate = (superframe_size - 16*(frames_per_superframe-1) - staticBits) * 1000/120; - fprintf(stderr, "DAB+ tuned bitrate=%d\n", config->bitRate); - config->maxBitsPerFrame = (superframe_size - 16*(frames_per_superframe-1) - staticBits) / frames_per_superframe; - config->maxBitsPerFrame += 7; /*padding*/ + //fprintf(stderr, "DAB+ superframe size=%d\n", superframe_size); + config->bitRate = (superframe_size - 16*(frames_per_superframe-1) - staticBits) * 1000/120; + //fprintf(stderr, "DAB+ tuned bitrate=%d\n", config->bitRate); + config->maxBitsPerFrame = (superframe_size - 16*(frames_per_superframe-1) - staticBits) / frames_per_superframe; + config->maxBitsPerFrame += 7; /*padding*/ //config->bitreservoir=(superframe_size - 16*(frames_per_superframe-1) - staticBits - 2*8)/frames_per_superframe; - fprintf(stderr, "DAB+ tuned maxBitsPerFrame=%d\n", (superframe_size - 16*(frames_per_superframe-1) - staticBits)/frames_per_superframe); + //fprintf(stderr, "DAB+ tuned maxBitsPerFrame=%d\n", (superframe_size - 16*(frames_per_superframe-1) - staticBits)/frames_per_superframe); } /* check bit rate */ @@ -610,15 +606,15 @@ AAC_ENCODER_ERROR FDKaacEnc_Initialize(HANDLE_AAC_ENC hAacEnc, qcInit.averageBits = (averageBitsPerFrame+7)&~7; maxBitres = (MIN_BUFSIZE_PER_EFF_CHAN*cm->nChannelsEff) - qcInit.averageBits; qcInit.bitRes = (config->bitreservoir!=-1) ? FDKmin(config->bitreservoir, maxBitres) : maxBitres; - fprintf(stderr, "qcInit.bitRes=%d\n", qcInit.bitRes); + //fprintf(stderr, "qcInit.bitRes=%d\n", qcInit.bitRes); qcInit.maxBits = fixMin(MIN_BUFSIZE_PER_EFF_CHAN*cm->nChannelsEff, ((averageBitsPerFrame+7)&~7)+qcInit.bitRes); qcInit.maxBits = (config->maxBitsPerFrame!=-1) ? fixMin(qcInit.maxBits, config->maxBitsPerFrame) : qcInit.maxBits; - fprintf(stderr, "qcInit.maxBits=%d\n", qcInit.maxBits); + //fprintf(stderr, "qcInit.maxBits=%d\n", qcInit.maxBits); qcInit.minBits = fixMax(0, ((averageBitsPerFrame-1)&~7)-qcInit.bitRes-transportEnc_GetStaticBits(hTpEnc, ((averageBitsPerFrame+7)&~7)+qcInit.bitRes)); qcInit.minBits = (config->minBitsPerFrame!=-1) ? fixMax(qcInit.minBits, config->minBitsPerFrame) : qcInit.minBits; - fprintf(stderr, "qcInit.minBits=%d\n", qcInit.minBits); + //fprintf(stderr, "qcInit.minBits=%d\n", qcInit.minBits); } qcInit.sampleRate = config->sampleRate; diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index edda485..6b77155 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -486,21 +486,21 @@ static void FDKaacEnc_MapConfig( cc->channelMode = hAacConfig->channelMode; if(extCfg->userTpType == TT_DABPLUS && hAacConfig->nSubFrames==1) { - switch(hAacConfig->sampleRate) { - case 48000: - cc->nSubFrames=6; - break; - case 32000: - cc->nSubFrames=4; - break; - case 24000: - cc->nSubFrames=3; - break; - case 16000: - cc->nSubFrames=2; - break; - } - fprintf(stderr, "hAacConfig->nSubFrames=%d hAacConfig->sampleRate=%d\n", hAacConfig->nSubFrames, hAacConfig->sampleRate); + switch(hAacConfig->sampleRate) { + case 48000: + cc->nSubFrames=6; + break; + case 32000: + cc->nSubFrames=4; + break; + case 24000: + cc->nSubFrames=3; + break; + case 16000: + cc->nSubFrames=2; + break; + } + //fprintf(stderr, "hAacConfig->nSubFrames=%d hAacConfig->sampleRate=%d\n", hAacConfig->nSubFrames, hAacConfig->sampleRate); } else { cc->nSubFrames = (hAacConfig->nSubFrames > 1 && extCfg->userTpNsubFrames == 1) ? hAacConfig->nSubFrames @@ -770,7 +770,7 @@ INT aacEncoder_LimitBitrate( FDK_ASSERT(bitRate > 0); - fprintf(stderr, "aacEncoder_LimitBitrate(): bitRate=%d\n", bitRate); + //fprintf(stderr, "aacEncoder_LimitBitrate(): bitRate=%d\n", bitRate); return bitRate; } @@ -981,7 +981,7 @@ AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder, - fprintf(stderr, "config->userBitrate=%d\n", config->userBitrate); + //fprintf(stderr, "config->userBitrate=%d\n", config->userBitrate); /* We need the frame length to call aacEncoder_LimitBitrate() */ hAacConfig->bitRate = aacEncoder_LimitBitrate( NULL, @@ -995,7 +995,7 @@ AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder, hAacConfig->sbrRatio, hAacConfig->audioObjectType ); - fprintf(stderr, "hAacConfig->bitRate=%d\n", hAacConfig->bitRate); + //fprintf(stderr, "hAacConfig->bitRate=%d\n", hAacConfig->bitRate); /* Configure PNS */ if ( ((hAacConfig->bitrateMode>=1) && (hAacConfig->bitrateMode<=5)) /* VBR without PNS. */ @@ -1040,7 +1040,7 @@ AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder, hAacEncoder->metaDataAllowed = 0; } - fprintf(stderr, "hAacEncoder->metaDataAllowed=%d\n", hAacEncoder->metaDataAllowed); + //fprintf(stderr, "hAacEncoder->metaDataAllowed=%d\n", hAacEncoder->metaDataAllowed); return err; } diff --git a/libMpegTPEnc/src/tpenc_dab.cpp b/libMpegTPEnc/src/tpenc_dab.cpp index cad5da5..202fecf 100644 --- a/libMpegTPEnc/src/tpenc_dab.cpp +++ b/libMpegTPEnc/src/tpenc_dab.cpp @@ -188,12 +188,12 @@ INT dabWrite_Init(HANDLE_DAB hDab, CODER_CONFIG *config) if(config->channelMode == MODE_2) hDab->aac_channel_mode = 1; - fprintf(stderr, "hDab->dac_rate=%d\n", hDab->dac_rate); - fprintf(stderr, "hDab->sbr_flag=%d\n", hDab->sbr_flag); - fprintf(stderr, "hDab->ps_flag=%d\n", hDab->ps_flag); - fprintf(stderr, "hDab->aac_channel_mode=%d\n", hDab->aac_channel_mode); - fprintf(stderr, "hDab->subchannels_num=%d\n", hDab->subchannels_num); - fprintf(stderr, "cc->nSubFrames=%d\n", config->nSubFrames); + //fprintf(stderr, "hDab->dac_rate=%d\n", hDab->dac_rate); + //fprintf(stderr, "hDab->sbr_flag=%d\n", hDab->sbr_flag); + //fprintf(stderr, "hDab->ps_flag=%d\n", hDab->ps_flag); + //fprintf(stderr, "hDab->aac_channel_mode=%d\n", hDab->aac_channel_mode); + //fprintf(stderr, "hDab->subchannels_num=%d\n", hDab->subchannels_num); + //fprintf(stderr, "cc->nSubFrames=%d\n", config->nSubFrames); hDab->num_raw_blocks=config->nSubFrames-1; /* 0 means 1 raw data block */ diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index a28d6b2..8e280e4 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -74,8 +74,6 @@ void usage(const char* name) { "\n" "This encoder includes PAD (DLS and MOT Slideshow) support by\n" "http://rd.csp.it to be used with mot-encoder\n" - "\n" - " http://opendigitalradio.org\n" "\nUsage:\n" "%s (-i file|-d alsa_device) [OPTION...]\n", #if defined(GITVERSION) @@ -306,6 +304,19 @@ int main(int argc, char *argv[]) {0,0,0,0}, }; + fprintf(stderr, + "Welcome to %s %s, compiled at %s, %s", + PACKAGE_NAME, +#if defined(GITVERSION) + GITVERSION, +#else + PACKAGE_VERSION, +#endif + __DATE__, __TIME__); + fprintf(stderr, "\n"); + fprintf(stderr, " http://opendigitalradio.org\n\n"); + + if (argc < 2) { usage(argv[0]); return 1; |