Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failed 4k videowalll test case in Gen12 platform #1839

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6784,6 +6784,13 @@ bool CompositeState::BuildFilter(

for (i = 0; (i < (int)pCompParams->uSourceCount) && (iMaxFilterSize > 0); i++)
{
if (i > 0)
{
if (!RECT1_CONTAINS_RECT2(pCompParams->pSource[0]->rcDst, pCompParams->pSource[i]->rcDst))
{
pFilter->forceToTargetColorSpace = true;
}
}
pSrc = pCompParams->pSource[i];

//--------------------------------
Expand Down Expand Up @@ -8154,4 +8161,4 @@ bool CompositeState::IsSamplerIDForY(
return true;
}
return false;
}
}
18 changes: 5 additions & 13 deletions media_driver/linux/common/vp/ddi/media_libva_vp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ DdiVp_SetProcPipelineParams(

// Background Colorfill
// According to libva definition, if alpha in output background color is zero, then colorfill is not needed
if ((pPipelineParam->output_background_color >> 24) != 0 || pVpHalTgtSurf->ColorSpace == CSpace_sRGB)
if ((pPipelineParam->output_background_color >> 24) != 0)
{
if (pVpHalRenderParams->pColorFillParams == nullptr)
{
Expand All @@ -1157,18 +1157,10 @@ DdiVp_SetProcPipelineParams(

DDI_CHK_NULL(pVpHalRenderParams->pColorFillParams, "Null pColorFillParams.", VA_STATUS_ERROR_UNKNOWN);

if (pVpHalTgtSurf->ColorSpace == CSpace_sRGB && (pPipelineParam->output_background_color >> 24) == 0)
{
// set color space for sRGB output
pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
}
else
{
// set background colorfill option
pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color;
pVpHalRenderParams->pColorFillParams->bYCbCr = false;
pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
}
// set background colorfill option
pVpHalRenderParams->pColorFillParams->Color = pPipelineParam->output_background_color;
pVpHalRenderParams->pColorFillParams->bYCbCr = false;
pVpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
}else
{
MOS_FreeMemAndSetNull(pVpHalRenderParams->pColorFillParams);
Expand Down