1 /* 2 * Copyright (c) 2020, Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 #ifndef __VP_PACKET_SHARED_CONTEXT_H__ 23 #define __VP_PACKET_SHARED_CONTEXT_H__ 24 25 namespace vp 26 { 27 struct VP_PACKET_SHARED_CONTEXT 28 { 29 bool isVeboxFirstFrame = true; 30 31 struct 32 { 33 bool bTgneFirstFrame = true; 34 bool bTgneEnable = false; 35 bool previousFallback = false; 36 uint32_t tgneFrame = 0; 37 uint32_t lumaStadTh = 3200; 38 uint32_t chromaStadTh = 1600; 39 uint32_t dw4X4TGNEThCnt = 576; 40 uint32_t dwBSDThreshold = 480; 41 uint32_t dwHistoryInit = 32; 42 uint32_t globalNoiseLevel_Temporal = 0; //!< Global Temporal Noise Level for Y 43 uint32_t globalNoiseLevelU_Temporal = 0; //!< Global Temporal Noise Level for U 44 uint32_t globalNoiseLevelV_Temporal = 0; //!< Global Temporal Noise Level for V 45 uint32_t globalNoiseLevel_Spatial = 0; //!< Global Spatial Noise Level for Y 46 uint32_t globalNoiseLevelU_Spatial = 0; //!< Global Spatial Noise Level for U 47 uint32_t globalNoiseLevelV_Spatial = 0; //!< Global Spatial Noise Level for V 48 } tgneParams; 49 50 struct 51 { 52 uint16_t QP = 0; 53 uint16_t Strength = 0; 54 VPHAL_HVSDN_MODE Mode = HVSDENOISE_AUTO_BDRATE; 55 uint16_t Format = 0; 56 uint16_t TgneEnable = 0; 57 uint16_t FirstFrame = 0; 58 uint16_t TgneFirstFrame = 0; 59 uint16_t Fallback = 0; 60 uint16_t EnableChroma = 0; 61 uint16_t EnableTemporalGNE = 0; 62 uint16_t Width = 0; 63 uint16_t Height = 0; 64 uint32_t Sgne_Level = 0; 65 uint32_t Sgne_LevelU = 0; 66 uint32_t Sgne_LevelV = 0; 67 uint32_t Sgne_Count = 0; 68 uint32_t Sgne_CountU = 0; 69 uint32_t Sgne_CountV = 0; 70 int32_t PrevNslvTemporal = 0; 71 int32_t PrevNslvTemporalU = 0; 72 int32_t PrevNslvTemporalV = 0; 73 uint32_t dwGlobalNoiseLevel = 0; //!< Global Noise Level for Y 74 uint32_t dwGlobalNoiseLevelU = 0; //!< Global Noise Level for U 75 uint32_t dwGlobalNoiseLevelV = 0; //!< Global Noise Level for V 76 bool hVSAutoBdrateEnable = false; 77 bool hVSAutoSubjectiveEnable = false; 78 bool hVSfallback = false; 79 } hvsParams; ~VP_PACKET_SHARED_CONTEXTVP_PACKET_SHARED_CONTEXT80 virtual ~VP_PACKET_SHARED_CONTEXT(){}; 81 }; 82 }; 83 84 #endif // !__VP_PACKET_SHARED_CONTEXT_H__