summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: add738b)
raw | patch | inline | side by side (parent: add738b)
author | Benoit Parrot <bparrot@ti.com> | |
Mon, 24 Jul 2017 19:23:06 +0000 (19:23 +0000) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 26 Jul 2017 08:12:09 +0000 (13:42 +0530) |
Remove superfluous G_FMT call prior to calling S_FMT as it would
force to manually zero out returned parameter value we don't need.
Using S_FMT and specifying only what we need should yield acceptable
default values for the part we don't care about.
This is standard v4l2 behavior.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
force to manually zero out returned parameter value we don't need.
Using S_FMT and specifying only what we need should yield acceptable
default values for the part we don't care about.
This is standard v4l2 behavior.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
capturevpedisplay.c | patch | blob | history | |
util/vpe-common.c | patch | blob | history |
diff --git a/capturevpedisplay.c b/capturevpedisplay.c
index cadea1002655c2345dec44c19b5b0820ad0d4686..576bf8faa4af51a6ae63bc1c435b37fab886133d 100644 (file)
--- a/capturevpedisplay.c
+++ b/capturevpedisplay.c
memset(&fmt, 0, sizeof fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
- ret = ioctl(vipfd, VIDIOC_G_FMT, &fmt);
- if (ret < 0)
- pexit( "vip: G_FMT failed: %s\n", strerror(errno));
-
fmt.fmt.pix.width = width;
fmt.fmt.pix.height = height;
fmt.fmt.pix.pixelformat = fourcc;
diff --git a/util/vpe-common.c b/util/vpe-common.c
index cf6ec0df9aaf25587bfaee242250b5ddd4d16c30..b7806ba26c54cc350501768dd91251e6c6fec920 100755 (executable)
--- a/util/vpe-common.c
+++ b/util/vpe-common.c
memset(&fmt, 0, sizeof fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
-
- ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
- if (ret < 0)
- pexit( "vpe i/p: G_FMT_1 failed: %s\n", strerror(errno));
-
fmt.fmt.pix_mp.width = vpe->src.width;
fmt.fmt.pix_mp.height = vpe->src.height;
fmt.fmt.pix_mp.pixelformat = vpe->src.fourcc;
memset(&fmt, 0, sizeof fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
-
- ret = ioctl(vpe->fd, VIDIOC_G_FMT, &fmt);
- if (ret < 0)
- pexit( "vpe o/p: G_FMT_1 failed: %s\n", strerror(errno));
-
fmt.fmt.pix_mp.width = vpe->dst.width;
fmt.fmt.pix_mp.height = vpe->dst.height;
fmt.fmt.pix_mp.pixelformat = vpe->dst.fourcc;