File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,15 @@ class MhwVdboxHcpInterfaceGeneric : public MhwVdboxHcpInterface
115
115
cmd.DW1 .SurfaceId = params->ucSurfaceStateId ;
116
116
cmd.DW1 .SurfacePitchMinus1 = params->psSurface ->dwPitch - 1 ;
117
117
118
+ /* Handling of reconstructed surface is different for Y410 & AYUV formats */
119
+ if ((params->ucSurfaceStateId != CODECHAL_HCP_SRC_SURFACE_ID) &&
120
+ (params->psSurface ->Format == Format_Y410))
121
+ cmd.DW1 .SurfacePitchMinus1 = params->psSurface ->dwPitch / 2 - 1 ;
122
+
123
+ if ((params->ucSurfaceStateId != CODECHAL_HCP_SRC_SURFACE_ID) &&
124
+ (params->psSurface ->Format == Format_AYUV))
125
+ cmd.DW1 .SurfacePitchMinus1 = params->psSurface ->dwPitch / 4 - 1 ;
126
+
118
127
cmd.DW2 .YOffsetForUCbInPixel = params->psSurface ->UPlaneOffset .iYOffset ;
119
128
120
129
MHW_MI_CHK_STATUS (Mos_AddCommand (cmdBuffer, &cmd, cmd.byteSize ));
Original file line number Diff line number Diff line change @@ -1309,7 +1309,7 @@ MOS_STATUS MhwVdboxHcpInterfaceG11::AddHcpEncodeSurfaceStateCmd(
1309
1309
mhw_vdbox_hcp_g11_X::HCP_SURFACE_STATE_CMD *cmd =
1310
1310
(mhw_vdbox_hcp_g11_X::HCP_SURFACE_STATE_CMD*)cmdBuffer->pCmdPtr ;
1311
1311
1312
- MHW_MI_CHK_STATUS (MhwVdboxHcpInterfaceGeneric<mhw_vdbox_hcp_g11_X>::AddHcpDecodeSurfaceStateCmd (cmdBuffer, params));
1312
+ MHW_MI_CHK_STATUS (MhwVdboxHcpInterfaceGeneric<mhw_vdbox_hcp_g11_X>::AddHcpEncodeSurfaceStateCmd (cmdBuffer, params));
1313
1313
1314
1314
bool surf10bit= (params->psSurface ->Format == Format_P010) ||
1315
1315
(params->psSurface ->Format == Format_P210) ||
Original file line number Diff line number Diff line change @@ -1070,6 +1070,13 @@ class MhwVdboxVdencInterfaceG11 : public MhwVdboxVdencInterfaceGeneric<TVdencCmd
1070
1070
if (cmd.Dwords25 .DW1 .SurfaceFormat == vdencSurfaceFormatY416Variant ||
1071
1071
cmd.Dwords25 .DW1 .SurfaceFormat == vdencSurfaceFormatAyuvVariant)
1072
1072
{
1073
+ /* Y410/Y416 Reconstructed format handling */
1074
+ if (cmd.Dwords25 .DW1 .SurfaceFormat == vdencSurfaceFormatY416Variant)
1075
+ cmd.Dwords25 .DW1 .SurfacePitch = params->psSurface ->dwPitch / 2 - 1 ;
1076
+ /* AYUV Reconstructed format handling */
1077
+ if (cmd.Dwords25 .DW1 .SurfaceFormat == vdencSurfaceFormatAyuvVariant)
1078
+ cmd.Dwords25 .DW1 .SurfacePitch = params->psSurface ->dwPitch / 4 - 1 ;
1079
+
1073
1080
cmd.Dwords25 .DW2 .YOffsetForUCb = params->dwReconSurfHeight ;
1074
1081
cmd.Dwords25 .DW3 .YOffsetForVCr = params->dwReconSurfHeight << 1 ;
1075
1082
}
You can’t perform that action at this time.
0 commit comments