media_module: fix h265 crop size issue in compress

PD#165820: vh265
add resolution crop handle for compress width and height

Change-Id: I355ac7f62eb4ce4b2d737becdf3a3a2892bb8a74
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
This commit is contained in:
Hui Zhang
2018-05-17 10:34:39 +08:00
committed by Dongjin Kim
parent c75776f429
commit d56b656a20

View File

@@ -6870,21 +6870,29 @@ static int prepare_display_buf(struct hevc_state_s *hevc, struct PIC_s *pic)
SubHeightC = 1;
break;
}
vf->width -= SubWidthC *
vf->width -= SubWidthC *
(hevc->param.p.conf_win_left_offset +
hevc->param.p.conf_win_right_offset);
vf->height -= SubHeightC *
vf->height -= SubHeightC *
(hevc->param.p.conf_win_top_offset +
hevc->param.p.conf_win_bottom_offset);
vf->compWidth -= SubWidthC *
(hevc->param.p.conf_win_left_offset +
hevc->param.p.conf_win_right_offset);
vf->compHeight -= SubHeightC *
(hevc->param.p.conf_win_top_offset +
hevc->param.p.conf_win_bottom_offset);
if (get_dbg_flag(hevc) & H265_DEBUG_BUFMGR)
hevc_print(hevc, 0,
"conformance_window %d, %d, %d, %d, %d => cropped width %d, height %d\n",
"conformance_window %d, %d, %d, %d, %d => cropped width %d, height %d com_w %d com_h %d\n",
hevc->param.p.chroma_format_idc,
hevc->param.p.conf_win_left_offset,
hevc->param.p.conf_win_right_offset,
hevc->param.p.conf_win_top_offset,
hevc->param.p.conf_win_bottom_offset,
vf->width, vf->height);
vf->width, vf->height, vf->compWidth, vf->compHeight);
}
#ifdef HEVC_PIC_STRUCT_SUPPORT