From ed1f29d4074218a8ea336dad1aff69130ad4b433 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Wed, 16 Dec 2020 17:02:09 +0800 Subject: [PATCH] mmpeg4: fix special resolution display issue [1/1] PD#SWPL-38564 Problem: the stream is 720x1280, display is adnormal Solution: when width < height, change canvas config for correct display Verify: AH212 Signed-off-by: Hui Zhang Change-Id: I77df15a7683a74f9e41c8118e19330a39cc85cf6 --- drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c b/drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c index 289178a..4757b21 100644 --- a/drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c +++ b/drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c @@ -1768,6 +1768,10 @@ static int vmpeg4_canvas_init(struct vdec_mpeg4_hw_s *hw) } else { /*1080p*/ canvas_width = 1920; canvas_height = 1088; + if (hw->vmpeg4_amstream_dec_info.width < hw->vmpeg4_amstream_dec_info.height ) { + canvas_width = 1088; + canvas_height = 1920; + } decbuf_y_size = 0x200000; decbuf_size = 0x300000; } -- 2.20.1