Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
[PATCH] [HEVCd] disp win offset should be added to crop (#4398)
Browse files Browse the repository at this point in the history
Report CropW/CropH using conformance crops, and display crops.

[Internal]
OSPR: Auto
Commit_Type: Bugfix
Platforms: N/A
OS: N/A
Feature impact: N/A
Resolves: MDP-63613
Related-to: MDP-63613
Klocwork: N/A
TP_Passed: N/A
IP Scan: N/A
Open/Embargo Dependency: N/A
  • Loading branch information
weizhu-intel authored and dmitryermilov committed Mar 4, 2022
1 parent 1e7091d commit 0bf5ca1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions _studio/shared/umc/codec/h265_dec/src/umc_h265_mfx_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ UMC::Status FillVideoParam(const H265VideoParamSet * vps, const H265SeqParamSet

//if (seq->frame_cropping_flag)
{
par->mfx.FrameInfo.CropX = (mfxU16)(seq->conf_win_left_offset);
par->mfx.FrameInfo.CropY = (mfxU16)(seq->conf_win_top_offset);
par->mfx.FrameInfo.CropH = (mfxU16)(par->mfx.FrameInfo.Height - (seq->conf_win_top_offset + seq->conf_win_bottom_offset));
par->mfx.FrameInfo.CropW = (mfxU16)(par->mfx.FrameInfo.Width - (seq->conf_win_left_offset + seq->conf_win_right_offset));
par->mfx.FrameInfo.CropX = (mfxU16)(seq->conf_win_left_offset + seq->def_disp_win_left_offset);
par->mfx.FrameInfo.CropY = (mfxU16)(seq->conf_win_top_offset + seq->def_disp_win_top_offset);
par->mfx.FrameInfo.CropH = (mfxU16)(par->mfx.FrameInfo.Height - (seq->conf_win_top_offset + seq->conf_win_bottom_offset + seq->def_disp_win_top_offset + seq->def_disp_win_bottom_offset));
par->mfx.FrameInfo.CropW = (mfxU16)(par->mfx.FrameInfo.Width - (seq->conf_win_left_offset + seq->conf_win_right_offset + seq->def_disp_win_left_offset + seq->def_disp_win_right_offset));

par->mfx.FrameInfo.CropH -= (mfxU16)(par->mfx.FrameInfo.Height - seq->pic_height_in_luma_samples);
par->mfx.FrameInfo.CropW -= (mfxU16)(par->mfx.FrameInfo.Width - seq->pic_width_in_luma_samples);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2409,10 +2409,10 @@ UMC::Status TaskSupplier_H265::InitFreeFrame(H265DecoderFrame * pFrame, const H2

pFrame->m_FrameType = SliceTypeToFrameType(pSlice->GetSliceHeader()->slice_type);
pFrame->m_dFrameTime = pSlice->m_source.GetTime();
pFrame->m_crop_left = pSeqParam->conf_win_left_offset;
pFrame->m_crop_right = pSeqParam->conf_win_right_offset;
pFrame->m_crop_top = pSeqParam->conf_win_top_offset;
pFrame->m_crop_bottom = pSeqParam->conf_win_bottom_offset;
pFrame->m_crop_left = pSeqParam->conf_win_left_offset + pSeqParam->def_disp_win_left_offset;
pFrame->m_crop_right = pSeqParam->conf_win_right_offset + pSeqParam->def_disp_win_right_offset;
pFrame->m_crop_top = pSeqParam->conf_win_top_offset + pSeqParam->def_disp_win_top_offset;
pFrame->m_crop_bottom = pSeqParam->conf_win_bottom_offset + pSeqParam->def_disp_win_bottom_offset;
pFrame->m_crop_flag = pSeqParam->conformance_window_flag;

pFrame->m_aspect_width = pSeqParam->sar_width;
Expand Down

0 comments on commit 0bf5ca1

Please sign in to comment.