#define wmadecoder_lib 0
#define useoldwmadecoder 0
#define usepv_one_segment_broadcast 0
+#define usemultichannlefriendly 0
#define wma_audio_support m
//
#define pvmp4ff_y_lib ""
#define pvamrffparsernode_y_mk ""
#define pvmshttpfsp_y_mk ""
-#define USE_OLD_WMA_DECODER 0
#define LIBS_omxenc_static " "
#define pvstreamingmanagernode_y_mk ""
#define smmshttpplugininterface_m_lib ""
#define rtspbasedpluginselected 1
#define pvwavffrecognizer_y_lib ""
#define MODS_pvdb_recovery_utility "-lopencore_common -lpvdb"
+#define USE_OLD_WMA_DECODER 0
#define pvomx_proxy_m_mk "/codecs_v2/omx/omx_proxy/build/make"
#define pvra8decoder_imp_m_mk ""
#define pvrtsptunicastfsp_y_mk ""
#define LIBDIR_nodes_static " "
#define smrtspunicastplugininterface_m_mk "/modules/linux_rtsp/smplugins/unicast/core/build/make"
#define pvmshttp_streaming_aggregate_libtype "static"
+#define PV_MULTICHANNEL_FRIENDLY 0
#define asfrecognizer_utility_m_mk ""
#define pvrmffparsernode_m_mk ""
#define realaudio_deinterleaver_m_mk ""
pvmp4ff_y_lib=""
pvamrffparsernode_y_mk=""
pvmshttpfsp_y_mk=""
-USE_OLD_WMA_DECODER=0
LIBS_omxenc_static=" "
pvstreamingmanagernode_y_mk=""
smmshttpplugininterface_m_lib=""
rtspbasedpluginselected=y
pvwavffrecognizer_y_lib=""
MODS_pvdb_recovery_utility="-lopencore_common -lpvdb"
+USE_OLD_WMA_DECODER=0
pvomx_proxy_m_mk="/codecs_v2/omx/omx_proxy/build/make"
pvra8decoder_imp_m_mk=""
pvrtsptunicastfsp_y_mk=""
LIBDIR_nodes_static=" "
smrtspunicastplugininterface_m_mk="/modules/linux_rtsp/smplugins/unicast/core/build/make"
pvmshttp_streaming_aggregate_libtype="static"
+PV_MULTICHANNEL_FRIENDLY=0
asfrecognizer_utility_m_mk=""
pvrmffparsernode_m_mk=""
realaudio_deinterleaver_m_mk=""
wmadecoder_lib=n
useoldwmadecoder=n
usepv_one_segment_broadcast=n
+usemultichannlefriendly=n
wma_audio_support=m
#
src/get_adif_header.cpp \
src/get_adts_header.cpp \
src/get_audio_specific_config.cpp \
+ src/get_cce.cpp \
src/get_dse.cpp \
src/get_ele_list.cpp \
src/get_ga_specific_config.cpp \
get_adif_header.cpp \
get_adts_header.cpp \
get_audio_specific_config.cpp \
+ get_cce.cpp \
get_dse.cpp \
get_ele_list.cpp \
get_ga_specific_config.cpp \
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define NULL 0
#endif
+#ifndef LEFT
+#define LEFT 0
+#endif
+
+#ifndef RIGHT
+#define RIGHT 1
+#endif
+
#endif /* PV_AUDIO_TYPE_DEFS_H */
* The constant value is 6144 * 2 channels / 8 bits per byte
*/
+#define PV_MAX_AAC_FRAME_SIZE_2_CH 1536
+
+
+#define PVMP4AUDIODECODER_INBUFSIZE PV_MAX_AAC_FRAME_SIZE_2_CH
-#define PVMP4AUDIODECODER_INBUFSIZE 1536
/*----------------------------------------------------------------------------
; EXTERNAL VARIABLES REFERENCES
*/
Int extendedAudioObjectType;
+ /*
+ * This value indicates if the clip is multichannel, if true, it will only decode the
+ * front channel stereo or mono(if stereo not available)
+ */
+ bool multichannel_detected;
+
+ /*
+ * This value indicates the total number of channels detected in a multichannel clip
+ * format (number of channel)<<1 + lfe
+ * i.e. 5.1 === 11 <> (5 channels)<<1 + 1 lfe
+ */
+ Int multichannel_numChannels;
+
} tPVMP4AudioDecoderExternal;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
LEN_MMIX_IDX = 2,
LEN_PSUR_ENAB = 1,
LEN_ELE_IS_CPE = 1,
- LEN_IND_SW_CCE = 1,
LEN_COMMENT_BYTES = 8
} eProgConfigConst;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
LEN_CC_SGN = 1,
LEN_CCH_GES = 2,
LEN_CCH_CGP = 1,
+ LEN_IND_SW_CCE = 1,
LEN_D_ALIGN = 1,
LEN_D_CNT = 8,
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*
+------------------------------------------------------------------------------
+ INPUT AND OUTPUT DEFINITIONS
+
+ Inputs:
+ pInputStream = pointer to a BITS structure that holds information
+ regarding the input stream.
+
+ pVars = pointer to structure that holds information for decoding,
+ tDec_Int_File
+
+ pChVars[] = pointer to structure that holds channel information,
+ tDec_Int_Chan
+
+
+ Local Stores/Buffers/Pointers Needed:
+ None
+
+ Global Stores/Buffers/Pointers Needed:
+ None
+
+ Outputs:
+ None
+
+ Pointers and Buffers Modified:
+ pInputStream->usedBits is rounded up to a number that represents the next
+ byte boundary.
+
+ Local Stores Modified:
+ None
+
+ Global Stores Modified:
+ None
+
+------------------------------------------------------------------------------
+ FUNCTION DESCRIPTION
+
+ Adquire Coupling Channel Element (CCE) from raw bitstream
+ At this time this function just drops the information.
+
+------------------------------------------------------------------------------
+ REQUIREMENTS
+
+ This function shall not use global or static variables.
+
+------------------------------------------------------------------------------
+ REFERENCES
+
+ (1) MPEG-2 NBC Audio Decoder
+ "This software module was originally developed by AT&T, Dolby
+ Laboratories, Fraunhofer Gesellschaft IIS in the course of development
+ of the MPEG-2 NBC/MPEG-4 Audio standard ISO/IEC 13818-7, 14496-1,2 and
+ 3. This software module is an implementation of a part of one or more
+ MPEG-2 NBC/MPEG-4 Audio tools as specified by the MPEG-2 NBC/MPEG-4
+ Audio standard. ISO/IEC gives users of the MPEG-2 NBC/MPEG-4 Audio
+ standards free license to this software module or modifications thereof
+ for use in hardware or software products claiming conformance to the
+ MPEG-2 NBC/MPEG-4 Audio standards. Those intending to use this software
+ module in hardware or software products are advised that this use may
+ infringe existing patents. The original developer of this software
+ module and his/her company, the subsequent editors and their companies,
+ and ISO/IEC have no liability for use of this software module or
+ modifications thereof in an implementation. Copyright is not released
+ for non MPEG-2 NBC/MPEG-4 Audio conforming products.The original
+ developer retains full right to use the code for his/her own purpose,
+ assign or donate the code to a third party and to inhibit third party
+ from using the code for non MPEG-2 NBC/MPEG-4 Audio conforming products.
+ This copyright notice must be included in all copies or derivative
+ works."
+ Copyright(c)1996.
+
+------------------------------------------------------------------------------
+ PSEUDO-CODE
+
+
+------------------------------------------------------------------------------
+ RESOURCES USED
+
+ STACK USAGE:
+
+ where:
+
+ DATA MEMORY USED: x words
+
+ PROGRAM MEMORY USED: x words
+
+ CLOCK CYCLES:
+
+------------------------------------------------------------------------------
+*/
+
+
+/*----------------------------------------------------------------------------
+; INCLUDES
+----------------------------------------------------------------------------*/
+
+#include "pv_audio_type_defs.h"
+#include "get_cce.h"
+#include "ibstream.h"
+#include "getbits.h"
+#include "s_bits.h"
+#include "e_elementid.h"
+#include "huffman.h"
+#include "e_huffmanconst.h"
+
+
+/*----------------------------------------------------------------------------
+; MACROS
+; Define module specific macros here
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; DEFINES
+; Include all pre-processor statements here. Include conditional
+; compile variables also.
+----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------
+; LOCAL FUNCTION DEFINITIONS
+; Function Prototype declaration
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; LOCAL VARIABLE DEFINITIONS
+; Variable declaration - defined here and used outside this module
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; EXTERNAL FUNCTION REFERENCES
+; Declare functions defined elsewhere and referenced in this module
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; EXTERNAL VARIABLES REFERENCES
+; Declare variables used in this module but defined elsewhere
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; FUNCTION CODE
+----------------------------------------------------------------------------*/
+
+
--- /dev/null
+/* ------------------------------------------------------------------
+ * Copyright (C) 1998-2010 PacketVideo
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ * -------------------------------------------------------------------
+ */
+/*
+
+ Pathname: get_dse.h
+ Funtions:
+ get_dse
+
+
+------------------------------------------------------------------------------
+ REVISION HISTORY
+
+
+ Who: Date: MM/DD/YYYY
+ Description:
+------------------------------------------------------------------------------
+
+*/
+
+/*----------------------------------------------------------------------------
+; CONTINUE ONLY IF NOT ALREADY DEFINED
+----------------------------------------------------------------------------*/
+#ifndef GET_CCE_H
+#define GET_CCE_H
+
+/*----------------------------------------------------------------------------
+; INCLUDES
+----------------------------------------------------------------------------*/
+#include "s_tdec_int_file.h"
+#include "s_tdec_int_chan.h"
+#include "pv_audio_type_defs.h"
+#include "s_elelist.h"
+#include "s_bits.h"
+
+/*----------------------------------------------------------------------------
+; MACROS
+; Define module specific macros here
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; DEFINES
+; Include all pre-processor statements here.
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; EXTERNAL VARIABLES REFERENCES
+; Declare variables used in this module but defined elsewhere
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; SIMPLE TYPEDEF'S
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; ENUMERATED TYPEDEF'S
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; STRUCTURES TYPEDEF'S
+----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------
+; GLOBAL FUNCTION DEFINITIONS
+; Function Prototype declaration
+----------------------------------------------------------------------------*/
+
+Int get_cce(BITS *pInputStream,
+ tDec_Int_File *pVars,
+ tDec_Int_Chan *pChVars[]);
+
+
+
+
+/*----------------------------------------------------------------------------
+; END
+----------------------------------------------------------------------------*/
+#endif
ProgConfig *pScratchPCE)
{
Int i;
- UInt tag;
+ UInt tag;
Int numChars;
- UInt temp;
+ UInt temp;
Bool flag;
Int status = SUCCESS;
- BITS *pInputStream = &(pVars->inputStream);
+ BITS *pInputStream = &(pVars->inputStream);
/*
* getbits is saved into a temporary variable, then transfered to
* the structure item.
*/
- tag =
- get9_n_lessbits(
- LEN_TAG,
- pInputStream);
+ tag = get9_n_lessbits(LEN_TAG, pInputStream);
- pScratchPCE->profile =
- get9_n_lessbits(
- LEN_PROFILE,
- pInputStream);
+ pScratchPCE->profile = get9_n_lessbits(LEN_PROFILE, pInputStream);
- pScratchPCE->sampling_rate_idx =
- get9_n_lessbits(
- LEN_SAMP_IDX,
- pInputStream);
+ pScratchPCE->sampling_rate_idx = get9_n_lessbits(LEN_SAMP_IDX, pInputStream);
if (!pVars->adif_test && (pScratchPCE->sampling_rate_idx != pVars->prog_config.sampling_rate_idx))
{
* The next six function calls could be combined into one, then use
* shifts and masks to retrieve the individual fields.
*/
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->front.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->side.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->back.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_LFE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_LFE, pInputStream);
pScratchPCE->lfe.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_DAT,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_DAT, pInputStream);
pScratchPCE->data.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_CCE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_CCE, pInputStream);
pScratchPCE->coupling.num_ele = temp;
*/
/* Read presence of mono_mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream);/* LEN_MIX_PRES,*/
pScratchPCE->mono_mix.present = flag;
} /* end if (flag != FALSE) */
/* Read presence of stereo mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream); /* LEN_MIX_PRES,*/
pScratchPCE->stereo_mix.present = flag;
if (flag != FALSE)
{
- temp =
- get9_n_lessbits(
- LEN_TAG,
- pInputStream);
+ temp = get9_n_lessbits(LEN_TAG, pInputStream);
pScratchPCE->stereo_mix.ele_tag = temp;
} /* end if (flag != FALSE) */
/* Read presence of matrix mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream); /* LEN_MIX_PRES,*/
pScratchPCE->matrix_mix.present = flag;
if (flag != FALSE)
{
- temp =
- get9_n_lessbits(
- LEN_MMIX_IDX,
- pInputStream);
+ temp = get9_n_lessbits(LEN_MMIX_IDX, pInputStream);
pScratchPCE->matrix_mix.ele_tag = temp;
- temp =
- get1bits(/* LEN_PSUR_ENAB,*/
- pInputStream);
+ temp = get1bits(pInputStream); /* LEN_PSUR_ENAB,*/
pScratchPCE->matrix_mix.pseudo_enab = temp;
* This could be optimized by advancing the bit stream for the
* elements that do not need to be read.
*/
- get_ele_list(
- &pScratchPCE->front,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->side,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->back,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->lfe,
- pInputStream,
- FALSE);
-
- get_ele_list(
- &pScratchPCE->data,
- pInputStream,
- FALSE);
-
- get_ele_list(
- &pScratchPCE->coupling,
- pInputStream,
- TRUE);
+ get_ele_list(&pScratchPCE->front,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->side,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->back,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->lfe,
+ pInputStream,
+ FALSE);
+
+ get_ele_list(&pScratchPCE->data,
+ pInputStream,
+ FALSE);
+
+ get_ele_list(&pScratchPCE->coupling,
+ pInputStream,
+ TRUE);
/*
* The standard requests a byte alignment before reading in the
*/
byte_align(pInputStream);
- numChars =
- get9_n_lessbits(
- LEN_COMMENT_BYTES, pInputStream);
+ numChars = get9_n_lessbits(LEN_COMMENT_BYTES, pInputStream);
/*
* Ignore the comment - it requires 65 bytes to store (or worse on DSP).
* Keep adts setting in case of a redundant PCE (only applicable when
* using aac-lib own adts parser)
*/
- pScratchPCE->file_is_adts = pVars->prog_config.file_is_adts;
+ pScratchPCE->file_is_adts = pVars->prog_config.file_is_adts;
pScratchPCE->headerless_frames = pVars->prog_config.headerless_frames;
}
pScratchPCE,
sizeof(ProgConfig));
- /* enter configuration into MC_Info structure */
- status =
- set_mc_info(
- &pVars->mc_info,
- (tMP4AudioObjectType)(pVars->prog_config.profile + 1),
- pVars->prog_config.sampling_rate_idx,
- pVars->prog_config.front.ele_tag[0],
- pVars->prog_config.front.ele_is_cpe[0],
- pVars->winmap,
- pVars->SFBWidth128);
+
+ tag = 0;
/*
* Check that dual-mono does not carry more than 2 tracks, otherwise flag an non-supported error
*/
- if ((pVars->prog_config.front.num_ele > 2) && !(pVars->prog_config.front.ele_is_cpe[0]))
+ if ((pVars->prog_config.front.num_ele > 2) && !(pVars->prog_config.front.ele_is_cpe[tag]))
{
status = 1;
}
/*
* Check that stereo does not carry more than 1 track, otherwise flag an non-supported error
*/
- if ((pVars->prog_config.front.num_ele > 1) && (pVars->prog_config.front.ele_is_cpe[0]))
+ if ((pVars->prog_config.front.num_ele > 1) && (pVars->prog_config.front.ele_is_cpe[tag]))
{
status = 1;
}
+
+ if (!status)
+ {
+
+ /* enter configuration into MC_Info structure */
+ status = set_mc_info(&pVars->mc_info,
+ (tMP4AudioObjectType)(pVars->prog_config.profile + 1),
+ pVars->prog_config.sampling_rate_idx,
+ pVars->prog_config.front.ele_tag[tag],
+ pVars->prog_config.front.ele_is_cpe[tag],
+ pVars->winmap,
+ pVars->SFBWidth128);
+ }
+
+
+
} /* end if (tag == pVars->current_program) */
#include "huffman.h"
#include "aac_mem_funcs.h"
#include "get_tns.h"
+#include "e_elementid.h"
/*----------------------------------------------------------------------------
; MACROS
; FUNCTION CODE
----------------------------------------------------------------------------*/
Int getics(
+ Int id_syn_ele,
BITS *pInputStream,
Int common_window,
tDec_Int_File *pVars,
pGroup = group;
/* read global gain from Input bitstream */
- global_gain =
- get9_n_lessbits(
- LEN_SCL_PCM,
- pInputStream);
+ global_gain = get9_n_lessbits(LEN_SCL_PCM, pInputStream);
if (common_window == FALSE)
{
- status = get_ics_info(
- pVars->mc_info.audioObjectType,
- pInputStream,
- common_window,
- &pChVars->wnd,
- &pChVars->wnd_shape_this_bk,
- group,
- pMax_sfb,
- pWinMap,
- &pChVars->pShareWfxpCoef->lt_status,
- NULL);
+ status = get_ics_info(pVars->mc_info.audioObjectType,
+ pInputStream,
+ common_window,
+ &pChVars->wnd,
+ &pChVars->wnd_shape_this_bk,
+ group,
+ pMax_sfb,
+ pWinMap,
+ &pChVars->pShareWfxpCoef->lt_status,
+ NULL);
}
pFrameInfo = pWinMap[pChVars->wnd];
totSfb *= pFrameInfo->sfb_per_win[0];
/* decode section data */
- nsect =
- huffcb(
- sect,
- pInputStream,
- pFrameInfo->sectbits,
- totSfb,
- pFrameInfo->sfb_per_win[0],
- *pMax_sfb);
+ nsect = huffcb(sect,
+ pInputStream,
+ pFrameInfo->sectbits,
+ totSfb,
+ pFrameInfo->sfb_per_win[0],
+ *pMax_sfb);
if (nsect == 0)
{
else
{
/* set all sections with ZERO_HCB */
- pv_memset(
- pCodebookMap,
- ZERO_HCB,
- MAXBANDS*sizeof(*pCodebookMap));
+ pv_memset(pCodebookMap,
+ ZERO_HCB,
+ MAXBANDS*sizeof(*pCodebookMap));
/*
for (i=MAXBANDS; i>0; i--)
{
*/
if (pFrameInfo->islong == FALSE)
{
- calc_gsfb_table(
- pFrameInfo,
- group);
+ calc_gsfb_table(pFrameInfo, group);
}
/* decode scale factor data */
if (status == SUCCESS)
{
- status =
- hufffac(
- pFrameInfo,
- pInputStream,
- group,
- nsect,
- sect,
- global_gain,
- pChVars->pShareWfxpCoef->factors,
- pVars->scratch.huffbook_used);
+ status = hufffac(pFrameInfo,
+ pInputStream,
+ group,
+ nsect,
+ sect,
+ global_gain,
+ pChVars->pShareWfxpCoef->factors,
+ pVars->scratch.a.huffbook_used);
} /* if (status) */
/* noiseless coding */
if (status == SUCCESS)
{
- present =
- get1bits(pInputStream);
+ present = get1bits(pInputStream);
pPulseInfo->pulse_data_present = present;
{
if (pFrameInfo->islong == 1)
{
- status = get_pulse_data(
- pPulseInfo,
- pInputStream);
+ status = get_pulse_data(pPulseInfo,
+ pInputStream);
}
else
{
/* decode tns data */
if (status == SUCCESS)
{
- present =
- get1bits(pInputStream);
+ present = get1bits(pInputStream);
pTnsFrameInfo->tns_data_present = present;
if (present != FALSE)
{
- get_tns(
- pChVars->pShareWfxpCoef->max_sfb,
- pInputStream,
- pChVars->wnd,
- pFrameInfo,
- &pVars->mc_info,
- pTnsFrameInfo,
- pVars->scratch.tns_decode_coef);
+ get_tns(pChVars->pShareWfxpCoef->max_sfb,
+ pInputStream,
+ pChVars->wnd,
+ pFrameInfo,
+ &pVars->mc_info,
+ pTnsFrameInfo,
+ pVars->scratch.a.tns_decode_coef);
}
else
{
if (status == SUCCESS)
{
- status =
- huffspec_fxp(
- pFrameInfo,
- pInputStream,
- nsect,
- sect,
- pChVars->pShareWfxpCoef->factors,
- pChVars->fxpCoef,
- pVars->share.a.quantSpec,
- pVars->scratch.tmp_spec,
- pWinMap[ONLY_LONG_WINDOW],
- pPulseInfo,
- pChVars->pShareWfxpCoef->qFormat);
+ /* Support Mono, Dual-Mono, or Stereo */
+ if ((id_syn_ele == ID_SCE) || (id_syn_ele == ID_CPE))
+ {
+ status = huffspec_fxp(pFrameInfo,
+ pInputStream,
+ nsect,
+ sect,
+ pChVars->pShareWfxpCoef->factors,
+ pChVars->fxpCoef,
+ pVars->share.a.quantSpec,
+ pVars->scratch.tmp_spec,
+ pWinMap[ONLY_LONG_WINDOW],
+ pPulseInfo,
+ pChVars->pShareWfxpCoef->qFormat);
+ }
}
/*----------------------------------------------------------------------------
; Include all pre-processor statements here. Include conditional
; compile variables also.
----------------------------------------------------------------------------*/
-#define LEFT (0)
-#define RIGHT (1)
+
/*----------------------------------------------------------------------------
; LOCAL FUNCTION DEFINITIONS
; Function Prototype declaration
Int huffdecode(
Int id_syn_ele,
BITS *pInputStream,
- tDec_Int_File *pVars,
- tDec_Int_Chan *pChVars[])
+ tDec_Int_File *pVars_0,
+ tDec_Int_Chan *pChVars_0[]
+)
{
/*----------------------------------------------------------------------------
Int hasmask;
Int status = SUCCESS;
Int num_channels = 0;
- Int tag;
+ Int tag = 0;
MC_Info *pMcInfo;
+ tDec_Int_File *pVars = (tDec_Int_File *)pVars_0;
+ tDec_Int_Chan *pChVars[2];
+
+ pChVars[0] = pChVars_0[0];
+ pChVars[1] = pChVars_0[1];
per_chan_share_w_fxpCoef *pChLeftShare; /* Helper pointer */
per_chan_share_w_fxpCoef *pChRightShare; /* Helper pointer */
/*----------------------------------------------------------------------------
; Function body here
----------------------------------------------------------------------------*/
- tag = get9_n_lessbits(LEN_TAG, pInputStream);
-
- /* suppose an un-supported id_syn_ele will never be passed */
+ {
+ tag = get9_n_lessbits(LEN_TAG, pInputStream);
+ }
if (id_syn_ele == ID_CPE)
pMcInfo = &pVars->mc_info;
+
/*
* check if provided info (num of channels) on audio config,
* matches read bitstream data, if not, allow update only once.
}
}
+
+
+
if (status == SUCCESS)
{
if (id_syn_ele == ID_SCE)
else
{
-
status = 1; /* ERROR == incorrect tag identifying dual-mono channel */
+
}
- pMcInfo->nch = pVars->prog_config.front.num_ele;
+ {
+ pMcInfo->nch = pVars->prog_config.front.num_ele; // dual mono
+ }
}
if ((pMcInfo->nch > 1) && (pMcInfo->psPresentFlag))
pChVars[RIGHT]->wnd_shape_this_bk =
pChVars[LEFT]->wnd_shape_this_bk;
pChRightShare->max_sfb = pChLeftShare->max_sfb;
- pv_memcpy(
- pChRightShare->group,
- pChLeftShare->group,
- NSHORT*sizeof(pChLeftShare->group[0]));
- hasmask = getmask(
- pVars->winmap[pChVars[LEFT]->wnd],
- pInputStream,
- pChLeftShare->group,
- pChLeftShare->max_sfb,
- pVars->mask);
+ pv_memcpy(pChRightShare->group,
+ pChLeftShare->group,
+ NSHORT*sizeof(pChLeftShare->group[0]));
+
+ hasmask = getmask(pVars->winmap[pChVars[LEFT]->wnd],
+ pInputStream,
+ pChLeftShare->group,
+ pChLeftShare->max_sfb,
+ pVars->mask);
if (hasmask == MASK_ERROR)
{
{
pChLeftShare = pChVars[ch]->pShareWfxpCoef;
- status = getics(
- pInputStream,
- common_window,
- pVars,
- pChVars[ch],
- pChLeftShare->group,
- &pChLeftShare->max_sfb,
- pChLeftShare->cb_map,
- &pChLeftShare->tns,
- pVars->winmap,
- &pVars->share.a.pulseInfo,
- pVars->share.a.sect);
+ status = getics(id_syn_ele,
+ pInputStream,
+ common_window,
+ pVars,
+ pChVars[ch],
+ pChLeftShare->group,
+ &pChLeftShare->max_sfb,
+ pChLeftShare->cb_map,
+ &pChLeftShare->tns,
+ pVars->winmap,
+ &pVars->share.a.pulseInfo,
+ pVars->share.a.sect);
ch++;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
FrameInfo **ppWin_seq_info,
Int *pSfbwidth128);
+ void initScratchChannel(
+ tDec_Int_File *pt_Scratch,
+ tDec_Int_File *pVars,
+ tDec_Int_Chan *pt_ChScratch[]);
+
+
Int huffcb(
SectInfo *pSect,
BITS *pInputStream,
PulseInfo *pPulseInfo,
Int qFormat[]);
+
+ Int huffspec_fxp_parse_bits(
+ FrameInfo *pFrameInfo,
+ BITS *pInputStream,
+ Int nsect,
+ SectInfo *pSectInfo);
+
Int huffdecode(
Int id_syn_ele,
BITS *pInputStream,
- tDec_Int_File *pVars,
- tDec_Int_Chan *pChVars[]);
+ tDec_Int_File *pVars_0,
+ tDec_Int_Chan *pChVars_0[]
+ );
+
void deinterleave(
Int16 interleaved[],
FrameInfo *pFrameInfo);
Int getics(
-
+ Int id_syn_ele,
BITS *pInputStream,
Int common_window,
tDec_Int_File *pVars,
PulseInfo *pPulseInfo,
SectInfo sect[]);
+
void calc_gsfb_table(
FrameInfo *pFrameInfo,
Int group[]);
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
though each one of them for re-quant and scaling, and pick the right qFormat to apply to
all spectral coeffs.*/
- if ((max < 0) || (max > 8192)) /* (8192>>ORDER) == 1024 is the inverseQuantTable size */
+ if ((max >= 0) && (max <= 8192)) /* (8192>>ORDER) == 1024 is the inverseQuantTable size */
{
- return (-1); /* error condition */
+ /* Get (max/SPACING) ^ (1/3), in Q Format */
+ temp = inverseQuantTable[(max >> ORDER) + 1];
}
else
{
- /* Get (max/SPACING) ^ (1/3), in Q Format */
- temp = inverseQuantTable[(max >> ORDER) + 1];
+ return (-1); /* error condition */
}
max);
pQuantSpec += sfbWidth;
- qFormat[tot_sfb] -= power_scale_div_4;
pCoef += sfbWidth;
- tot_sfb++;
+ qFormat[tot_sfb++] -= power_scale_div_4;
+
} /* for (sfb) */
} /* for (i) */
return SUCCESS;
} /* huffspec_fxp */
+
+
+
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include "e_huffmanconst.h"
#include "sfb.h"
#include "huffman.h"
+#include "aac_mem_funcs.h"
/*----------------------------------------------------------------------------
; MACROS
return SUCCESS;
} /* infoinit */
+
+
+
#include "get_sbr_bitstream.h"
#include "e_sbr_element_id.h"
+#include "get_cce.h"
/*----------------------------------------------------------------------------
; compile variables also.
----------------------------------------------------------------------------*/
-#define LEFT (0)
-#define RIGHT (1)
-
/*----------------------------------------------------------------------------
; LOCAL FUNCTION DEFINITIONS
; Declare variables used in this module but defined elsewhere
----------------------------------------------------------------------------*/
+
/*----------------------------------------------------------------------------
; FUNCTION CODE
----------------------------------------------------------------------------*/
per_chan_share_w_fxpCoef *pChLeftShare; /* Helper pointer */
per_chan_share_w_fxpCoef *pChRightShare; /* Helper pointer */
+
+
Int status = MP4AUDEC_SUCCESS;
*/
pVars = (tDec_Int_File *)pMem;
+
+
pMC_Info = &pVars->mc_info;
pChVars[LEFT] = &pVars->perChan[LEFT];
leaveGetLoop = FALSE;
empty_frame = TRUE;
+
+
+
while ((leaveGetLoop == FALSE) && (status == SUCCESS))
{
/* get audio syntactic element */
status = huffdecode(id_syn_ele,
&(pVars->inputStream),
pVars,
- pChVars);
+ pChVars
+ );
#ifdef AAC_PLUS
sbrBitStream->sbrElement[sbrBitStream->NrElements].ElementID = id_syn_ele;
sbrBitStream->NrElementsCore++;
-
-
#endif
-
break;
+
+
case ID_PCE: /* program config element */
/*
* PCE are not accepted in the middle of a
&pVars->inputStream);
break;
+
+
default: /* Unsupported element, including ID_LFE */
status = -1; /* ERROR CODE needs to be updated */
break;
pFrameInfo = pVars->winmap[pChVars[LEFT]->wnd];
- pns_left(
- pFrameInfo,
- pChLeftShare->group,
- pChLeftShare->cb_map,
- pChLeftShare->factors,
- pChLeftShare->lt_status.sfb_prediction_used,
- pChLeftShare->lt_status.ltp_data_present,
- pChVars[LEFT]->fxpCoef,
- pChLeftShare->qFormat,
- &(pVars->pns_cur_noise_state));
+ pns_left(pFrameInfo,
+ pChLeftShare->group,
+ pChLeftShare->cb_map,
+ pChLeftShare->factors,
+ pChLeftShare->lt_status.sfb_prediction_used,
+ pChLeftShare->lt_status.ltp_data_present,
+ pChVars[LEFT]->fxpCoef,
+ pChLeftShare->qFormat,
+ &(pVars->pns_cur_noise_state));
/*
* For dual-mono clips, process second channel as well
{
pFrameInfo = pVars->winmap[pChVars[RIGHT]->wnd];
- pns_left(
- pFrameInfo,
- pChRightShare->group,
- pChRightShare->cb_map,
- pChRightShare->factors,
- pChRightShare->lt_status.sfb_prediction_used,
- pChRightShare->lt_status.ltp_data_present,
- pChVars[RIGHT]->fxpCoef,
- pChRightShare->qFormat,
- &(pVars->pns_cur_noise_state));
+ pns_left(pFrameInfo,
+ pChRightShare->group,
+ pChRightShare->cb_map,
+ pChRightShare->factors,
+ pChRightShare->lt_status.sfb_prediction_used,
+ pChRightShare->lt_status.ltp_data_present,
+ pChVars[RIGHT]->fxpCoef,
+ pChRightShare->qFormat,
+ &(pVars->pns_cur_noise_state));
}
if (pVars->hasmask > 0)
{
- apply_ms_synt(
- pFrameInfo,
- pChLeftShare->group,
- pVars->mask,
- pChLeftShare->cb_map,
- pChVars[LEFT]->fxpCoef,
- pChVars[RIGHT]->fxpCoef,
- pChLeftShare->qFormat,
- pChRightShare->qFormat);
+ apply_ms_synt(pFrameInfo,
+ pChLeftShare->group,
+ pVars->mask,
+ pChLeftShare->cb_map,
+ pChVars[LEFT]->fxpCoef,
+ pChVars[RIGHT]->fxpCoef,
+ pChLeftShare->qFormat,
+ pChRightShare->qFormat);
}
for (ch = 0; (ch < pMC_Info->nch); ch++)
* the forward filter, but is passed in to maintain
* common interface for inverse and forward filter
*/
- apply_tns(
- pChVars[ch]->fxpCoef,
- pChVars[ch]->pShareWfxpCoef->qFormat,
- pFrameInfo,
- &(pChVars[ch]->pShareWfxpCoef->tns),
- FALSE, /* FALSE is IIR */
- pVars->scratch.tns_inv_filter);
+ apply_tns(pChVars[ch]->fxpCoef,
+ pChVars[ch]->pShareWfxpCoef->qFormat,
+ pFrameInfo,
+ &(pChVars[ch]->pShareWfxpCoef->tns),
+ FALSE, /* FALSE is IIR */
+ pVars->scratch.tns_inv_filter);
/*
* Normalize the q format across all scale factor bands
* to one value.
*/
- qFormatNorm =
- q_normalize(
- pChVars[ch]->pShareWfxpCoef->qFormat,
- pFrameInfo,
- pChVars[ch]->abs_max_per_window,
- pChVars[ch]->fxpCoef);
+ qFormatNorm = q_normalize(pChVars[ch]->pShareWfxpCoef->qFormat,
+ pFrameInfo,
+ pChVars[ch]->abs_max_per_window,
+ pChVars[ch]->fxpCoef);
/*
* filterbank - converts frequency coeficients to time domain.
}
-
#endif
-
-
/* Update the window shape */
pChVars[ch]->wnd_shape_prev_bk = pChVars[ch]->wnd_shape_this_bk;
} /* end for() */
-
/*
* Copy to the final output buffer, taking into account the desired
* channels from the calling environment, the actual channels, and
*
*/
-
#ifdef AAC_PLUS
if (sbrBitStream->NrElements || pMC_Info->upsamplingFactor == 2)
sbrDecoderData,
pVars->mc_info.bDownSampledSbr);
}
-
}
pMC_Info->upsamplingFactor =
sbrDecoderData->SbrChannel[0].frameData.sbr_header.sampleRateMode;
-
/* reuse right aac spectrum channel */
{
Int16 *pt_left = &(pChVars[LEFT ]->ltp_buffer[pVars->ltp_buffer_state]);
}
-
-
-
/* pVars->ltp_buffer_state cycles between 0 and 1024. The value
* indicates the location of the data corresponding to t == -2.
*
pVars->ltp_buffer_state ^= frameLength;
#endif
-
if (pVars->bno <= 1)
{
/*
* only the first time
*/
-
#ifdef AAC_PLUS
if (pMC_Info->upsamplingFactor == 2)
pExt->samplingRate *= pMC_Info->upsamplingFactor;
pExt->aacPlusUpsamplingFactor = pMC_Info->upsamplingFactor;
}
-
#endif
pExt->extendedAudioObjectType = pMC_Info->ExtendedAudioObjectType;
pExt->encodedChannels = pMC_Info->nch;
pExt->frameLength = pVars->frameLength;
+
+
+ pExt->multichannel_detected = pVars->multichannel_detected;
+ if (pVars->multichannel_detected)
+ {
+ pExt->multichannel_numChannels = pVars->multichannel_numChannels ;
+ }
}
pVars->bno++;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
size = (UInt32) sizeof(tDec_Int_File);
+
return (size);
} /* PVMP4AudioDecoderGetMemRequirements() */
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
pVars->aacPlusEnabled = pExt->aacPlusEnabled;
+ pVars->multichannel_detected = false;
+
#if defined(AAC_PLUS)
pVars->sbrDecoderData.setStreamType = 1; /* Enable Lock for AAC stream type setting */
#endif
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; Include all pre-processor statements here. Include conditional
; compile variables also.
----------------------------------------------------------------------------*/
-#define LEFT (0)
-#define RIGHT (1)
/*----------------------------------------------------------------------------
; LOCAL FUNCTION DEFINITIONS
bool aacPlusEnabled;
bool aacConfigUtilityEnabled;
+ bool multichannel_detected;
+ Int multichannel_numChannels;
+
Int current_program;
Int frameLength;
Int adif_test;
Int ltp_buffer_state;
- /*
- * For eaac+, a scratch matrix is created with the rigth element ( perChan[1] is not used)
- * and the fxpCoef matrix. These 2 matrices are [2][38][64] == 4864 Int32
- * 2349 coming from the perChan[1] plus 4096 coming from fxpCoef
- */
- tDec_Int_Chan perChan[Chans];
-
- Int32 fxpCoef[2][LN]; /* LN = 2048 */
-
#ifdef AAC_PLUS
Int hasmask;
+ /*
+ * For eaac+, a scratch matrix is created with the rigth element ( perChan[1] is not used)
+ * and the fxpCoef matrix. These 2 matrices are [2][38][64] == 4864 Int32
+ * 2349 coming from the perChan[1] plus 4096 coming from fxpCoef
+ */
+ tDec_Int_Chan perChan[Chans];
+
+ Int32 fxpCoef[2][LN]; /* LN = 2048 */
+
+
+
/* SBR usage
* These two unions are used for the SBR tool and used
* as a single 2560 int32 continuous memory for circular
{
Int32 fft[LONG_WINDOW]; /* 1024, as needed by the FFT */
Int32 tns_inv_filter[TNS_MAX_ORDER];
- Int32 tns_decode_coef[2*TNS_MAX_ORDER];
- Int huffbook_used[248];
+ struct
+ {
+ Int32 tns_decode_coef[2*TNS_MAX_ORDER];
+ Int huffbook_used[248];
+ } a;
Int16 tmp_spec[LN2]; /* Used in conjunction with quant_spec */
ADIF_Header adif_header;
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
; Include all pre-processor statements here. Include conditional
; compile variables also.
----------------------------------------------------------------------------*/
-#define LEFT (0)
-#define RIGHT (1)
/*----------------------------------------------------------------------------
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return ;
} /* unpack_idx_esc */
+
+
+/*############################################################################################*/
+
+
+
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
BITS *pInputStream,
Int *max);
+
+ void unpack_idx_sgn_parse_bits(
+ Int codeword_indx,
+ const Hcb *pHuffCodebook,
+ BITS *pInputStream);
+ void unpack_idx_esc_parse_bits(
+ Int codeword_indx,
+ const Hcb *pHuffCodebook,
+ BITS *pInputStream);
+
#ifdef __cplusplus
}
#endif
ProgConfig *pScratchPCE)
{
Int i;
- UInt tag;
+ UInt tag;
Int numChars;
- UInt temp;
+ UInt temp;
Bool flag;
Int status = SUCCESS;
- BITS *pInputStream = &(pVars->inputStream);
+ BITS *pInputStream = &(pVars->inputStream);
/*
* getbits is saved into a temporary variable, then transfered to
* the structure item.
*/
- tag =
- get9_n_lessbits(
- LEN_TAG,
- pInputStream);
+ tag = get9_n_lessbits(LEN_TAG, pInputStream);
- pScratchPCE->profile =
- get9_n_lessbits(
- LEN_PROFILE,
- pInputStream);
+ pScratchPCE->profile = get9_n_lessbits(LEN_PROFILE, pInputStream);
- pScratchPCE->sampling_rate_idx =
- get9_n_lessbits(
- LEN_SAMP_IDX,
- pInputStream);
+ pScratchPCE->sampling_rate_idx = get9_n_lessbits(LEN_SAMP_IDX, pInputStream);
if (!pVars->adif_test && (pScratchPCE->sampling_rate_idx != pVars->prog_config.sampling_rate_idx))
{
* The next six function calls could be combined into one, then use
* shifts and masks to retrieve the individual fields.
*/
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->front.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->side.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_ELE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_ELE, pInputStream);
pScratchPCE->back.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_LFE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_LFE, pInputStream);
pScratchPCE->lfe.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_DAT,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_DAT, pInputStream);
pScratchPCE->data.num_ele = temp;
/* Needed only to read in the element list. */
- temp =
- get9_n_lessbits(
- LEN_NUM_CCE,
- pInputStream);
+ temp = get9_n_lessbits(LEN_NUM_CCE, pInputStream);
pScratchPCE->coupling.num_ele = temp;
*/
/* Read presence of mono_mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream);/* LEN_MIX_PRES,*/
pScratchPCE->mono_mix.present = flag;
} /* end if (flag != FALSE) */
/* Read presence of stereo mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream); /* LEN_MIX_PRES,*/
pScratchPCE->stereo_mix.present = flag;
if (flag != FALSE)
{
- temp =
- get9_n_lessbits(
- LEN_TAG,
- pInputStream);
+ temp = get9_n_lessbits(LEN_TAG, pInputStream);
pScratchPCE->stereo_mix.ele_tag = temp;
} /* end if (flag != FALSE) */
/* Read presence of matrix mix */
- flag =
- get1bits(/* LEN_MIX_PRES,*/
- pInputStream);
+ flag = get1bits(pInputStream); /* LEN_MIX_PRES,*/
pScratchPCE->matrix_mix.present = flag;
if (flag != FALSE)
{
- temp =
- get9_n_lessbits(
- LEN_MMIX_IDX,
- pInputStream);
+ temp = get9_n_lessbits(LEN_MMIX_IDX, pInputStream);
pScratchPCE->matrix_mix.ele_tag = temp;
- temp =
- get1bits(/* LEN_PSUR_ENAB,*/
- pInputStream);
+ temp = get1bits(pInputStream); /* LEN_PSUR_ENAB,*/
pScratchPCE->matrix_mix.pseudo_enab = temp;
* This could be optimized by advancing the bit stream for the
* elements that do not need to be read.
*/
- get_ele_list(
- &pScratchPCE->front,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->side,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->back,
- pInputStream,
- TRUE);
-
- get_ele_list(
- &pScratchPCE->lfe,
- pInputStream,
- FALSE);
-
- get_ele_list(
- &pScratchPCE->data,
- pInputStream,
- FALSE);
-
- get_ele_list(
- &pScratchPCE->coupling,
- pInputStream,
- TRUE);
+ get_ele_list(&pScratchPCE->front,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->side,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->back,
+ pInputStream,
+ TRUE);
+
+ get_ele_list(&pScratchPCE->lfe,
+ pInputStream,
+ FALSE);
+
+ get_ele_list(&pScratchPCE->data,
+ pInputStream,
+ FALSE);
+
+ get_ele_list(&pScratchPCE->coupling,
+ pInputStream,
+ TRUE);
/*
* The standard requests a byte alignment before reading in the
*/
byte_align(pInputStream);
- numChars =
- get9_n_lessbits(
- LEN_COMMENT_BYTES, pInputStream);
+ numChars = get9_n_lessbits(LEN_COMMENT_BYTES, pInputStream);
/*
* Ignore the comment - it requires 65 bytes to store (or worse on DSP).
* Keep adts setting in case of a redundant PCE (only applicable when
* using aac-lib own adts parser)
*/
- pScratchPCE->file_is_adts = pVars->prog_config.file_is_adts;
+ pScratchPCE->file_is_adts = pVars->prog_config.file_is_adts;
pScratchPCE->headerless_frames = pVars->prog_config.headerless_frames;
}
pScratchPCE,
sizeof(ProgConfig));
- /* enter configuration into MC_Info structure */
- status =
- set_mc_info(
- &pVars->mc_info,
- (tMP4AudioObjectType)(pVars->prog_config.profile + 1),
- pVars->prog_config.sampling_rate_idx,
- pVars->prog_config.front.ele_tag[0],
- pVars->prog_config.front.ele_is_cpe[0],
- pVars->winmap,
- pVars->SFBWidth128);
+
+ tag = 0;
/*
* Check that dual-mono does not carry more than 2 tracks, otherwise flag an non-supported error
*/
- if ((pVars->prog_config.front.num_ele > 2) && !(pVars->prog_config.front.ele_is_cpe[0]))
+ if ((pVars->prog_config.front.num_ele > 2) && !(pVars->prog_config.front.ele_is_cpe[tag]))
{
status = 1;
}
/*
* Check that stereo does not carry more than 1 track, otherwise flag an non-supported error
*/
- if ((pVars->prog_config.front.num_ele > 1) && (pVars->prog_config.front.ele_is_cpe[0]))
+ if ((pVars->prog_config.front.num_ele > 1) && (pVars->prog_config.front.ele_is_cpe[tag]))
{
status = 1;
}
+
+ if (!status)
+ {
+
+ /* enter configuration into MC_Info structure */
+ status = set_mc_info(&pVars->mc_info,
+ (tMP4AudioObjectType)(pVars->prog_config.profile + 1),
+ pVars->prog_config.sampling_rate_idx,
+ pVars->prog_config.front.ele_tag[tag],
+ pVars->prog_config.front.ele_is_cpe[tag],
+ pVars->winmap,
+ pVars->SFBWidth128);
+ }
+
+
+
} /* end if (tag == pVars->current_program) */
/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 PacketVideo
+ * Copyright (C) 1998-2010 PacketVideo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define ERROR_BUFFER_OVERRUN (-2)
#define KCODEC_INIT_FAILURE (-1)
-#define LEFT (0)
-#define RIGHT (1)
/*----------------------------------------------------------------------------
; LOCAL FUNCTION DEFINITIONS
#include "e_huffmanconst.h"
#include "sfb.h"
#include "huffman.h"
+#include "aac_mem_funcs.h"
/*----------------------------------------------------------------------------
; MACROS
return SUCCESS;
} /* infoinit */
+
+
+
size = (UInt32) sizeof(tDec_Int_File);
+
return (size);
} /* PVMP4AudioDecoderGetMemRequirements() */
pVars->aacPlusEnabled = pExt->aacPlusEnabled;
+ pVars->multichannel_detected = false;
+
#if defined(AAC_PLUS)
pVars->sbrDecoderData.setStreamType = 1; /* Enable Lock for AAC stream type setting */
#endif
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PV2WAY_ENGINE_SDKINFO_LABEL "1313199"
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1313263"
#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100310
#endif //PV_2WAY_SDKINFO_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1313199"
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1313263"
#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100310
#endif //PV_AUTHOR_SDKINFO_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1313199"
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1313263"
#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100310
#endif //PV_PLAYER_SDKINFO_H_INCLUDED