From a84864deb7c36b88f104f3116552d52d1ce64045 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Thu, 8 Aug 2013 18:25:28 -0700 Subject: SBR header period AAC encoder: Connect SBR and PS header repetition rate with AACENC_HEADER_PERIOD parameter of the encoder API. Bug 9428126 Change-Id: Ia1ab965de9eaa2ac229d0c395a337cbd4d20cba1 --- libAACenc/src/aacenc_lib.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libAACenc/src') diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp index 169400a..161ed1c 100644 --- a/libAACenc/src/aacenc_lib.cpp +++ b/libAACenc/src/aacenc_lib.cpp @@ -98,7 +98,7 @@ amm-info@iis.fraunhofer.de /* Encoder library info */ #define AACENCODER_LIB_VL0 3 #define AACENCODER_LIB_VL1 4 -#define AACENCODER_LIB_VL2 5 +#define AACENCODER_LIB_VL2 6 #define AACENCODER_LIB_TITLE "AAC Encoder" #define AACENCODER_LIB_BUILD_DATE __DATE__ #define AACENCODER_LIB_BUILD_TIME __TIME__ @@ -122,6 +122,8 @@ amm-info@iis.fraunhofer.de #define INPUTBUFFER_SIZE (1537+100+2048) +#define DEFAULT_HEADER_PERIOD_REPETITION_RATE 10 /*!< Default header repetition rate used in transport library and for SBR header. */ + //////////////////////////////////////////////////////////////////////////////////// /** * Flags to characterize encoder modules to be supported in present instance. @@ -335,7 +337,7 @@ void FDKaacEnc_MapConfig(CODER_CONFIG *cc, USER_PARAM *extCfg, HANDLE_AACENC_CON case TT_MP4_ADTS: case TT_MP4_LOAS: case TT_MP4_LATM_MCP1: - cc->headerPeriod = 10; + cc->headerPeriod = DEFAULT_HEADER_PERIOD_REPETITION_RATE; break; default: cc->headerPeriod = 0; @@ -876,6 +878,7 @@ static AACENC_ERROR aacEncInit(HANDLE_AACENCODER hAacEncoder, &hAacConfig->audioObjectType, &hAacEncoder->nDelay, (hAacConfig->audioObjectType == AOT_ER_AAC_ELD) ? 1 : TRANS_FAC, + (config->userTpHeaderPeriod!=0xFF) ? config->userTpHeaderPeriod : DEFAULT_HEADER_PERIOD_REPETITION_RATE, initFlag ); -- cgit v1.2.3