[PATCH 2/3] v4l2-utils gtf: use round instead of roundown for v_lines_rnd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GTF standards document specifies to use round() for v_lines_rnd
calculations. This change will affect only if image height is odd.

Cc: Hans Verkuil <hans.verkuil@xxxxxxxxx>
Signed-off-by: Prashant Laddha <prladdha@xxxxxxxxx>
---
 utils/v4l2-ctl/v4l2-ctl-modes.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl-modes.cpp b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
index ef528c0..d65cd75 100644
--- a/utils/v4l2-ctl/v4l2-ctl-modes.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
@@ -410,7 +410,7 @@ bool calc_gtf_modeline(int image_width, int image_height,
 
 	if (interlaced) {
 		interlace = 1;
-		v_lines_rnd = v_lines / 2;
+		v_lines_rnd = (v_lines + 1) / 2;
 		v_refresh = v_refresh * 2;
 	} else {
 		interlace = 0;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux