v_letterbox: Bug fix video format update

-When setting up background color the video format should be
 updated to the current stream format. This not being done
 resulting in wrong colors in various color format inputs
-Updated video common version to 2.0 to reflect new driver in repo
-Removed hls generated comments in makefile

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-08-07 16:05:02 -07:00 committed by Nava kishore Manne
parent 206cf0e392
commit 400437fb0e
3 changed files with 11 additions and 13 deletions

View file

@ -35,7 +35,7 @@ BEGIN driver v_letterbox
OPTION supported_peripherals = (v_letterbox_v1_0 );
OPTION driver_state = ACTIVE;
OPTION DEPENDS = (video_common_v1_1);
OPTION DEPENDS = (video_common_v2_0);
OPTION copyfiles = all;
OPTION name = v_letterbox;
OPTION version = 1.0;

View file

@ -1,10 +1,3 @@
# ==============================================================
# File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
# Version: 2015.1
# Copyright (C) 2015 Xilinx Inc. All rights reserved.
#
# ==============================================================
COMPILER=
ARCHIVER=
CP=cp

View file

@ -132,9 +132,9 @@ void XV_LBoxStop(XV_letterbox *InstancePtr)
*
******************************************************************************/
void XV_LBoxSetActiveWin(XV_letterbox *InstancePtr,
XVidC_VideoWindow *ActiveWindow,
u32 FrameWidth,
u32 FrameHeight)
XVidC_VideoWindow *ActiveWindow,
u32 FrameWidth,
u32 FrameHeight)
{
Xil_AssertVoid(InstancePtr != NULL);
@ -190,7 +190,10 @@ void XV_LboxSetBackgroundColor(XV_letterbox *InstancePtr,
Cr_b_val = bkgndColorYUV[ColorId][2] * scale;
}
//Set Background (outside window) to be Black
/* Set video format */
XV_letterbox_Set_HwReg_video_format(InstancePtr, cfmt);
/* Set Background color (outside window) */
XV_letterbox_Set_HwReg_Y_R_value(InstancePtr, y_r_val);
XV_letterbox_Set_HwReg_Cb_G_value(InstancePtr, Cb_g_val);
XV_letterbox_Set_HwReg_Cr_B_value(InstancePtr, Cr_b_val);
@ -212,7 +215,7 @@ void XV_LBoxDbgReportStatus(XV_letterbox *InstancePtr)
XV_letterbox *pLbox = InstancePtr;
u32 done, idle, ready, ctrl;
u32 colstart, colend, rowstart, rowend;
u32 yr,cbg,crb, width, height;
u32 yr,cbg,crb, cfmt, width, height;
/*
* Assert validates the input arguments
@ -235,6 +238,7 @@ void XV_LBoxDbgReportStatus(XV_letterbox *InstancePtr)
crb = XV_letterbox_Get_HwReg_Cr_B_value(pLbox);
height = XV_letterbox_Get_HwReg_height(pLbox);
width = XV_letterbox_Get_HwReg_width(pLbox);
cfmt = XV_letterbox_Get_HwReg_video_format(pLbox);
xil_printf("IsDone: %d\r\n", done);
@ -248,6 +252,7 @@ void XV_LBoxDbgReportStatus(XV_letterbox *InstancePtr)
xil_printf(" Window End Y : %d\r\n",rowend);
xil_printf(" Frame Width : %d\r\n",width);
xil_printf(" Frame Height : %d\r\n",height);
xil_printf(" Color Format : %d\r\n",cfmt);
xil_printf(" Bkgnd Color Y/R: %d\r\n",yr);
xil_printf(" Bkgnd Color U/G: %d\r\n",cbg);
xil_printf(" Bkgnd Color V/B: %d\r\n",crb);