author | Hui Zhang <hui.zhang@amlogic.com> | 2019-06-13 09:12:05 (GMT) |
---|---|---|
committer | Shen Liu <shen.liu@amlogic.com> | 2020-06-02 08:34:10 (GMT) |
commit | b18ab63e9d4008157e71b17bbbdd636979ec0447 (patch) | |
tree | 5d9528c80b90a4fa7068df436c45adfba7d93373 | |
parent | 8e675db594c558da6b04c4f09a8ec92a3c4bdac1 (diff) | |
download | media_modules-b18ab63e9d4008157e71b17bbbdd636979ec0447.zip media_modules-b18ab63e9d4008157e71b17bbbdd636979ec0447.tar.gz media_modules-b18ab63e9d4008157e71b17bbbdd636979ec0447.tar.bz2 |
vp9: fix vp9 decoder green screen issue [1/1]
PD#TV-6406
Problem:
playback youtube, the value vp9_max_pic_x is not correct with some
APK. acutal size is beyond max value, cause canvas size overflow
Solution:
add a vp9_max_pic_x value check, to use vp9_buf_x as max when
origanl vp9_max_pic_x is less then vp9_buf_x
Verify:
x301
Change-Id: Ie9f256ff43ddd81effb1b8b9a990d26fe09d2ee0
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/vp9/vvp9.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/frame_provider/decoder/vp9/vvp9.c b/drivers/frame_provider/decoder/vp9/vvp9.c index 507d07b..c474ab9 100644 --- a/drivers/frame_provider/decoder/vp9/vvp9.c +++ b/drivers/frame_provider/decoder/vp9/vvp9.c @@ -9300,6 +9300,8 @@ static int ammvdec_vp9_probe(struct platform_device *pdev) if ((debug & IGNORE_PARAM_FROM_CONFIG) == 0 && pdata->config_len) { #ifdef MULTI_INSTANCE_SUPPORT + int vp9_buf_width = 0; + int vp9_buf_height = 0; /*use ptr config for doubel_write_mode, etc*/ vp9_print(pbi, 0, "pdata->config=%s\n", pdata->config); if (get_config_int(pdata->config, "vp9_double_write_mode", @@ -9313,6 +9315,14 @@ static int ammvdec_vp9_probe(struct platform_device *pdev) pbi->save_buffer_mode = config_val; else pbi->save_buffer_mode = 0; + if (get_config_int(pdata->config, "vp9_buf_width", + &config_val) == 0) { + vp9_buf_width = config_val; + } + if (get_config_int(pdata->config, "vp9_buf_height", + &config_val) == 0) { + vp9_buf_height = config_val; + } /*use ptr config for max_pic_w, etc*/ if (get_config_int(pdata->config, "vp9_max_pic_w", @@ -9323,6 +9333,12 @@ static int ammvdec_vp9_probe(struct platform_device *pdev) &config_val) == 0) { pbi->max_pic_h = config_val; } + if ((pbi->max_pic_w * pbi->max_pic_h) + < (vp9_buf_width * vp9_buf_height)) { + pbi->max_pic_w = vp9_buf_width; + pbi->max_pic_h = vp9_buf_height; + vp9_print(pbi, 0, "use buf resolution\n"); + } #endif if (get_config_int(pdata->config, "HDRStaticInfo", &vf_dp.present_flag) == 0 |