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_MEMORY_STANDARDS_H
     21 #define IXHEAACD_MEMORY_STANDARDS_H
     22 
     23 /*****************************************************************************/
     24 /* type definitions                                                          */
     25 /*****************************************************************************/
     26 /* standard memory table descriptor for libraries */
     27 typedef struct {
     28   UWORD32 ui_size;         /* size of the memory in bytes   */
     29   UWORD32 ui_alignment;    /* alignment in bytes            */
     30   UWORD32 ui_type;         /* type of memory                */
     31   UWORD32 ui_placement[2]; /* 64 bit placement info     */
     32   UWORD32 ui_priority;     /* the importance for placement  */
     33   UWORD32 ui_placed[2];    /* the o_red location for placement  */
     34 } ia_mem_info_struct;
     35 
     36 /*****************************************************************************/
     37 /* Constant hash defines                                                     */
     38 /*****************************************************************************/
     39 /* when you don't need alignment, pass this to memory library */
     40 #define IA_MEM_NO_ALIGN 0x01
     41 
     42 /* ittiam standard memory types */
     43 /* to be used inter frames */
     44 #define IA_MEMTYPE_PERSIST 0x00
     45 /* read write, to be used intra frames */
     46 #define IA_MEMTYPE_SCRATCH 0x01
     47 /* read only memory, intra frame */
     48 #define IA_MEMTYPE_INPUT 0x02
     49 /* read-write memory, for usable output, intra frame */
     50 #define IA_MEMTYPE_OUTPUT 0x03
     51 /* readonly memory, inter frame */
     52 #define IA_MEMTYPE_TABLE 0x04
     53 /* input buffer before mem tabs allocation */
     54 #define IA_MEMTYPE_PRE_FRAME_INPUT 0x05
     55 /* input buffer before mem tabs allocation */
     56 #define IA_MEMTYPE_PRE_FRAME_SCRATCH 0x06
     57 /* for local variables */
     58 #define IA_MEMTYPE_AUTO_VAR 0x80
     59 
     60 /* ittiam standard memory priorities */
     61 #define IA_MEMPRIORITY_ANYWHERE 0x00
     62 #define IA_MEMPRIORITY_LOWEST 0x01
     63 #define IA_MEMPRIORITY_LOW 0x02
     64 #define IA_MEMPRIORITY_NORM 0x03
     65 #define IA_MEMPRIORITY_ABOVE_NORM 0x04
     66 #define IA_MEMPRIORITY_HIGH 0x05
     67 #define IA_MEMPRIORITY_HIGHER 0x06
     68 #define IA_MEMPRIORITY_CRITICAL 0x07
     69 
     70 /* ittiam standard memory placements */
     71 /* placement is defined by 64 bits */
     72 
     73 #define IA_MEMPLACE_FAST_RAM_0 0x000001
     74 #define IA_MEMPLACE_FAST_RAM_1 0x000002
     75 #define IA_MEMPLACE_FAST_RAM_2 0x000004
     76 #define IA_MEMPLACE_FAST_RAM_3 0x000008
     77 #define IA_MEMPLACE_FAST_RAM_4 0x000010
     78 #define IA_MEMPLACE_FAST_RAM_5 0x000020
     79 #define IA_MEMPLACE_FAST_RAM_6 0x000040
     80 #define IA_MEMPLACE_FAST_RAM_7 0x000080
     81 
     82 #define IA_MEMPLACE_INT_RAM_0 0x000100
     83 #define IA_MEMPLACE_INT_RAM_1 0x000200
     84 #define IA_MEMPLACE_INT_RAM_2 0x000400
     85 #define IA_MEMPLACE_INT_RAM_3 0x000800
     86 #define IA_MEMPLACE_INT_RAM_4 0x001000
     87 #define IA_MEMPLACE_INT_RAM_5 0x002000
     88 #define IA_MEMPLACE_INT_RAM_6 0x004000
     89 #define IA_MEMPLACE_INT_RAM_7 0x008000
     90 
     91 #define IA_MEMPLACE_EXT_RAM_0 0x010000
     92 #define IA_MEMPLACE_EXT_RAM_1 0x020000
     93 #define IA_MEMPLACE_EXT_RAM_2 0x040000
     94 #define IA_MEMPLACE_EXT_RAM_3 0x080000
     95 #define IA_MEMPLACE_EXT_RAM_4 0x100000
     96 #define IA_MEMPLACE_EXT_RAM_5 0x200000
     97 #define IA_MEMPLACE_EXT_RAM_6 0x400000
     98 #define IA_MEMPLACE_EXT_RAM_7 0x800000
     99 
    100 #define IA_MEMPLACE_DONTCARE_H 0xFFFFFFFF
    101 #define IA_MEMPLACE_DONTCARE_L 0xFFFFFFFF
    102 
    103 /* the simple common PC RAM */
    104 #define IA_PC_RAM_H 0x00000000
    105 #define IA_PC_RAM_L IA_MEMPLACE_EXT_RAM_0
    106 
    107 #endif /* IXHEAACD_MEMORY_STANDARDS_H */
    108