vc1: oversize vc1 streams limit. [1/1]

PD#TV-3303

Problem:
played vc1 oversize stream cause sys no response.

Solution:
limit oversize vc1 stream.

Verify:
x301

Change-Id: Ifc75c1025b2bd81642b5659feffdd42111a286d8
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
This commit is contained in:
shihong.zheng
2019-03-20 10:13:14 +08:00
committed by Dongjin Kim
parent f60ee39d4c
commit 79ec5f6b31

View File

@@ -54,6 +54,8 @@
#define NV21
#endif
#define VC1_MAX_SUPPORT_SIZE (1920*1088)
#define I_PICTURE 0
#define P_PICTURE 1
#define B_PICTURE 2
@@ -1143,9 +1145,18 @@ static int amvdec_vc1_probe(struct platform_device *pdev)
return -EFAULT;
}
if (pdata->sys_info)
if (pdata->sys_info) {
vvc1_amstream_dec_info = *pdata->sys_info;
if ((vvc1_amstream_dec_info.height != 0) &&
(vvc1_amstream_dec_info.width >
(VC1_MAX_SUPPORT_SIZE/vvc1_amstream_dec_info.height))) {
pr_info("amvdec_vc1: over size, unsupport: %d * %d\n",
vvc1_amstream_dec_info.width,
vvc1_amstream_dec_info.height);
return -EFAULT;
}
}
pdata->dec_status = vvc1_dec_status;
pdata->set_isreset = vvc1_set_isreset;
is_reset = 0;