1 /* 2 * Copyright (c) 2021-2023, 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 //! 23 //! \file vp_feature_report.h 24 //! \brief vp feature report 25 //! \details vp feature report class inlcuding: 26 //! features, functions 27 //! 28 29 #ifndef __VP_FEATURE_REPORT_H__ 30 #define __VP_FEATURE_REPORT_H__ 31 32 #include <stdint.h> 33 #include "vp_common.h" 34 #include "vp_common_tools.h" 35 #include "media_class_trace.h" 36 #include "vp_common_hdr.h" 37 38 //! 39 //! Class VphalFeatureReport 40 //! \brief Vphal Feature Report Class 41 //! 42 class VpFeatureReport 43 { 44 public: 45 struct VP_FEATURES 46 { 47 bool iecp = false; //!< IECP enable/disable 48 bool ief = false; //!< Enhancement filter 49 bool denoise = false; //!< Denoise 50 bool chromaDenoise = false; //!< Chroma Denoise 51 VPHAL_DI_REPORT_MODE deinterlaceMode = VPHAL_DI_REPORT_PROGRESSIVE; //!< Deinterlace mode 52 VPHAL_SCALING_MODE scalingMode = VPHAL_SCALING_NEAREST; //!< Scaling mode 53 VPHAL_OUTPUT_PIPE_MODE outputPipeMode = VPHAL_OUTPUT_PIPE_MODE_COMP; //!< Output Pipe 54 bool vpMMCInUse = false; //!< MMC enable flag 55 bool rtCompressible = false; //!< RT MMC Compressible flag 56 uint8_t rtCompressMode = 0; //!< RT MMC Compression mode 57 bool ffdiCompressible = false; //!< FFDI MMC Compressible flag 58 uint8_t ffdiCompressMode = 0; //!< FFDI MMC Compression mode 59 bool ffdnCompressible = false; //!< FFDN MMC Compressible flag 60 uint8_t ffdnCompressMode = 0; //!< FFDN MMC Compression mode 61 bool stmmCompressible = false; //!< STMM MMC Compressible flag 62 uint8_t stmmCompressMode = 0; //!< STMM MMC Compression mode 63 bool scalerCompressible = false; //!< Scaler MMC Compressible flag for Gen10 64 uint8_t scalerCompressMode = 0; //!< Scaler MMC Compression mode for Gen10 65 bool primaryCompressible = false; //!< Input Primary Surface Compressible flag 66 uint8_t primaryCompressMode = 0; //!< Input Primary Surface Compression mode 67 VPHAL_COMPOSITION_REPORT_MODE compositionMode = VPHAL_NO_COMPOSITION; //!< Inplace/Legacy Compostion flag 68 bool veFeatureInUse = false; //!< If any VEBOX feature is in use, excluding pure bypass for SFC 69 bool diScdMode = false; //!< Scene change detection 70 VPHAL_HDR_MODE hdrMode = VPHAL_HDR_MODE_NONE; //!< HDR mode 71 bool packetReused = false; //!< true if packet reused. 72 uint8_t rtCacheSetting = 0; //!< Render Target cache usage 73 #if (_DEBUG || _RELEASE_INTERNAL) 74 uint8_t rtOldCacheSetting = 0; //!< Render Target old cache usage 75 bool isL03DLut = false; 76 bool isL0FC = false; 77 uint32_t diffLogL0FC = 0; 78 #endif 79 bool VeboxScalability = false; //!< Vebox Scalability flag 80 bool VPApogeios = false; //!< VP Apogeios flag 81 bool sfcLinearOutputByTileConvert = false; //!< enableSFCLinearOutputByTileConvert 82 }; 83 ~VpFeatureReport()84 virtual ~VpFeatureReport(){}; 85 86 //! 87 //! \brief VphalFeatureReport Constructor 88 //! \details Creates instance of VphalFeatureReport 89 //! 90 VpFeatureReport(void *owner = nullptr) 91 { 92 this->owner = owner; 93 }; 94 95 //! 96 //! \brief initialize VphalFeatureReport value 97 //! \details initialize VphalFeatureReport value, can use it to reset report value 98 //! 99 virtual void InitReportValue(); 100 101 //! 102 //! \brief set VphalFeatureReport value 103 //! \details set VphalFeatureReport value 104 //! 105 virtual void SetConfigValues( 106 PVP_CONFIG configValues, 107 bool traceEvent = true); 108 GetFeatures()109 VP_FEATURES &GetFeatures() 110 { 111 return m_features; 112 } 113 114 void *owner = nullptr; //!< Pointer to object creating the report 115 116 protected: 117 VP_FEATURES m_features; 118 119 MEDIA_CLASS_DEFINE_END(VpFeatureReport) 120 }; 121 #endif // __VP_FEATURE_REPORT_H__ 122