1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
22 ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec
23 Available from http://www.3gpp.org
25 (C) 2007, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26 Permission to distribute, modify and use this file under the standard license
27 terms listed above has been obtained from the copyright holder.
28 ****************************************************************************************/
30 ------------------------------------------------------------------------------
34 Filename: noise_gen_amrwb.cpp
36 ------------------------------------------------------------------------------
37 INPUT AND OUTPUT DEFINITIONS
39 int16 * seed seed for the random ng
41 ------------------------------------------------------------------------------
44 Signed 16 bits random generator
46 ------------------------------------------------------------------------------
50 ------------------------------------------------------------------------------
53 ------------------------------------------------------------------------------
56 ------------------------------------------------------------------------------
60 /*----------------------------------------------------------------------------
62 ----------------------------------------------------------------------------*/
64 #include "pv_amr_wb_type_defs.h"
65 #include "pvamrwbdecoder_basic_op.h"
66 #include "pvamrwbdecoder_acelp.h"
68 /*----------------------------------------------------------------------------
70 ; Define module specific macros here
71 ----------------------------------------------------------------------------*/
74 /*----------------------------------------------------------------------------
76 ; Include all pre-processor statements here. Include conditional
77 ; compile variables also.
78 ----------------------------------------------------------------------------*/
80 /*----------------------------------------------------------------------------
81 ; LOCAL FUNCTION DEFINITIONS
82 ; Function Prototype declaration
83 ----------------------------------------------------------------------------*/
85 /*----------------------------------------------------------------------------
86 ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
87 ; Variable declaration - defined here and used outside this module
88 ----------------------------------------------------------------------------*/
90 /*----------------------------------------------------------------------------
91 ; EXTERNAL FUNCTION REFERENCES
92 ; Declare functions defined elsewhere and referenced in this module
93 ----------------------------------------------------------------------------*/
95 /*----------------------------------------------------------------------------
96 ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
97 ; Declare variables used in this module but defined elsewhere
98 ----------------------------------------------------------------------------*/
100 /*----------------------------------------------------------------------------
102 ----------------------------------------------------------------------------*/
104 int16 noise_gen_amrwb(int16 * seed)
106 /* int16 seed = 21845; */
107 *seed = (int16)fxp_mac_16by16(*seed, 31821, 13849L);