1 /* 2 * Copyright (c) 2017, 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 media_libva_caps_g8.h 24 //! \brief This file defines the C++ class/interface for gen8 media capbilities. 25 //! 26 27 #ifndef __MEDIA_LIBVA_CAPS_G8_H__ 28 #define __MEDIA_LIBVA_CAPS_G8_H__ 29 30 #include "media_libva_caps.h" 31 32 //! 33 //! \class MediaLibvaCapsG8 34 //! \brief Media libva caps Gen8 35 //! 36 class MediaLibvaCapsG8 : public MediaLibvaCaps 37 { 38 public: 39 //! 40 //! \brief Constructor 41 //! MediaLibvaCapsG8(DDI_MEDIA_CONTEXT * mediaCtx)42 MediaLibvaCapsG8(DDI_MEDIA_CONTEXT *mediaCtx) : MediaLibvaCaps(mediaCtx) 43 { 44 LoadProfileEntrypoints(); 45 return; 46 } 47 48 virtual VAStatus QueryImageFormats(VAImageFormat *formatList, int32_t *num_formats); 49 50 virtual uint32_t GetImageFormatsMaxNum(); 51 52 virtual bool IsImageSupported(uint32_t fourcc); 53 54 virtual VAStatus PopulateColorMaskInfo(VAImageFormat *vaImgFmt); 55 56 protected: 57 virtual VAStatus GetPlatformSpecificAttrib( 58 VAProfile profile, 59 VAEntrypoint entrypoint, 60 VAConfigAttribType type, 61 uint32_t *value); 62 63 //! 64 //! \brief Load profile entry points 65 //! 66 //! \return VAStatus 67 //! Return VA_STATUS_SUCCESS if call success, else fail reason 68 //! 69 VAStatus LoadProfileEntrypoints(); 70 71 //! 72 //! \brief Query AVC ROI maximum number 73 //! 74 //! \param [in] rcMode 75 //! RC mode 76 //! \param [in] isVdenc 77 //! vdenc 78 //! \param [in] maxNum 79 //! Maximum number 80 //! \param [in] isRoiInDeltaQP 81 //! Is ROI in delta QP 82 //! 83 //! \return VAStatus 84 //! Return VA_STATUS_SUCCESS if call success, else fail reason 85 //! 86 VAStatus QueryAVCROIMaxNum(uint32_t rcMode, bool isVdenc, uint32_t *maxNum, bool *isRoiInDeltaQP); 87 88 //! 89 //! \brief Get mb processing rate encode 90 //! 91 //! \param [in] skuTable 92 //! Media feature table 93 //! \param [in] tuIdx 94 //! TU index 95 //! \param [in] codecMode 96 //! Codec mode 97 //! \param [in] vdencActive 98 //! VDENC active 99 //! \param [in] mbProcessingRatePerSec 100 //! Mb processing rate per second 101 //! 102 //! \return VAStatus 103 //! Return VA_STATUS_SUCCESS if call success, else fail reason 104 //! 105 VAStatus GetMbProcessingRateEnc( 106 MEDIA_FEATURE_TABLE *skuTable, 107 uint32_t tuIdx, 108 uint32_t codecMode, 109 bool vdencActive, 110 uint32_t *mbProcessingRatePerSec); 111 }; 112 #endif 113