diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-06-28 12:54:41 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-06-28 12:55:55 +0200 |
commit | 4dc918f4a3cfab8573f931bb5bb3bf83af576e1a (patch) | |
tree | 62a8b2f5d09646cac1265ace65055a04cb3d60ac | |
parent | b37efa24b519a2ca3b27e32258ca24470ab48075 (diff) | |
download | gst-plugins-fsl-vpu-4dc918f4a3cfab8573f931bb5bb3bf83af576e1a.tar.gz gst-plugins-fsl-vpu-4dc918f4a3cfab8573f931bb5bb3bf83af576e1a.tar.xz |
vpu module: allocate enough framebuffer space
We forgot to allocate space for the motion vector buffer
resulting in memory corruptions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | module/imx-vpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/imx-vpu.c b/module/imx-vpu.c index 5557c1b..c26bad3 100644 --- a/module/imx-vpu.c +++ b/module/imx-vpu.c @@ -507,6 +507,11 @@ static int vpu_alloc_fb_v2(struct vpu_instance *instance) int i, ret = 0; int size = (instance->width * instance->height * 3) / 2; unsigned long *para_buf = instance->para_buf; + int height = instance->height; + int stridey = instance->width; + int mvsize = (stridey * height) >> 2; + + size += mvsize; for (i = 0; i < instance->num_fb; i++) { struct memalloc_record *rec = &instance->rec[i]; |