1 /****************************************************************************** 2 * 3 * Copyright (C) 2022 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 21 /** 22 ******************************************************************************* 23 * @file 24 * isvc_defs.h 25 * 26 * @brief 27 * Contains macro defintions, and other typedefs used for SVC encoding 28 * 29 * @author 30 * ittiam 31 * 32 * @remarks 33 * None 34 * 35 ******************************************************************************* 36 */ 37 38 #ifndef _ISVC_DEFS_H_ 39 #define _ISVC_DEFS_H_ 40 41 #define MAX_NUM_TEMPORAL_LAYERS 3 42 43 #define MAX_NUM_SPATIAL_LAYERS 3 44 45 #define MAX_VUI_EXT_NUM_ENTRIES (MAX_NUM_TEMPORAL_LAYERS * MAX_NUM_SPATIAL_LAYERS) 46 47 #define SVC_INTER_MB (1 << 0) /*!< Intra MBs other than IPCM and I_BL */ 48 49 #define SVC_INTRA_MB (1 << 1) /*!< P or B MBs decoded or inferred*/ 50 51 #define SVC_IPCM_MB (1 << 2) /*!< IPCM_MB decoder or inferred*/ 52 53 #define SVC_IBL_MB (1 << 3) /*!< I_BL MB always inferred */ 54 55 #define SVC_INTRA_INTER_MB \ 56 (1 << 4) /*!< Intra Inter MB will have an alternate prediction \ 57 process*/ 58 59 #define MB_WIDTH_SHIFT 4 60 61 #define MB_HEIGHT_SHIFT 4 62 63 #define UV 1 64 65 #define NUM_SP_COMPONENTS 2 66 67 #define NUM_COMPONENTS 3 68 69 #define SVC_EXTRACT_MB_MODE(x) ((x) &0x1F) 70 71 #define GET_BIT_TX_SIZE(x, y) ((x) & (1 << (7 - (y)))) 72 73 typedef enum SVC_PROFILES_T 74 { 75 IH264_SCALABLE_BASELINE = 83, 76 IH264_SCALABLE_HIGH_PROFILE = 86 77 } SVC_PROFILES_T; 78 79 typedef enum PRED_MODE_T 80 { 81 L0 = 0, 82 L1 = 1, 83 BI = 2, 84 NUM_PRED_DIRS = 2, 85 INVALID_PRED_MODE = 4, 86 } PRED_MODE_T; 87 88 #endif 89