Skip to content

Commit 1cd025d

Browse files
Brian Zhukongsuozt
authored andcommitted
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 <[email protected]>
1 parent 1cf9d61 commit 1cd025d

File tree

1 file changed

+12
-0
lines changed
  • drivers/amlogic/media/video_sink

1 file changed

+12
-0
lines changed

drivers/amlogic/media/video_sink/vpp.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,6 +3068,18 @@ int vpp_set_filters(
30683068
aspect_ratio = (vf->ratio_control & DISP_RATIO_ASPECT_RATIO_MASK)
30693069
>> DISP_RATIO_ASPECT_RATIO_BIT;
30703070

3071+
if (!aspect_ratio) {
3072+
u32 sar_width, sar_height;
3073+
3074+
if (vf->type & VIDTYPE_COMPRESS) {
3075+
sar_width = vf->compWidth;
3076+
sar_height = vf->compHeight;
3077+
} else {
3078+
sar_width = vf->width;
3079+
sar_height = vf->height;
3080+
}
3081+
aspect_ratio = (sar_height << 8) / sar_width;
3082+
}
30713083
/* the height from vdin afbc will be half */
30723084
/* so need no interlace in */
30733085
if ((vf->type & VIDTYPE_INTERLACE)

0 commit comments

Comments
 (0)