From 4fd5787f10414d5e696f3902cd628cca80930f5d Mon Sep 17 00:00:00 2001 From: Rohit Consul Date: Thu, 29 Oct 2015 11:53:04 -0700 Subject: [PATCH] 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 Acked-by: Andrei-Liviu Simion --- .../drivers/video_common/src/xvidc.c | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c index 4d95f47a..bf4a8dee 100644 --- a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c +++ b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c @@ -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",