Skip to content

Commit

Permalink
[VP] HDR Tone Mapping Shader Open Source.
Browse files Browse the repository at this point in the history
HDR Tone Mapping Shader Open Source from Gen9+. It is for HDR10.

Change-Id: Ic9a7bad7af3e777ca8179c80ed721ebcec039e5a
  • Loading branch information
FurongZhang authored and gfxbot committed Aug 27, 2019
1 parent 77ecc67 commit 43df6f5
Show file tree
Hide file tree
Showing 13 changed files with 7,305 additions and 7 deletions.
5 changes: 4 additions & 1 deletion media_driver/agnostic/common/renderhal/renderhal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6735,7 +6735,10 @@ MOS_STATUS RenderHal_SendSurfaceStateEntry(

MOS_MEMCOMP_STATE mmcMode = MOS_MEMCOMP_DISABLED;
PMOS_RESOURCE pMosResource = (PMOS_RESOURCE)pSurfaceStateToken->pResourceInfo;
pOsInterface->pfnGetMemoryCompressionMode(pOsInterface, pMosResource, &mmcMode);
if (pOsInterface->pfnGetMemoryCompressionMode)
{
pOsInterface->pfnGetMemoryCompressionMode(pOsInterface, pMosResource, &mmcMode);
}

if (mmcMode == MOS_MEMCOMP_RC && pSurfaceStateToken->DW3.SurfaceStateType == MEDIASTATE_BTS_DEFAULT_TYPE)
{
Expand Down
3 changes: 2 additions & 1 deletion media_driver/agnostic/common/renderhal/renderhal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2018, Intel Corporation
* Copyright (c) 2009-2019, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -472,6 +472,7 @@ typedef enum _RENDERHAL_COMPONENT
RENDERHAL_COMPONENT_CM,
RENDERHAL_COMPONENT_16ALIGN,
RENDERHAL_COMPONENT_FAST1TON,
RENDERHAL_COMPONENT_HDR,
RENDERHAL_COMPONENT_COUNT_BASE,
RENDERHAL_COMPONENT_RESERVED_NUM = 15,
RENDERHAL_COMPONENT_COUNT
Expand Down
4 changes: 3 additions & 1 deletion media_driver/agnostic/common/vp/hal/media_srcs.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018, Intel Corporation
# Copyright (c) 2019, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -39,6 +39,7 @@ set(TMP_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/vphal_render_16alignment.cpp
${CMAKE_CURRENT_LIST_DIR}/vphal_render_fast1ton.cpp
${CMAKE_CURRENT_LIST_DIR}/vphal_render_vebox_denoise.cpp
${CMAKE_CURRENT_LIST_DIR}/vphal_render_hdr_base.cpp
)

set(TMP_HEADERS_
Expand All @@ -64,6 +65,7 @@ set(TMP_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/vphal_render_fast1ton.h
${CMAKE_CURRENT_LIST_DIR}/vphal_common_hdr.h
${CMAKE_CURRENT_LIST_DIR}/vphal_render_vebox_denoise.h
${CMAKE_CURRENT_LIST_DIR}/vphal_render_hdr_base.h
)


Expand Down
9 changes: 8 additions & 1 deletion media_driver/agnostic/common/vp/hal/vphal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2018, Intel Corporation
* Copyright (c) 2009-2019, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -254,6 +254,10 @@ enum VpKernelID
// Fast 1toN
kernelFast1toN,

// HDR
kernelHdrMandatory,
kernelHdrPreprocess,

baseKernelMaxNumID
};

Expand Down Expand Up @@ -290,6 +294,7 @@ struct VphalSettings
sameSampleThreshold(0),
disableDnDi(0),
kernelUpdate(0),
disableHdr(0),
veboxParallelExecution(0)
{
};
Expand All @@ -299,6 +304,7 @@ struct VphalSettings
int32_t sameSampleThreshold;
uint32_t disableDnDi; //!< For validation purpose
uint32_t kernelUpdate; //!< For VEBox Copy and Update kernels
uint32_t disableHdr; //!< Disable Hdr
uint32_t veboxParallelExecution; //!< Control VEBox parallel execution with render engine
};

Expand Down Expand Up @@ -350,6 +356,7 @@ struct VphalFeatureReport
VPHAL_COMPOSITION_REPORT_MODE CompositionMode; //!< Inplace/Legacy Compostion flag
bool VEFeatureInUse; //!< If any VEBOX feature is in use, excluding pure bypass for SFC
bool DiScdMode; //!< Scene change detection
VPHAL_HDR_MODE HDRMode; //!< HDR mode
};

#pragma pack(pop)
Expand Down
9 changes: 9 additions & 0 deletions media_driver/agnostic/common/vp/hal/vphal_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ typedef struct _VPHAL_FAST1TON_CACHE_CNTL
VPHAL_MEMORY_OBJECT_CONTROL SamplerParamsStatsSurfMemObjCtl;
}VPHAL_FAST1TON_CACHE_CNTL, *PVPHAL_FAST1TON_CACHE_CNTL;

typedef struct _VPHAL_HDR_CACHE_CNTL
{
bool bL3CachingEnabled;
VPHAL_MEMORY_OBJECT_CONTROL SourceSurfMemObjCtl;
VPHAL_MEMORY_OBJECT_CONTROL TargetSurfMemObjCtl;
VPHAL_MEMORY_OBJECT_CONTROL Lut2DSurfMemObjCtl;
VPHAL_MEMORY_OBJECT_CONTROL Lut3DSurfMemObjCtl;
VPHAL_MEMORY_OBJECT_CONTROL CoeffSurfMemObjCtl;
} VPHAL_HDR_CACHE_CNTL, *PVPHAL_HDR_CACHE_CNTL;

//!
//! \brief Feature specific cache control settings
Expand Down

0 comments on commit 43df6f5

Please sign in to comment.