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 * @file 23 * isvcd_defs.h 24 * 25 * @brief 26 * Type definitions used in the code 27 * 28 * @author 29 * Kishore 30 * 31 * @remarks 32 * None 33 * 34 ******************************************************************************* 35 */ 36 37 #ifndef _ISVCD_DEFS_H_ 38 #define _ISVCD_DEFS_H_ 39 40 #include <stdint.h> 41 42 typedef enum 43 { 44 ERROR_SVC_FIELD_PIC_UNSUPPORTED = 0xC1, 45 ERROR_SVC_INV_SCAN_IDX = 0xC2, 46 ERROR_SVC_INV_NAL_UNIT = 0xC3, 47 ERROR_SVC_INV_SUBSET_SPS = 0xC4 48 } isvcd_decoder_error_code_t; 49 50 #define FLUSH 2 51 52 #define SVCD_MAX_FRAME_WIDTH 4080 53 #define SVCD_MAX_FRAME_HEIGHT 4080 54 #define SVCD_MAX_FRAME_SIZE (4096 * 2048) 55 56 #define SVCD_MIN_FRAME_WIDTH 32 57 #define SVCD_MIN_FRAME_HEIGHT 32 58 59 #define SCALABLE_BASELINE_PROFILE_IDC 83 60 #define SCALABLE_HIGH_PROFILE_IDC 86 61 #define SCALABLE_HIGH_INTRA_IDC 118 62 63 #define SPS_EXTENSION_NAL 13 64 #define PREFIX_UNIT_NAL 14 65 #define SUBSET_SPS_NAL 15 66 #define CODED_SLICE_EXTENSION_NAL 20 67 68 #define EP_SLICE 5 69 #define EB_SLICE 6 70 #define EI_SLICE 7 71 72 #define D_INTRA_IBL 16 73 74 #define CAB_INFERRED 0xFF 75 76 #define MAX_TOTAL_LYRS (MAX_QUALITY_ID + 1) * (MAX_DEPENDENCY_ID + 1) * 16 77 78 #define MAX_QUALITY_LYRS 5 /* ReqRename */ 79 /*!< Maximum number of layers with same 80 dependency id 81 */ 82 #define MAX_DEPENDENCY_LYRS 6 /* ReqRename */ 83 /*!< Maximum number of layers with 84 different dependency id 85 */ 86 87 /** Maximum number of layers without spatial resolution change */ 88 #define MAX_NUM_LYRS_IN_RES 5 89 90 /** Maximum number of dependency layers in a resolution */ 91 #define MAX_DEP_LYRS_IN_RES 3 92 93 /* Maximum number of spatial resolution layers */ 94 #define MAX_NUM_RES_LYRS 3 95 96 /* Maximum number of layers in an access unit */ 97 #define MAX_NUM_LAYERS MAX_NUM_LYRS_IN_RES *MAX_NUM_RES_LYRS 98 99 #define MAX_NUM_PIC_BUFS (32 + 1) 100 101 /*SVC Standard Specific Macros*/ 102 #define MAX_QUALITY_ID 0 103 #define MAX_DEPENDENCY_ID 4 104 #define MAX_TEMPORAL_ID 7 105 #define MAX_PRIORITY_ID 63 106 #define MAX_REF_DEP_ID ((MAX_DEPENDENCY_ID << 4) | MAX_QUALITY_ID) 107 108 #define BASE_LAYER 0 109 #define MEDIAL_ENHANCEMENT_LAYER 1 110 #define TARGET_LAYER 2 111 112 #define MB_INFER 250 113 114 #define SVC_INTER_MB (1 << 0) /*!< Intra MBs other than IPCM and I_BL */ 115 #define SVC_INTRA_MB (1 << 1) /*!< P or B MBs decoded or inferred*/ 116 #define SVC_IPCM_MB (1 << 2) /*!< IPCM_MB decoder or inferred*/ 117 #define SVC_IBL_MB (1 << 3) /*!< I_BL MB always inferred */ 118 #define SVC_INTRA_INTER_MB (1 << 4) /*!< Intra Inter MB */ 119 120 #endif /*_ISVCD_DEFS_H_*/ 121