vp9: add vp9 decoder tests in dec_slt. [2/2]
authorgan.zhang <gan.zhang@amlogic.com>
Sun, 27 Sep 2020 01:30:11 +0000 (09:30 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Sat, 3 Oct 2020 02:44:17 +0000 (19:44 -0700)
PD#OPS-1192

Problem:
In the dec_slt test, since max_pic_h and max_pic_w were not
configured via config at the upper level, the decoding driver
allocated memory according to the maximum resolution supported
by the chip, this will cause the codec_mm to be insufficient
and lead the test to fail.

Solution:
max_pic_h and max_pic_w are configured via the upper sys_info.

Verify:
AC214

Change-Id: Ib2006c51ecef3d98ebd6cce89610f636c60c60ed
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
drivers/frame_provider/decoder/vp9/vvp9.c

index f86998f0537e17a9075b94b523bd1fc7d5f47238..d08def04b1483670c2f75bf9e56c46beb7dbda72 100644 (file)
@@ -10909,6 +10909,14 @@ static int ammvdec_vp9_probe(struct platform_device *pdev)
        } else
 #endif
        {
+               if (pdata->sys_info) {
+                       pbi->vvp9_amstream_dec_info = *pdata->sys_info;
+                       if ((pbi->vvp9_amstream_dec_info.width != 0) &&
+                               (pbi->vvp9_amstream_dec_info.height != 0)) {
+                               pbi->max_pic_w = pbi->vvp9_amstream_dec_info.width;
+                               pbi->max_pic_h = pbi->vvp9_amstream_dec_info.height;
+                       }
+               }
                /*pbi->vvp9_amstream_dec_info.width = 0;
                pbi->vvp9_amstream_dec_info.height = 0;
                pbi->vvp9_amstream_dec_info.rate = 30;*/