1 /* Copyright (c) 2022, Intel Corporation 2 * 3 * Permission is hereby granted, free of charge, to any person obtaining a 4 * copy of this software and associated documentation files (the "Software"), 5 * to deal in the Software without restriction, including without limitation 6 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 * and/or sell copies of the Software, and to permit persons to whom the 8 * Software is furnished to do so, subject to the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included 11 * in all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 17 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19 * OTHER DEALINGS IN THE SOFTWARE. 20 */ 21 //! 22 //! \file vp_hdr_resource_manager.h 23 //! \brief The header file of the extention class of vp hdr resource manager 24 //! \details all the vp hdr resources will be traced here for usages using intermeida 25 //! surfaces. 26 //! 27 #ifndef _VP_HDR_RESOURCE_MANAGER_H__ 28 #define _VP_HDR_RESOURCE_MANAGER_H__ 29 #include "mos_defs.h" 30 #include "vp_allocator.h" 31 #include "sw_filter_pipe.h" 32 #include "vp_utils.h" 33 34 #define VP_MAX_HDR_INPUT_LAYER 8 35 36 typedef unsigned char uchar; 37 38 namespace vp { 39 class VphdrResourceManager 40 { 41 public: 42 VphdrResourceManager(VpAllocator &allocator); 43 ~VphdrResourceManager(); 44 MOS_STATUS AssignRenderResource(VP_EXECUTE_CAPS &caps, std::vector<VP_SURFACE *> &inputSurfaces, VP_SURFACE *outputSurface, RESOURCE_ASSIGNMENT_HINT resHint, VP_SURFACE_SETTING &surfSetting, SwFilterPipe &executedFilters, MOS_INTERFACE &osInterface, VphalFeatureReport &reporting, bool deferredDestroyed); 45 46 private: 47 MOS_STATUS FreeHdrRenderResource(); 48 49 protected: 50 VpAllocator &m_allocator; 51 VP_SURFACE *m_hdrCoeff = nullptr; 52 VP_SURFACE *m_hdrAutoModeCoeffSurface = nullptr; 53 VP_SURFACE *m_hdrAutoModeIirTempSurface = nullptr; 54 VP_SURFACE *m_hdrOETF1DLUTSurface[VP_MAX_HDR_INPUT_LAYER] = {}; 55 VP_SURFACE *m_hdrCri3DLUTSurface[VP_MAX_HDR_INPUT_LAYER] = {}; 56 57 MEDIA_CLASS_DEFINE_END(vp__VphdrResourceManager) 58 }; 59 } // namespace vp 60 #endif // _VP_HDR_RESOURCE_MANAGER_H__ 61