di: video stretch downwards on starting [1/1]

PD#SWPL-170069

Problem:
crop param would been modify by di.

Solution:
Modify crop param setting flow in di.

Verify:
t5d

Change-Id: If3f61769454d54e1ef7d28655039c027547b9545
Signed-off-by: qiyao.zhou <qiyao.zhou@amlogic.com>
This commit is contained in:
qiyao.zhou
2024-05-20 14:10:44 +08:00
committed by Luan Yuan
parent bbc4c188ac
commit dfeb303695
3 changed files with 11 additions and 7 deletions
+2 -4
View File
@@ -676,13 +676,11 @@ enum DI_ERRORTYPE new_empty_input_buffer(int index, struct di_buffer *buffer)
} else {
memcpy(&pins->c.vfm_cp, buffer->vf, sizeof(pins->c.vfm_cp));
}
if (pins->c.vfm_cp.type & VIDTYPE_COMPRESS) {
if (buffer->vf && is_src_crop_valid(buffer->vf->src_crop)) {
buffer->vf->compHeight =
buffer->vf->compHeight - buffer->vf->src_crop.bottom;
if (buffer->vf && is_src_crop_valid(buffer->vf->src_crop))
pins->c.vfm_cp.compHeight =
pins->c.vfm_cp.compHeight - pins->c.vfm_cp.src_crop.bottom;
}
}
plink_dct = dip_plink_check_ponly_dct(pch, &pins->c.vfm_cp);
dbg_poll("ins:plink_dct=%d,flg_q=%d\n", plink_dct, flg_q);
@@ -3401,8 +3401,13 @@ static void video_composer_task(struct composer_dev *dev)
frame_info->crop_w,
frame_info->crop_h);
if (is_dec_vf || is_v4l_vf) {
if ((vf->type & VIDTYPE_COMPRESS) != 0) {
if ((vf->type_original & VIDTYPE_COMPRESS) != 0) {
if (is_src_crop_valid(vf->src_crop)) {
vc_print(dev->index, PRINT_AXIS, "src_crop:%d %d %d %d.\n",
vf->src_crop.left,
vf->src_crop.right,
vf->src_crop.top,
vf->src_crop.bottom);
pic_w = vf->compWidth -
vf->src_crop.left - vf->src_crop.right;
pic_h = vf->compHeight -
@@ -3415,6 +3420,7 @@ static void video_composer_task(struct composer_dev *dev)
pic_w = vf->width;
pic_h = vf->height;
}
vc_print(dev->index, PRINT_AXIS, "pic_w: %d, pic_h: %d.\n", pic_w, pic_h);
if (frame_info->source_type == SOURCE_DTV_FIX_TUNNEL) {
vf->flag |= VFRAME_FLAG_FIX_TUNNEL;
vf->crop[0] = frame_info->crop_y;
@@ -3565,7 +3571,7 @@ static void video_composer_task(struct composer_dev *dev)
BITDEPTH_Y8 | BITDEPTH_U8 | BITDEPTH_V8;
}
vc_print(dev->index, PRINT_AXIS,
"axis: %d %d %d %d\ncrop: %d %d %d %d\n",
"axis: %d %d %d %d, crop: %d %d %d %d\n",
vf->axis[0], vf->axis[1], vf->axis[2], vf->axis[3],
vf->crop[0], vf->crop[1], vf->crop[2], vf->crop[3]);
vc_print(dev->index, PRINT_AXIS,
+1 -1
View File
@@ -2544,7 +2544,7 @@ RESTART:
crop_ratio = vf->compWidth / vf->width;
goto RESTART_ALL;
} else {
if (vf->type & VIDTYPE_COMPRESS &&
if (vf->type_original & VIDTYPE_COMPRESS &&
is_src_crop_valid(vf->src_crop) &&
!src_crop_adjust) {
/* src crop top/left will always be 0 */