video_common: Update stream report API for custom tag

In Stream reporting API if custom tag is detected print stream
properties as-is instead of using the mode table based API's

Signed-off-by: Rohit Consul <rohit.consul@xilinx.com>
Acked-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Rohit Consul 2015-10-29 11:53:04 -07:00 committed by Nava kishore Manne
parent 816e90b214
commit 4fd5787f10

View file

@ -483,19 +483,32 @@ const XVidC_VideoTiming *XVidC_GetTimingInfo(XVidC_VideoMode VmId)
void XVidC_ReportStreamInfo(XVidC_VideoStream *Stream)
{
if ((Stream->VmId < XVIDC_VM_NUM_SUPPORTED) ||
(Stream->VmId == XVIDC_VM_CUSTOM)) {
(Stream->VmId == XVIDC_VM_CUSTOM)) {
xil_printf("\tColor Format: %s\r\n",
XVidC_GetColorFormatStr(Stream->ColorFormatId));
xil_printf("\tColor Depth: %d\r\n", Stream->ColorDepth);
xil_printf("\tPixels Per Clock: %d\r\n", Stream->PixPerClk);
xil_printf("\tMode: %s\r\n",
Stream->IsInterlaced ? "Interlaced" : "Progressive");
xil_printf("\tFrame Rate: %s\r\n",
XVidC_GetFrameRateStr(Stream->VmId));
xil_printf("\tResolution: %s\r\n",
XVidC_GetVideoModeStr(Stream->VmId));
xil_printf("\tPixel Clock: %d\r\n",
XVidC_GetPixelClockHzByVmId(Stream->VmId));
if(Stream->VmId == XVIDC_VM_CUSTOM) {
xil_printf("\tFrame Rate: %dHz\r\n",
Stream->FrameRate);
xil_printf("\tResolution: %dx%d "
"[Custom Mode]\r\n",
Stream->Timing.HActive, Stream->Timing.VActive);
xil_printf("\tPixel Clock: %d\r\n",
XVidC_GetPixelClockHzByHVFr(Stream->Timing.F0PVTotal,
Stream->Timing.F0PVTotal,
Stream->FrameRate));
} else {
xil_printf("\tFrame Rate: %s\r\n",
XVidC_GetFrameRateStr(Stream->VmId));
xil_printf("\tResolution: %s\r\n",
XVidC_GetVideoModeStr(Stream->VmId));
xil_printf("\tPixel Clock: %d\r\n",
XVidC_GetPixelClockHzByVmId(Stream->VmId));
}
}
else {
xil_printf("Video Stream ID (%d) Not Supported\r\n",