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_g9.h 24 //! \brief This file defines the C++ class/interface for gen9 media capbilities. 25 //! 26 27 #ifndef __MEDIA_LIBVA_CAPS_G9_H__ 28 #define __MEDIA_LIBVA_CAPS_G9_H__ 29 30 #include "media_libva_caps.h" 31 32 //! 33 //! \class MediaLibvaCapsG9 34 //! \brief Media libva caps Gen9 35 //! 36 class MediaLibvaCapsG9 : public MediaLibvaCaps 37 { 38 public: 39 //! 40 //! \brief Constructor 41 //! MediaLibvaCapsG9(DDI_MEDIA_CONTEXT * mediaCtx)42 MediaLibvaCapsG9(DDI_MEDIA_CONTEXT *mediaCtx) : MediaLibvaCaps(mediaCtx) 43 { 44 return; 45 } 46 Init()47 virtual VAStatus Init() 48 { 49 LoadProfileEntrypoints(); 50 return VA_STATUS_SUCCESS; 51 } 52 53 virtual VAStatus QueryImageFormats(VAImageFormat *formatList, int32_t *num_formats); 54 55 virtual uint32_t GetImageFormatsMaxNum(); 56 57 virtual bool IsImageSupported(uint32_t fourcc); 58 59 virtual VAStatus PopulateColorMaskInfo(VAImageFormat *vaImgFmt); 60 61 protected: 62 virtual VAStatus GetPlatformSpecificAttrib(VAProfile profile, 63 VAEntrypoint entrypoint, 64 VAConfigAttribType type, 65 unsigned int *value); 66 67 //! 68 //! \brief Load profile entry points 69 //! 70 //! \return VAStatus 71 //! Return VA_STATUS_SUCCESS if call success, else fail reason 72 //! 73 VAStatus LoadProfileEntrypoints(); 74 75 //! 76 //! \brief Query AVC ROI maximum number 77 //! 78 //! \param [in] rcMode 79 //! RC mode 80 //! \param [in] isVdenc 81 //! vdenc 82 //! \param [in] maxNum 83 //! Maximum number 84 //! \param [in] isRoiInDeltaQP 85 //! Is ROI in delta QP 86 //! 87 //! \return VAStatus 88 //! Return VA_STATUS_SUCCESS if call success, else fail reason 89 //! 90 VAStatus QueryAVCROIMaxNum(uint32_t rcMode, bool isVdenc, uint32_t *maxNum, bool *isRoiInDeltaQP); 91 }; 92 #endif 93