mult_r.h revision 4f1efc098cb5791c3e9f483f2af84aef70d2d0a0
10c1bc742181ded4930842b46e9507372f0b1b963James Dong/* ------------------------------------------------------------------
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 1998-2009 PacketVideo
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * express or implied.
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * and limitations under the License.
1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * -------------------------------------------------------------------
170c1bc742181ded4930842b46e9507372f0b1b963James Dong */
180c1bc742181ded4930842b46e9507372f0b1b963James Dong/****************************************************************************************
190c1bc742181ded4930842b46e9507372f0b1b963James DongPortions of this file are derived from the following 3GPP standard:
200c1bc742181ded4930842b46e9507372f0b1b963James Dong
210c1bc742181ded4930842b46e9507372f0b1b963James Dong    3GPP TS 26.073
220c1bc742181ded4930842b46e9507372f0b1b963James Dong    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
230c1bc742181ded4930842b46e9507372f0b1b963James Dong    Available from http://www.3gpp.org
240c1bc742181ded4930842b46e9507372f0b1b963James Dong
250c1bc742181ded4930842b46e9507372f0b1b963James Dong(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
260c1bc742181ded4930842b46e9507372f0b1b963James DongPermission to distribute, modify and use this file under the standard license
270c1bc742181ded4930842b46e9507372f0b1b963James Dongterms listed above has been obtained from the copyright holder.
280c1bc742181ded4930842b46e9507372f0b1b963James Dong****************************************************************************************/
290c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
300c1bc742181ded4930842b46e9507372f0b1b963James Dong
310c1bc742181ded4930842b46e9507372f0b1b963James Dong Filename: /audio/gsm_amr/c/include/mult_r.h
320c1bc742181ded4930842b46e9507372f0b1b963James Dong
330c1bc742181ded4930842b46e9507372f0b1b963James Dong------------------------------------------------------------------------------
340c1bc742181ded4930842b46e9507372f0b1b963James Dong REVISION HISTORY
350c1bc742181ded4930842b46e9507372f0b1b963James Dong
360c1bc742181ded4930842b46e9507372f0b1b963James Dong Description: Created separate header file for mult_r function.
370c1bc742181ded4930842b46e9507372f0b1b963James Dong
380c1bc742181ded4930842b46e9507372f0b1b963James Dong Description: Changed prototype of the mult() function. Instead of using global
390c1bc742181ded4930842b46e9507372f0b1b963James Dong              data, a pointer to overflow flag is now passed into the function.
400c1bc742181ded4930842b46e9507372f0b1b963James Dong
410c1bc742181ded4930842b46e9507372f0b1b963James Dong Description: Made the following based on P2/P3 review
420c1bc742181ded4930842b46e9507372f0b1b963James Dong              1) Changed the parameter name from "overflow" to "pOverflow"
430c1bc742181ded4930842b46e9507372f0b1b963James Dong              in the function prototype declaration.
440c1bc742181ded4930842b46e9507372f0b1b963James Dong              2) Updated template
450c1bc742181ded4930842b46e9507372f0b1b963James Dong
460c1bc742181ded4930842b46e9507372f0b1b963James Dong Description: Moved _cplusplus #ifdef after Include section.
470c1bc742181ded4930842b46e9507372f0b1b963James Dong
480c1bc742181ded4930842b46e9507372f0b1b963James Dong Who:                       Date:
490c1bc742181ded4930842b46e9507372f0b1b963James Dong Description:
500c1bc742181ded4930842b46e9507372f0b1b963James Dong
510c1bc742181ded4930842b46e9507372f0b1b963James Dong------------------------------------------------------------------------------
520c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE DESCRIPTION
530c1bc742181ded4930842b46e9507372f0b1b963James Dong
540c1bc742181ded4930842b46e9507372f0b1b963James Dong This file contains all the constant definitions and prototype definitions
550c1bc742181ded4930842b46e9507372f0b1b963James Dong needed by the mult_r function.
560c1bc742181ded4930842b46e9507372f0b1b963James Dong
570c1bc742181ded4930842b46e9507372f0b1b963James Dong------------------------------------------------------------------------------
580c1bc742181ded4930842b46e9507372f0b1b963James Dong*/
590c1bc742181ded4930842b46e9507372f0b1b963James Dong
600c1bc742181ded4930842b46e9507372f0b1b963James Dong#ifndef MULT_R__H
610c1bc742181ded4930842b46e9507372f0b1b963James Dong#define MULT_R__H
620c1bc742181ded4930842b46e9507372f0b1b963James Dong
630c1bc742181ded4930842b46e9507372f0b1b963James Dong/*----------------------------------------------------------------------------
640c1bc742181ded4930842b46e9507372f0b1b963James Dong; INCLUDES
650c1bc742181ded4930842b46e9507372f0b1b963James Dong----------------------------------------------------------------------------*/
660c1bc742181ded4930842b46e9507372f0b1b963James Dong
670c1bc742181ded4930842b46e9507372f0b1b963James Dong#include    "basicop_malloc.h"
680c1bc742181ded4930842b46e9507372f0b1b963James Dong
690c1bc742181ded4930842b46e9507372f0b1b963James Dong/*--------------------------------------------------------------------------*/
700c1bc742181ded4930842b46e9507372f0b1b963James Dong#ifdef __cplusplus
710c1bc742181ded4930842b46e9507372f0b1b963James Dongextern "C"
720c1bc742181ded4930842b46e9507372f0b1b963James Dong{
730c1bc742181ded4930842b46e9507372f0b1b963James Dong#endif
740c1bc742181ded4930842b46e9507372f0b1b963James Dong
750c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
760c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; MACROS
770c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; Define module specific macros here
780c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
790c1bc742181ded4930842b46e9507372f0b1b963James Dong
800c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
810c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; DEFINES
820c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; Include all pre-processor statements here.
830c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
840c1bc742181ded4930842b46e9507372f0b1b963James Dong
850c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
860c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; EXTERNAL VARIABLES REFERENCES
870c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; Declare variables used in this module but defined elsewhere
880c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
890c1bc742181ded4930842b46e9507372f0b1b963James Dong
900c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
910c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; SIMPLE TYPEDEF'S
920c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
930c1bc742181ded4930842b46e9507372f0b1b963James Dong
940c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
950c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; ENUMERATED TYPEDEF'S
960c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
970c1bc742181ded4930842b46e9507372f0b1b963James Dong
980c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
990c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; STRUCTURES TYPEDEF'S
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; GLOBAL FUNCTION DEFINITIONS
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; Function Prototype declaration
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong    Word16 mult_r(Word16 var1, Word16 var2, Flag *pOverflow);
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong    /*----------------------------------------------------------------------------
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong    ; END
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong    ----------------------------------------------------------------------------*/
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong#ifdef __cplusplus
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong}
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong#endif
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong#endif  /* _MULT_R_H_ */
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong