Home | History | Annotate | Download | only in src
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 
     19 /*----------------------------------------------------------------------------
     20 ; INCLUDES
     21 ----------------------------------------------------------------------------*/
     22 
     23 #include    "mp4dec_api.h"
     24 #include    "mp4def.h"
     25 #include    "scaling.h"
     26 /*----------------------------------------------------------------------------
     27 ; MACROS
     28 ; Define module specific macros here
     29 ----------------------------------------------------------------------------*/
     30 
     31 
     32 /*----------------------------------------------------------------------------
     33 ; DEFINES
     34 ; Include all pre-processor statements here. Include conditional
     35 ; compile variables also.
     36 ----------------------------------------------------------------------------*/
     37 
     38 /*----------------------------------------------------------------------------
     39 ; LOCAL FUNCTION DEFINITIONS
     40 ; Function Prototype declaration
     41 ----------------------------------------------------------------------------*/
     42 
     43 
     44 /*----------------------------------------------------------------------------
     45 ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
     46 ; Variable declaration - defined here and used outside this module
     47 ----------------------------------------------------------------------------*/
     48 
     49 /* this scaling can be used for dividing values up to 3292             07/10/01 */
     50 const int32 scale[63] = {0, 262145, 131073, 87382, 65537, 52430, 43692, 37450, 32769, 29128,
     51                          26215, 23832, 21846, 20166, 18726, 17477, 16385, 15421, 14565, 13798,
     52                          13108, 12484, 11917, 11399, 10924, 10487, 10083, 9710, 9363, 9040,
     53                          8739, 8457, 8193, 7945, 7711, 7491, 7283, 7086, 6900, 6723, 6555, 6395,
     54                          6243, 6097, 5959, 5826, 5700, 5579, 5462, 5351, 5244, 5141, 5042, 4947, 4856,
     55                          4767, 4682, 4600, 4521, 4444, 4370, 4298, 4229
     56                         };
     57 /*----------------------------------------------------------------------------
     58 ; EXTERNAL FUNCTION REFERENCES
     59 ; Declare functions defined elsewhere and referenced in this module
     60 ----------------------------------------------------------------------------*/
     61 
     62 
     63 /*----------------------------------------------------------------------------
     64 ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
     65 ; Declare variables used in this module but defined elsewhere
     66 ----------------------------------------------------------------------------*/
     67 
     68 
     69 /*----------------------------------------------------------------------------
     70 ; FUNCTION CODE
     71 ----------------------------------------------------------------------------*/
     72 
     73 
     74 /*----------------------------------------------------------------------------
     75 ; Define all local variables
     76 ----------------------------------------------------------------------------*/
     77 
     78 
     79 /*----------------------------------------------------------------------------
     80 ; Function body here
     81 ----------------------------------------------------------------------------*/
     82 
     83 
     84 /*----------------------------------------------------------------------------
     85 ; Return nothing or data or data pointer
     86 ----------------------------------------------------------------------------*/
     87 
     88 
     89