summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2790ef8)
raw | patch | inline | side by side (parent: 2790ef8)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 30 Jul 2014 14:51:19 +0000 (20:21 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 30 Jul 2014 15:01:12 +0000 (20:31 +0530) |
Current VPE library doesn't support NV12 as output format
App fails with Seg fault when trying to convert to NV12 format
Add this support
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
App fails with Seg fault when trying to convert to NV12 format
Add this support
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
util/vpe-common.c | patch | blob | history |
diff --git a/util/vpe-common.c b/util/vpe-common.c
index 164f7a28d5a88138143f63235f045f3b3d281185..c3f6e4eb48ebee09f9c58fed670f17c6e93cb15a 100755 (executable)
--- a/util/vpe-common.c
+++ b/util/vpe-common.c
int input_buf_dmafd[NUMBUF];
int input_buf_dmafd_uv[NUMBUF];
int output_buf_dmafd[NUMBUF];
+ int output_buf_dmafd_uv[NUMBUF];
struct display *disp;
struct buffer **disp_bufs;
};
for (i = 0; i < NUMBUF; i++) {
vpe->output_buf_dmafd[i] = omap_bo_dmabuf(vpe->disp_bufs[i]->bo[0]);
vpe->disp_bufs[i]->fd[0] = vpe->output_buf_dmafd[i];
+
+ if(vpe->dst.coplanar) {
+ vpe->output_buf_dmafd_uv[i] = omap_bo_dmabuf(vpe->disp_bufs[i]->bo[1]);
+ vpe->disp_bufs[i]->fd[1] = vpe->output_buf_dmafd_uv[i];
+ }
/* display only image widthxheight, no full screen */
vpe->disp_bufs[i]->noScale = true;
dprintf("vpe->disp_bufs_fd[%d] = %d\n", i, vpe->output_buf_dmafd[i]);
buf.memory = V4L2_MEMORY_DMABUF;
buf.index = index;
buf.m.planes = &planes;
- buf.length = 2;
+ if(vpe->dst.coplanar)
+ buf.length = 2;
+ else
+ buf.length = 1;
buf.m.planes[0].m.fd = vpe->output_buf_dmafd[index];
+ if(vpe->dst.coplanar)
+ buf.m.planes[1].m.fd = vpe->output_buf_dmafd_uv[index];
+
ret = ioctl(vpe->fd, VIDIOC_QBUF, &buf);
if (ret < 0)
pexit( "vpe o/p: QBUF failed: %s, index = %d\n",
buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.m.planes = &planes;
- if(vpe->src.coplanar)
+ if(vpe->src.coplanar)
buf.length = 2;
- else
+ else
buf.length = 1;
ret = ioctl(vpe->fd, VIDIOC_DQBUF, &buf);
if (ret < 0)
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.m.planes = &planes;
- buf.length = 1;
+ if(vpe->dst.coplanar)
+ buf.length = 2;
+ else
+ buf.length = 1;
ret = ioctl(vpe->fd, VIDIOC_DQBUF, &buf);
if (ret < 0)
pexit("vpe o/p: DQBUF failed: %s\n", strerror(errno));