1 /* 2 * Copyright (c) 2018-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 23 //! 24 //! \file media_scalability_option.h 25 //! \brief Defines the common interface for media scalability option 26 //! \details The media scalability interface is further sub-divided by component, 27 //! this file is for the base interface which is shared by all components. 28 //! 29 30 #ifndef __MEDIA_SCALABILITY_OPTION_H__ 31 #define __MEDIA_SCALABILITY_OPTION_H__ 32 #include "media_scalability_defs.h" 33 #include "mos_os.h" 34 35 class MediaScalabilityOption { 36 public: 37 //! 38 //! \brief Media scalability option destructor 39 // ~MediaScalabilityOption()40 virtual ~MediaScalabilityOption(){}; 41 42 //! 43 //! \brief Set scalability option 44 //! \param [in] params 45 //! Pointer to the input parameters to set scalability option 46 //! \return MOS_STATUS 47 //! MOS_STATUS_SUCCESS if success, else fail reason 48 //! 49 virtual MOS_STATUS SetScalabilityOption(ScalabilityPars *params) = 0; 50 //! 51 //! \brief check if scalability option matched with current option 52 //! \param [in] params 53 //! Pointer to the input parameters for compare 54 //! \return bool 55 //! Ture if matched, else false 56 //! 57 virtual bool IsScalabilityOptionMatched(ScalabilityPars *params) = 0; 58 //! 59 //! \brief check if scalability option matched with current option 60 //! \param [in] scalabOption 61 //! Input scalability option for compare 62 //! \return bool 63 //! Ture if matched, else false 64 //! IsScalabilityOptionMatched(MediaScalabilityOption & scalabOption)65 virtual bool IsScalabilityOptionMatched(MediaScalabilityOption &scalabOption) 66 { 67 return false; 68 }; 69 //! 70 //! \brief check if scalability option matched with current option 71 //! \return uint8_t 72 //! pipe number 73 //! GetNumPipe()74 uint8_t GetNumPipe() { return m_numPipe; }; GetRAMode()75 uint32_t GetRAMode() const { return m_raMode; }; GetProtectMode()76 uint32_t GetProtectMode() const { return m_protectMode; }; 77 protected: 78 uint8_t m_numPipe = 0; 79 uint32_t m_raMode = 0; 80 uint32_t m_protectMode = 0; 81 static constexpr uint32_t m_4KFrameWdithTh = 3840; 82 static constexpr uint32_t m_4KFrameHeightTh = 2160; 83 static constexpr uint32_t m_5KFrameWdithTh = 5120; 84 static constexpr uint32_t m_5KFrameHeightTh = 2880; 85 static constexpr uint32_t m_8KFrameWdithTh = 7680; 86 static constexpr uint32_t m_8KFrameHeightTh = 4320; 87 MEDIA_CLASS_DEFINE_END(MediaScalabilityOption) 88 }; 89 #endif // !__MEDIA_SCALABILITY_OPTION_H__ 90