关于视频采集播放时的视频时序标准的换算,实际的帧率计算(DM8168)
[复制链接]
关于视频采集播放时的视频时序标准的换算,获取实际的帧率,或者是我们配置输出的时间帧率信息;
先看一下下面的几组数据
{{FVID2_STD_1080P_60, 1920, 1080, FVID2_SF_PROGRESSIVE, 148500, 60,
88, 148, 44, 4, 36, 5}, 3, 8, 0},
{{FVID2_STD_720P_60, 1280, 720, FVID2_SF_PROGRESSIVE, 74250, 60,
110, 220, 40, 5, 20, 5}, 3, 6, 0},
{{FVID2_STD_576P, 720, 576, FVID2_SF_PROGRESSIVE, 27000, 50,
12, 68, 64, 5, 39, 5}, 5, 4, 4},
参数描述:
UInt32 standard;
/**< [IN] Standard for which to get the info.
For valid values see #FVID2_Standard. */
UInt32 width;
/**< Active video frame width in pixels. */
UInt32 height;
/**< Active video frame height in lines. */
UInt32 scanFormat;
/**< Scan format of standard. For valid values see #FVID2_ScanFormat. */
UInt32 pixelClock;
/**< Pixel clock of standard in KHz. This assumes 8-bit interface for
NTSC/PAL/480I/576I resolutions and 16/24-bit interface for other
resolutions including 480P and 576P. */
UInt32 fps;
/**< Frames per second. */
UInt32 hFrontPorch;
/**< Horizontal front porch. Same for both fields in case of interlaced
display. */
UInt32 hBackPorch;
/**< Horizontal back porch. */
UInt32 hSyncLen;
/**< Horizontal sync length. Same for both fields in case of interlaced
display. */
UInt32 vFrontPorch;
/**< Vertical front porch for each field or frame. */
UInt32 vBackPorch;
/**< Vertical back porch for each field or frame. */
UInt32 vSyncLen;
/**< Vertical sync length for each field. */
UInt32 reserved[4u];
/**< For future use. Not used currently. */
UInt32 dispMode;
/**< Display mode select - 480i, 480p, 1080i, 720p, 576i or 576p. */
UInt32 osdFidSt1;
/**< Defines the starting location of the first field for OSD timing. */
UInt32 osdFidSt2;
/**< Defines the starting location of the second field for OSD timing.
This is used only in interlaced mode. */
我们现在先取一组数据来进行计算:
{{FVID2_STD_720P_60, 1280, 720, FVID2_SF_PROGRESSIVE, 74250, 60,
110, 220, 40, 5, 20, 5}, 3, 6, 0},
rowPixel = width + hFrontPorch + hBackPorch + hSyncLen = 1650
colLine = height + vFrontPorch + vBackPorch + vSyncLen = 750
fps = pixelClock/rowPixel/colLine = 74250*1000/1650/750 = 60 Hz
这个在视频的ad 或者是da的调试过程中,我们需要用到,或者是通过示波器来测试信号的时候,也是测试这几个值;
有可能遇到图片偏移等问题,时钟等问题,只需要实际的测量者和上面的理论值进行对比就可以;
关于更多的标准大家可以参考CEA-861-D、CEA-861-E、ATSC、VESA等标准手册查看;
|