From 3ed69ef88fdabcd26ec4bb2117494e1944355824 Mon Sep 17 00:00:00 2001 From: Cao Jian Date: Thu, 19 Sep 2019 11:38:57 +0800 Subject: [PATCH] picdec: fix no scale mode, frame stretch [1/1] PD#SWPL-14477 Problem: the picture is rotated 90 degrees, stretching left and right Solution: modify conditions for frame width or height equal to screen width or height Verify: verify by g12b-w400 Change-Id: I0ca9cc255b202306562bee69726400c697f3b053 Signed-off-by: Cao Jian --- .../media/video_processor/pic_dev/picdec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/amlogic/media/video_processor/pic_dev/picdec.c b/drivers/amlogic/media/video_processor/pic_dev/picdec.c index 2588b2567339..b061e79bfa0d 100644 --- a/drivers/amlogic/media/video_processor/pic_dev/picdec.c +++ b/drivers/amlogic/media/video_processor/pic_dev/picdec.c @@ -278,8 +278,8 @@ static int render_frame(struct ge2d_context_s *context, dev->p2p_mode = p2p_mode; switch (dev->p2p_mode) { case 0: - if ((input->frame_width < dev->disp_width) && - (input->frame_height < dev->disp_height)) { + if ((input->frame_width <= dev->disp_width) && + (input->frame_height <= dev->disp_height)) { dev->target_width = input->frame_width; dev->target_height = input->frame_height; } else { @@ -290,8 +290,8 @@ static int render_frame(struct ge2d_context_s *context, new_vf->height = dev->target_height; break; case 1: - if ((input->frame_width < dev->disp_width) && - (input->frame_height < dev->disp_height)) { + if ((input->frame_width <= dev->disp_width) && + (input->frame_height <= dev->disp_height)) { dev->target_width = input->frame_width; dev->target_height = input->frame_height; } else { @@ -395,8 +395,8 @@ static int render_frame_block(void) dev->p2p_mode = p2p_mode; switch (dev->p2p_mode) { case 0: - if ((input->frame_width < dev->disp_width) && - (input->frame_height < dev->disp_height)) { + if ((input->frame_width <= dev->disp_width) && + (input->frame_height <= dev->disp_height)) { dev->target_width = input->frame_width; dev->target_height = input->frame_height; } else { @@ -407,8 +407,8 @@ static int render_frame_block(void) new_vf->height = dev->target_height; break; case 1: - if ((input->frame_width < dev->disp_width) && - (input->frame_height < dev->disp_height)) { + if ((input->frame_width <= dev->disp_width) && + (input->frame_height <= dev->disp_height)) { dev->target_width = input->frame_width; dev->target_height = input->frame_height; } else {