Skip to content

Commit

Permalink
Revert "[VP] HDR Tone Mapping Curve Change on 3dlut kernel"
Browse files Browse the repository at this point in the history
This reverts commit 8a867fa.
  • Loading branch information
hanlong1 committed Nov 20, 2024
1 parent 020ae63 commit cb6d1f0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 38 deletions.
11 changes: 2 additions & 9 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,15 +407,8 @@ void Hdr3DLutGenerator::InitCoefSurface(const uint32_t maxDLL, const uint32_t ma
{
CalcCCMMatrix();
MOS_SecureMemcpy(ccmMatrix, sizeof(float) * 12, color_matrix_calculation, sizeof(float) * 12);
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;
}

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 = 800;
uiMaxContentLevelLum = 4000;
uiMaxDisplayLum = 4000;
uiMaxContentLevelLum = 1000;
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 = 800;
uiMaxContentLevelLum = 4000;
uiMaxDisplayLum = 4000;
uiMaxContentLevelLum = 1000;
hdrMode = VPHAL_HDR_MODE_NONE;

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

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;
}
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 @@ -389,14 +389,8 @@ MOS_STATUS VpRenderHdr3DLutKernel::InitCoefSurface(const uint32_t maxDLL, const
{
CalcCCMMatrix();
MOS_SecureMemcpy(ccmMatrix, sizeof(float) * 12, color_matrix_calculation, sizeof(float) * 12);
if (maxDLL > 800)
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2H;
}
else
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
}

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 @@ -453,14 +453,7 @@ MOS_STATUS VpRenderHdr3DLutOclKernel::InitCoefSurface(const uint32_t maxDLL, con
CalcCCMMatrix();
MOS_SecureMemcpy(ccmMatrix, sizeof(float) * 12, color_matrix_calculation, sizeof(float) * 12);

if (maxDLL > 800)
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2H;
}
else
{
tmMode = (TONE_MAPPING_MODE)TONE_MAPPING_MODE_H2S;
}
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 cb6d1f0

Please sign in to comment.