[SCM] opencore-amr packaging branch, master, updated. upstream/0.1.2-10-g7bf1e45

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Fri Sep 18 20:49:06 UTC 2009


The following commit has been merged in the master branch:
commit 6dbf01353ad26acc2ce81423863f3edf497221c3
Author: Martin Storsjo <martin at martin.st>
Date:   Tue Sep 1 12:27:43 2009 +0300

    Updated the opencore subdirectory to a new upstream version
    
    This is a unmodified copy of git version
    5e4737a8d023ad6503ed2b028f9b554cd306644a in the opencore
    upstream repo.
    
    This corresponds to the OpenCORE 2.05 release, plus a handful
    of extra commits on top of that.

diff --git a/opencore/ChangeLog b/opencore/ChangeLog
index ef3588c..d7f4819 100644
--- a/opencore/ChangeLog
+++ b/opencore/ChangeLog
@@ -1,5 +1,190 @@
 ===============================================================================
-2009-05-10  OpenCORE 2.04
+2009-08-06  OpenCORE 2.05
+
+New Features
+- Helper function to retrieve extended messages from command responses.
+
+- Support for eAAC+ encode in the pvAuthor engine.
+
+- Add conversion operations to OSCL_String classes.
+
+- RTSPT support (3GPP streaming over TCP). To test, replace "rtsp" with "rtspt"
+in the control URL (in source URL or SDP file). It is assumed that the user has
+access to a server with TCP streaming capability.
+
+- PV Metadata Engine (ME). This engine is targeted at applications that want
+to retrieve metadata for any given clip in a generic manner. Typically, a lot
+of these applications would like to scan large batches of content. Since ME 
+is mainly targeted at apps like mediascanner, where speed is the most important
+factor, thumbnail extraction is not supported. For applications that do want 
+to extract thumbnails in a generic manner along with the metadata, PV's 
+FrameAndMetadata Utility (FMU) is recommended instead.
+
+- 2way Lip-Sync unit test cases.
+
+
+Improvement
+- A new base node implementation is introduced for the purpose of 
+  refactoring and consolidating common logic in the nodes. The changes
+  will improve maintainability and make it easier to create new nodes.
+  Further documentation will be released in the future providing guidelines
+  for authoring nodes.
+- The following existing nodes were refactored to utilize the base node 
+  implementation mentioned above: AAC, AMR, and WAV parser nodes.
+- Replace CodecSpecifier with PVMFFormatType.
+- Move EventHandlerProcessing method to PVMFOMXBaseDecNode class.
+- Change method type from "protected" to "private" in OMX derived classes
+(videodec node and audiodec node).
+- Adding robustness to avcdecoder to verify PPS and SPS parameters.
+- Display status of every test case after it finishes in 2way unit test app.
+- Add support to H.245 version 10.
+- OMX node - Implement interleaved NAL sizes (to replace NAL start codes) in 
+omx buffers carrying AVC frames.
+- AMR-WB contributions to enable building in "C":
+https://review.source.android.com/10014 
+https://review.source.android.com/10015
+https://review.source.android.com/10016 
+https://review.source.android.com/10017 
+https://review.source.android.com/10018 
+- AMR-NB contributions to enable building in "C":
+https://review.source.android.com/10297 
+https://review.source.android.com/10301 
+https://review.source.android.com/10302 
+https://review.source.android.com/10303 
+- Update OsclFileStats to track total time taken instead of only the 
+maximum time per operation.
+- Rename OMX master core methods to avoid linking conflicts.
+- Pass key MOUT_VIDEO_SUBFORMAT_KEY to the video MIO of FMU.
+- Remove Direct Render Mode from mp4 composer library. 
+- AMR-NB and AMR-WB inline assembly is being re-enabled after a bug
+in the QEMU assembly translation has been fixed.
+- Modification of MIOs to take all configuration parameters at once.
+- Move OMX input and output buffer ctrl structure away from data buffers.
+- Enable byte-stream (H264-RAW) format decoding in OMX dec node.
+- PVMFInfoTrackDisable information event should be report to java application.
+- Retrieve the PLATFORM version at run time for the Android UserAgent string.
+- OMX audio and video dec nodes need to be able to handle PortSettingsChanged
+event with argument OMX_ALL.
+- PVMFMediaClock latency handling improvement.
+- AAC decoder creates artifacts when decoding clip.
+- Modify MP4 composer node to do sample adds to mp4 composer lib in a separate
+thread.
+- Add support for VIDEO_ENCODER_H264 in authordriver.
+- Author major brand "3gp5" if 3gp clip has TIMED-TEXT track.
+- No interleaving of mp4 files for just one track.
+https://review.source.android.com/10510 
+- Return non-zero code when we detect a memory leak during unit tests.
+- Add "3g2a", "3g2b" and "3g2c" as compatible branch in all content authored
+by PvAuthor SDK.
+- Add support for OMX_COLOR_FormatYCbYCr.
+- Remove unneeded libraries being linked against individual shared libraries.
+- Exclude empty directories and unncessary build files from OpenCORE.
+- In OMX base node, turn the InputBufCtrlStruct from a struct into a class
+- Updates to pvmf_return_codes.pdf, pvplayer_developers_guide.pdf,
+omx_decoder_test_app_guide.pdf, and omx_encoder_test_app_guide.pdf.
+
+Bugs Fixed
+- Repositioning takes a long time for YouTube videos after a few
+repositions.
+- Crash in CPVH223Multiplex::Stop().
+- PlayerEngine cannot finish a playback session after repeated pause
+and resume near EndOfStream.
+- Allow file path to be passed to the pvPlayer SDK on Android.
+- Add a new constructor for the AVCSampleEntry to be used when parsing the 
+encv atom
+https://review.source.android.com/9683
+- MP3 DurationCalcAO logic needs to moved to a place during Prepare and not 
+Init.
+- Change PV_GET_ROW definition in M4V decoder. 
+- Player Engine unit test TC 55 and 56 has memory leaks
+- Crash in authordriver if InitializeForThread fails.
+- Crash in playerdriver if InitializeForThread fails.
+- Potential memory leak in OMX encoder node.
+- Memory leaks in AAC file parser node & lib
+- FindFirst returns wrong element type when find a directory in android
+- Intermittent timeouts on 2way unit tests
+- Incorrect DeBlocking logic
+- AVC Clip Specific Issue: (Play till EOS) OR (Reposition to near EOS) The 
+video gets stuck at near EOS 
+- iTunes genre is not parsed correctly
+- Youtube : AV sync is lost after a seek when playing youtube contents
+- Crash after recording one minute of Video when duration is specified
+- Tracknumber metadata key string should be consistent through out all nodes
+- Possible race condition in singleton lock in omx_init 
+- CPV2WayDatapath::GetPortFormatType() selects least preferred type 
+- AAC OMX decoder component needs to process whole audio config buffer
+- Modify MP3Parser to make seek to 0 a special case and do not use XING header
+for calculating file offset
+- AAC Decoder should not try decode any AAC+ clip whose final sampling freq 
+is > 48 KHz. Should default to AAC in these cases.
+- Update OMX encoder node to calculate the correct output buffer size in case
+the encoder has multiple roles.
+- OMX Encoder MPEG4 unit test fix
+- Setting AMR_NB bitrate to GSM_AMR_4_75 will fail prepare. 
+- AuthorEngine should return Success incase Stop is called in
+PVAE_STATE_INITIALIZED state.
+- OMX M4V encoding drops the first I-frame
+- VIDEO_INTERLEAVE_BUFFER_SIZE is too short for some buffers when encoding 
+D1 resolutions 
+- Occasional audio glitch in MP3 parser during repositioning
+- OMX tests for AMR give seg fault on android
+- pvPlayer sends incorrect HTTP Range header
+http://code.google.com/p/android/issues/detail?id=3031
+- PDL/PS - Fix the Mp4 Parser node to pass the correct timestamp to PE node 
+in RequestResumeNotification during Underflow condition 
+- H.245 TerminalCapabilitySet (TCS) and MasterSlaveDetermination (MSD) 
+requests must be sent before any other H.245 messages. 
+- Logic to set iKeepDroppingMsgsUntilMarkerBit to false in AMR RTSP streaming 
+- 2way tests hanging when run in Android emulator
+- Sound Recorder: Incorrect Duration of clip sometimes observed when sdcard is
+full
+- Memory leak in PV2WayMIO
+- Playerengine needs to be updated to return success even if there are no keys
+for GetMetadataValue
+- Correct the Android RTSP UserAgent string
+- Author Engine : Don't access the queue element without checking its queue
+size
+- If SSRC is not provided in setup response, then pvplayer cleint doesn't send
+firewall packets to the server
+- GetMetadataValues returns invalid number of entries
+- Modify AUT to parse authored files and validate the files as much as possible
+- Eliminate media layer node in case of RTSP streaming
+- AAC timestamps provided to OMX component may be wrong
+- Clean up warnings and some negotiate parameter changes from omx dec & enc
+test apps
+- Fix valgrind issue reported with android simulator in omx base node
+- Add more supported rate control types in pvmp4h263encextension.h
+- Memory leak in player engine test case 807
+- Addressed compiler warnings in PVME
+- nBufferAlignment of OMX_PARAM_PORTDEFINITIONTYPE is initialized to negative
+value when playing clip on android using qcom decoders
+- MP3 parser crash
+- pvplayer_engine_test is detecting 'rtspt_test.sdp' as a url instead a local
+file
+- Count of command line arguments being read in PVME Test App is incorrect
+- Player engine test case 1307 fails when run with a mp4 file containing 3GPP timed text track 
+- PVMFInfoDataReady event being sent to the engine after the unit test calls
+stop
+- PlayerEngine doesn't free reference to PVMFDataSourceNodeRegistryInitInterface
+- Combine the AMR if statement in pv_omxmastercore.cpp
+- Player Engine unit test case 154 fails on execution 
+- Author Engine unit test cases 101-105 fail
+- Add new return code PVMFErrContentInvalidForProgressivePlayback for a
+NOT_PROGRESSIVE_STREAMABLE content 
+- Add USE (AL2, AL3) to 2way test files
+- H223 2way test not being run 
+- Avoid calling CCYUV422toYUV420::New() for each thumbnail
+- Author engine unit test case 101 fails
+- Ignore encoding flaw, which generates aspec_ratio of value 0 in file
+codecs_v2\video\m4v_h263\dec\src
+- Memory leaks in pvmf_mio_fileinput.cpp and performance improvement in mp4
+composer node
+- Do not cancel Init() immediately in case of 3gpp streaming 
+- Transferring MP3 with invalid ID2 tags crashes mediaScanner
+
+
+===============================================================================
+2009-05-17  OpenCORE 2.04
 
 New Features
 - Create external download datastream An external download datastream is
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk
index 9d586d8..550e5fe 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/Android.mk
@@ -56,7 +56,7 @@ LOCAL_SRC_FILES := \
 
 LOCAL_MODULE := libpv_amr_nb_common_lib
 
-LOCAL_CFLAGS :=  $(PV_CFLAGS)
+LOCAL_CFLAGS :=   $(PV_CFLAGS)
 
 LOCAL_ARM_MODE := arm
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build/make/local.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build/make/local.mk
index b628b43..92b3f5e 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build/make/local.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/build/make/local.mk
@@ -6,7 +6,6 @@ include $(MK)/clear.mk
 
 TARGET := pv_amr_nb_common_lib
 
-XCXXFLAGS := $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 OPTIMIZE_FOR_PERFORMANCE_OVER_SIZE := true
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/az_lsp.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/az_lsp.h
index 798340a..cd2e91f 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/az_lsp.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/az_lsp.h
@@ -45,7 +45,7 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
+#include  "typedef.h"
 
 /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h
index 33cd704..d38f953 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op.h
@@ -52,7 +52,7 @@ terms listed above has been obtained from the copyright holder.
 #if defined(PV_ARM_V5)
 #include "basic_op_arm_v5.h"
 
-#elif defined(xxPV_ARM_GCC_V5) // @TODO: Enable gcc-arm assembly
+#elif defined(PV_ARM_GCC_V5)
 #include "basic_op_arm_gcc_v5.h"
 
 #else
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h
deleted file mode 100644
index 23fd18d..0000000
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_arm_v5.h
+++ /dev/null
@@ -1,434 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 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.
- * -------------------------------------------------------------------
- */
-/****************************************************************************************
-Portions of this file are derived from the following 3GPP standard:
-
-    3GPP TS 26.073
-    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
-    Available from http://www.3gpp.org
-
-(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
-Permission to distribute, modify and use this file under the standard license
-terms listed above has been obtained from the copyright holder.
-****************************************************************************************/
-/*
- Filename: basic_op_arm_v5.h
-
-------------------------------------------------------------------------------
- INCLUDE DESCRIPTION
-
- This file includes all the ARM-V5 based basicop.c functions.
-
-------------------------------------------------------------------------------
-*/
-
-/*----------------------------------------------------------------------------
-; CONTINUE ONLY IF NOT ALREADY DEFINED
-----------------------------------------------------------------------------*/
-#ifndef BASIC_OP_ARM_V5_H
-#define BASIC_OP_ARM_V5_H
-
-/*----------------------------------------------------------------------------
-; INCLUDES
-----------------------------------------------------------------------------*/
-#include    "basicop_malloc.h"
-
-/*--------------------------------------------------------------------------*/
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-    /*----------------------------------------------------------------------------
-    ; 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
-    ----------------------------------------------------------------------------*/
-
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: L_add
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var1 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
-
-        L_var2 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit add operation resulted in overflow
-
-     Returns:
-        L_sum = 32-bit sum of L_var1 and L_var2 (Word32)
-    */
-
-    __inline Word32 L_add(register Word32 L_var1, register Word32 L_var2, Flag *pOverflow)
-    {
-        Word32 result;
-
-        OSCL_UNUSED_ARG(pOverflow);
-        __asm
-        {
-            QADD result, L_var1, L_var2
-        }
-        return(result);
-    }
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: L_sub
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var1 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
-
-        L_var2 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var1 <= 0x7fff ffff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit add operation resulted in overflow
-
-     Returns:
-        L_diff = 32-bit difference of L_var1 and L_var2 (Word32)
-    */
-    __inline Word32 L_sub(Word32 L_var1, Word32 L_var2, Flag *pOverflow)
-    {
-        Word32 result;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm
-        {
-            QSUB result, L_var1, L_var2
-        }
-
-        return(result);
-
-    }
-
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: L_mac
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var3 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
-        var1 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
-        var2 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit add operation resulted in overflow
-
-     Returns:
-        result = 32-bit result of L_var3 + (var1 * var2)(Word32)
-    */
-    __inline Word32 L_mac(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
-    {
-        Word32 result;
-        Word32 L_sum;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm {SMULBB result, var1, var2}
-        __asm {QDADD L_sum, L_var3, result}
-        return (L_sum);
-    }
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: L_mult
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var1 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
-
-        L_var2 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit add operation resulted in overflow
-
-     Returns:
-        L_product = 32-bit product of L_var1 and L_var2 (Word32)
-    */
-    __inline Word32 L_mult(Word16 var1, Word16 var2, Flag *pOverflow)
-    {
-        Word32 result;
-        Word32 product;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm
-        {
-            SMULBB product, var1, var2
-            QADD   result, product, product
-        }
-
-        return (result);
-    }
-
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: L_msu
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var3 = 32 bit long signed integer (Word32) whose value falls
-                 in the range : 0x8000 0000 <= L_var3 <= 0x7fff ffff.
-
-        var1 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
-        var2 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit operation resulted in overflow
-
-     Returns:
-        result = 32-bit result of L_var3 - (var1 * var2)
-    */
-    __inline Word32 L_msu(Word32 L_var3, Word16 var1, Word16 var2, Flag *pOverflow)
-    {
-        Word32 product;
-        Word32 result;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm
-        {
-            SMULBB product, var1, var2
-            QDSUB  result, L_var3, product
-        }
-
-        return (result);
-    }
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: Mpy_32
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var1_hi = most significant word of first input (Word16).
-        L_var1_lo = least significant word of first input (Word16).
-        L_var2_hi = most significant word of second input (Word16).
-        L_var2_lo = least significant word of second input (Word16).
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit multiply operation resulted in overflow
-
-     Returns:
-        L_product = 32-bit product of L_var1 and L_var2 (Word32)
-    */
-    __inline Word32 Mpy_32(Word16 L_var1_hi, Word16 L_var1_lo, Word16 L_var2_hi,
-                           Word16 L_var2_lo, Flag   *pOverflow)
-
-    {
-
-        Word32 L_product;
-        Word32 L_sum;
-        Word32 product32;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm
-        {
-            SMULBB L_product, L_var1_hi, L_var2_hi
-            QDADD L_product, 0, L_product
-            SMULBB product32, L_var1_hi, L_var2_lo
-        }
-        product32 >>= 15;
-        __asm
-        {
-            QDADD L_sum, L_product, product32
-        }
-        L_product = L_sum;
-        __asm
-        {
-            SMULBB product32, L_var1_lo, L_var2_hi
-        }
-        product32 >>= 15;
-        __asm
-        {
-            QDADD L_sum, L_product, product32
-        }
-        return (L_sum);
-    }
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: Mpy_32_16
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        L_var1_hi = most significant 16 bits of 32-bit input (Word16).
-        L_var1_lo = least significant 16 bits of 32-bit input (Word16).
-        var2  = 16-bit signed integer (Word16).
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the 32 bit product operation resulted in overflow
-
-     Returns:
-        product = 32-bit product of the 32-bit L_var1 and 16-bit var1 (Word32)
-    */
-    __inline Word32 Mpy_32_16(Word16 L_var1_hi,
-                              Word16 L_var1_lo,
-                              Word16 var2,
-                              Flag *pOverflow)
-    {
-
-        Word32 L_product;
-        Word32 L_sum;
-        Word32 result;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm {SMULBB L_product, L_var1_hi, var2}
-        __asm {QDADD L_product, 0, L_product}
-        __asm {SMULBB result, L_var1_lo, var2}
-        result >>= 15;
-        __asm {QDADD L_sum, L_product, result}
-        return (L_sum);
-    }
-
-    /*
-    ------------------------------------------------------------------------------
-     FUNCTION NAME: mult
-    ------------------------------------------------------------------------------
-     INPUT AND OUTPUT DEFINITIONS
-
-     Inputs:
-        var1 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var1 <= 0x0000 7fff.
-
-        var2 = 16 bit short signed integer (Word16) whose value falls in
-               the range : 0xffff 8000 <= var2 <= 0x0000 7fff.
-
-        pOverflow = pointer to overflow (Flag)
-
-     Outputs:
-        pOverflow -> 1 if the add operation resulted in overflow
-
-     Returns:
-        product = 16-bit limited product of var1 and var2 (Word16)
-    */
-    __inline Word16 mult(Word16 var1, Word16 var2, Flag *pOverflow)
-    {
-        Word32 product;
-
-        OSCL_UNUSED_ARG(pOverflow);
-
-        __asm
-        {
-            SMULBB product, var1, var2
-            MOV    product, product, ASR #15
-            CMP    product, 0x7FFF
-            MOVGE  product, 0x7FFF
-        }
-
-        return ((Word16) product);
-    }
-
-    __inline Word32 amrnb_fxp_mac_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
-    {
-        Word32 result;
-        __asm
-        {
-            smlabb result, L_var1, L_var2, L_var3
-        }
-        return result;
-    }
-
-    __inline Word32 amrnb_fxp_msu_16_by_16bb(Word32 L_var1, Word32 L_var2, Word32 L_var3)
-    {
-        Word32 result;
-        __asm
-        {
-            rsb L_var1, L_var1, #0
-            smlabb result, L_var1, L_var2, L_var3
-        }
-        return result;
-    }
-
-
-    /*----------------------------------------------------------------------------
-    ; END
-    ----------------------------------------------------------------------------*/
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* BASIC_OP_ARM_V5_H */
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_c_equivalent.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_c_equivalent.h
index fe49cd3..eb91049 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_c_equivalent.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/basic_op_c_equivalent.h
@@ -313,10 +313,10 @@ extern "C"
         L_product = 32-bit product of L_var1 and L_var2 (Word32)
     */
     static inline Word32 Mpy_32(Word16 L_var1_hi,
-                           Word16 L_var1_lo,
-                           Word16 L_var2_hi,
-                           Word16 L_var2_lo,
-                           Flag   *pOverflow)
+                                Word16 L_var1_lo,
+                                Word16 L_var2_hi,
+                                Word16 L_var2_lo,
+                                Flag   *pOverflow)
     {
         Word32 L_product;
         Word32 L_sum;
@@ -387,9 +387,9 @@ extern "C"
     */
 
     static inline Word32 Mpy_32_16(Word16 L_var1_hi,
-                              Word16 L_var1_lo,
-                              Word16 var2,
-                              Flag *pOverflow)
+                                   Word16 L_var1_lo,
+                                   Word16 var2,
+                                   Flag *pOverflow)
     {
 
         Word32 L_product;
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/log2_norm.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/log2_norm.h
index 2f11cbc..3b06244 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/log2_norm.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/log2_norm.h
@@ -44,8 +44,6 @@ terms listed above has been obtained from the copyright holder.
 #ifndef LOG2_NORM_H
 #define LOG2_NORM_H
 
-#define log2_h "$Id $"              /* Used by legacy code */
-
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/lsp_lsf.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/lsp_lsf.h
index 5cdbb4c..ac7fca0 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/lsp_lsf.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/lsp_lsf.h
@@ -42,7 +42,7 @@ terms listed above has been obtained from the copyright holder.
 ; CONTINUE ONLY IF NOT ALREADY DEFINED
 ----------------------------------------------------------------------------*/
 #ifndef lsp_lsf_h
-#define lsp_lsf_h "$Id $"
+#define lsp_lsf_h
 
 /*----------------------------------------------------------------------------
 ; INCLUDES
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h
index 87f5128..33ade51 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/mpy_32_16.h
@@ -157,9 +157,9 @@ extern "C"
 
 #else /* C_EQUIVALENT */
     static inline Word32 Mpy_32_16(Word16 L_var1_hi,
-                              Word16 L_var1_lo,
-                              Word16 var2,
-                              Flag *pOverflow)
+                                   Word16 L_var1_lo,
+                                   Word16 var2,
+                                   Flag *pOverflow)
     {
 
         Word32 L_product;
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/p_ol_wgh.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/p_ol_wgh.h
index 6a13a57..f07ea36 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/p_ol_wgh.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/p_ol_wgh.h
@@ -40,7 +40,7 @@ terms listed above has been obtained from the copyright holder.
 */
 
 #ifndef P_OL_WGH_H
-#define P_OL_WGH_H "$Id $"
+#define P_OL_WGH_H
 
 /*----------------------------------------------------------------------------
 ; INCLUDES
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/pow2.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/pow2.h
index 0cd57e1..ba83477 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/pow2.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/include/pow2.h
@@ -47,7 +47,7 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
+#include  "typedef.h"
 
 /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/az_lsp.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/az_lsp.cpp
index 4fc4fbc..6f6bf4d 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/az_lsp.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/az_lsp.cpp
@@ -240,7 +240,7 @@ static Word16 Chebps(Word16 x,
     t0 += (Word32) * (p_f) << 13;
 
 
-    if ((UWord32)(t0 - 0xfe000000L) < (UWord32)(0x01ffffffL -  0xfe000000L))
+    if ((UWord32)(t0 - 0xfe000000L) < (UWord32)0x03ffffffL)
     {
         cheb = (Word16)(t0 >> 10);
     }
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bitreorder_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bitreorder_tab.cpp
index c3d7a2f..3245cdb 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bitreorder_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bitreorder_tab.cpp
@@ -82,7 +82,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "bitreorder_tab.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bytesused.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bytesused.cpp
index 4893542..d4b50b2 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bytesused.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/bytesused.cpp
@@ -115,7 +115,7 @@ extern "C"
     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
     ; Variable declaration - defined here and used outside this module
     ----------------------------------------------------------------------------*/
-    const short BytesUsed[16] =
+    extern const short BytesUsed[16] =
     {
         13, /* 4.75 */
         14, /* 5.15 */
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/c2_9pf_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/c2_9pf_tab.cpp
index 8c44605..789bc0e 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/c2_9pf_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/c2_9pf_tab.cpp
@@ -42,7 +42,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "get_const_tbls.h"
 
 /*--------------------------------------------------------------------------*/
@@ -71,8 +70,10 @@ extern "C"
     ; LOCAL VARIABLE DEFINITIONS
     ; [Variable declaration - defined here and used outside this module]
     ----------------------------------------------------------------------------*/
-    extern const Word16 startPos[];
-    const Word16 startPos[2*4*2] = {0, 2, 0, 3,
+
+    extern const Word16 startPos[2*4*2] =
+    {
+        0, 2, 0, 3,
         0, 2, 0, 3,
         1, 3, 2, 4,
         1, 4, 1, 4
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gains_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gains_tbl.cpp
index 925c1dc..4584f5d 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gains_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gains_tbl.cpp
@@ -71,16 +71,14 @@ extern "C"
     ----------------------------------------------------------------------------*/
 
 
-    extern const Word16 qua_gain_pitch[];
-    const Word16 qua_gain_pitch[NB_QUA_PITCH] =
+    extern const Word16 qua_gain_pitch[NB_QUA_PITCH] =
     {
         0, 3277, 6556, 8192, 9830, 11469, 12288, 13107,
         13926, 14746, 15565, 16384, 17203, 18022, 18842, 19661
     };
 
 
-    extern const Word16 qua_gain_code[];
-    const Word16 qua_gain_code[(NB_QUA_CODE+1)*3] =
+    extern const Word16 qua_gain_code[(NB_QUA_CODE+1)*3] =
     {
         /* gain factor (g_fac) and quantized energy error (qua_ener_MR122, qua_ener)
          * are stored:
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gray_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gray_tbl.cpp
index 8b192f2..f4e4975 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gray_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/gray_tbl.cpp
@@ -72,10 +72,8 @@ extern "C"
     ; [Variable declaration - defined here and used outside this module]
     ----------------------------------------------------------------------------*/
 
-    extern const Word16 gray[];
-    extern const Word16 dgray[];
-    const Word16 gray[8]  = {0, 1, 3, 2, 6, 4, 5, 7};
-    const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
+    extern const Word16 gray[8]  = {0, 1, 3, 2, 6, 4, 5, 7};
+    extern const Word16 dgray[8] = {0, 1, 3, 2, 5, 6, 4, 7};
 
     /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/grid_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/grid_tbl.cpp
index 745a555..48bab68 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/grid_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/grid_tbl.cpp
@@ -51,7 +51,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "az_lsp.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/inv_sqrt_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/inv_sqrt_tbl.cpp
index bfa4f30..3ae066a 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/inv_sqrt_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/inv_sqrt_tbl.cpp
@@ -41,7 +41,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "inv_sqrt.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/log2_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/log2_tbl.cpp
index 7a17592..76f66b0 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/log2_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/log2_tbl.cpp
@@ -42,7 +42,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "log2_norm.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_lsf_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_lsf_tbl.cpp
index f44aabf..03a5195 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_lsf_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_lsf_tbl.cpp
@@ -67,8 +67,7 @@ extern "C"
     ; [Variable declaration - defined here and used outside this module]
     ----------------------------------------------------------------------------*/
 
-    extern const Word16 table[];
-    const Word16 table[65] =
+    extern const Word16 table[65] =
     {
         32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853,
         30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279,
@@ -85,8 +84,7 @@ extern "C"
 
     /* slope used to compute y = acos(x) */
 
-    extern const Word16 slope[];
-    const Word16 slope[64] =
+    extern const Word16 slope[64] =
     {
         -26887, -8812, -5323, -3813, -2979, -2444, -2081, -1811,
         -1608, -1450, -1322, -1219, -1132, -1059, -998, -946,
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_tab.cpp
index 92700ad..d236137 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/lsp_tab.cpp
@@ -81,8 +81,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
-#include    "cnst.h"
 #include    "lsp_tab.h"
 
 /*--------------------------------------------------------------------------*/
@@ -113,7 +111,9 @@ extern "C"
     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
     ; Variable declaration - defined here and used outside this module
     ----------------------------------------------------------------------------*/
-    const Word16 lsp_init_data[M] = {30000, 26000, 21000, 15000, 8000,
+    const Word16 lsp_init_data[M] =
+    {
+        30000, 26000, 21000, 15000, 8000,
         0, -8000, -15000, -21000, -26000
     };
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/ph_disp_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/ph_disp_tab.cpp
index f9e7faa..3a41508 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/ph_disp_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/ph_disp_tab.cpp
@@ -70,16 +70,14 @@ extern "C"
     ; LOCAL VARIABLE DEFINITIONS
     ; [Variable declaration - defined here and used outside this module]
     ----------------------------------------------------------------------------*/
-    extern const Word16 ph_imp_low_MR795[];
-    const Word16 ph_imp_low_MR795[40] =
+    extern const Word16 ph_imp_low_MR795[40] =
     {
         26777,    801,   2505,   -683,  -1382,    582,    604,  -1274,   3511,  -5894,
         4534,   -499,  -1940,   3011,  -5058,   5614,  -1990,  -1061,  -1459,   4442,
         -700,  -5335,   4609,    452,   -589,  -3352,   2953,   1267,  -1212,  -2590,
         1731,   3670,  -4475,   -975,   4391,  -2537,    949,  -1363,   -979,   5734
     };
-    extern const Word16 ph_imp_mid_MR795[];
-    const Word16 ph_imp_mid_MR795[40] =
+    extern const Word16 ph_imp_mid_MR795[40] =
     {
         30274,   3831,  -4036,   2972,  -1048,  -1002,   2477,  -3043,   2815,  -2231,
         1753,  -1611,   1714,  -1775,   1543,  -1008,    429,   -169,    472,  -1264,
@@ -87,16 +85,14 @@ extern "C"
         -2063,   2644,  -3060,   2897,  -1978,    557,    780,  -1369,    842,    655
     };
 
-    extern const Word16 ph_imp_low[];
-    const Word16 ph_imp_low[40] =
+    extern const Word16 ph_imp_low[40] =
     {
         14690,  11518,   1268,  -2761,  -5671,   7514,    -35,  -2807,  -3040,   4823,
         2952,  -8424,   3785,   1455,   2179,  -8637,   8051,  -2103,  -1454,    777,
         1108,  -2385,   2254,   -363,   -674,  -2103,   6046,  -5681,   1072,   3123,
         -5058,   5312,  -2329,  -3728,   6924,  -3889,    675,  -1775,     29,  10145
     };
-    extern const Word16 ph_imp_mid[];
-    const Word16 ph_imp_mid[40] =
+    extern const Word16 ph_imp_mid[40] =
     {
         30274,   3831,  -4036,   2972,  -1048,  -1002,   2477,  -3043,   2815,  -2231,
         1753,  -1611,   1714,  -1775,   1543,  -1008,    429,   -169,    472,  -1264,
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/pow2_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/pow2_tbl.cpp
index eb3ce12..e49a89d 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/pow2_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/pow2_tbl.cpp
@@ -41,7 +41,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "pow2.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/q_plsf_5_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/q_plsf_5_tbl.cpp
index b6852ea..42f37a1 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/q_plsf_5_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/q_plsf_5_tbl.cpp
@@ -39,7 +39,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "q_plsf_5_tbl.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/qua_gain_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/qua_gain_tbl.cpp
index 70a91c0..e7320b2 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/qua_gain_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/qua_gain_tbl.cpp
@@ -39,9 +39,8 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
-#include "qua_gain.h"
 #include "qua_gain_tbl.h"
+#include "qua_gain.h"
 
 /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
@@ -84,7 +83,7 @@ extern "C"
 
     /* table used in 'high' rates: MR67 MR74 */
 
-    const Word16 table_gain_highrates[VQ_SIZE_HIGHRATES*4] =
+    extern const Word16 table_gain_highrates[VQ_SIZE_HIGHRATES*4] =
     {
 
         /*
@@ -228,7 +227,7 @@ extern "C"
 
     /* table used in 'low' rates: MR475, MR515, MR59 */
 
-    const Word16 table_gain_lowrates[VQ_SIZE_LOWRATES*4] =
+    extern const Word16 table_gain_lowrates[VQ_SIZE_LOWRATES*4] =
     {
         /*g_pit,    g_fac,  qua_ener_MR122, qua_ener */
         10813,    28753,            2879,    17333,
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/r_fft.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/r_fft.cpp
similarity index 95%
rename from opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/r_fft.cpp
rename to opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/r_fft.cpp
index 4675959..a528838 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/r_fft.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/r_fft.cpp
@@ -36,11 +36,21 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-
 #include "typedef.h"
-#include "basic_op.h"
+#include "cnst.h"
+#include "oper_32b.h"
 #include "vad2.h"
-
+#include "sub.h"
+#include "add.h"
+#include "shr.h"
+#include "shl.h"
+#include "l_mult.h"
+#include "l_mac.h"
+#include "l_msu.h"
+#include "round.h"
+#include "l_negate.h"
+#include "l_deposit_h.h"
+#include "l_shr.h"
 
 /*----------------------------------------------------------------------------
 ; MACROS
@@ -306,7 +316,7 @@ void c_fft(Word16 * farray_ptr, Flag *pOverflow)
             j = sub(j, k, pOverflow);
             k = shr(k, 1, pOverflow);
         }
-        j = add_16(j, k, pOverflow);
+        j = add(j, k, pOverflow);
     }
 
     /* The FFT part */
@@ -323,7 +333,7 @@ void c_fft(Word16 * farray_ptr, Flag *pOverflow)
 
             for (k = j; k < SIZE; k = k + kk)
             {               /* k is butterfly top */
-                kj = add_16(k, jj, pOverflow);    /* kj is butterfly bottom */
+                kj = add(k, jj, pOverflow);    /* kj is butterfly bottom */
 
                 /* Butterfly computations */
                 ftmp_real = L_mult(*(farray_ptr + kj), phs_tbl[ji], pOverflow);
@@ -344,14 +354,14 @@ void c_fft(Word16 * farray_ptr, Flag *pOverflow)
                 tmp = sub(*(farray_ptr + k + 1), tmp2, pOverflow);
                 *(farray_ptr + kj + 1) = shr(tmp, 1, pOverflow);
 
-                tmp = add_16(*(farray_ptr + k), tmp1, pOverflow);
+                tmp = add(*(farray_ptr + k), tmp1, pOverflow);
                 *(farray_ptr + k) = shr(tmp, 1, pOverflow);
 
-                tmp = add_16(*(farray_ptr + k + 1), tmp2, pOverflow);
+                tmp = add(*(farray_ptr + k + 1), tmp2, pOverflow);
                 *(farray_ptr + k + 1) = shr(tmp, 1, pOverflow);
             }
 
-            ji =  add_16(ji, ii2, pOverflow);
+            ji =  add(ji, ii2, pOverflow);
         }
     }
 }                               /* end of c_fft () */
@@ -522,22 +532,22 @@ void r_fft(Word16 * farray_ptr, Flag *pOverflow)
     /* First, handle the DC and foldover frequencies */
     ftmp1_real = *farray_ptr;
     ftmp2_real = *(farray_ptr + 1);
-    *farray_ptr = add_16(ftmp1_real, ftmp2_real, pOverflow);
+    *farray_ptr = add(ftmp1_real, ftmp2_real, pOverflow);
     *(farray_ptr + 1) = sub(ftmp1_real, ftmp2_real, pOverflow);
 
     /* Now, handle the remaining positive frequencies */
     for (i = 2, j = SIZE - i; i <= SIZE_BY_TWO; i = i + 2, j = SIZE - i)
     {
-        ftmp1_real = add_16(*(farray_ptr + i), *(farray_ptr + j), pOverflow);
+        ftmp1_real = add(*(farray_ptr + i), *(farray_ptr + j), pOverflow);
         ftmp1_imag = sub(*(farray_ptr + i + 1),
                          *(farray_ptr + j + 1), pOverflow);
-        ftmp2_real = add_16(*(farray_ptr + i + 1),
-                            *(farray_ptr + j + 1), pOverflow);
+        ftmp2_real = add(*(farray_ptr + i + 1),
+                         *(farray_ptr + j + 1), pOverflow);
         ftmp2_imag = sub(*(farray_ptr + j),
                          *(farray_ptr + i), pOverflow);
 
-        Lftmp1_real = ((Word32) ftmp1_real << 16);
-        Lftmp1_imag = ((Word32) ftmp1_imag << 16);
+        Lftmp1_real = L_deposit_h(ftmp1_real);
+        Lftmp1_imag = L_deposit_h(ftmp1_imag);
 
         Ltmp1 = L_mac(Lftmp1_real, ftmp2_real, phs_tbl[i], pOverflow);
         Ltmp1 = L_msu(Ltmp1, ftmp2_imag, phs_tbl[i + 1], pOverflow);
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/sqrt_l_tbl.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/sqrt_l_tbl.cpp
index 56b588b..8b91771 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/sqrt_l_tbl.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/sqrt_l_tbl.cpp
@@ -44,7 +44,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "sqrt_l.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/vad2.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/vad2.cpp
similarity index 98%
rename from opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/vad2.cpp
rename to opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/vad2.cpp
index 4c3527f..ecd1cf0 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/vad2.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/vad2.cpp
@@ -40,18 +40,35 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-
-
 #include "typedef.h"
-#include "shr.h"
-#include "basic_op.h"
-#include "cnst_vad.h"
-#include "oscl_mem.h"
+#include "cnst.h"
 #include "log2.h"
 #include "pow2.h"
-#include "vad2.h"
+#include "sub.h"
+#include "l_shr_r.h"
+#include "abs_s.h"
+#include "norm_s.h"
+#include "shl.h"
+#include "l_add.h"
+#include "shr_r.h"
+#include "add.h"
+#include "mult.h"
+#include "l_shr.h"
+#include "mpy_32_16.h"
+#include "l_mac.h"
+#include "l_extract.h"
+#include "l_sub.h"
+#include "l_mult.h"
+#include "round.h"
+#include "shr.h"
+#include "l_shl.h"
+#include "mult_r.h"
+#include "div_s.h"
+#include "oscl_mem.h"
 
 
+#include "vad2.h"
+
 /*----------------------------------------------------------------------------
 ; MACROS
 ; Define module specific macros here
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/window_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/window_tab.cpp
index c9f7470..14ecf2e 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/window_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/window_tab.cpp
@@ -80,8 +80,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
-#include    "cnst.h"
 #include    "window_tab.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk
index 65a327d..a3bd037 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/Android.mk
@@ -42,7 +42,7 @@ LOCAL_SRC_FILES := \
 
 LOCAL_MODULE := libpvdecoder_gsmamr
 
-LOCAL_CFLAGS :=  $(PV_CFLAGS)
+LOCAL_CFLAGS :=   $(PV_CFLAGS)
 
 LOCAL_ARM_MODE := arm
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build/make/local.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build/make/local.mk
index 9df9ddb..f5fcc15 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build/make/local.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/build/make/local.mk
@@ -6,7 +6,6 @@ include $(MK)/clear.mk
 
 TARGET := pvdecoder_gsmamr
 
-XCXXFLAGS := $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 OPTIMIZE_FOR_PERFORMANCE_OVER_SIZE := true
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/dec_input_format_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/dec_input_format_tab.cpp
index 9da47f9..867df28 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/dec_input_format_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/dec/src/dec_input_format_tab.cpp
@@ -78,7 +78,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "amrdecode.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk
index 0fd7864..100268e 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/Android.mk
@@ -67,7 +67,7 @@ LOCAL_SRC_FILES := \
 
 LOCAL_MODULE := libpvencoder_gsmamr
 
-LOCAL_CFLAGS :=  $(PV_CFLAGS)
+LOCAL_CFLAGS :=   $(PV_CFLAGS)
 
 LOCAL_ARM_MODE := arm
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build/make/local.mk b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build/make/local.mk
index 531e38a..01d55d8 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build/make/local.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/build/make/local.mk
@@ -8,7 +8,6 @@ include $(MK)/clear.mk
 
 TARGET := pvencoder_gsmamr
 
-XCXXFLAGS += $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 OPTIMIZE_FOR_PERFORMANCE_OVER_SIZE := true
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.cpp
index 5ef9b15..a58dd74 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.cpp
@@ -665,7 +665,8 @@ Word16 AMREncode(
     enum Mode usedMode = MR475;
 
     /* Encode WMF or IF2 frames */
-    if ((output_format == AMR_TX_WMF) | (output_format == AMR_TX_IF2))
+    if ((output_format == AMR_TX_WMF) | (output_format == AMR_TX_IF2)
+            | (output_format == AMR_TX_IETF))
     {
         /* Encode one speech frame (20 ms) */
 
@@ -717,7 +718,16 @@ Word16 AMREncode(
 
         /* At this point, output format is ETS */
         /* Determine the output format to use */
-        if (output_format == AMR_TX_WMF)
+        if (output_format == AMR_TX_IETF)
+        {
+            /* Change output data format to WMF */
+            ets_to_ietf(*p3gpp_frame_type, ets_output_bfr, pEncOutput, &(((Speech_Encode_FrameState*)pEncState)->cod_amr_state->common_amr_tbls));
+
+            /* Set up the number of encoded WMF bytes */
+            num_enc_bytes = WmfEncBytesPerFrame[(Word16) *p3gpp_frame_type];
+
+        }
+        else if (output_format == AMR_TX_WMF)
         {
             /* Change output data format to WMF */
             ets_to_wmf(*p3gpp_frame_type, ets_output_bfr, pEncOutput, &(((Speech_Encode_FrameState*)pEncState)->cod_amr_state->common_amr_tbls));
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.h
index 3929a60..1f1dc90 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/amrencode.h
@@ -71,9 +71,12 @@ extern "C"
 #define AMRSID_TXTYPE_BIT_OFFSET   35
 
     /* Output format types */
-#define AMR_TX_WMF 0
-#define AMR_TX_IF2 1
-#define AMR_TX_ETS 2
+
+#define AMR_TX_WMF  0
+#define AMR_TX_IF2  1
+#define AMR_TX_ETS  2
+#define AMR_TX_IETF 3
+
 
     /*----------------------------------------------------------------------------
     ; EXTERNAL VARIABLES REFERENCES
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/corrwght_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/corrwght_tab.cpp
index 3b8d9e8..34b8a68 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/corrwght_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/corrwght_tab.cpp
@@ -44,7 +44,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "p_ol_wgh.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/enc_output_format_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/enc_output_format_tab.cpp
index 7534023..39e81e8 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/enc_output_format_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/enc_output_format_tab.cpp
@@ -78,7 +78,6 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include "typedef.h"
 #include "amrencode.h"
 
 /*--------------------------------------------------------------------------*/
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.cpp
index 48c6325..76634b0 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.cpp
@@ -143,9 +143,10 @@ void ets_to_wmf(
     const Word16* const* reorderBits_ptr = common_amr_tbls->reorderBits_ptr;
     const Word16* numOfBits_ptr = common_amr_tbls->numOfBits_ptr;
 
+    wmf_output_ptr[j++] = (UWord8)(frame_type_3gpp) & 0x0f;
+
     if (frame_type_3gpp < AMR_SID)
     {
-        wmf_output_ptr[j++] = (UWord8)(frame_type_3gpp) & 0x0f;
 
         for (i = 0; i < numOfBits_ptr[frame_type_3gpp] - 7;)
         {
@@ -181,7 +182,6 @@ void ets_to_wmf(
     }
     else
     {
-        wmf_output_ptr[j++] = (UWord8)(frame_type_3gpp) & 0x0f;
 
         ptr_temp = &ets_input_ptr[0];
 
@@ -212,3 +212,89 @@ void ets_to_wmf(
 
     return;
 }
+
+
+
+void ets_to_ietf(
+    enum Frame_Type_3GPP frame_type_3gpp,
+    Word16 *ets_input_ptr,
+    UWord8 *ietf_output_ptr,
+    CommonAmrTbls* common_amr_tbls)
+{
+    Word16  i;
+    Word16  k = 0;
+    Word16  j = 0;
+    Word16 *ptr_temp;
+    Word16  bits_left;
+    UWord8  accum;
+    const Word16* const* reorderBits_ptr = common_amr_tbls->reorderBits_ptr;
+    const Word16* numOfBits_ptr = common_amr_tbls->numOfBits_ptr;
+
+    ietf_output_ptr[j++] = (UWord8)(frame_type_3gpp << 3);
+
+    if (frame_type_3gpp < AMR_SID)
+    {
+        for (i = 0; i < numOfBits_ptr[frame_type_3gpp] - 7;)
+        {
+            ietf_output_ptr[j]  =
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 7;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 6;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 5;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 4;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 3;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 2;
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << 1;
+            ietf_output_ptr[j++] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]];
+        }
+
+        bits_left = numOfBits_ptr[frame_type_3gpp] -
+                    (numOfBits_ptr[frame_type_3gpp] & 0xFFF8);
+
+        ietf_output_ptr[j] = 0;
+
+        for (k = 0; k < bits_left; k++)
+        {
+            ietf_output_ptr[j] |=
+                (UWord8) ets_input_ptr[reorderBits_ptr[frame_type_3gpp][i++]] << (7 - k);
+
+        }
+    }
+    else
+    {
+
+        ptr_temp = &ets_input_ptr[0];
+
+        for (i = numOfBits_ptr[frame_type_3gpp] - 7; i > 0; i -= 8)
+        {
+            accum  = (UWord8) * (ptr_temp++) << 7;
+            accum |= (UWord8) * (ptr_temp++) << 6;
+            accum |= (UWord8) * (ptr_temp++) << 5;
+            accum |= (UWord8) * (ptr_temp++) << 4;
+            accum |= (UWord8) * (ptr_temp++) << 3;
+            accum |= (UWord8) * (ptr_temp++) << 2;
+            accum |= (UWord8) * (ptr_temp++) << 1;
+            accum |= (UWord8) * (ptr_temp++);
+
+            ietf_output_ptr[j++] = accum;
+        }
+
+        bits_left = numOfBits_ptr[frame_type_3gpp] -
+                    (numOfBits_ptr[frame_type_3gpp] & 0xFFF8);
+
+        ietf_output_ptr[j] = 0;
+
+        for (i = 0; i < bits_left; i++)
+        {
+            ietf_output_ptr[j] |= *(ptr_temp++) << (7 - i);
+        }
+    }
+
+    return;
+}
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.h
index 2147b86..c26ca30 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/ets_to_wmf.h
@@ -99,6 +99,10 @@ extern "C"
     UWord8   *wmf_output_ptr,
     CommonAmrTbls* common_amr_tbls);
 
+    void ets_to_ietf(enum Frame_Type_3GPP frame_type_3gpp,
+                     Word16 *ets_input_ptr,
+                     UWord8 *ietf_output_ptr,
+                     CommonAmrTbls* common_amr_tbls);
 
 
     /*----------------------------------------------------------------------------
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/g_pitch.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/g_pitch.cpp
index e6cca48..325e29b 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/g_pitch.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/g_pitch.cpp
@@ -346,9 +346,10 @@ Word16 G_pitch(         /* o : Gain of pitch lag saturated to 1.2       */
     }
     else
     {
-        s = 0;                      /* Avoid case of all zeros */
+        s = 0;  /* re-initialize calculations */
         p_y1 = &y1[0];
         p_xn = &xn[0];
+
         for (i = (L_subfr >> 2); i != 0; i--)
         {
             L_temp = (Word32)(*(p_y1++) >> 2);
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_enc.h b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_enc.h
index 478ffc2..078b787 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_enc.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_enc.h
@@ -72,6 +72,7 @@ extern "C"
 #define AMR_TX_WMF  0
 #define AMR_TX_IF2  1
 #define AMR_TX_ETS  2
+#define AMR_TX_IETF 3
 
     /*----------------------------------------------------------------------------
     ; EXTERNAL VARIABLES REFERENCES
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_encoder_wrapper.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_encoder_wrapper.cpp
index f753901..4bbe478 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_encoder_wrapper.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/gsmamr_encoder_wrapper.cpp
@@ -122,6 +122,10 @@ OSCL_EXPORT_REF int32 CPvGsmAmrEncoder::InitializeEncoder(int32 aMaxOutputBuffer
         {
             iBitStreamFormat = AMR_TX_IF2;
         }
+        else if (aProps->iBitStreamFormat == AMR_TX_IETF)
+        {
+            iBitStreamFormat = AMR_TX_IETF;
+        }
         else
         {
             iBitStreamFormat = AMR_TX_ETS;
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/inter_36_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/inter_36_tab.cpp
index dc809d0..264d0bf 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/inter_36_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/inter_36_tab.cpp
@@ -84,9 +84,7 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
-#include    "cnst.h"
-#include    "inter_36_tab.h"
+#include "inter_36_tab.h"
 
 /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/lag_wind_tab.cpp b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/lag_wind_tab.cpp
index 6c59f5d..c16090a 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/lag_wind_tab.cpp
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_nb/enc/src/lag_wind_tab.cpp
@@ -102,8 +102,7 @@ terms listed above has been obtained from the copyright holder.
 /*----------------------------------------------------------------------------
 ; INCLUDES
 ----------------------------------------------------------------------------*/
-#include    "typedef.h"
-#include    "lag_wind_tab.h"
+#include "lag_wind_tab.h"
 
 /*--------------------------------------------------------------------------*/
 #ifdef __cplusplus
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
index 064b740..e096ff8 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/Android.mk
@@ -46,7 +46,7 @@ LOCAL_SRC_FILES := \
 
 LOCAL_MODULE := libpvamrwbdecoder
 
-LOCAL_CFLAGS :=  $(PV_CFLAGS)
+LOCAL_CFLAGS :=   $(PV_CFLAGS)
 
 LOCAL_ARM_MODE := arm
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build/make/local.mk b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build/make/local.mk
index c131aa6..7b914eb 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build/make/local.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/build/make/local.mk
@@ -6,7 +6,6 @@ include $(MK)/clear.mk
 
 TARGET := pvamrwbdecoder
 
-XCXXFLAGS := $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 OPTIMIZE_FOR_PERFORMANCE_OVER_SIZE := true
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include/pvamrwbdecoder_api.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include/pvamrwbdecoder_api.h
index 24fa429..04d7fa6 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include/pvamrwbdecoder_api.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/include/pvamrwbdecoder_api.h
@@ -100,7 +100,7 @@ extern "C"
 #define NUM_OF_MODES  10
 
 
-    static const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
+    const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
     {
         NBBITS_7k,
         NBBITS_9k,
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
index 11368fd..e653a98 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op.h
@@ -75,7 +75,7 @@ terms listed above has been obtained from the copyright holder.
                range : 0x8000 <= var_out <= 0x7fff.
  ----------------------------------------------------------------------------*/
 
-static inline int16 negate_int16(int16 var1)
+__inline int16 negate_int16(int16 var1)
 {
     return (((var1 == MIN_16) ? MAX_16 : -var1));
 }
@@ -105,7 +105,7 @@ static inline int16 negate_int16(int16 var1)
                range : 0x8000 <= var_out <= 0x7fff.
  ----------------------------------------------------------------------------*/
 
-static inline int16 shl_int16(int16 var1, int16 var2)
+__inline int16 shl_int16(int16 var1, int16 var2)
 {
     int16 var_out;
 
@@ -149,7 +149,7 @@ static inline int16 shl_int16(int16 var1, int16 var2)
 
  ----------------------------------------------------------------------------*/
 
-static inline int32 shl_int32(int32 L_var1, int16 var2)
+__inline int32 shl_int32(int32 L_var1, int16 var2)
 {
     int32 L_var_out;
 
@@ -193,7 +193,7 @@ static inline int32 shl_int32(int32 L_var1, int16 var2)
 
  ----------------------------------------------------------------------------*/
 
-static inline int32 shr_int32(int32 L_var1, int16 var2)
+__inline int32 shr_int32(int32 L_var1, int16 var2)
 {
     int32 L_var_out;
 
@@ -224,7 +224,7 @@ static inline int32 shr_int32(int32 L_var1, int16 var2)
 
 #include "pvamrwbdecoder_basic_op_armv5.h"
 
-#elif defined(xxPV_ARM_GCC_V5) //@TODO: Enable gcc-arm assembly
+#elif defined(PV_ARM_GCC_V5)
 
 #include "pvamrwbdecoder_basic_op_gcc_armv5.h"
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h
deleted file mode 100644
index 540a1a4..0000000
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_armv5.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/* ------------------------------------------------------------------
- * Copyright (C) 1998-2009 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.
- * -------------------------------------------------------------------
- */
-/****************************************************************************************
-Portions of this file are derived from the following 3GPP standard:
-
-    3GPP TS 26.173
-    ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec
-    Available from http://www.3gpp.org
-
-(C) 2007, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
-Permission to distribute, modify and use this file under the standard license
-terms listed above has been obtained from the copyright holder.
-****************************************************************************************/
-/*
-------------------------------------------------------------------------------
-
-
-
- Pathname: ./src/pvamrwbdecoder_basic_op_armv5.h
-
-------------------------------------------------------------------------------
- INCLUDE DESCRIPTION
-
-------------------------------------------------------------------------------
-*/
-
-#ifndef PVAMRWBDECODER_BASIC_OP_ARMV5_H
-#define PVAMRWBDECODER_BASIC_OP_ARMV5_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-
-
-
-#if defined(PV_ARM_V5)
-
-    __inline int16 add_int16(int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-        int32 L_var_aux;
-
-        __asm
-        {
-            mov L_var_out, var1, lsl #16
-            mov L_var_aux, var2, lsl #16
-            qadd L_var_out, L_var_out, L_var_aux
-            mov L_var_out, L_var_out, asr #16
-
-        }
-        return L_var_out;
-    }
-
-
-    __inline int16 sub_int16(int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-        int32 L_var_aux;
-
-        __asm
-        {
-            mov L_var_out, var1, lsl #16
-            mov L_var_aux, var2, lsl #16
-            qsub L_var_out, L_var_out, L_var_aux
-            mov L_var_out, L_var_out, asr #16
-
-        }
-        return L_var_out;
-    }
-
-
-    __inline int32 add_int32(int32 L_var1, int32 L_var2)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            qadd L_var_out, L_var1, L_var2
-        }
-        return L_var_out;
-    }
-
-
-    __inline int32 mac_16by16_to_int32(int32 L_var3, int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-
-
-        __asm
-        {
-            smulbb L_var_out, var1, var2
-            qdadd L_var_out, L_var3, L_var_out
-        }
-        return L_var_out;
-    }
-
-    __inline int32 sub_int32(int32 L_var1, int32 L_var2)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            qsub L_var_out, L_var1, L_var2
-        }
-        return L_var_out;
-    }
-
-    __inline int32 msu_16by16_from_int32(int32 L_var3, int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-
-
-        __asm
-        {
-            smulbb L_var_out, var1, var2
-            qdsub L_var_out, L_var3, L_var_out
-        }
-        return L_var_out;
-    }
-
-    __inline int32 mul_16by16_to_int32(int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            smulbb L_var_out, var1, var2
-            qadd L_var_out, L_var_out, L_var_out
-        }
-        return L_var_out;
-    }
-
-    __inline int16 mult_int16(int16 var1, int16 var2)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            smulbb L_var_out, var1, var2
-            mov L_var_out, L_var_out, asr #15
-        }
-        return L_var_out;
-    }
-
-
-    __inline int16 amr_wb_round(int32 L_var1)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            qadd L_var_out, L_var1, (int32) 0x00008000L
-            mov L_var_out, L_var_out, asr #16
-        }
-        return L_var_out;
-    }
-
-
-
-    __inline int16 amr_wb_shl1_round(int32 L_var1)
-    {
-        int32 L_var_out;
-
-        __asm
-        {
-            qadd L_var_out, L_var1, L_var1
-            qadd L_var_out, L_var_out, (int32) 0x00008000L
-            mov L_var_out, L_var_out, asr #16
-        }
-        return L_var_out;
-    }
-
-    __inline int32 mul_32by16(int16 hi, int16 lo, int16 n)
-    {
-        int32 H_32;
-        int32 L_32;
-        __asm
-        {
-            smulbb H_32, hi, n
-            smulbb L_32, lo, n
-            add H_32, H_32, L_32, asr #15
-            qadd H_32, H_32, H_32
-        }
-
-        return (H_32);
-    }
-
-    __inline  int32 fxp_mac_16by16(const int16 var1, const int16 var2, int32 L_add)
-    {
-        __asm
-        {
-            smlabb L_add, var1, var2, L_add
-        }
-        return (L_add);
-    }
-
-    __inline  int32 fxp_mul_16by16(int16 var1, const int16 var2)
-    {
-        int32 L_mult;
-        __asm
-        {
-            smulbb L_mult, var1, var2
-        }
-        return (L_mult);
-    }
-
-    __inline  int32 fxp_mul32_by_16b(int32 L_var1, const int32 L_var2)
-    {
-        int32 L_mult;
-        __asm
-        {
-            smulwb L_mult, L_var1, L_var2
-        }
-
-        return L_mult;
-    }
-
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-
-
-
-#endif   /*  PVAMRWBDECODER_BASIC_OP_ARMV5_H  */
-
diff --git a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
index 3505fe5..7a34d89 100644
--- a/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
+++ b/opencore/codecs_v2/audio/gsm_amr/amr_wb/dec/src/pvamrwbdecoder_basic_op_cequivalent.h
@@ -196,7 +196,7 @@ extern "C"
      ----------------------------------------------------------------------------*/
 
 
-    static inline  int32 add_int32(int32 L_var1, int32 L_var2)
+    static inline int32 add_int32(int32 L_var1, int32 L_var2)
     {
         int32 L_var_out;
 
@@ -240,7 +240,7 @@ extern "C"
      ----------------------------------------------------------------------------*/
 
 
-    static inline  int32 sub_int32(int32 L_var1, int32 L_var2)
+    static inline int32 sub_int32(int32 L_var1, int32 L_var2)
     {
         int32 L_var_out;
 
@@ -287,7 +287,7 @@ extern "C"
      ----------------------------------------------------------------------------*/
 
 
-    static inline  int32 mac_16by16_to_int32(int32 L_var3, int16 var1, int16 var2)
+    static inline   int32 mac_16by16_to_int32(int32 L_var3, int16 var1, int16 var2)
     {
         int32 L_var_out;
         int32 L_mul;
@@ -346,7 +346,7 @@ extern "C"
 
      ----------------------------------------------------------------------------*/
 
-    static inline  int32 msu_16by16_from_int32(int32 L_var3, int16 var1, int16 var2)
+    static inline int32 msu_16by16_from_int32(int32 L_var3, int16 var1, int16 var2)
     {
         int32 L_var_out;
         int32 L_mul;
@@ -401,7 +401,7 @@ extern "C"
      ----------------------------------------------------------------------------*/
 
 
-    static inline  int32 mul_16by16_to_int32(int16 var1, int16 var2)
+    static inline int32 mul_16by16_to_int32(int16 var1, int16 var2)
     {
         int32 L_mul;
 
@@ -500,12 +500,12 @@ extern "C"
          ----------------------------------------------------------------------------*/
 
 
-    static inline int32 mul_32by16(int16 hi, int16 lo, int16 n)
+    static inline  int32 mul_32by16(int16 hi, int16 lo, int16 n)
     {
         return (((((int32)hi*n)) + ((((int32)lo*n) >> 15))) << 1);
     }
 
-    static inline  int32 fxp_mac_16by16(int16 var1,  int16 var2, int32 L_add)
+    static inline   int32 fxp_mac_16by16(int16 var1,  int16 var2, int32 L_add)
     {
 
         L_add += (int32)var1 * var2;
@@ -513,14 +513,14 @@ extern "C"
         return L_add;
     }
 
-    static inline  int32 fxp_mul_16by16(int16 var1, const int16 var2)
+    static inline   int32 fxp_mul_16by16(int16 var1, const int16 var2)
     {
         int32 L_mul = (int32)var1 * var2;
 
         return L_mul;
     }
 
-    static inline  int32 fxp_mul32_by_16b(int32 L_var1, const int32 L_var2)
+    static inline   int32 fxp_mul32_by_16b(int32 L_var1, const int32 L_var2)
     {
 
         int32 L_mul = (int32)(((int64)L_var1 * (L_var2 << 16)) >> 32);
diff --git a/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk b/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk
index bc39492..2acf59e 100644
--- a/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/common/dec/Android.mk
@@ -7,7 +7,7 @@ LOCAL_SRC_FILES := \
 
 
 
-LOCAL_CFLAGS :=  $(PV_CFLAGS)
+LOCAL_CFLAGS :=   $(PV_CFLAGS)
 
 LOCAL_ARM_MODE := arm
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/common/dec/build/make/local.mk b/opencore/codecs_v2/audio/gsm_amr/common/dec/build/make/local.mk
index 477a46f..8db50c4 100644
--- a/opencore/codecs_v2/audio/gsm_amr/common/dec/build/make/local.mk
+++ b/opencore/codecs_v2/audio/gsm_amr/common/dec/build/make/local.mk
@@ -6,7 +6,6 @@ include $(MK)/clear.mk
 
 TARGET :=
 
-XCXXFLAGS := $(FLAG_COMPILE_WARNINGS_AS_ERRORS)
 
 INCSRCDIR := ../../include
 
diff --git a/opencore/codecs_v2/audio/gsm_amr/common/dec/include/pvgsmamrdecoderinterface.h b/opencore/codecs_v2/audio/gsm_amr/common/dec/include/pvgsmamrdecoderinterface.h
index 33ddcf1..d3e41f8 100644
--- a/opencore/codecs_v2/audio/gsm_amr/common/dec/include/pvgsmamrdecoderinterface.h
+++ b/opencore/codecs_v2/audio/gsm_amr/common/dec/include/pvgsmamrdecoderinterface.h
@@ -181,8 +181,10 @@ typedef struct tPVAmrDecoderExternal
 
 } tPVAmrDecoderExternal;
 
-#ifdef __cplusplus
 // CDecoder_AMRInterface
+
+#ifdef __cplusplus
+
 class CDecoder_AMRInterface
 {
     public:
@@ -199,6 +201,5 @@ class CDecoder_AMRInterface
 #endif
 
 
-
 #endif
 

-- 
opencore-amr packaging



More information about the pkg-multimedia-commits mailing list