(bt->polarities & V4L2_DV_VSYNC_POS_POL) ? '+' : '-',
(bt->polarities & V4L2_DV_HSYNC_POS_POL) ? '+' : '-');
printf("\tPixelclock: %lld Hz", bt->pixelclock);
- if (bt->width && bt->height)
- printf(" (%.2f fields per second)", (double)bt->pixelclock /
+ if (bt->width && bt->height) {
+ if (bt->interlaced)
+ printf(" (%.2f fields per second)", (double)bt->pixelclock /
+ ((bt->width + bt->hfrontporch + bt->hsync + bt->hbackporch) *
+ (bt->height / 2 + bt->vfrontporch + bt->vsync + bt->vbackporch)));
+ else
+ printf(" (%.2f frames per second)", (double)bt->pixelclock /
((bt->width + bt->hfrontporch + bt->hsync + bt->hbackporch) *
(bt->height + bt->vfrontporch + bt->vsync + bt->vbackporch)));
+ }
printf("\n");
printf("\tHorizontal frontporch: %d\n", bt->hfrontporch);
printf("\tHorizontal sync: %d\n", bt->hsync);