1 // Copyright (c) 2020 Intel Corporation 2 // 3 // Permission is hereby granted, free of charge, to any person obtaining a copy 4 // of this software and associated documentation files (the "Software"), to deal 5 // in the Software without restriction, including without limitation the rights 6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 // copies of the Software, and to permit persons to whom the Software is 8 // furnished to do so, subject to the following conditions: 9 // 10 // The above copyright notice and this permission notice shall be included in all 11 // copies or substantial portions of the Software. 12 // 13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 // SOFTWARE. 20 21 #include "umc_defs.h" 22 #if defined (MFX_ENABLE_H264_VIDEO_DECODE) 23 24 #ifndef __UMC_H264_DEC_H__ 25 #define __UMC_H264_DEC_H__ 26 27 #include "umc_video_decoder.h" 28 29 namespace UMC 30 { 31 32 class H264VideoDecoderParams : public VideoDecoderParams 33 { 34 public: 35 DYNAMIC_CAST_DECL(H264VideoDecoderParams, VideoDecoderParams); 36 37 enum 38 { 39 ENTROPY_CODING_CAVLC = 0, 40 ENTROPY_CODING_CABAC = 1 41 }; 42 43 enum 44 { 45 H264_PROFILE_UNKNOWN = 0, 46 H264_PROFILE_BASELINE = 66, 47 H264_PROFILE_MAIN = 77, 48 H264_PROFILE_SCALABLE_BASELINE = 83, 49 H264_PROFILE_SCALABLE_HIGH = 86, 50 H264_PROFILE_EXTENDED = 88, 51 H264_PROFILE_HIGH = 100, 52 H264_PROFILE_HIGH10 = 110, 53 H264_PROFILE_MULTIVIEW_HIGH = 118, 54 H264_PROFILE_HIGH422 = 122, 55 H264_PROFILE_STEREO_HIGH = 128, 56 H264_PROFILE_HIGH444 = 144, 57 H264_PROFILE_ADVANCED444_INTRA = 166, 58 H264_PROFILE_ADVANCED444 = 188, 59 H264_PROFILE_HIGH444_PRED = 244, 60 H264_PROFILE_CAVLC444_INTRA = 44 61 }; 62 63 enum 64 { 65 H264_LEVEL_UNKNOWN = 0, 66 H264_LEVEL_1 = 10, 67 H264_LEVEL_11 = 11, 68 H264_LEVEL_1b = 11, 69 H264_LEVEL_12 = 12, 70 H264_LEVEL_13 = 13, 71 72 H264_LEVEL_2 = 20, 73 H264_LEVEL_21 = 21, 74 H264_LEVEL_22 = 22, 75 76 H264_LEVEL_3 = 30, 77 H264_LEVEL_31 = 31, 78 H264_LEVEL_32 = 32, 79 80 H264_LEVEL_4 = 40, 81 H264_LEVEL_41 = 41, 82 H264_LEVEL_42 = 42, 83 84 H264_LEVEL_5 = 50, 85 H264_LEVEL_51 = 51, 86 H264_LEVEL_52 = 52, 87 88 #if (MFX_VERSION >= 1035) 89 H264_LEVEL_6 = 60, 90 H264_LEVEL_61 = 61, 91 H264_LEVEL_62 = 62, 92 #endif 93 94 #if (MFX_VERSION >= 1035) 95 H264_LEVEL_MAX = 62, 96 #else 97 H264_LEVEL_MAX = 52, 98 #endif 99 100 H264_LEVEL_9 = 9 // for SVC profiles 101 }; 102 H264VideoDecoderParams()103 H264VideoDecoderParams() 104 : m_entropy_coding_type(ENTROPY_CODING_CAVLC) 105 , m_DPBSize(16) 106 , m_auxiliary_format_idc(0) 107 , m_bufferedFrames(0) 108 { 109 m_fullSize.width = 0; 110 m_fullSize.height = 0; 111 112 m_cropArea.top = 0; 113 m_cropArea.bottom = 0; 114 m_cropArea.left = 0; 115 m_cropArea.right = 0; 116 117 m_ignore_level_constrain = false; 118 } 119 120 int32_t m_entropy_coding_type; 121 int32_t m_DPBSize; 122 int32_t m_auxiliary_format_idc; 123 mfxSize m_fullSize; 124 UMC::sRECT m_cropArea; 125 126 bool m_ignore_level_constrain; 127 128 int32_t m_bufferedFrames; 129 }; 130 131 } // namespace UMC 132 133 #endif // __UMC_H264_DEC_H__ 134 #endif // MFX_ENABLE_H264_VIDEO_DECODE 135