1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
/*
* Copyright (c) 2017, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
//!
//! \file cm_hal_vebox.h
//! \brief HAL CM Vebox functions
//!
#ifndef MEDIADRIVER_AGNOSTIC_COMMON_CM_CMHALVEBOX_H_
#define MEDIADRIVER_AGNOSTIC_COMMON_CM_CMHALVEBOX_H_
#include "mos_os.h"
#include "renderhal.h"
#include "mhw_vebox.h"
struct CM_VEBOX_SURFACE
{
uint16_t surfaceIndex;
uint16_t surfaceCtrlBits;
};
#define VEBOX_SURFACE_NUMBER (16) //MAX
struct CM_VEBOX_SURFACE_DATA
{
CM_VEBOX_SURFACE surfaceEntry[VEBOX_SURFACE_NUMBER];
};
typedef CM_VEBOX_SURFACE_DATA *PCM_VEBOX_SURFACE_DATA;
struct CM_HAL_EXEC_VEBOX_TASK_PARAM
{
uint32_t veboxVersion; // [in] version
CM_VEBOX_STATE cmVeboxState;
void *veboxParam; // CmBuffer, hold the vebox parameters
uint32_t veboxParamIndex; // vebox parameter surface index (UMD)
CM_VEBOX_SURFACE_DATA veboxSurfaceData;
CM_QUEUE_CREATE_OPTION queueOption; // cm queue info, such as rcs/ccs gpu context.
int32_t taskIdOut; // [out] Task ID
void *osData; // [out] Used for Linux OS data to pass to event
};
typedef CM_HAL_EXEC_VEBOX_TASK_PARAM *PCM_HAL_EXEC_VEBOX_TASK_PARAM;
enum VEBOX_SURF_USAGE
{
VEBOX_CURRENT_FRAME_INPUT_SURF,
VEBOX_PREVIOUS_FRAME_INPUT_SURF,
VEBOX_STMM_INPUT_SURF,
VEBOX_STMM_OUTPUT_SURF,
VEBOX_DN_CURRENT_FRAME_OUTPUT_SURF,
VEBOX_CURRENT_FRAME_OUTPUT_SURF,
VEBOX_PREVIOUS_FRAME_OUTPUT_SURF,
VEBOX_STATISTICS_OUTPUT_SURF,
VEBOX_ALPHA_VIGNETTE_CORRECTION_SURF,
VEBOX_LACE_ACE_RGB_HISTOGRAM_OUTPUT_SURF,
VEBOX_SKIN_SCORE_OUTPUT_SURF
};
//!
//! \brief build up vebox command sequence
//! \details based on passed vebox param to build command sequence and
//! put it into command buffer
//! \param [in] state --- CM_HAL_STATE
//! \param [in] execVeboxParam -- vebox setup params
//!
MOS_STATUS HalCm_ExecuteVeboxTask(
PCM_HAL_STATE state, // [in] Pointer to CM State
PCM_HAL_EXEC_VEBOX_TASK_PARAM execVeboxParam);
//!
//! \brief Set up vebox surface Param
//! \details set up vebox surface state based on parameter based from application
//!
//! \param [in]state -- CM_HAL_STATE
//! \param [in]veboxSurfaceStateCmdParams -- surface state param struct
//!
MOS_STATUS HalCm_SetVeboxSurfaceStateCmdParams(
PCM_HAL_STATE state,
PMHW_VEBOX_SURFACE_STATE_CMD_PARAMS veboxSurfaceStateCmdParams);
//!
//! \brief set vebox DiIecp Command
//! \details build up command to start processing the frames specified by
//! VEB_SURFACE_STATE using the parameters specified by VEB_DI_STATE
//! and VEB_IECP_STATE.
//! \param [in] state -- HAL_CM_STATE
//! \param [in] veboxDiIecpCmdParams -- DIECP command parameter
//! \param [in] cmVeboxSurfaceDataInput -- surface data such as index and control bits
//!
MOS_STATUS HalCm_SetVeboxDiIecpCmdParams(
PCM_HAL_STATE state,
PMHW_VEBOX_DI_IECP_CMD_PARAMS veboxDiIecpCmdParams,
PCM_VEBOX_SURFACE_DATA cmVeboxSurfaceDataInput);
//!
//| \brief reset vebox STMM history
//! \details Resets the portion of the Vebox STMM surface associated with
//| motion history for temporal filtering.
//| \param [in] osInterface -- MOS_INTERFACE
//| \param [in] renderHalSTMMSurface -- RENDERHAL_SURFACE
//!
MOS_STATUS HalCm_VeboxInitSTMMHistory(
PMOS_INTERFACE osInterface,
PRENDERHAL_SURFACE renderHalSTMMSurface);
#endif // #ifndef MEDIADRIVER_AGNOSTIC_COMMON_CM_CMHALVEBOX_H_
|