From 96929a770316c110e7f78b4f92ae66f41e00260a Mon Sep 17 00:00:00 2001 From: Rohit Consul Date: Wed, 27 May 2015 16:12:42 -0700 Subject: [PATCH] video_common: Fixed search algo for resolution less than supported check for boundary case when mid=0 before decrementing Signed-off-by: Rohit Consul --- XilinxProcessorIPLib/drivers/video_common/src/xvidc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c index 02675d0d..ec672e65 100644 --- a/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c +++ b/XilinxProcessorIPLib/drivers/video_common/src/xvidc.c @@ -217,7 +217,12 @@ XVidC_VideoMode XVidC_GetVideoModeId(u32 Width, u32 Height, u32 FrameRate, break; } else if (Width < HActive) { - High = Mid - 1; + if (Mid == 0) { + break; + } + else { + High = Mid - 1; + } } else { Low = Mid + 1;