diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-07-25 12:54:02 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-07-25 12:54:02 +0200 |
commit | 5a9d42c18d2669798910fa2dbf4df61473d58c9d (patch) | |
tree | fce81164d6b5391ec525af388b6737f61f6e5bca /libAACenc | |
parent | 31d30df661bc3b9082082084d702a76117370555 (diff) | |
download | ODR-AudioEnc-5a9d42c18d2669798910fa2dbf4df61473d58c9d.tar.gz ODR-AudioEnc-5a9d42c18d2669798910fa2dbf4df61473d58c9d.tar.bz2 ODR-AudioEnc-5a9d42c18d2669798910fa2dbf4df61473d58c9d.zip |
Revert "Write DSE at start of AU"
This reverts commit 05e6de86461b4ab0c55880db0c83d7a7bd6c5bc1 which
broke audio decoding for PURE One Elite receivers, but fixed
slideshow and DLS decoding on PURE Sensia receivers.
Slides and DLS are now not working on PURE Sensia, but at least
audio is working again.
Diffstat (limited to 'libAACenc')
-rw-r--r-- | libAACenc/src/bitenc.cpp | 64 |
1 files changed, 28 insertions, 36 deletions
diff --git a/libAACenc/src/bitenc.cpp b/libAACenc/src/bitenc.cpp index c7f698a..6f2c151 100644 --- a/libAACenc/src/bitenc.cpp +++ b/libAACenc/src/bitenc.cpp @@ -1302,41 +1302,6 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, frameBits = bitMarkUp = alignAnchor; -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -/// Block moved in order to write DSE at the beginning of the bit stream - Sergio Sagliocco (CSP) - - /* Add fill data / stuffing bits */ - n = qcOut->nExtensions; - -// if (!(syntaxFlags & AC_DAB)) { - qcOut->extension[n].type = EXT_FILL_DATA; - qcOut->extension[n].nPayloadBits = qcOut->totFillBits; - qcOut->nExtensions++; -// } else { -// doByteAlign = 0; -// } - if (syntaxFlags & AC_DAB) - doByteAlign = 0; - - /* Write global extension payload and fill data */ - for (n = 0; (n < qcOut->nExtensions) && (n < (2+2)); n++) - { - //fprintf(stderr,"SERGIO FDKaacEnc_WriteBitstream: call FDKaacEnc_writeExtensionData - 3 (%d)\n",n); - - FDKaacEnc_writeExtensionData( hTpEnc, - &qcOut->extension[n], - 0, - alignAnchor, - syntaxFlags, - aot, - epConfig ); - - /* For EXT_FIL or EXT_FILL_DATA we could do an additional sanity check here */ - } - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /* Channel element loop */ for (i=0; i<channelMapping->nElements; i++) { @@ -1397,7 +1362,7 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, if ( (syntaxFlags & AC_ER) && !(syntaxFlags & AC_DRM) ) { - UCHAR channelElementExtensionWritten[(6)][(1)]; /* 0: extension not touched, 1: extension already written */ + UCHAR channelElementExtensionWritten[(8)][(1)]; /* 0: extension not touched, 1: extension already written */ FDKmemclear(channelElementExtensionWritten, sizeof(channelElementExtensionWritten)); @@ -1464,6 +1429,33 @@ AAC_ENCODER_ERROR FDKaacEnc_WriteBitstream(HANDLE_TRANSPORTENC hTpEnc, } /* AC_DRM */ + /* Add fill data / stuffing bits */ + n = qcOut->nExtensions; + +// if (!(syntaxFlags & AC_DAB)) { + qcOut->extension[n].type = EXT_FILL_DATA; + qcOut->extension[n].nPayloadBits = qcOut->totFillBits; + qcOut->nExtensions++; +// } else { +// doByteAlign = 0; +// } + if (syntaxFlags & AC_DAB) + doByteAlign = 0; + + /* Write global extension payload and fill data */ + for (n = 0; (n < qcOut->nExtensions) && (n < (2+2)); n++) + { + FDKaacEnc_writeExtensionData( hTpEnc, + &qcOut->extension[n], + 0, + alignAnchor, + syntaxFlags, + aot, + epConfig ); + + /* For EXT_FIL or EXT_FILL_DATA we could do an additional sanity check here */ + } + if (!(syntaxFlags & (AC_SCALABLE|AC_ER|AC_DAB))) { FDKwriteBits(hBs, ID_END, EL_ID_BITS); } |