mirror of https://github.com/mstorsjo/fdk-aac.git
Merge remote-tracking branch 'aosp/master'
This commit is contained in:
commit
32c712cbd1
|
@ -0,0 +1,32 @@
|
|||
cc_library_static {
|
||||
name: "libFraunhoferAAC",
|
||||
srcs: [
|
||||
"libAACdec/src/*.cpp",
|
||||
"libAACenc/src/*.cpp",
|
||||
"libPCMutils/src/*.cpp",
|
||||
"libFDK/src/*.cpp",
|
||||
"libSYS/src/*.cpp",
|
||||
"libMpegTPDec/src/*.cpp",
|
||||
"libMpegTPEnc/src/*.cpp",
|
||||
"libSBRdec/src/*.cpp",
|
||||
"libSBRenc/src/*.cpp",
|
||||
],
|
||||
cflags: [
|
||||
"-Wno-sequence-point",
|
||||
"-Wno-extra",
|
||||
"-Wno-#warnings",
|
||||
"-Wno-constant-logical-operand",
|
||||
"-Wno-self-assign",
|
||||
],
|
||||
export_include_dirs: [
|
||||
"libAACdec/include",
|
||||
"libAACenc/include",
|
||||
"libPCMutils/include",
|
||||
"libFDK/include",
|
||||
"libSYS/include",
|
||||
"libMpegTPDec/include",
|
||||
"libMpegTPEnc/include",
|
||||
"libSBRdec/include",
|
||||
"libSBRenc/include",
|
||||
],
|
||||
}
|
59
Android.mk
59
Android.mk
|
@ -1,59 +0,0 @@
|
|||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
aacdec_sources := $(sort $(wildcard $(LOCAL_PATH)/libAACdec/src/*.cpp))
|
||||
aacdec_sources := $(aacdec_sources:$(LOCAL_PATH)/libAACdec/src/%=%)
|
||||
|
||||
aacenc_sources := $(sort $(wildcard $(LOCAL_PATH)/libAACenc/src/*.cpp))
|
||||
aacenc_sources := $(aacenc_sources:$(LOCAL_PATH)/libAACenc/src/%=%)
|
||||
|
||||
pcmutils_sources := $(sort $(wildcard $(LOCAL_PATH)/libPCMutils/src/*.cpp))
|
||||
pcmutils_sources := $(pcmutils_sources:$(LOCAL_PATH)/libPCMutils/src/%=%)
|
||||
|
||||
fdk_sources := $(sort $(wildcard $(LOCAL_PATH)/libFDK/src/*.cpp))
|
||||
fdk_sources := $(fdk_sources:$(LOCAL_PATH)/libFDK/src/%=%)
|
||||
|
||||
sys_sources := $(sort $(wildcard $(LOCAL_PATH)/libSYS/src/*.cpp))
|
||||
sys_sources := $(sys_sources:$(LOCAL_PATH)/libSYS/src/%=%)
|
||||
|
||||
mpegtpdec_sources := $(sort $(wildcard $(LOCAL_PATH)/libMpegTPDec/src/*.cpp))
|
||||
mpegtpdec_sources := $(mpegtpdec_sources:$(LOCAL_PATH)/libMpegTPDec/src/%=%)
|
||||
|
||||
mpegtpenc_sources := $(sort $(wildcard $(LOCAL_PATH)/libMpegTPEnc/src/*.cpp))
|
||||
mpegtpenc_sources := $(mpegtpenc_sources:$(LOCAL_PATH)/libMpegTPEnc/src/%=%)
|
||||
|
||||
sbrdec_sources := $(sort $(wildcard $(LOCAL_PATH)/libSBRdec/src/*.cpp))
|
||||
sbrdec_sources := $(sbrdec_sources:$(LOCAL_PATH)/libSBRdec/src/%=%)
|
||||
|
||||
sbrenc_sources := $(sort $(wildcard $(LOCAL_PATH)/libSBRenc/src/*.cpp))
|
||||
sbrenc_sources := $(sbrenc_sources:$(LOCAL_PATH)/libSBRenc/src/%=%)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(aacdec_sources:%=libAACdec/src/%) \
|
||||
$(aacenc_sources:%=libAACenc/src/%) \
|
||||
$(pcmutils_sources:%=libPCMutils/src/%) \
|
||||
$(fdk_sources:%=libFDK/src/%) \
|
||||
$(sys_sources:%=libSYS/src/%) \
|
||||
$(mpegtpdec_sources:%=libMpegTPDec/src/%) \
|
||||
$(mpegtpenc_sources:%=libMpegTPEnc/src/%) \
|
||||
$(sbrdec_sources:%=libSBRdec/src/%) \
|
||||
$(sbrenc_sources:%=libSBRenc/src/%)
|
||||
|
||||
LOCAL_CFLAGS += -Wno-sequence-point -Wno-extra
|
||||
LOCAL_CFLAGS += "-Wno-\#warnings" -Wno-constant-logical-operand -Wno-self-assign
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/libAACdec/include \
|
||||
$(LOCAL_PATH)/libAACenc/include \
|
||||
$(LOCAL_PATH)/libPCMutils/include \
|
||||
$(LOCAL_PATH)/libFDK/include \
|
||||
$(LOCAL_PATH)/libSYS/include \
|
||||
$(LOCAL_PATH)/libMpegTPDec/include \
|
||||
$(LOCAL_PATH)/libMpegTPEnc/include \
|
||||
$(LOCAL_PATH)/libSBRdec/include \
|
||||
$(LOCAL_PATH)/libSBRenc/include
|
||||
|
||||
|
||||
LOCAL_MODULE:= libFraunhoferAAC
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
|
@ -791,36 +791,29 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_DecodeFrame(
|
|||
const UINT flags)
|
||||
{
|
||||
AAC_DECODER_ERROR ErrorStatus;
|
||||
INT layer;
|
||||
INT nBits;
|
||||
INT interleaved = self->outputInterleaved;
|
||||
HANDLE_FDK_BITSTREAM hBs;
|
||||
int fTpInterruption = 0; /* Transport originated interruption detection. */
|
||||
int fTpConceal = 0; /* Transport originated concealment. */
|
||||
INT_PCM *pTimeData = NULL;
|
||||
INT timeDataSize = 0;
|
||||
|
||||
|
||||
if (self == NULL) {
|
||||
return AAC_DEC_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
pTimeData = self->pcmOutputBuffer;
|
||||
timeDataSize = sizeof(self->pcmOutputBuffer)/sizeof(*self->pcmOutputBuffer);
|
||||
INT interleaved = self->outputInterleaved;
|
||||
INT_PCM *pTimeData = self->pcmOutputBuffer;
|
||||
INT timeDataSize = sizeof(self->pcmOutputBuffer)/sizeof(*self->pcmOutputBuffer);
|
||||
|
||||
if (flags & AACDEC_INTR) {
|
||||
self->streamInfo.numLostAccessUnits = 0;
|
||||
}
|
||||
|
||||
hBs = transportDec_GetBitstream(self->hInput, 0);
|
||||
HANDLE_FDK_BITSTREAM hBs = transportDec_GetBitstream(self->hInput, 0);
|
||||
|
||||
/* Get current bits position for bitrate calculation. */
|
||||
nBits = FDKgetValidBits(hBs);
|
||||
INT nBits = FDKgetValidBits(hBs);
|
||||
if (! (flags & (AACDEC_CONCEAL | AACDEC_FLUSH) ) )
|
||||
{
|
||||
TRANSPORTDEC_ERROR err;
|
||||
|
||||
for(layer = 0; layer < self->nrOfLayers; layer++)
|
||||
for(INT layer = 0; layer < self->nrOfLayers; layer++)
|
||||
{
|
||||
err = transportDec_ReadAccessUnit(self->hInput, layer);
|
||||
if (err != TRANSPORTDEC_OK) {
|
||||
|
|
|
@ -488,14 +488,12 @@ static FDK_METADATA_ERROR ProcessCompressor(
|
|||
{
|
||||
FDK_METADATA_ERROR err = METADATA_OK;
|
||||
|
||||
INT dynrng, compr;
|
||||
DRC_PROFILE profileDrc = convertProfile(pMetadata->mpegDrc.drc_profile);
|
||||
DRC_PROFILE profileComp = convertProfile(pMetadata->etsiAncData.comp_profile);
|
||||
|
||||
if ( (pMetadata==NULL) || (hDrcComp==NULL) ) {
|
||||
err = METADATA_INVALID_HANDLE;
|
||||
return err;
|
||||
}
|
||||
DRC_PROFILE profileDrc = convertProfile(pMetadata->mpegDrc.drc_profile);
|
||||
DRC_PROFILE profileComp = convertProfile(pMetadata->etsiAncData.comp_profile);
|
||||
|
||||
/* first, check if profile is same as last frame
|
||||
* otherwise, update setup */
|
||||
|
@ -511,8 +509,8 @@ static FDK_METADATA_ERROR ProcessCompressor(
|
|||
}
|
||||
|
||||
/* in case of embedding external values, copy this now (limiter may overwrite them) */
|
||||
dynrng = decodeDynrng(pMetadata->mpegDrc.dyn_rng_ctl[0], pMetadata->mpegDrc.dyn_rng_sgn[0]);
|
||||
compr = decodeCompr(pMetadata->etsiAncData.compression_value);
|
||||
INT dynrng = decodeDynrng(pMetadata->mpegDrc.dyn_rng_ctl[0], pMetadata->mpegDrc.dyn_rng_sgn[0]);
|
||||
INT compr = decodeCompr(pMetadata->etsiAncData.compression_value);
|
||||
|
||||
/* Call compressor */
|
||||
if (FDK_DRC_Generator_Calc(hDrcComp,
|
||||
|
|
Loading…
Reference in New Issue