Projects
Essentials
fdk-aac
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
fdk-aac.changes
Changed
@@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Tue May 1 12:17:21 UTC 2018 - zaitor@opensuse.org + +- Update to version 1.6.0: + + This version is a minor update with a number of crash/fuzz + fixes only. +- Run spec-cleaner, modernize spec. + +------------------------------------------------------------------- Fri Jan 20 16:50:14 UTC 2017 - zaitor@opensuse.org - Update to proper 1.5.0 version.
View file
fdk-aac.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package fdk-aac # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,19 +15,19 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: fdk-aac -Version: 0.1.5 -Release: 0 -License: SUSE-NonFree -Summary: A standalone library of the Fraunhofer FDK AAC code from Android -Url: https://github.com/mstorsjo/fdk-aac -Group: System/Libraries -Source0: https://github.com/mstorsjo/fdk-aac/archive/v%{version}.tar.gz -Source1: baselibs.conf -BuildRequires: gcc-c++ +Version: 0.1.6 +Release: 0 +Summary: A standalone library of the Fraunhofer FDK AAC code from Android +License: SUSE-NonFree +Group: System/Libraries +URL: https://github.com/mstorsjo/fdk-aac +Source0: https://github.com/mstorsjo/fdk-aac/archive/v%{version}.tar.gz +Source1: baselibs.conf +BuildRequires: gcc-c++ BuildRequires: libtool -BuildRequires: pkg-config -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig %description A standalone library of the Fraunhofer FDK AAC code from Android @@ -36,16 +36,19 @@ wiki.hydrogenaud.io/Fraunhofer_FDK_AAC %package -n libfdk-aac1 -Summary: A standalone library of the Fraunhofer FDK AAC code from Android -Group: System/Libraries +Summary: A standalone library of the Fraunhofer FDK AAC code from Android +Group: System/Libraries %description -n libfdk-aac1 A standalone library of the Fraunhofer FDK AAC code from Android +For further information, read: +wiki.hydrogenaud.io/Fraunhofer_FDK_AAC + %package devel -Summary: Development headers for Fraunhofer FDK AAC -Group: Development/Libraries/C and C++ -Requires: libfdk-aac1 = %{version} +Summary: Development headers for Fraunhofer FDK AAC +Group: Development/Libraries/C and C++ +Requires: libfdk-aac1 = %{version} %description devel This package provides development headers for Fraunhofer FDK AAC code @@ -58,28 +61,24 @@ sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" lib*/src/{*.cpp,version} %build -NOCONFIGURE=1 ./autogen.sh +NOCONFIGURE=1 ./autogen.sh %configure --disable-static make %{?_smp_mflags} %install -make install DESTDIR=%{buildroot} %{?_smp_mflags} +%make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n libfdk-aac1 -p /sbin/ldconfig - %postun -n libfdk-aac1 -p /sbin/ldconfig %files -n libfdk-aac1 -%defattr(-,root,root) %doc ChangeLog NOTICE -%{_libdir}/libfdk-aac.so.1 -%{_libdir}/libfdk-aac.so.1.0.0 +%{_libdir}/libfdk-aac.so.* %files devel -%defattr(-,root,root) %{_includedir}/fdk-aac %{_libdir}/libfdk-aac.so %{_libdir}/pkgconfig/fdk-aac.pc - +%changelog
View file
v0.1.5.tar.gz/Android.mk
Deleted
@@ -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)
View file
v0.1.6.tar.gz/Android.bp
Added
@@ -0,0 +1,35 @@ +cc_library_static { + name: "libFraunhoferAAC", + vendor_available: true, + 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: [ + "-Werror", + "-Wno-constant-conversion", + "-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", + ], +}
View file
v0.1.5.tar.gz/ChangeLog -> v0.1.6.tar.gz/ChangeLog
Changed
@@ -1,3 +1,7 @@ +0.1.6 + - Lots of minor assorted crash/fuzz fixes, mostly for the decoder but + also some for the encoder + 0.1.5 - Updated upstream sources - Fixed building with GCC 3.3 and 3.4
View file
v0.1.5.tar.gz/Makefile.am -> v0.1.6.tar.gz/Makefile.am
Changed
@@ -188,7 +188,8 @@ $(top_srcdir)/autogen.sh \ $(top_srcdir)/MODULE_LICENSE_FRAUNHOFER \ $(top_srcdir)/NOTICE \ - $(top_srcdir)/Android.mk \ + $(top_srcdir)/OWNERS \ + $(top_srcdir)/Android.bp \ $(top_srcdir)/fdk-aac.sym \ $(top_srcdir)/Makefile.vc \ $(top_srcdir)/documentation/*.pdf \
View file
v0.1.6.tar.gz/OWNERS
Added
@@ -0,0 +1,2 @@ +jmtrivi@google.com +gkasten@android.com
View file
v0.1.5.tar.gz/configure.ac -> v0.1.6.tar.gz/configure.ac
Changed
@@ -1,7 +1,7 @@ dnl -*- Autoconf -*- dnl Process this file with autoconf to produce a configure script. -AC_INIT([fdk-aac], [0.1.5], [http://sourceforge.net/projects/opencore-amr/]) +AC_INIT([fdk-aac], [0.1.6], [http://sourceforge.net/projects/opencore-amr/]) AC_CONFIG_AUX_DIR(.) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([tar-ustar foreign]) @@ -26,7 +26,7 @@ dnl soname version to use dnl goes by ‘current[:revision[:age]]’ with the soname ending up as dnl current.age.revision -FDK_AAC_VERSION=1:0:0 +FDK_AAC_VERSION=1:1:0 AS_IF([test x$enable_shared = xyes], [LIBS_PRIVATE=$LIBS], [LIBS_PUBLIC=$LIBS]) AC_SUBST(FDK_AAC_VERSION)
View file
v0.1.5.tar.gz/libAACdec/src/aacdecoder_lib.cpp -> v0.1.6.tar.gz/libAACdec/src/aacdecoder_lib.cpp
Changed
@@ -791,36 +791,29 @@ 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) {
View file
v0.1.5.tar.gz/libAACdec/src/block.cpp -> v0.1.6.tar.gz/libAACdec/src/block.cpp
Changed
@@ -138,7 +138,7 @@ if (i > 16) { - if (i - 16 > CACHE_BITS) { /* cannot read more than "CACHE_BITS" bits at once in the function FDKreadBits() */ + if (i >= 31) { /* (1 << i) will shift into the sign bit if i >= 31 */ return (MAX_QUANTIZED_VALUE + 1); /* returning invalid value that will be captured later */ } @@ -318,6 +318,9 @@ } sect_len += sect_len_incr; + if (sect_len <= 0) { + return AAC_DEC_PARSE_ERROR; + } top = band + sect_len;
View file
v0.1.5.tar.gz/libAACdec/src/channel.cpp -> v0.1.6.tar.gz/libAACdec/src/channel.cpp
Changed
@@ -411,11 +411,15 @@ case drmcrc_end_reg: if (pTpDec != NULL) { transportDec_CrcEndReg(pTpDec, crcReg1); + crcReg1 = -1; } break; case adtscrc_end_reg2: - if (pTpDec != NULL) { + if (crcReg1 != -1) { + error = AAC_DEC_DECODE_FRAME_ERROR; + } else if (pTpDec != NULL) { transportDec_CrcEndReg(pTpDec, crcReg2); + crcReg2 = -1; } break; case drmcrc_start_reg: @@ -447,5 +451,16 @@ } while (list->id[i] != end_of_sequence); bail: + if (crcReg1 != -1 || crcReg2 != -1) { + if (error == AAC_DEC_OK) { + error = AAC_DEC_DECODE_FRAME_ERROR; + } + if (crcReg1 != -1) { + transportDec_CrcEndReg(pTpDec, crcReg1); + } + if (crcReg2 != -1) { + transportDec_CrcEndReg(pTpDec, crcReg2); + } + } return error; }
View file
v0.1.5.tar.gz/libAACenc/src/aacenc_tns.cpp -> v0.1.6.tar.gz/libAACenc/src/aacenc_tns.cpp
Changed
@@ -388,7 +388,7 @@ switch (granuleLength) { case 1024: /* TNS start line: skip lower MDCT lines to prevent artifacts due to filter mismatch */ - tC->lpcStartBand[LOFILT] = (blockType == SHORT_WINDOW) ? 0 : ((sampleRate < 18783) ? 4 : 8); + tC->lpcStartBand[LOFILT] = (blockType == SHORT_WINDOW) ? 0 : ((sampleRate <= 8000) ? 2 : ((sampleRate < 18783) ? 4 : 8)); tC->lpcStartLine[LOFILT] = pC->sfbOffset[tC->lpcStartBand[LOFILT]]; i = tC->lpcStopBand; @@ -1147,6 +1147,9 @@ workBuffer++; } + if (input[0] == 0) + input[0] = 1; + tmp = fMult((FIXP_DBL)((LONG)TNS_PREDGAIN_SCALE<<21), fDivNorm(fAbs(autoCorr_0), fAbs(input[0]), &scale)); if ( fMultDiv2(autoCorr_0, input[0])<FL2FXCONST_DBL(0.0f) ) { tmp = -tmp;
View file
v0.1.5.tar.gz/libAACenc/src/adj_thr.cpp -> v0.1.6.tar.gz/libAACenc/src/adj_thr.cpp
Changed
@@ -958,7 +958,7 @@ CalcInvLdData( (((CalcLdData(frameFormFactor)>>1) - (CalcLdData(frameEnergy)>>(2+1))) - (fMultDiv2(FL2FXCONST_DBL(0.75f),CalcLdData((FIXP_DBL)frameNLines<<(DFRACT_BITS-1-SCALE_NLINES))) - - (((FIXP_DBL)(SCALE_FORM_FAC-SCALE_NRGS_SQRT4+FORM_FAC_SHIFT-(SCALE_NLINES_P34))<<(DFRACT_BITS-1-LD_DATA_SHIFT))>>1)) + (((FIXP_DBL)(-((-SCALE_FORM_FAC+SCALE_NRGS_SQRT4-FORM_FAC_SHIFT+SCALE_NLINES_P34) << (DFRACT_BITS-1-LD_DATA_SHIFT))))>>1)) )<<1 ); } else {
View file
v0.1.5.tar.gz/libAACenc/src/metadata_main.cpp -> v0.1.6.tar.gz/libAACenc/src/metadata_main.cpp
Changed
@@ -488,14 +488,12 @@ { 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 @@ } /* 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,
View file
v0.1.5.tar.gz/libAACenc/src/sf_estim.cpp -> v0.1.6.tar.gz/libAACenc/src/sf_estim.cpp
Changed
@@ -533,6 +533,7 @@ (scfAct > scfMin) && (scfAct <= scfMin+MAX_SCF_DELTA) && (scfAct >= scfMax-MAX_SCF_DELTA) && + (scfAct <= fixMin(scfMin,fixMin(*scfLast, *scfNext))+MAX_SCF_DELTA) && (*scfLast != prevScfLast[sfbAct] || *scfNext != prevScfNext[sfbAct] || deltaPe < deltaPeLast[sfbAct])) {
View file
v0.1.5.tar.gz/libFDK/include/FDK_bitstream.h -> v0.1.6.tar.gz/libFDK/include/FDK_bitstream.h
Changed
@@ -212,9 +212,28 @@ INT missingBits = numberOfBits - hBitStream->BitsInCache; if (missingBits > 0) { - UINT bits = hBitStream->CacheWord << missingBits; - hBitStream->CacheWord = FDK_get32 (&hBitStream->hBitBuf) ; - hBitStream->BitsInCache = CACHE_BITS - missingBits; + const UINT bits = hBitStream->CacheWord << missingBits; + const UINT validBits = FDK_getValidBits (&hBitStream->hBitBuf); + + if (validBits >= 32) + { + hBitStream->CacheWord = FDK_get32 (&hBitStream->hBitBuf) ; + hBitStream->BitsInCache = CACHE_BITS - missingBits; + } + else + { + hBitStream->CacheWord = FDK_get (&hBitStream->hBitBuf,validBits) ; + if (validBits >= missingBits) + { + hBitStream->BitsInCache = validBits - missingBits; + } + else + { + hBitStream->BitsInCache = 0; + hBitStream->CacheWord <<= missingBits - validBits; + } + } + return ( bits | (hBitStream->CacheWord >> hBitStream->BitsInCache)) & BitMask[numberOfBits]; } @@ -226,10 +245,18 @@ if (hBitStream->BitsInCache <= numberOfBits) { - const INT freeBits = (CACHE_BITS-1) - hBitStream->BitsInCache ; - - hBitStream->CacheWord = (hBitStream->CacheWord << freeBits) | FDK_get (&hBitStream->hBitBuf,freeBits) ; - hBitStream->BitsInCache += freeBits ; + const INT validBits = FDK_getValidBits (&hBitStream->hBitBuf) ; + const INT freeBits = (CACHE_BITS-1) - hBitStream->BitsInCache ; + const INT bitsToRead = (freeBits <= validBits) ? freeBits : validBits ; + + hBitStream->CacheWord = (hBitStream->CacheWord << bitsToRead) | FDK_get (&hBitStream->hBitBuf,bitsToRead) ; + hBitStream->BitsInCache += bitsToRead ; + if (hBitStream->BitsInCache < numberOfBits) + { + hBitStream->CacheWord <<= numberOfBits - hBitStream->BitsInCache; + hBitStream->BitsInCache = 0; + return (hBitStream->CacheWord >> hBitStream->BitsInCache) & validMask ; + } } hBitStream->BitsInCache -= numberOfBits ; @@ -243,8 +270,22 @@ #ifdef OPTIMIZE_FDKREADBITS if (!hBitStream->BitsInCache) { - hBitStream->CacheWord = FDK_get32 (&hBitStream->hBitBuf); - hBitStream->BitsInCache = CACHE_BITS; + const UINT validBits = FDK_getValidBits (&hBitStream->hBitBuf); + + if (validBits >= 32) + { + hBitStream->CacheWord = FDK_get32 (&hBitStream->hBitBuf); + hBitStream->BitsInCache = CACHE_BITS; + } + else if (validBits > 0) + { + hBitStream->CacheWord = FDK_get (&hBitStream->hBitBuf,validBits); + hBitStream->BitsInCache = validBits; + } + else + { + return 0; + } } hBitStream->BitsInCache--; @@ -268,10 +309,12 @@ UINT BitsInCache = hBitStream->BitsInCache; if (BitsInCache < 2) /* Comparison changed from 'less-equal' to 'less' */ { - const INT freeBits = (CACHE_BITS-1) - BitsInCache ; + const INT validBits = FDK_getValidBits (&hBitStream->hBitBuf) ; + const INT freeBits = (CACHE_BITS-1) - BitsInCache ; + const INT bitsToRead = (freeBits <= validBits) ? freeBits : validBits ; - hBitStream->CacheWord = (hBitStream->CacheWord << freeBits) | FDK_get (&hBitStream->hBitBuf,freeBits) ; - BitsInCache += freeBits; + hBitStream->CacheWord = (hBitStream->CacheWord << bitsToRead) | FDK_get (&hBitStream->hBitBuf,bitsToRead) ; + BitsInCache += bitsToRead; } hBitStream->BitsInCache = BitsInCache - 2; return (hBitStream->CacheWord >> hBitStream->BitsInCache) & 0x3;
View file
v0.1.5.tar.gz/libFDK/src/FDK_bitbuffer.cpp -> v0.1.6.tar.gz/libFDK/src/FDK_bitbuffer.cpp
Changed
@@ -157,6 +157,8 @@ INT FDK_get (HANDLE_FDK_BITBUF hBitBuf, const UINT numberOfBits) { + if (numberOfBits == 0 || numberOfBits > hBitBuf->ValidBits) return 0; + UINT byteOffset = hBitBuf->BitNdx >> 3 ; UINT bitOffset = hBitBuf->BitNdx & 0x07 ; @@ -166,22 +168,20 @@ UINT byteMask = hBitBuf->bufSize - 1 ; - UINT tx = (hBitBuf->Buffer [ byteOffset & byteMask] << 24) | - (hBitBuf->Buffer [(byteOffset+1) & byteMask] << 16) | - (hBitBuf->Buffer [(byteOffset+2) & byteMask] << 8) | - hBitBuf->Buffer [(byteOffset+3) & byteMask]; + UINT tx = hBitBuf->Buffer [ byteOffset & byteMask] << 24 << bitOffset; - if (bitOffset) - { - tx <<= bitOffset; - tx |= hBitBuf->Buffer [(byteOffset+4) & byteMask] >> (8-bitOffset); - } + if (numberOfBits + bitOffset > 8) tx |= hBitBuf->Buffer [(byteOffset+1) & byteMask] << 16 << bitOffset; + if (numberOfBits + bitOffset > 16) tx |= hBitBuf->Buffer [(byteOffset+2) & byteMask] << 8 << bitOffset; + if (numberOfBits + bitOffset > 24) tx |= hBitBuf->Buffer [(byteOffset+3) & byteMask] << bitOffset; + if (numberOfBits + bitOffset > 32) tx |= hBitBuf->Buffer [(byteOffset+4) & byteMask] >> (8 - bitOffset); return (tx >> (32 - numberOfBits)) ; } INT FDK_get32 (HANDLE_FDK_BITBUF hBitBuf) { + if (hBitBuf->ValidBits < 32) return 0; + UINT BitNdx = hBitBuf->BitNdx + 32; if (BitNdx <= hBitBuf->bufBits) {
View file
v0.1.5.tar.gz/libFDK/src/qmf.cpp -> v0.1.6.tar.gz/libFDK/src/qmf.cpp
Changed
@@ -791,6 +791,10 @@ scaleValues(&tImag[0+synQmf->lsb], &qmfImag[0+synQmf->lsb], synQmf->usb-synQmf->lsb, scaleFactorHighBand); } + if (synQmf->usb > synQmf->no_channels) { + return; + } + FDKmemclear(&tReal[synQmf->usb], (synQmf->no_channels-synQmf->usb)*sizeof(FIXP_QMF)); FDKmemclear(&tImag[synQmf->usb], (synQmf->no_channels-synQmf->usb)*sizeof(FIXP_QMF));
View file
v0.1.5.tar.gz/libMpegTPDec/src/tpdec_adts.cpp -> v0.1.6.tar.gz/libMpegTPDec/src/tpdec_adts.cpp
Changed
@@ -185,6 +185,9 @@ #endif valBits = FDKgetValidBits(hBs); + if (valBits < ADTS_HEADERLENGTH) { + return TRANSPORTDEC_NOT_ENOUGH_BITS; + } /* adts_fixed_header */ bs.mpeg_id = FDKreadBits(hBs, Adts_Length_Id);
View file
v0.1.5.tar.gz/libMpegTPDec/src/tpdec_asc.cpp -> v0.1.6.tar.gz/libMpegTPDec/src/tpdec_asc.cpp
Changed
@@ -650,6 +650,8 @@ /* search in front channels */ for (i = 0; i < pPce->NumFrontChannelElements; i++) { int heightLayer = pPce->FrontElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; if (isCpe == pPce->FrontElementIsCpe[i] && pPce->FrontElementTagSelect[i] == tag) { int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer]; AUDIO_CHANNEL_TYPE aChType = (AUDIO_CHANNEL_TYPE)((heightLayer<<4) | ACT_FRONT); @@ -704,6 +706,8 @@ /* search in side channels */ for (i = 0; i < pPce->NumSideChannelElements; i++) { int heightLayer = pPce->SideElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; if (isCpe == pPce->SideElementIsCpe[i] && pPce->SideElementTagSelect[i] == tag) { int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer]; AUDIO_CHANNEL_TYPE aChType = (AUDIO_CHANNEL_TYPE)((heightLayer<<4) | ACT_SIDE); @@ -758,6 +762,8 @@ /* search in back channels */ for (i = 0; i < pPce->NumBackChannelElements; i++) { int heightLayer = pPce->BackElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; if (isCpe == pPce->BackElementIsCpe[i] && pPce->BackElementTagSelect[i] == tag) { int h, elIdx = ec[heightLayer], chIdx = cc[heightLayer]; AUDIO_CHANNEL_TYPE aChType = (AUDIO_CHANNEL_TYPE)((heightLayer<<4) | ACT_BACK); @@ -817,18 +823,24 @@ Start with counting the front channels/elements at normal height */ for (i = 0; i < pPce->NumFrontChannelElements; i+=1) { int heightLayer = pPce->FrontElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; ec[heightLayer] += 1; cc[heightLayer] += (pPce->FrontElementIsCpe[i]) ? 2 : 1; } /* Count side channels/elements at normal height */ for (i = 0; i < pPce->NumSideChannelElements; i+=1) { int heightLayer = pPce->SideElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; ec[heightLayer] += 1; cc[heightLayer] += (pPce->SideElementIsCpe[i]) ? 2 : 1; } /* Count back channels/elements at normal height */ for (i = 0; i < pPce->NumBackChannelElements; i+=1) { int heightLayer = pPce->BackElementHeightInfo[i]; + if (heightLayer >= PC_NUM_HEIGHT_LAYER) + return 0; ec[heightLayer] += 1; cc[heightLayer] += (pPce->BackElementIsCpe[i]) ? 2 : 1; }
View file
v0.1.5.tar.gz/libMpegTPDec/src/tpdec_lib.cpp -> v0.1.6.tar.gz/libMpegTPDec/src/tpdec_lib.cpp
Changed
@@ -342,7 +342,7 @@ } } else { /* ... else feed bitbuffer with new stream data (append). */ - if (hTp->numberOfRawDataBlocks <= 0) { + if ((hTp->numberOfRawDataBlocks <= 0) || (FDKgetValidBits(hBs)==0)) { FDKfeedBuffer (hBs, pBuffer, bufferSize, pBytesValid) ; } }
View file
v0.1.5.tar.gz/libSBRdec/src/psbitdec.cpp -> v0.1.6.tar.gz/libSBRdec/src/psbitdec.cpp
Changed
@@ -498,7 +498,7 @@ h_ps_d->bPsDataAvail[h_ps_d->bsReadSlot] = ppt_none; /* discard all remaining bits */ nBitsLeft -= startbits - FDKgetValidBits(hBitBuf); - while (nBitsLeft) { + while (nBitsLeft > 0) { int i = nBitsLeft; if (i>8) { i = 8;
View file
v0.1.5.tar.gz/libSBRdec/src/psdec.cpp -> v0.1.6.tar.gz/libSBRdec/src/psdec.cpp
Changed
@@ -938,13 +938,13 @@ INT group = 0; INT bin = 0; - INT noIidSteps; + INT noIidSteps, noFactors; /* const UCHAR *pQuantizedIIDs;*/ FIXP_SGL invL; FIXP_DBL ScaleL, ScaleR; - FIXP_DBL Alpha, Beta; + FIXP_DBL Alpha, Beta, AlphasValue; FIXP_DBL h11r, h12r, h21r, h22r; const FIXP_DBL *PScaleFactors; @@ -984,6 +984,7 @@ { PScaleFactors = ScaleFactorsFine; /* values are shiftet right by one */ noIidSteps = NO_IID_STEPS_FINE; + noFactors = NO_IID_LEVELS_FINE; /*pQuantizedIIDs = quantizedIIDsFine;*/ } @@ -991,6 +992,7 @@ { PScaleFactors = ScaleFactors; /* values are shiftet right by one */ noIidSteps = NO_IID_STEPS; + noFactors = NO_IID_LEVELS; /*pQuantizedIIDs = quantizedIIDs;*/ } @@ -1012,11 +1014,17 @@ /* ScaleR and ScaleL are scaled by 1 shift right */ - ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin]]; - ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin]]; - - Beta = fMult (fMult( Alphas[h_ps_d->specificTo.mpeg.coef.aaIccIndexMapped[env][bin]], ( ScaleR - ScaleL )), FIXP_SQRT05); - Alpha = Alphas[h_ps_d->specificTo.mpeg.coef.aaIccIndexMapped[env][bin]]>>1; + ScaleL = ScaleR = 0; + if (noIidSteps + h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin] >= 0 && noIidSteps + h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin] < noFactors) + ScaleR = PScaleFactors[noIidSteps + h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin]]; + if (noIidSteps - h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin] >= 0 && noIidSteps - h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin] < noFactors) + ScaleL = PScaleFactors[noIidSteps - h_ps_d->specificTo.mpeg.coef.aaIidIndexMapped[env][bin]]; + + AlphasValue = 0; + if (h_ps_d->specificTo.mpeg.coef.aaIccIndexMapped[env][bin] >= 0) + AlphasValue = Alphas[h_ps_d->specificTo.mpeg.coef.aaIccIndexMapped[env][bin]]; + Beta = fMult (fMult( AlphasValue, ( ScaleR - ScaleL )), FIXP_SQRT05); + Alpha = AlphasValue>>1; /* Alpha and Beta are now both scaled by 2 shifts right */
View file
v0.1.5.tar.gz/libSBRdec/src/sbr_dec.cpp -> v0.1.6.tar.gz/libSBRdec/src/sbr_dec.cpp
Changed
@@ -940,6 +940,10 @@ FIXP_DBL **OverlapBufferReal = hSbrDec->QmfBufferReal; FIXP_DBL **OverlapBufferImag = hSbrDec->QmfBufferImag; + if (!hSbrDec->LppTrans.pSettings) { + return SBRDEC_NOT_INITIALIZED; + } + /* assign qmf time slots */ assignTimeSlots( hSbrDec, hHeaderData->numberTimeSlots * hHeaderData->timeStep, useLP);
View file
v0.1.5.tar.gz/libSBRdec/src/sbrdecoder.cpp -> v0.1.6.tar.gz/libSBRdec/src/sbrdecoder.cpp
Changed
@@ -1444,6 +1444,13 @@ self->flags |= (applyPs) ? SBRDEC_PS_DECODED : 0; } + if (channelMapping[0] == 255 || ((*numOutChannels == 2) && channelMapping[1] == 255)) + return SBRDEC_UNSUPPORTED_CONFIG; + if (!pSbrChannel[0]->SbrDec.LppTrans.pSettings) + return SBRDEC_UNSUPPORTED_CONFIG; + if (stereo && !pSbrChannel[1]->SbrDec.LppTrans.pSettings) + return SBRDEC_UNSUPPORTED_CONFIG; + /* Set strides for reading and writing */ if (interleaved) { strideIn = numInChannels;
View file
v0.1.5.tar.gz/libSBRenc/src/tran_det.cpp -> v0.1.6.tar.gz/libSBRenc/src/tran_det.cpp
Changed
@@ -187,12 +187,12 @@ /* Sum up energies in first half */ for (i=start; i<border; i++) { - accu1 += scaleValue(Energies[i][j], -energies_e_diff[i]); + accu1 = fAddSaturate(accu1, scaleValue(Energies[i][j], -energies_e_diff[i])); } /* Sum up energies in second half */ for (i=border; i<stop; i++) { - accu2 += scaleValue(Energies[i][j], -energies_e_diff[i]); + accu2 = fAddSaturate(accu2, scaleValue(Energies[i][j], -energies_e_diff[i])); } /* Energy change in current band */
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.