Skip to content

Commit

Permalink
[VP] HDR Tone Mapping Curve Change on 3dlut kernel Legacy
Browse files Browse the repository at this point in the history
HDR Tone Mapping Curve Change on 3dlut kernel Legacy.
  • Loading branch information
VickyZengg authored and intel-mediadev committed Oct 24, 2024
1 parent 9bbd928 commit 9c9263a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
11 changes: 9 additions & 2 deletions media_driver/agnostic/common/vp/hal/vphal_render_hdr_g11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,15 @@ void Hdr3DLutGenerator::InitCoefSurface(const uint32_t maxDLL, const uint32_t ma
{
CalcCCMMatrix();
MOS_SecureMemcpy(ccmMatrix, sizeof(float) * 12, color_matrix_calculation, sizeof(float) * 12);

tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
if (maxDLL > 800)
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2H;
VPHAL_RENDER_NORMALMESSAGE("Change curve, maxDLL %d, hdrMode: %d!", maxDLL, tmMode);
}
else
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
}
oetfCurve = (OETF_CURVE_TYPE)OETF_SRGB;
tmSrcType = (TONE_MAPPING_SOURCE_TYPE)TONE_MAPPING_SOURCE_PSEUDO_Y_BT709;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5299,8 +5299,8 @@ MOS_STATUS VPHAL_VEBOX_RENDER_DATA::Init()
fScaleY = 0.0f;

bHdr3DLut = false;
uiMaxDisplayLum = 4000;
uiMaxContentLevelLum = 1000;
uiMaxDisplayLum = 800;
uiMaxContentLevelLum = 4000;
hdrMode = VPHAL_HDR_MODE_NONE;

return MOS_STATUS_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions media_driver/agnostic/common/vp/hal/vphal_render_vebox_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,8 @@ struct VPHAL_VEBOX_RENDER_DATA

bHdr3DLut = false;
bUseVEHdrSfc = false;
uiMaxDisplayLum = 4000;
uiMaxContentLevelLum = 1000;
uiMaxDisplayLum = 800;
uiMaxContentLevelLum = 4000;
hdrMode = VPHAL_HDR_MODE_NONE;

m_pVeboxStateParams = nullptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,15 @@ void Hdr3DLutGeneratorG12::InitCoefSurface(const uint32_t maxDLL, const uint32_t
CalcCCMMatrix();
MOS_SecureMemcpy(ccmMatrix, sizeof(float) * 12, color_matrix_calculation, sizeof(float) * 12);

tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
if (maxDLL > 800)
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2H;
VPHAL_RENDER_NORMALMESSAGE("Change curve, maxDLL %d, hdrMode: %d!", maxDLL, tmMode);
}
else
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
}
oetfCurve = (OETF_CURVE_TYPE)OETF_SRGB;
tmSrcType = (TONE_MAPPING_SOURCE_TYPE)TONE_MAPPING_SOURCE_PSEUDO_Y_BT709;
}
Expand Down

0 comments on commit 9c9263a

Please sign in to comment.