mmpeg4: fix special resolution display issue [1/1]
authorHui Zhang <hui.zhang@amlogic.com>
Wed, 16 Dec 2020 09:02:09 +0000 (17:02 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Thu, 17 Dec 2020 06:28:32 +0000 (22:28 -0800)
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 <hui.zhang@amlogic.com>
Change-Id: I77df15a7683a74f9e41c8118e19330a39cc85cf6

drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c

index 289178a31717eee3c6daa05fdc5e2911a697377b..4757b211bfc694b0acb2319d318b6b71cbb5b37b 100644 (file)
@@ -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;
                }