vpp: set default aspect when the ratecontrol is zero [1/1]

PD#TV-5266

Problem:
Vpp used the wrong aspect ratio in 3D, screen mode = normal
and aspect ratio is 0 in ratecontrol variable.

Solution:
When the aspect ratio is 0, set the default value as
(height << 8) / width

Verify:
Verified by x301

Change-Id: I34f7cd3ce5ed1818d3090ebb4be934225038625e
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
This commit is contained in:
Brian Zhu
2019-05-22 22:03:43 +08:00
committed by Tao Zeng
parent 1cf9d6149c
commit 1cd025d5fa

View File

@@ -3068,6 +3068,18 @@ int vpp_set_filters(
aspect_ratio = (vf->ratio_control & DISP_RATIO_ASPECT_RATIO_MASK)
>> DISP_RATIO_ASPECT_RATIO_BIT;
if (!aspect_ratio) {
u32 sar_width, sar_height;
if (vf->type & VIDTYPE_COMPRESS) {
sar_width = vf->compWidth;
sar_height = vf->compHeight;
} else {
sar_width = vf->width;
sar_height = vf->height;
}
aspect_ratio = (sar_height << 8) / sar_width;
}
/* the height from vdin afbc will be half */
/* so need no interlace in */
if ((vf->type & VIDTYPE_INTERLACE)