The total height was divided by 2, since height is odd we should make sure the
height is a double, not unsigned or you get a rounding error.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
if (enum_dv_timings(timings, true)) {
do {
v4l2_bt_timings &bt = timings.timings.bt;
- unsigned tot_height = bt.height +
+ double tot_height = bt.height +
bt.vfrontporch + bt.vsync + bt.vbackporch +
bt.il_vfrontporch + bt.il_vsync + bt.il_vbackporch;
- unsigned tot_width = bt.width +
+ double tot_width = bt.width +
bt.hfrontporch + bt.hsync + bt.hbackporch;
char buf[100];
(bt->polarities & V4L2_DV_HSYNC_POS_POL) ? '+' : '-');
printf("\tPixelclock: %lld Hz", bt->pixelclock);
if (bt->width && bt->height) {
- unsigned tot_height = bt->height +
+ double tot_height = bt->height +
bt->vfrontporch + bt->vsync + bt->vbackporch +
bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch;
- unsigned tot_width = bt->width +
+ double tot_width = bt->width +
bt->hfrontporch + bt->hsync + bt->hbackporch;
if (bt->interlaced)