Home | History | Annotate | Download | only in decoder
      1 /******************************************************************************
      2  *                                                                            *
      3  * Copyright (C) 2018 The Android Open Source Project
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at:
      8  *
      9  * http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  *
     17  *****************************************************************************
     18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
     19 */
     20 #ifndef IXHEAACD_PNS_H
     21 #define IXHEAACD_PNS_H
     22 
     23 #define PNS_BAND_FLAGS_SIZE 16
     24 #define PNS_BAND_FLAGS_MASK \
     25   ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
     26 #define PNS_BAND_FLAGS_SHIFT 3
     27 
     28 #define PNS_SCALE_MANT_TAB_SIZE 4
     29 #define PNS_SCALE_MANT_TAB_MASK (PNS_SCALE_MANT_TAB_SIZE - 1)
     30 #define PNS_SCALE_MANT_TAB_SCALING -4
     31 
     32 #define PNS_SCALEFACTOR_SCALING 2
     33 
     34 #define PNS_SPEC_SCALE 3
     35 
     36 typedef struct {
     37   UWORD8 correlated[PNS_BAND_FLAGS_SIZE];
     38   WORD32 random_vector[PNS_BAND_FLAGS_SIZE * 8];
     39 } ia_pns_correlation_info_struct;
     40 
     41 typedef struct {
     42   WORD32 current_seed;
     43   WORD16 pns_frame_number;
     44 } ia_pns_rand_vec_struct;
     45 
     46 typedef struct {
     47   UWORD8 pns_used[PNS_BAND_FLAGS_SIZE * 8];
     48   WORD16 noise_energy;
     49   UWORD16 pns_active;
     50 } ia_pns_info_struct;
     51 
     52 #endif /* #ifndef IXHEAACD_PNS_H */
     53