From 58bdd4198eb5b7029d515340307c754108ab8b11 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 11 Mar 2015 21:27:57 +0100 Subject: Revert useless changes This reverts commit b46963cc7e82dcb8c6509139f9176458db7c9d91. --- libAACenc/src/aacenc.cpp | 16 ++++------------ libAACenc/src/aacenc_lib.cpp | 13 ------------- libAACenc/src/bitenc.cpp | 5 +---- libMpegTPEnc/src/tpenc_lib.cpp | 3 --- src/dabplus-enc.cpp | 2 +- 5 files changed, 6 insertions(+), 33 deletions(-) diff --git a/libAACenc/src/aacenc.cpp b/libAACenc/src/aacenc.cpp index 72f08f1..96668cc 100644 --- a/libAACenc/src/aacenc.cpp +++ b/libAACenc/src/aacenc.cpp @@ -792,10 +792,8 @@ AAC_ENCODER_ERROR FDKaacEnc_EncodeFrame( HANDLE_AAC_ENC hAacEnc, hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); - if (ErrorStatus != AAC_ENC_OK) { - printf("Fail 2.1\n"); + if (ErrorStatus != AAC_ENC_OK) return ErrorStatus; - } /*-------------------------------------------- */ @@ -936,10 +934,8 @@ AAC_ENCODER_ERROR FDKaacEnc_EncodeFrame( HANDLE_AAC_ENC hAacEnc, hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); - if (ErrorStatus != AAC_ENC_OK) { - printf("Fail 2.2\n"); + if (ErrorStatus != AAC_ENC_OK) return ErrorStatus; - } /*-------------------------------------------- */ /*-------------------------------------------- */ @@ -959,10 +955,8 @@ AAC_ENCODER_ERROR FDKaacEnc_EncodeFrame( HANDLE_AAC_ENC hAacEnc, hAacEnc->aot, hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); - if (ErrorStatus != AAC_ENC_OK) { - printf("Fail 2.3\n"); + if (ErrorStatus != AAC_ENC_OK) return ErrorStatus; - } /*-------------------------------------------- */ totalBits += qcOut->totalBits; @@ -994,10 +988,8 @@ AAC_ENCODER_ERROR FDKaacEnc_EncodeFrame( HANDLE_AAC_ENC hAacEnc, hAacEnc->config->syntaxFlags, hAacEnc->config->epConfig); - if (ErrorStatus != AAC_ENC_OK) { - printf("Fail 2.4\n"); + if (ErrorStatus != AAC_ENC_OK) return ErrorStatus; - } /* transportEnc_EndAccessUnit() is being called inside FDKaacEnc_WriteBitstream() */ transportEnc_GetFrame(hTpEnc, nOutBytes); diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index 34028c5..6b77155 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -1083,7 +1083,6 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, /* Verify settings and update: config -> heAacEncoder */ if ( (err=FDKaacEnc_AdjustEncSettings(hAacEncoder, config)) != AACENC_OK ) { - printf("Fail 1.1\n"); return err; } frameLength = hAacConfig->framelength; /* adapt temporal framelength */ @@ -1122,13 +1121,11 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, hAacConfig->channelOrder, &channelMapping) != AAC_ENC_OK ) { - printf("Fail 1.2\n"); return AACENC_INIT_ERROR; } /* Check return value and if the SBR encoder can handle enough elements */ if (channelMapping.nElements > (8)) { - printf("Fail 1.3\n"); return AACENC_INIT_ERROR; } @@ -1158,7 +1155,6 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, /* Suppress AOT reconfiguration and check error status. */ if (sbrError) { - printf("Fail 1.4\n"); return AACENC_INIT_SBR_ERROR; } @@ -1199,7 +1195,6 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, /* Initialize Bitstream encoder */ if ( transportEnc_Init(hAacEncoder->hTpEnc, hAacEncoder->outBuffer, hAacEncoder->outBufferInBytes, config->userTpType, &hAacEncoder->coderConfig, flags) != 0) { - printf("Fail 1.5\n"); return AACENC_INIT_TP_ERROR; } @@ -1218,7 +1213,6 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, (InitFlags & AACENC_INIT_STATES) ? 1 : 0); if (err != AAC_ENC_OK) { - printf("Fail 1.6\n"); return AACENC_INIT_AAC_ERROR; } @@ -1246,7 +1240,6 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, config->userChannelMode, hAacConfig->channelOrder) != 0) { - printf("Fail 1.7\n"); return AACENC_INIT_META_ERROR; } @@ -1495,7 +1488,6 @@ AACENC_ERROR aacEncEncode( if (err!=AACENC_OK) { /* keep init flags alive! */ - printf("Fail 1\n"); goto bail; } hAacEncoder->InitFlags = AACENC_INIT_NONE; @@ -1517,7 +1509,6 @@ AACENC_ERROR aacEncEncode( * If only encoder handle given, independent (re)initialization can be triggered. */ if ( (hAacEncoder!=NULL) & (inBufDesc==NULL) && (outBufDesc==NULL) && (inargs==NULL) && (outargs==NULL) ) { - printf("Fail 2\n"); goto bail; } @@ -1581,7 +1572,6 @@ AACENC_ERROR aacEncEncode( } } else { /* inargs->numInSamples!= -1 */ - printf("Fail 3\n"); goto bail; /* not enough samples in input buffer and no flushing enabled */ } } @@ -1654,7 +1644,6 @@ AACENC_ERROR aacEncEncode( )) { err = AACENC_ENCODE_ERROR; - printf("Fail 4\n"); goto bail; } else { @@ -1696,7 +1685,6 @@ AACENC_ERROR aacEncEncode( ) != AAC_ENC_OK ) { err = AACENC_ENCODE_ERROR; - printf("Fail 5\n"); goto bail; } @@ -1737,7 +1725,6 @@ AACENC_ERROR aacEncEncode( else { /* output buffer too small, can't write valid bitstream */ err = AACENC_ENCODE_ERROR; - printf("Fail 6\n"); goto bail; } } diff --git a/libAACenc/src/bitenc.cpp b/libAACenc/src/bitenc.cpp index fd2697e..4552457 100644 --- a/libAACenc/src/bitenc.cpp +++ b/libAACenc/src/bitenc.cpp @@ -1302,6 +1302,7 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, frameBits = bitMarkUp = alignAnchor; + /* Write DSEs first in case of DAB */ for (n = 0; (n < qcOut->nExtensions) && (n < (2+2)); n++) { @@ -1342,7 +1343,6 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, NULL, 0 )) ) { - printf("Fail 2.4.1\n"); return ErrorStatus; } @@ -1364,7 +1364,6 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, /* In FDK, DSE signalling explicit done in elDSE. See channel_map.cpp */ default: - printf("Fail 2.4.2\n"); return AAC_ENC_INVALID_ELEMENTINFO_TYPE; } /* switch */ @@ -1440,7 +1439,6 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, /* Do byte alignment after AAC (+ MPS) payload. Assure that MPS has been written as channel assigned extension payload! */ if (((FDKgetValidBits(hBs)-alignAnchor+(UINT)qcOut->totFillBits)&0x7)!=(UINT)qcOut->alignBits) { - printf("Fail 2.4.3\n"); return AAC_ENC_WRITTEN_BITS_ERROR; } FDKaacEnc_ByteAlignment(hBs, qcOut->alignBits); @@ -1488,7 +1486,6 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, if (doByteAlign) { /* Assure byte alignment*/ if (((alignAnchor-FDKgetValidBits(hBs))&0x7)!=(UINT)qcOut->alignBits) { - printf("Fail 2.4.4, %d != %d\n", (alignAnchor-FDKgetValidBits(hBs))&0x7, (UINT)qcOut->alignBits ); return AAC_ENC_WRITTEN_BITS_ERROR; } diff --git a/libMpegTPEnc/src/tpenc_lib.cpp b/libMpegTPEnc/src/tpenc_lib.cpp index 12cfa09..058b8d4 100644 --- a/libMpegTPEnc/src/tpenc_lib.cpp +++ b/libMpegTPEnc/src/tpenc_lib.cpp @@ -88,7 +88,6 @@ amm-info@iis.fraunhofer.de ******************************************************************************/ -#include #include "tpenc_lib.h" /* library info */ @@ -285,8 +284,6 @@ TRANSPORTENC_ERROR transportEnc_Init( if ( ( hTpEnc->config.aot != AOT_AAC_LC) ||(hTpEnc->config.samplesPerFrame != 1024) ) { - printf("Fail 1.5.1 aot %d\n", hTpEnc->config.aot); - return TRANSPORTENC_INVALID_PARAMETER; } if ( adtsWrite_Init(&hTpEnc->writer.adts, &hTpEnc->config) != 0) { diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp index bdd4c58..3dc09fe 100644 --- a/src/dabplus-enc.cpp +++ b/src/dabplus-enc.cpp @@ -335,7 +335,7 @@ int main(int argc, char *argv[]) int index; while(ch != -1) { - ch = getopt_long(argc, argv, "aAhDlVb:c:f:i:j:k:o:r:d:p:P:s:v:", longopts, &index); + ch = getopt_long(argc, argv, "aAhDlb:c:f:i:j:k:o:r:d:p:P:s:v:", longopts, &index); switch (ch) { case 0: // AAC-LC aot = AOT_DABPLUS_AAC_LC; -- cgit v1.2.3