From 4753d078fdc2874252f8fda6512f50b2b7907aa7 Mon Sep 17 00:00:00 2001 From: Shravan Kumar A Date: Tue, 15 Jul 2014 18:12:32 +0530 Subject: [PATCH] deinterlacer: Added driver source files in deinterlacer driver Modified the following: deinterlacer/src/ deinterlacer/data/ deinterlacer/doc/ Added the following: deinterlacer/examples/ Signed-off-by: Shravan Kumar A Acked-by: Srikanth Vemula --- .../deinterlacer/data/deinterlacer.mdd | 6 +- .../deinterlacer/data/deinterlacer.tcl | 19 +- .../deinterlacer/doc/html/api/annotated.html | 2 +- .../deinterlacer/doc/html/api/files.html | 6 +- .../deinterlacer/doc/html/api/functions.html | 19 +- .../doc/html/api/functions_vars.html | 17 +- .../deinterlacer/doc/html/api/globals.html | 221 +- .../doc/html/api/globals_defs.html | 190 +- .../doc/html/api/globals_func.html | 29 +- .../doc/html/api/globals_type.html | 38 + .../doc/html/api/globals_vars.html | 5 +- .../deinterlacer/doc/html/api/index.html | 48 +- .../doc/html/api/struct_x_deint-members.html | 13 +- .../doc/html/api/struct_x_deint.html | 173 +- .../api/struct_x_deint___config-members.html | 6 +- .../doc/html/api/struct_x_deint___config.html | 66 +- .../deinterlacer/doc/html/api/xdeint_8c.html | 777 +++-- .../deinterlacer/doc/html/api/xdeint_8h.html | 1363 +++++++++ .../doc/html/api/xdeint__g_8c.html | 47 +- .../doc/html/api/xdeint__hw_8h.html | 2642 ++++++++--------- .../doc/html/api/xdeint__i_8h.html | 52 +- .../doc/html/api/xdeint__intr_8c.html | 119 +- .../doc/html/api/xdeint__selftest_8c.html | 72 + .../doc/html/api/xdeint__sinit_8c.html | 61 +- .../examples/deint_selftest_example.c | 163 + .../drivers/deinterlacer/examples/index.html | 18 + .../drivers/deinterlacer/src/xdeint.c | 703 +++-- .../drivers/deinterlacer/src/xdeint.h | 484 +-- .../drivers/deinterlacer/src/xdeint_g.c | 27 +- .../drivers/deinterlacer/src/xdeint_hw.h | 416 ++- .../drivers/deinterlacer/src/xdeint_i.h | 35 +- .../drivers/deinterlacer/src/xdeint_intr.c | 108 +- .../deinterlacer/src/xdeint_selftest.c | 105 + .../drivers/deinterlacer/src/xdeint_sinit.c | 93 +- 34 files changed, 5245 insertions(+), 2898 deletions(-) create mode 100644 XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_type.html create mode 100644 XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8h.html create mode 100644 XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__selftest_8c.html create mode 100755 XilinxProcessorIPLib/drivers/deinterlacer/examples/deint_selftest_example.c create mode 100755 XilinxProcessorIPLib/drivers/deinterlacer/examples/index.html create mode 100755 XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_selftest.c diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.mdd b/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.mdd index 6854bd32..99bb31ef 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.mdd +++ b/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.mdd @@ -1,9 +1,9 @@ -############################################################################### +############################################################################## # # Copyright (C) 2008 - 2014 Xilinx, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal +# of this software and associated documentation files (the "Software"),to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is @@ -27,8 +27,8 @@ # Except as contained in this notice, the name of the Xilinx shall not be used # in advertising or otherwise to promote the sale, use or other dealings in # this Software without prior written authorization from Xilinx. -# ############################################################################### + OPTION psf_version = 2.1; BEGIN driver deinterlacer diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.tcl b/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.tcl index e54f8a79..0d34cd27 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.tcl +++ b/XilinxProcessorIPLib/drivers/deinterlacer/data/deinterlacer.tcl @@ -1,9 +1,9 @@ -############################################################################### +############################################################################## # # Copyright (C) 2011 - 2014 Xilinx, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal +# of this software and associated documentation files (the "Software"),to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is @@ -27,20 +27,13 @@ # Except as contained in this notice, the name of the Xilinx shall not be used # in advertising or otherwise to promote the sale, use or other dealings in # this Software without prior written authorization from Xilinx. -# ############################################################################### -# -# Modification History -# Ver Who Date Changes -# -------- ------ -------- ---------------------------------------------------- -# 3.0 adk 10/12/13 Updated as per the New Tcl API's -################################################################################# + +#uses "xillib.tcl" proc generate {drv_handle} { - xdefine_include_file $drv_handle "xparameters.h" "XDEINT" "NUM_INSTANCES" "DEVICE_ID" "C_DIAG" "C_MOTION" "C_DEPTH" "C_STREAMS" "C_TRIPLE_PORT" "C_MAX_XSIZE" "C_BASEADDR" "C_HIGHADDR" + xdefine_include_file $drv_handle "xparameters.h" "XDEINT" "NUM_INSTANCES" "DEVICE_ID" "C_DIAG" "C_MOTION" "C_DEPTH" "C_STREAMS" "C_TRIPLE_PORT" "C_MAX_XSIZE" "C_BASEADDR" "C_HIGHADDR" "XDeint" "DEVICE_ID" "C_BASEADDR" xdefine_config_file $drv_handle "xdeint_g.c" "XDeint" "DEVICE_ID" "C_BASEADDR" - xdefine_canonical_xpars $drv_handle "xparameters.h" "Deinterlacer" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" + xdefine_canonical_xpars $drv_handle "xparameters.h" "Deinterlacer" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "XDeint" "DEVICE_ID" "C_BASEADDR" } - - diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/annotated.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/annotated.html index c7de21fb..a20df47a 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/annotated.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/annotated.html @@ -9,7 +9,7 @@ Software Drivers
- +
  • Main Page
  • diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/files.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/files.html index 8589a56a..9c86e84c 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/files.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/files.html @@ -9,7 +9,7 @@ Software Drivers
    - +
    -

    File List

    Here is a list of all documented files with brief descriptions: +

    File List

    Here is a list of all files with brief descriptions:
    + +
    xdeint.c
    xdeint.h
    xdeint_g.c
    xdeint_hw.h
    xdeint_i.h
    xdeint_intr.c
    xdeint_selftest.c
    xdeint_sinit.c
    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions.html index f05ed1a9..27e0dff6 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions.html @@ -9,7 +9,7 @@ Software Drivers
    - +
    -Here is a list of all documented class members with links to the class documentation for each member: +Here is a list of all class members with links to the classes they belong to:

    +: XDeint_Config
  • Config +: XDeint
  • DeviceId +: XDeint_Config
  • IntCallBack +: XDeint
  • IntRef +: XDeint
  • IsReady +: XDeint
  • XSize +: XDeint
  • YSize +: XDeint
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions_vars.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions_vars.html index f362327a..e5e24c2b 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions_vars.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/functions_vars.html @@ -9,7 +9,7 @@ Software Drivers
- +
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals.html index 5e266b6d..0c4503d5 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals.html @@ -9,7 +9,7 @@ Software Drivers
- + @@ -36,89 +37,141 @@

-Here is a list of all documented file members with links to the documentation: +Here is a list of all file members with links to the files they belong to:

- x -

+
  • XDeint_BaseAddr +: xdeint_i.h
  • XDEINT_BUF_SIZE_MASK +: xdeint_hw.h
  • XDEINT_BUFFER0_OFFSET +: xdeint_hw.h
  • XDEINT_BUFFER1_OFFSET +: xdeint_hw.h
  • XDEINT_BUFFER2_OFFSET +: xdeint_hw.h
  • XDEINT_BUFSIZE_OFFSET +: xdeint_hw.h
  • XDeint_CallBack +: xdeint.h
  • XDeint_ConfigInitialize() +: xdeint.h, xdeint.c
  • XDeint_ConfigTable +: xdeint_g.c
  • XDEINT_CONTROL +: xdeint_hw.h
  • XDEINT_CONTROL_OFFSET +: xdeint_hw.h
  • XDEINT_CTL_ACCEPT_VIDEO +: xdeint_hw.h
  • XDEINT_CTL_ENABLE +: xdeint_hw.h
  • XDEINT_CTL_UPDATE_REQ +: xdeint_hw.h
  • XDeint_Disable +: xdeint.h
  • XDeint_Enable +: xdeint.h
  • XDEINT_FADE_RATIO +: xdeint_hw.h
  • XDEINT_FS_BASE0 +: xdeint_hw.h
  • XDEINT_FS_BASE1 +: xdeint_hw.h
  • XDEINT_FS_BASE2 +: xdeint_hw.h
  • XDEINT_FS_WORDS +: xdeint_hw.h
  • XDeint_GetAlgorithm +: xdeint.h
  • XDeint_GetColorSpace +: xdeint.h
  • XDeint_GetFramestore() +: xdeint.h, xdeint.c
  • XDeint_GetPulldown() +: xdeint.h, xdeint.c
  • XDeint_GetSize() +: xdeint.h, xdeint.c
  • XDeint_GetThresholds() +: xdeint.h, xdeint.c
  • XDeint_GetVersion() +: xdeint.h, xdeint.c
  • XDeint_GetVideo() +: xdeint.h, xdeint.c
  • XDEINT_H +: xdeint.h
  • XDEINT_HANDLER +: xdeint.h
  • XDEINT_HEIGHT +: xdeint_hw.h
  • XDEINT_HEIGHT_MASK +: xdeint_hw.h
  • XDEINT_HEIGHT_OFFSET +: xdeint_hw.h
  • XDEINT_HW_H +: xdeint_hw.h
  • XDEINT_I_H +: xdeint_i.h
  • XDEINT_IER +: xdeint_hw.h
  • XDEINT_IER_OFFSET +: xdeint_hw.h
  • XDeint_In32 +: xdeint_hw.h
  • XDeint_InReset +: xdeint.h
  • XDeint_IntrClear +: xdeint.h
  • XDeint_IntrDisable +: xdeint.h
  • XDeint_IntrEnable +: xdeint.h
  • XDeint_IntrGetPending +: xdeint.h
  • XDeint_IntrHandler() +: xdeint_intr.c, xdeint.h
  • XDEINT_ISR +: xdeint_hw.h
  • XDEINT_ISR_OFFSET +: xdeint_hw.h
  • XDEINT_IXR_ALLINTR_MASK +: xdeint_hw.h
  • XDEINT_IXR_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FRAME_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_CFG_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_RD_FIELD_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_RD_FRAME_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_WR_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_LOCKED_MASK +: xdeint_hw.h
  • XDEINT_IXR_PULL_OFF_MASK +: xdeint_hw.h
  • XDEINT_IXR_PULL_ON_MASK +: xdeint_hw.h
  • XDEINT_IXR_UNLOCKED_MASK +: xdeint_hw.h
  • XDEINT_IXR_UPDATE_MASK +: xdeint_hw.h
  • XDeint_LookupConfig() +: xdeint_sinit.c, xdeint.h
  • XDEINT_MODE +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_0 +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_1 +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_DIAG +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_FULL +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_MASK +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_MOTION +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_RAW +: xdeint_hw.h
  • XDEINT_MODE_COL +: xdeint_hw.h
  • XDEINT_MODE_COL_MASK +: xdeint_hw.h
  • XDEINT_MODE_COLOUR_RGB +: xdeint_hw.h
  • XDEINT_MODE_COLOUR_YUV +: xdeint_hw.h
  • XDEINT_MODE_FIELD_EVEN_FIRST +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ODD_FIRST +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ORDER +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ORDER_MASK +: xdeint_hw.h
  • XDEINT_MODE_OFFSET +: xdeint_hw.h
  • XDEINT_MODE_PACKING_0 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_1 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_420 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_422 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_444 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_MASK +: xdeint_hw.h
  • XDEINT_MODE_PSF_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PSF_ENABLE_MASK +: xdeint_hw.h
  • XDEINT_MODE_PULL_22_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PULL_22_FIELDP +: xdeint_hw.h
  • XDEINT_MODE_PULL_32_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PULL_ENABLE_MASK +: xdeint_hw.h
  • XDeint_Out32 +: xdeint_hw.h
  • XDeint_ReadReg +: xdeint_hw.h
  • XDeint_RegUpdateReq +: xdeint.h
  • XDeint_Reset +: xdeint.h
  • XDEINT_RESET +: xdeint_hw.h
  • XDEINT_RESET_OFFSET +: xdeint_hw.h
  • XDEINT_RESET_RESET_MASK +: xdeint_hw.h
  • XDeint_Selftest() +: xdeint_selftest.c, xdeint.h
  • XDeint_SetAlgorithm +: xdeint.h
  • XDeint_SetCallBack() +: xdeint_intr.c, xdeint.h
  • XDeint_SetFramestore() +: xdeint.h, xdeint.c
  • XDeint_SetPulldown() +: xdeint.h, xdeint.c
  • XDeint_SetRGB +: xdeint.h
  • XDeint_SetSize() +: xdeint.h, xdeint.c
  • XDeint_SetThresholds() +: xdeint.h, xdeint.c
  • XDeint_SetVideo() +: xdeint.h, xdeint.c
  • XDeint_SetYUV +: xdeint.h
  • XDeint_Start +: xdeint.h
  • XDeint_Stop +: xdeint.h
  • XDEINT_STS_ERROR_OFFSET +: xdeint_hw.h
  • XDEINT_STS_FS_CFG_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_RD_FIELD_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_RD_FRAME_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_WR_ERROR +: xdeint_hw.h
  • XDEINT_T1 +: xdeint_hw.h
  • XDEINT_T2 +: xdeint_hw.h
  • XDEINT_THRESH1_OFFSET +: xdeint_hw.h
  • XDEINT_THRESH2_OFFSET +: xdeint_hw.h
  • XDEINT_THRESHOLD_MASK +: xdeint_hw.h
  • XDEINT_VER +: xdeint_hw.h
  • XDEINT_VER_MAJOR_MASK +: xdeint_hw.h
  • XDEINT_VER_MAJOR_SHIFT +: xdeint_hw.h
  • XDEINT_VER_MINOR_MASK +: xdeint_hw.h
  • XDEINT_VER_MINOR_SHIFT +: xdeint_hw.h
  • XDEINT_VER_OFFSET +: xdeint_hw.h
  • XDEINT_VER_REV_MASK +: xdeint_hw.h
  • XDEINT_VER_REV_SHIFT +: xdeint_hw.h
  • XDEINT_WIDTH +: xdeint_hw.h
  • XDEINT_WIDTH_MASK +: xdeint_hw.h
  • XDEINT_WIDTH_OFFSET +: xdeint_hw.h
  • XDeint_WriteReg +: xdeint_hw.h
  • XDEINT_XFADE +: xdeint_hw.h
  • XDEINT_XFADE_MASK +: xdeint_hw.h
  • XDEINT_XFADE_OFFSET +: xdeint_hw.h Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_defs.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_defs.html index 99072e71..a848ed54 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_defs.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_defs.html @@ -9,7 +9,7 @@ Software Drivers
    - + @@ -39,75 +40,120 @@  

    - x -

    +
  • XDeint_BaseAddr +: xdeint_i.h
  • XDEINT_BUF_SIZE_MASK +: xdeint_hw.h
  • XDEINT_BUFFER0_OFFSET +: xdeint_hw.h
  • XDEINT_BUFFER1_OFFSET +: xdeint_hw.h
  • XDEINT_BUFFER2_OFFSET +: xdeint_hw.h
  • XDEINT_BUFSIZE_OFFSET +: xdeint_hw.h
  • XDEINT_CONTROL +: xdeint_hw.h
  • XDEINT_CONTROL_OFFSET +: xdeint_hw.h
  • XDEINT_CTL_ACCEPT_VIDEO +: xdeint_hw.h
  • XDEINT_CTL_ENABLE +: xdeint_hw.h
  • XDEINT_CTL_UPDATE_REQ +: xdeint_hw.h
  • XDeint_Disable +: xdeint.h
  • XDeint_Enable +: xdeint.h
  • XDEINT_FADE_RATIO +: xdeint_hw.h
  • XDEINT_FS_BASE0 +: xdeint_hw.h
  • XDEINT_FS_BASE1 +: xdeint_hw.h
  • XDEINT_FS_BASE2 +: xdeint_hw.h
  • XDEINT_FS_WORDS +: xdeint_hw.h
  • XDeint_GetAlgorithm +: xdeint.h
  • XDeint_GetColorSpace +: xdeint.h
  • XDEINT_H +: xdeint.h
  • XDEINT_HANDLER +: xdeint.h
  • XDEINT_HEIGHT +: xdeint_hw.h
  • XDEINT_HEIGHT_MASK +: xdeint_hw.h
  • XDEINT_HEIGHT_OFFSET +: xdeint_hw.h
  • XDEINT_HW_H +: xdeint_hw.h
  • XDEINT_I_H +: xdeint_i.h
  • XDEINT_IER +: xdeint_hw.h
  • XDEINT_IER_OFFSET +: xdeint_hw.h
  • XDeint_In32 +: xdeint_hw.h
  • XDeint_InReset +: xdeint.h
  • XDeint_IntrClear +: xdeint.h
  • XDeint_IntrDisable +: xdeint.h
  • XDeint_IntrEnable +: xdeint.h
  • XDeint_IntrGetPending +: xdeint.h
  • XDEINT_ISR +: xdeint_hw.h
  • XDEINT_ISR_OFFSET +: xdeint_hw.h
  • XDEINT_IXR_ALLINTR_MASK +: xdeint_hw.h
  • XDEINT_IXR_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FRAME_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_CFG_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_RD_FIELD_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_RD_FRAME_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_FS_WR_ERROR_MASK +: xdeint_hw.h
  • XDEINT_IXR_LOCKED_MASK +: xdeint_hw.h
  • XDEINT_IXR_PULL_OFF_MASK +: xdeint_hw.h
  • XDEINT_IXR_PULL_ON_MASK +: xdeint_hw.h
  • XDEINT_IXR_UNLOCKED_MASK +: xdeint_hw.h
  • XDEINT_IXR_UPDATE_MASK +: xdeint_hw.h
  • XDEINT_MODE +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_0 +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_1 +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_DIAG +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_FULL +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_MASK +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_MOTION +: xdeint_hw.h
  • XDEINT_MODE_ALGORITHM_RAW +: xdeint_hw.h
  • XDEINT_MODE_COL +: xdeint_hw.h
  • XDEINT_MODE_COL_MASK +: xdeint_hw.h
  • XDEINT_MODE_COLOUR_RGB +: xdeint_hw.h
  • XDEINT_MODE_COLOUR_YUV +: xdeint_hw.h
  • XDEINT_MODE_FIELD_EVEN_FIRST +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ODD_FIRST +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ORDER +: xdeint_hw.h
  • XDEINT_MODE_FIELD_ORDER_MASK +: xdeint_hw.h
  • XDEINT_MODE_OFFSET +: xdeint_hw.h
  • XDEINT_MODE_PACKING_0 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_1 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_420 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_422 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_444 +: xdeint_hw.h
  • XDEINT_MODE_PACKING_MASK +: xdeint_hw.h
  • XDEINT_MODE_PSF_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PSF_ENABLE_MASK +: xdeint_hw.h
  • XDEINT_MODE_PULL_22_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PULL_22_FIELDP +: xdeint_hw.h
  • XDEINT_MODE_PULL_32_ENABLE +: xdeint_hw.h
  • XDEINT_MODE_PULL_ENABLE_MASK +: xdeint_hw.h
  • XDeint_Out32 +: xdeint_hw.h
  • XDeint_ReadReg +: xdeint_hw.h
  • XDeint_RegUpdateReq +: xdeint.h
  • XDeint_Reset +: xdeint.h
  • XDEINT_RESET +: xdeint_hw.h
  • XDEINT_RESET_OFFSET +: xdeint_hw.h
  • XDEINT_RESET_RESET_MASK +: xdeint_hw.h
  • XDeint_SetAlgorithm +: xdeint.h
  • XDeint_SetRGB +: xdeint.h
  • XDeint_SetYUV +: xdeint.h
  • XDeint_Start +: xdeint.h
  • XDeint_Stop +: xdeint.h
  • XDEINT_STS_ERROR_OFFSET +: xdeint_hw.h
  • XDEINT_STS_FS_CFG_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_RD_FIELD_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_RD_FRAME_ERROR +: xdeint_hw.h
  • XDEINT_STS_FS_WR_ERROR +: xdeint_hw.h
  • XDEINT_T1 +: xdeint_hw.h
  • XDEINT_T2 +: xdeint_hw.h
  • XDEINT_THRESH1_OFFSET +: xdeint_hw.h
  • XDEINT_THRESH2_OFFSET +: xdeint_hw.h
  • XDEINT_THRESHOLD_MASK +: xdeint_hw.h
  • XDEINT_VER +: xdeint_hw.h
  • XDEINT_VER_MAJOR_MASK +: xdeint_hw.h
  • XDEINT_VER_MAJOR_SHIFT +: xdeint_hw.h
  • XDEINT_VER_MINOR_MASK +: xdeint_hw.h
  • XDEINT_VER_MINOR_SHIFT +: xdeint_hw.h
  • XDEINT_VER_OFFSET +: xdeint_hw.h
  • XDEINT_VER_REV_MASK +: xdeint_hw.h
  • XDEINT_VER_REV_SHIFT +: xdeint_hw.h
  • XDEINT_WIDTH +: xdeint_hw.h
  • XDEINT_WIDTH_MASK +: xdeint_hw.h
  • XDEINT_WIDTH_OFFSET +: xdeint_hw.h
  • XDeint_WriteReg +: xdeint_hw.h
  • XDEINT_XFADE +: xdeint_hw.h
  • XDEINT_XFADE_MASK +: xdeint_hw.h
  • XDEINT_XFADE_OFFSET +: xdeint_hw.h Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_func.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_func.html index 8dbe9134..b1038dd2 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_func.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_func.html @@ -9,7 +9,7 @@ Software Drivers
    - + @@ -33,14 +34,20 @@

    +: xdeint.h, xdeint.c
  • XDeint_GetFramestore() +: xdeint.h, xdeint.c
  • XDeint_GetPulldown() +: xdeint.h, xdeint.c
  • XDeint_GetSize() +: xdeint.h, xdeint.c
  • XDeint_GetThresholds() +: xdeint.h, xdeint.c
  • XDeint_GetVersion() +: xdeint.h, xdeint.c
  • XDeint_GetVideo() +: xdeint.h, xdeint.c
  • XDeint_IntrHandler() +: xdeint_intr.c, xdeint.h
  • XDeint_LookupConfig() +: xdeint_sinit.c, xdeint.h
  • XDeint_Selftest() +: xdeint_selftest.c, xdeint.h
  • XDeint_SetCallBack() +: xdeint_intr.c, xdeint.h
  • XDeint_SetFramestore() +: xdeint.h, xdeint.c
  • XDeint_SetPulldown() +: xdeint.h, xdeint.c
  • XDeint_SetSize() +: xdeint.h, xdeint.c
  • XDeint_SetThresholds() +: xdeint.h, xdeint.c
  • XDeint_SetVideo() +: xdeint.h, xdeint.c Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_type.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_type.html new file mode 100644 index 00000000..903548c7 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_type.html @@ -0,0 +1,38 @@ + + + + + Class Members + + + + +Software Drivers +
    + + + + +  +

    +

    +Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_vars.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_vars.html index 7ef47830..72e3f47e 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_vars.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/globals_vars.html @@ -9,7 +9,7 @@ Software Drivers
    - + @@ -33,5 +34,5 @@

    +: xdeint_g.c Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/index.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/index.html index 44daab25..611e44ca 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/index.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/index.html @@ -2,40 +2,60 @@ - deinterlacer v3_1 + Deinterlacer v3_2 Software Drivers
    - + -

    deinterlacer v3_1

    +

    Deinterlacer v3_2

    -This is the main header file of Xilinx Video Deinterlacer device driver

    +This is the main header file of Xilinx Video Deinterlacer core.

    Interrupt Service

    The Deinterlacer can generate 11 interrupt sources

      -
    • Internal Register update done
    • Deinterlacer is locked to incoming video
    • Deinterlacer has lost lock to incoming video
    • Deinterlacer internal fifo error
    • Pulldown activated
    • Pulldown cancelled
    • Frame Tick
    • Framestore Write setup error
    • Framestore Write fifo overflow
    • Framestore Read Field underrun
    • Framestore Read Frame underrun
    +
  • Internal Register update done
  • Deinterlacer is locked to incoming video
  • Deinterlacer has lost lock to incoming video
  • Deinterlacer internal FIFO error
  • Pull down activated
  • Pull down cancelled
  • Frame Tick
  • Frame store Write setup error
  • Frame store Write FIFO overflow
  • Frame store Read Field under run
  • Frame store Read Frame under run
  • This driver provides functions to install callbacks for the interrupts and enable/disable/clear any of them.

    Examples

    -Example(s) are provided with this driver to demonstrate the driver usage.

    +Example(s) are provided with this driver to demonstrate the self test.

    Limitations

    BUS Interface

      MODIFICATION HISTORY:

    -

     Ver   Who  Date     Changes
    +
     Ver   Who     Date     Changes
      ----- ---- -------- -------------------------------------------------------
    - 1.00a rjh 07/10/11 First release
    - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    - 3.0   adk  19/12/13 Updated as per the New Tcl API's
    - 3.1   adk  09/05/14 Fixed the CR:798337 driver doesn't support the IP in the
    - 		             build.Changes are made in the driver mdd file.
    -
    - 
    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. + 1.00a rjh 07/10/11 First release + 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00 + 3.0 adk 19/12/13 Updated as per the New Tcl API's. + 3.2 adk 02/13/14 Added Doxygen support, adherence to Xilinx + coding standards.

    +

                           Modification history of xdeint_sinit.c:
    +                       Added Doxygen support, adherence to Xilinx
    +                       coding standards.

    +

                           Modification history of xdeint_selftest.c:
    +                       Added the XDeint_Selftest function.

    +

                           Modification history of xdeint_intr.c:
    +                       Adherence to Xilinx coding, Doxygen guidelines.

    +

                           Modification history of xdeint_i.h:
    +                       Added Doxygen support.

    +

                           Modification history of xdeint_hw.h:
    +                       Suffixed "_OFFSET" to all register offset macros.
    +                       Added bit masks for the registers and added
    +                       backward compatibility for macros.

    +

                           Modification history of xdeint.c:
    +                       Changed the prototype of XDeint_GetVersion
    +                       Implemented the following functions:
    +                       XDeint_GetFramestore
    +                       XDeint_GetVideo
    +                       XDeint_GetThresholds
    +                       XDeint_GetPulldown
    +                       XDeint_GetSize
    + 
    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint-members.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint-members.html index 33d3ca3a..2b95679c 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint-members.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint-members.html @@ -9,7 +9,7 @@ Software Drivers
    - +

    XDeint Member List

    This is the complete list of members for XDeint, including all inherited members.

    - - - - - + + + + + +
    ConfigXDeint
    IntCallBackXDeint
    IsReadyXDeint
    xsizeXDeint
    ysizeXDeint
    ConfigXDeint
    IntCallBackXDeint
    IntRefXDeint
    IsReadyXDeint
    XSizeXDeint
    YSizeXDeint
    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint.html index 6e7d628e..edb40fb8 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint.html @@ -9,7 +9,7 @@

    Software Drivers
    - +
    +

    + +

    +
    + + + + +
    u32 XDeint::YSize
    +
    +
    + +

    +Y Input Dimension +

    +


    The documentation for this struct was generated from the following file:
      -
    • xdeint.h
    +
  • xdeint.h Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config-members.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config-members.html index 2a17ff7c..50a666f5 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config-members.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config-members.html @@ -9,7 +9,7 @@ Software Drivers
    - +

    XDeint_Config Member List

    This is the complete list of members for XDeint_Config, including all inherited members.

    - - + +
    BaseAddressXDeint_Config
    DeviceIdXDeint_Config
    BaseAddressXDeint_Config
    DeviceIdXDeint_Config
    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config.html index d811d7d4..bda305b3 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/struct_x_deint___config.html @@ -9,7 +9,7 @@

    Software Drivers
    - +
    • Main Page
    • @@ -24,63 +24,47 @@

      XDeint_Config Struct Reference

      #include <xdeint.h>

      List of all members.


      Detailed Description

      -Deinterlacer device configuration structure. Each Deinterlacer device should have a configuration structure associated. +Deinterlacer core configuration structure. Each Deinterlacer core should have a configuration structure associated.

      - + - +

      Public Attributes

      u16 DeviceId
      u16 DeviceId
      u32 BaseAddress
      u32 BaseAddress


      Member Data Documentation

      -

      - - - - -
      - + +
      +
      +
      - +
      u32 XDeint_Config::BaseAddress u32 XDeint_Config::BaseAddress
      -
      - - - - - -
      -   - + +

      -BaseAddress is the physical base address of the device's registers

      -

      - - - - -
      - +BaseAddress is the physical base address of the core's registers + +

      + +

      +
      +
      - +
      u16 XDeint_Config::DeviceId u16 XDeint_Config::DeviceId
      -
      - - - - - -
      -   - + +

      -DeviceId is the unique ID of the device

      +DeviceId is the unique ID of the core +

    +


    The documentation for this struct was generated from the following file:
      -
    • xdeint.h
    +
  • xdeint.h Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8c.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8c.html index f4ecf98b..72b43c11 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8c.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8c.html @@ -9,7 +9,7 @@ Software Drivers
    - +

    xdeint.c File Reference


    Detailed Description

    -This is main code of Xilinx Vide Deinterlacer device driver. Please see xdeint.h for more details of the driver.

    +This is main code of Xilinx Vide Deinterlacer core. Please see xdeint.h for more details of the driver.

      MODIFICATION HISTORY:

    -

     Ver    Who     Date      Changes
    - ----- ---- -------- -------------------------------------------------------
    - 1.00a rjh 07/10/11 First release
    - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +
     Ver   Who  Date     Changes
    + ----- ---- -------- ------------------------------------------------------
    + 1.00a rjh  07/10/11 First release
    + 2.00a rjh  18/01/12 Updated for v_deinterlacer 2.00
    + 3.2   adk  02/13/14 Changed the prototype of XDeint_GetVersion
    +                     Implemented the following functions:
    +                     XDeint_GetFramestore
    +                     XDeint_GetVideo
    +                     XDeint_GetThresholds
    +                     XDeint_GetPulldown
    +                     XDeint_GetSize
      

    -#include "xdeint.h"
    -#include "xenv.h"
    +#include "xdeint.h"
    #include "xil_assert.h"
    - + - + - + - + - + - + - + + + + + + + + + + +

    Functions

    int XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr)
    int XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr)
    void XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize)
    void XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize)
    void XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Colour, u32 Order, u32 PSF)
    void XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Color, u32 Order, u32 PSF)
    void XDeint_SetThresholds (XDeint *InstancePtr, u32 t1, u32 t2)
    void XDeint_SetThresholds (XDeint *InstancePtr, u32 ThresholdT1, u32 ThresholdT2)
    void XDeint_SetPulldown (XDeint *InstancePtr, u32 enable_32, u32 enable_22)
    void XDeint_SetPulldown (XDeint *InstancePtr, u32 Enable_32, u32 Enable_22)
    void XDeint_GetVersion (XDeint *InstancePtr, u16 *Major, u16 *Minor, u16 *Revision)
    u32 XDeint_GetVersion (XDeint *InstancePtr)
    void XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height)
    void XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height)
    u32 XDeint_GetVideo (XDeint *InstancePtr)
    void XDeint_GetPulldown (XDeint *InstancePtr, u32 *Enable_32, u32 *Enable_22)
    void XDeint_GetSize (XDeint *InstancePtr, u32 *Width, u32 *Height)
    void XDeint_GetThresholds (XDeint *InstancePtr, u32 *ThresholdT1, u32 *ThresholdT2)
    void XDeint_GetFramestore (XDeint *InstancePtr, u32 *FieldAddr1, u32 *FieldAddr2, u32 *FieldAddr3, u32 *FrameSize)


    Function Documentation

    -

    - - - - -
    - + +
    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - + + +
    int XDeint_ConfigInitialize XDeint InstancePtr, int XDeint_ConfigInitialize (XDeint InstancePtr,
    XDeint_Config CfgPtr, XDeint_Config CfgPtr,
    u32  EffectiveAddru32  EffectiveAddr 
    )
    -
    - - - - - -
    -   - + +

    -This function initializes an Deinterlacer device. This function must be called prior to using a Deinterlacer device. Initialization of an Deinterlacer includes setting up the instance data, and ensuring the hardware is in a quiescent state.

    +This function initializes the Deinterlacer core. This function must be called prior to using a Deinterlacer core. Initialization of the Deinterlacer includes setting up the instance data, and ensuring the hardware is in a quiescent state.

    Parameters:
    - - - + + +
    InstancePtr is a pointer to the Deinterlacer device instance to be worked on.
    CfgPtr points to the configuration structure associated with the Deinterlacer device.
    EffectiveAddr is the base address of the device. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
    InstancePtr is a pointer to XDeint instance to be worked on.
    CfgPtr points to the configuration structure associated with the Deinterlacer core.
    EffectiveAddr is the base address of the core. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
    -
    Returns:
    XST_SUCCESS
    -
    -

    - - - - -
    - +
    Returns:
      +
    • XST_SUCCESS if initialization was successful.
    +
    +
    Note:
    None.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + + + + + + +
    void XDeint_GetVersion XDeint InstancePtr, void XDeint_GetFramestore (XDeint InstancePtr,
    u16 *  Major, u32 *  FieldAddr1,
    u16 *  Minor, u32 *  FieldAddr2,
    u16 *  Revisionu32 *  FieldAddr3,
    u32 *  FrameSize 
    )
    -
    - - - - - -
    -   - + +

    -This function returns the version of a Deinterlacer device.

    +This function gets input field buffer addresses of an Deinterlacer core.

    Parameters:
    - - - - + + + + + +
    InstancePtr is a pointer to the Deinterlacer device instance to be worked on.
    Major points to an unsigned 16-bit variable that will be assigned with the major version number after this function returns. Value range is from 0x0 to 0xF.
    Minor points to an unsigned 16-bit variable that will be assigned with the minor version number after this function returns. Value range is from 0x00 to 0xFF.
    Revision points to an unsigned 16-bit variable that will be assigned with the revision version number after this function returns. Value range is from 0xA to 0xF.
    InstancePtr is a pointer to XDeint instance to be worked on.
    FieldAddr1 is the pointer to the 1st input field buffer.
    FieldAddr2 is the pointer to the 2nd input field buffer.
    FieldAddr3 is the pointer to the 3rd input field buffer.
    FrameSize is the pointer to size in 32bit words of a single field buffer.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetPulldown (XDeint InstancePtr,
    u32 *  Enable_32,
    u32 *  Enable_22 
    )
    +
    +
    + +

    +This function gets the pull down controller of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Enable_32 is a pointer which holds status of Enable_32 mode.
      +
    • FALSE = Disabled.
    • TRUE = Enabled.
    +
    Enable_22 is a pointer which holds status of Enable_22 mode.
      +
    • FALSE = Disabled.
    • TRUE = Enabled.
    +
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetSize (XDeint InstancePtr,
    u32 *  Width,
    u32 *  Height 
    )
    +
    +
    + +

    +This function gets the input frame size of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Width is pointer to the width of the frame.
    Height is pointer to the height of the frame.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetThresholds (XDeint InstancePtr,
    u32 *  ThresholdT1,
    u32 *  ThresholdT2 
    )
    +
    +
    + +

    +This function gets the threshold used by the motion adaptive kernel.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    ThresholdT1 is the pointer to lower threshold of the motion kernel.
    ThresholdT2 is the pointer to upper threshold of the motion kernel.
    Returns:
    None.
    -
    Note:
    Example: Device version should read v2.01.c if major version number is 0x2, minor version number is 0x1, and revision version number is 0xC.
    -
    -

    - - - - -
    - + + +

    + +

    +
    +
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + +
    void XDeint_SetFramestore XDeint InstancePtr,
    u32  FieldAddr1,
    u32  FieldAddr2,
    u32  FieldAddr3,
    u32  FrameSize
    u32 XDeint_GetVersion (XDeint InstancePtr  ) 
    -
    - - - - - -
    -   - + +

    -This function sets up input field buffer addresses of an Deinterlacer device.

    +This function returns the contents of Version register.

    Parameters:
    - + +
    InstancePtr is a pointer to the DEINT device instance to be worked on.
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns the contents of the version register.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + +
    u32 XDeint_GetVideo (XDeint InstancePtr  ) 
    +
    +
    + +

    +This function gets the video format of the Deinterlacer core.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns the video format.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetFramestore (XDeint InstancePtr,
    u32  FieldAddr1,
    u32  FieldAddr2,
    u32  FieldAddr3,
    u32  FrameSize 
    )
    +
    +
    + +

    +This function sets the input field buffer addresses of the Deinterlacer core.

    +

    Parameters:
    + + - +
    InstancePtr is a pointer to XDeint instance to be worked on.
    FieldAddr1 is the address of the 1st input field buffer.
    FieldAddr2 is the address of the 2nd input field buffer.
    FieldAddr3 is the address of the 3rd input field buffer.
    FrameSize is the size in 32bit words of a single field buffer
    FrameSize is the size in 32bit words of a single field buffer.
    -
    Returns:
    None.
    -
    -

    - - - - -
    - +
    Returns:
    None.
    +
    Note:
    None.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - + + +
    void XDeint_SetPulldown XDeint InstancePtr, void XDeint_SetPulldown (XDeint InstancePtr,
    u32  enable_32, u32  Enable_32,
    u32  enable_22u32  Enable_22 
    )
    -
    - - - - - -
    -   - + +

    -This function sets up the pulldown controller

    +This function sets the pull down controller of the Deinterlacer core.

    Parameters:
    - - + + +
    InstancePtr is a pointer to the DEINT device instance to be worked on.
    enable 
    InstancePtr is a pointer to XDeint instance to be worked on.
    Enable_32 allows detectors to automatically control Deinterlacer core.
    Enable_22 allows detectors to automatically control Deinterlacer core.
    -
    Returns:
    None.
    -
    -

    - - - - -
    - +
    Returns:
    None.
    +
    Note:
    None.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - + + +
    void XDeint_SetSize XDeint InstancePtr, void XDeint_SetSize (XDeint InstancePtr,
    u32  Width, u32  Width,
    u32  Heightu32  Height 
    )
    -
    - - - - - -
    -   - + +

    -This function sets up the input frame size of the deinterlacer

    +This function sets the input frame size of the Deinterlacer core.

    Parameters:
    - - - + + +
    InstancePtr is a pointer to the DEINT device instance to be worked on.
    Width 
    Height 
    InstancePtr is a pointer to XDeint instance to be worked on.
    Width is the width of the frame.
    Height is the height of the frame.
    -
    Returns:
    None.
    -
    -

    - - - - -
    - +
    Returns:
    None.
    +
    Note:
    None.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - + + +
    void XDeint_SetThresholds XDeint InstancePtr, void XDeint_SetThresholds (XDeint InstancePtr,
    u32  t1, u32  ThresholdT1,
    u32  t2u32  ThresholdT2 
    )
    -
    - - - - - -
    -   - + +

    -This function sets up the threshold used by the motion adaptive kernel

    +This function sets the threshold used by the motion adaptive kernel of the Deinterlacer core.

    Parameters:
    - - - + + +
    InstancePtr is a pointer to the DEINT device instance to be worked on.
    T1 is the lower threshold of the motion kernel
    T2 is the upper threshold of the motion kernel
    InstancePtr is a pointer to XDeint instance to be worked on.
    ThresholdT1 is the lower threshold of the motion kernel.
    ThresholdT2 is the upper threshold of the motion kernel.
    -
    Returns:
    None.
    -
    -

    - - - - -
    - +
    Returns:
    None.
    +
    Note:
    None.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + +
    void XDeint_SetVideo XDeint InstancePtr, void XDeint_SetVideo (XDeint InstancePtr,
    u32  Packing, u32  Packing,
    u32  Colour, u32  Color,
    u32  Order, u32  Order,
    u32  PSFu32  PSF 
    )
    -
    - - - - - -
    -   - + +

    -This function sets up the video format

    +This function sets the video format of the Deinterlacer core.

    Parameters:
    + - - - + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Packing selects the XSVI video packing mode.
    Colour selects what colourspace to use
    Order selects which field ordering is being used
    psf enables psf (progressive segmented frame mode)
    Color selects what color space to use.
    Order selects which field ordering is being used.
    PSF enables psf (progressive segmented frame mode).
    -
    Returns:
    None.
    -
    +

    Returns:
    None.
    +
    Note:
    None.
    + + +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8h.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8h.html new file mode 100644 index 00000000..8d1f28c8 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint_8h.html @@ -0,0 +1,1363 @@ + + + + + xdeint.h File Reference + + + +

    +Software Drivers +
    + + + +

    xdeint.h File Reference

    +

    +#include "xdeint_hw.h"
    +#include "xstatus.h"
    +#include "xil_assert.h"
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Classes

    struct  XDeint_Config
    struct  XDeint

    Interrupt types for setting up callbacks

    #define XDEINT_HANDLER

    Defines

    #define XDEINT_H
    #define XDeint_Enable(InstancePtr)
    #define XDeint_Disable(InstancePtr)
    #define XDeint_Start(InstancePtr)
    #define XDeint_Stop(InstancePtr)
    #define XDeint_Reset(InstancePtr)
    #define XDeint_InReset(InstancePtr)
    #define XDeint_RegUpdateReq(InstancePtr)
    #define XDeint_IntrEnable(InstancePtr, IntrType)
    #define XDeint_IntrDisable(InstancePtr, IntrType)
    #define XDeint_IntrGetPending(InstancePtr)
    #define XDeint_IntrClear(InstancePtr, IntrType)
    #define XDeint_SetRGB(InstancePtr)
    #define XDeint_SetYUV(InstancePtr)
    #define XDeint_SetAlgorithm(InstancePtr, Alg)
    #define XDeint_GetColorSpace(InstancePtr)
    #define XDeint_GetAlgorithm(InstancePtr)

    Typedefs

    typedef void(*) XDeint_CallBack (u32 status)

    Functions

    int XDeint_ConfigInitialize (XDeint *InstancePtr, XDeint_Config *CfgPtr, u32 EffectiveAddr)
    XDeint_ConfigXDeint_LookupConfig (u16 DeviceId)
    void XDeint_SetFramestore (XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, u32 FieldAddr3, u32 FrameSize)
    void XDeint_SetSize (XDeint *InstancePtr, u32 Width, u32 Height)
    void XDeint_SetPulldown (XDeint *InstancePtr, u32 Enable_32, u32 Enable_22)
    void XDeint_SetThresholds (XDeint *InstancePtr, u32 ThresholdT1, u32 ThresholdT2)
    void XDeint_SetVideo (XDeint *InstancePtr, u32 Packing, u32 Color, u32 Order, u32 PSF)
    void XDeint_IntrHandler (void *InstancePtr)
    int XDeint_SetCallBack (XDeint *InstancePtr, void *CallBackFunc)
    u32 XDeint_GetVideo (XDeint *InstancePtr)
    void XDeint_GetPulldown (XDeint *InstancePtr, u32 *Enable_32, u32 *Enable_22)
    void XDeint_GetSize (XDeint *InstancePtr, u32 *Width, u32 *Height)
    void XDeint_GetThresholds (XDeint *InstancePtr, u32 *ThresholdT1, u32 *ThresholdT2)
    void XDeint_GetFramestore (XDeint *InstancePtr, u32 *FieldAddr1, u32 *FieldAddr2, u32 *FieldAddr3, u32 *FrameSize)
    u32 XDeint_GetVersion (XDeint *InstancePtr)
    int XDeint_Selftest (XDeint *InstancePtr)
    +


    Define Documentation

    + +
    +
    + + + + + + + + + +
    #define XDeint_Disable (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET)) & (~(XDEINT_CTL_ENABLE)))
    +
    This macro disables the Deinterlacer algorithms.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_Disable(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_Enable (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ENABLE))
    +
    This macro enables the Deinterlacer algorithms.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_Enable(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_GetAlgorithm (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_MODE_OFFSET)) & (~(XDEINT_MODE_ALGORITHM_FULL))
    +
    This macro gets the Deinterlacer's processing algorithm.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns algorithm for deinterlacing method.
      +
    • 0x00000000 = Pure field interpolating technique is used.
    • 0x00000001 = Diagonal engine is used.
    • 0x00000002 = Motion adaptive engine is used.
    • 0x00000003 = Motion and Diagonal engines are used.
    +
    +
    Note:
    C-style signature: u32 XDeint_GetAlgorithm(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_GetColorSpace (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_MODE_OFFSET)) & (XDEINT_MODE_COLOUR_YUV)
    +
    This macro gets the Deinterlacer's color space.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns the color space. 0x00000004 - YUV color space, 0x00000000 - RGB color space.
    +
    Note:
    C-style signature: u32 XDeint_GetColorSpace(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + +
    #define XDEINT_H
    +
    +
    + +

    +Prevent circular inclusions by using protection macros +

    +

    + +

    +
    + + + + +
    #define XDEINT_HANDLER
    +
    +
    + +

    +Internal Register update done +

    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_InReset (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                                (XDEINT_RESET_OFFSET))
    +
    This macro returns the current soft-reset state.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    1=In Reset, 0=Ready.
    +
    Note:
    C-style signature: u32 XDeint_InReset(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + + + + +
    #define XDeint_IntrClear (InstancePtr,
    IntrType   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                                (XDEINT_ISR_OFFSET), (IntrType) & \
    +                                        (XDeint_IntrGetPending(InstancePtr)))
    +
    This macro clears/acknowledges pending interrupts of the Deinterlacer core.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    IntrType is the pending interrupts to clear/acknowledge. Use OR'ing of XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_IntrClear(XDeint *InstancePtr, u32 IntrType)
    + +
    +

    + +

    +
    + + + + + + + + + + + + +
    #define XDeint_IntrDisable (InstancePtr,
    IntrType   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_IER_OFFSET), ((~(IntrType)) & \
    +                        (XDEINT_IXR_ALLINTR_MASK)) & \
    +        XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_ISR_OFFSET)))
    +
    This macro disables the given individual interrupt(s) on the Deinterlacer core.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    IntrType is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be disabled. Bit post ions of 0 will keep the previous setting.This mask is formed by OR'ing XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value.
    +
    +
    Returns:
    None.
    +
    Note:
    Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled.
    +C-style signature: void XDeint_IntrDisable(XDeint *InstancePtr, u32 IntrType) +
    +

    + +

    +
    + + + + + + + + + + + + +
    #define XDeint_IntrEnable (InstancePtr,
    IntrType   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_IER_OFFSET), ((IntrType) & \
    +                                (XDEINT_IXR_ALLINTR_MASK)) | \
    +        XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET)))
    +
    This macro enables the given individual interrupt(s) on the Deinterlacer core.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    IntrType is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit post ions of 0 will keep the previous setting.This mask is formed by OR'ing XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create this parameter value.
    +
    +
    Returns:
    None.
    +
    Note:
    The existing enabled interrupt(s) will remain enabled.
    +C-style signature: void XDeint_IntrEnable(XDeint *InstancePtr, u32 IntrType) +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_IntrGetPending (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_IER_OFFSET)) & \
    +                (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_ISR_OFFSET)) & (XDEINT_IXR_ALLINTR_MASK))
    +
    This macro returns the pending interrupts of the Deinterlacer core.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    The pending interrupts of the Deinterlacer core. Use XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to interpret this value.
    +
    Note:
    C-style signature: u32 XDeint_IntrGetPending(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_RegUpdateReq (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_UPDATE_REQ))
    +
    This macro tells the Deinterlacer core to pick up all the register value changes made so far by the software at the next frame boundary.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_RegUpdateReq(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_Reset (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_RESET_OFFSET), (u32)(XDEINT_RESET_RESET_MASK))
    +
    This macro soft resets the Deinterlacer to its default mode. This register will clear once the reset is complete. Software should poll here until the reset has completed. NOTE : Attempting to alter CPU registers during a soft reset will result in no register changes due to the CPU interface being reset.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_Reset(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + + + + +
    #define XDeint_SetAlgorithm (InstancePtr,
    Alg   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_MODE_OFFSET), \
    +                        (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                                (XDEINT_MODE_OFFSET)) & \
    +                                        (~(XDEINT_MODE_ALGORITHM_FULL))) | \
    +                                                (Alg))
    +
    This macro sets the Deinterlacer's processing algorithm.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Alg is a algorithm setting from XDEINT_MODE_ALGORITHM_????
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_SetAlgorithm(XDeint *InstancePtr, u32 Alg)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_SetRGB (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_MODE_OFFSET), \
    +                        XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_MODE_OFFSET)) | (XDEINT_MODE_COLOUR_RGB))
    +
    This macro sets the Deinterlacer's color space to RGB.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_SetRGB(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_SetYUV (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_MODE_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_MODE_OFFSET)) & (~(XDEINT_MODE_COLOUR_RGB)))
    +
    This macro sets the Deinterlacer's color space to YUV.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_SetYUV(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_Start (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ACCEPT_VIDEO))
    +
    This macro enables the Deinterlacer core to accept video.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_Start(XDeint *InstancePtr)
    + +
    +

    + +

    +
    + + + + + + + + + +
    #define XDeint_Stop (InstancePtr   ) 
    +
    +
    + +

    +Value:

    XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET), \
    +                XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \
    +                        (XDEINT_CONTROL_OFFSET)) & \
    +                                (~(XDEINT_CTL_ACCEPT_VIDEO)))
    +
    This macro halts the Deinterlacer core on the next frame boundary.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    C-style signature: void XDeint_Stop(XDeint *InstancePtr)
    + +
    +

    +


    Typedef Documentation

    + +
    +
    + + + + +
    typedef void(*) XDeint_CallBack(u32 status)
    +
    +
    + +

    +Callback type for all interrupts +

    +

    +


    Function Documentation

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    int XDeint_ConfigInitialize (XDeint InstancePtr,
    XDeint_Config CfgPtr,
    u32  EffectiveAddr 
    )
    +
    +
    + +

    +This function initializes the Deinterlacer core. This function must be called prior to using a Deinterlacer core. Initialization of the Deinterlacer includes setting up the instance data, and ensuring the hardware is in a quiescent state.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    CfgPtr points to the configuration structure associated with the Deinterlacer core.
    EffectiveAddr is the base address of the core. If address translation is being used, then this parameter must reflect the virtual base address. Otherwise, the physical address should be used.
    +
    +
    Returns:
      +
    • XST_SUCCESS if initialization was successful.
    +
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetFramestore (XDeint InstancePtr,
    u32 *  FieldAddr1,
    u32 *  FieldAddr2,
    u32 *  FieldAddr3,
    u32 *  FrameSize 
    )
    +
    +
    + +

    +This function gets input field buffer addresses of an Deinterlacer core.

    +

    Parameters:
    + + + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    FieldAddr1 is the pointer to the 1st input field buffer.
    FieldAddr2 is the pointer to the 2nd input field buffer.
    FieldAddr3 is the pointer to the 3rd input field buffer.
    FrameSize is the pointer to size in 32bit words of a single field buffer.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetPulldown (XDeint InstancePtr,
    u32 *  Enable_32,
    u32 *  Enable_22 
    )
    +
    +
    + +

    +This function gets the pull down controller of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Enable_32 is a pointer which holds status of Enable_32 mode.
      +
    • FALSE = Disabled.
    • TRUE = Enabled.
    +
    Enable_22 is a pointer which holds status of Enable_22 mode.
      +
    • FALSE = Disabled.
    • TRUE = Enabled.
    +
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetSize (XDeint InstancePtr,
    u32 *  Width,
    u32 *  Height 
    )
    +
    +
    + +

    +This function gets the input frame size of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Width is pointer to the width of the frame.
    Height is pointer to the height of the frame.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_GetThresholds (XDeint InstancePtr,
    u32 *  ThresholdT1,
    u32 *  ThresholdT2 
    )
    +
    +
    + +

    +This function gets the threshold used by the motion adaptive kernel.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    ThresholdT1 is the pointer to lower threshold of the motion kernel.
    ThresholdT2 is the pointer to upper threshold of the motion kernel.
    +
    +
    Returns:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + +
    u32 XDeint_GetVersion (XDeint InstancePtr  ) 
    +
    +
    + +

    +This function returns the contents of Version register.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns the contents of the version register.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + +
    u32 XDeint_GetVideo (XDeint InstancePtr  ) 
    +
    +
    + +

    +This function gets the video format of the Deinterlacer core.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    Returns the video format.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + +
    void XDeint_IntrHandler (void *  InstancePtr  ) 
    +
    +
    + +

    +This function is the interrupt handler for the Deinterlacer core.

    +This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callback, and finally clears the interrupts.

    +The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDeint_SetCallBack() during initialization phase.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
    None.
    +
    Note:
    The Error interrupt callback invoked in case an error interrupt or spurious interrupt happens should reset the Deinterlacer core that just interrupted.
    + +
    +

    + +

    +
    + + + + + + + + + +
    XDeint_Config* XDeint_LookupConfig (u16  DeviceId  ) 
    +
    +
    + +

    +This function returns a reference to an XDeint_Config structure based on the unique device id, DeviceId. The return value will refer to an entry in the device configuration table defined in the xdeint_g.c file.

    +

    Parameters:
    + + +
    DeviceId is the unique device ID of the device for the lookup operation.
    +
    +
    Returns:
    XDeint_LookupConfig returns a reference to a config record in the configuration table (in xDEINT_g.c) corresponding to DeviceId or NULL if no match is found.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + +
    int XDeint_Selftest (XDeint InstancePtr  ) 
    +
    +
    + +

    +This function reads Version register of Deinterlacer core and compares with zero as part of self test.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
      +
    • XST_SUCCESS if the test was successful.
    • XST_FAILURE if the test failed.
    +
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + +
    int XDeint_SetCallBack (XDeint InstancePtr,
    void *  CallBackFunc 
    )
    +
    +
    + +

    +This routine installs an asynchronous callback function.

    +

    Parameters:
    + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    CallBackFunc is the address of the callback function.
    +
    +
    Returns:
      +
    • XST_SUCCESS when handler is installed.
    • XST_INVALID_PARAM when HandlerType is invalid.
    +
    +
    Note:
    Invoking this function for a handler that already has been installed replaces it with the new handler.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetFramestore (XDeint InstancePtr,
    u32  FieldAddr1,
    u32  FieldAddr2,
    u32  FieldAddr3,
    u32  FrameSize 
    )
    +
    +
    + +

    +This function sets the input field buffer addresses of the Deinterlacer core.

    +

    Parameters:
    + + + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    FieldAddr1 is the address of the 1st input field buffer.
    FieldAddr2 is the address of the 2nd input field buffer.
    FieldAddr3 is the address of the 3rd input field buffer.
    FrameSize is the size in 32bit words of a single field buffer.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetPulldown (XDeint InstancePtr,
    u32  Enable_32,
    u32  Enable_22 
    )
    +
    +
    + +

    +This function sets the pull down controller of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Enable_32 allows detectors to automatically control Deinterlacer core.
    Enable_22 allows detectors to automatically control Deinterlacer core.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetSize (XDeint InstancePtr,
    u32  Width,
    u32  Height 
    )
    +
    +
    + +

    +This function sets the input frame size of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Width is the width of the frame.
    Height is the height of the frame.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetThresholds (XDeint InstancePtr,
    u32  ThresholdT1,
    u32  ThresholdT2 
    )
    +
    +
    + +

    +This function sets the threshold used by the motion adaptive kernel of the Deinterlacer core.

    +

    Parameters:
    + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    ThresholdT1 is the lower threshold of the motion kernel.
    ThresholdT2 is the upper threshold of the motion kernel.
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void XDeint_SetVideo (XDeint InstancePtr,
    u32  Packing,
    u32  Color,
    u32  Order,
    u32  PSF 
    )
    +
    +
    + +

    +This function sets the video format of the Deinterlacer core.

    +

    Parameters:
    + + + + + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    Packing selects the XSVI video packing mode.
    Color selects what color space to use.
    Order selects which field ordering is being used.
    PSF enables psf (progressive segmented frame mode).
    +
    +
    Returns:
    None.
    +
    Note:
    None.
    + +
    +

    +Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__g_8c.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__g_8c.html index 7d29ea56..ffb9a325 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__g_8c.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__g_8c.html @@ -9,7 +9,7 @@

    Software Drivers
    - +
    • Main Page
    • @@ -25,48 +25,41 @@ This file contains a template for configuration table of Xilinx Video Deinterlacer For a real hardware system, Xilinx Platform Studio (XPS) will automatically generate a real configuration table to match the configuration of the Deinterlacer devices.

        MODIFICATION HISTORY:

      -

       Ver   Who  Date     Changes
      - ----- ---- -------- -------------------------------------------------------
      - 1.00a rjh 07/10/11 First release
      - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
      +
       Ver   Who     Date     Changes
      + ----- ------ -------- -------------------------------------------------------
      + 1.00a rjh    07/10/11 First release
      + 2.00a rjh    18/01/12 Updated for v_deinterlacer 2.00
      + 3.2   adk    02/13/14 Adherence to Xilinx coding, Doxygen guidelines.
        

      +#include "xdeint.h"
      #include "xparameters.h"
      -#include "xdeint.h"
      - +

      Variables

      XDeint_Config XDeint_ConfigTable []
      XDeint_Config XDeint_ConfigTable []


      Variable Documentation

      -

      - - - - -
      - + +
      +
      +
      - +
      XDeint_Config XDeint_ConfigTable[] XDeint_Config XDeint_ConfigTable[]
      -
      - - - - - -
      -   - + +

      Initial value:

       {
               {
      -                XPAR_DEINTERLACER_0_DEVICE_ID,
      -                XPAR_DEINTERLACER_0_BASEADDR
      +                XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1_DEVICE_ID,
      +                XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1__BASEADDR
               }
       }
      -
      The configuration table for Video Deinterlacers devices
      +

    The configuration table for Video Deinterlacers devices + +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__hw_8h.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__hw_8h.html index 7987127d..85ca8990 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__hw_8h.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__hw_8h.html @@ -9,7 +9,7 @@

    Software Drivers
    - +

    xdeint_hw.h File Reference


    Detailed Description

    -This header file contains identifiers and register-level driver functions (or macros) that can be used to access the Xilinx Video Deinterlacer device.

    -For more information about the operation of this device, see the hardware specification and documentation in the higher level driver xdeint.h source code file.

    +This header file contains identifiers and register-level driver functions (or macros) that can be used to access the Xilinx Video Deinterlacer core.

    +For more information about the operation of this core, see the hardware specification and documentation in the higher level core xdeint.h source code file.

      MODIFICATION HISTORY:

    -

     Ver   Who  Date     Changes
    - ----- ---- -------- -------------------------------------------------------
    - 1.00a rjh 07/10/11 First release
    - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +
     Ver   Who      Date     Changes
    + ----- ------ -------- -------------------------------------------------------
    + 1.00a rjh    07/10/11 First release.
    + 2.00a rjh    18/01/12 Updated for v_deinterlacer 2.00.
    + 3.2   adk    02/13/14 Suffixed "_OFFSET" to all register offset macros.
    +                       Added bit masks for the registers and added
    +                       backward compatibility for macros.
      

    #include "xil_io.h"
    - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + +

    Register Offsets

    #define XDEINT_CONTROL   0x000

    Register Offsets:

    #define XDEINT_CONTROL_OFFSET   0x000
    #define XDEINT_MODE   0x004
    #define XDEINT_MODE_OFFSET   0x004
    #define XDEINT_IER   0x008
    #define XDEINT_IER_OFFSET   0x008
    #define XDEINT_ISR   0x00C
    #define XDEINT_ISR_OFFSET   0x00C
    #define XDEINT_HEIGHT   0x010
    #define XDEINT_HEIGHT_OFFSET   0x010
    #define XDEINT_WIDTH   0x014
    #define XDEINT_WIDTH_OFFSET   0x014
    #define XDEINT_T1   0x018
    #define XDEINT_THRESH1_OFFSET   0x018
    #define XDEINT_T2   0x01C
    #define XDEINT_THRESH2_OFFSET   0x01C
    #define XDEINT_XFADE   0x020
    #define XDEINT_XFADE_OFFSET   0x020
    #define XDEINT_FS_BASE0   0x024
    #define XDEINT_BUFFER0_OFFSET   0x024
    #define XDEINT_FS_BASE1   0x028
    #define XDEINT_BUFFER1_OFFSET   0x028
    #define XDEINT_FS_BASE2   0x02C
    #define XDEINT_BUFFER2_OFFSET   0x02C
    #define XDEINT_FS_WORDS   0x030
    #define XDEINT_BUFSIZE_OFFSET   0x030
    #define XDEINT_VER   0x0F0
    #define XDEINT_VER_OFFSET   0x0F0
    #define XDEINT_RESET   0x100
    #define XDEINT_RESET_OFFSET   0x100

    Interrupt Status/Enable Register bit definition

    #define XDEINT_IXR_UPDATE_MASK   0x00000001

    Interrupt Status/Enable Register bit definitions:

    #define XDEINT_IXR_UPDATE_MASK   0x00000001
    #define XDEINT_IXR_LOCKED_MASK   0x00000002
    #define XDEINT_IXR_LOCKED_MASK   0x00000002
    #define XDEINT_IXR_UNLOCKED_MASK   0x00000004
    #define XDEINT_IXR_UNLOCKED_MASK   0x00000004
    #define XDEINT_IXR_ERROR_MASK   0x00000008
    #define XDEINT_IXR_ERROR_MASK   0x00000008
    #define XDEINT_IXR_PULL_ON_MASK   0x00000010
    #define XDEINT_IXR_PULL_ON_MASK   0x00000010
    #define XDEINT_IXR_PULL_OFF_MASK   0x00000020
    #define XDEINT_IXR_PULL_OFF_MASK   0x00000020
    #define XDEINT_IXR_FRAME_MASK   0x00000040
    #define XDEINT_IXR_FRAME_MASK   0x00000040
    #define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100
    #define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100
    #define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200
    #define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200
    #define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400
    #define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400
    #define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800
    #define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800
    #define XDEINT_IXR_ALLINTR_MASK
    #define XDEINT_IXR_ALLINTR_MASK

    Error Status bit definition

    #define XDEINT_STS_ERROR   0x00000008

    Error Status/ bit definitions:

    #define XDEINT_STS_ERROR_OFFSET   0x00000008
    #define XDEINT_STS_FS_CFG_ERROR   0x00000100
    #define XDEINT_STS_FS_CFG_ERROR   0x00000100
    #define XDEINT_STS_FS_WR_ERROR   0x00000200
    #define XDEINT_STS_FS_WR_ERROR   0x00000200
    #define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400
    #define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400
    #define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800
    #define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800

    Deinterlacer COntrol Fields

    #define XDEINT_VER_MAJOR_MASK   0xF0000000

    Deinterlacer Control Fields:

    #define XDEINT_VER_MAJOR_MASK   0xF0000000
    #define XDEINT_VER_MAJOR_SHIFT   28
    #define XDEINT_VER_MAJOR_SHIFT   28
    #define XDEINT_VER_MINOR_MASK   0x0FF00000
    #define XDEINT_VER_MINOR_MASK   0x0FF00000
    #define XDEINT_VER_MINOR_SHIFT   20
    #define XDEINT_VER_MINOR_SHIFT   20
    #define XDEINT_VER_REV_MASK   0x000F0000
    #define XDEINT_VER_REV_MASK   0x000F0000
    #define XDEINT_VER_REV_SHIFT   16
    #define XDEINT_VER_REV_SHIFT   16

    Deinterlacer COntrol Fields

    #define XDEINT_CTL_UPDATE_REQ   0x00000001

    Deinterlacer Control Fields:

    #define XDEINT_CTL_UPDATE_REQ   0x00000001
    #define XDEINT_CTL_ENABLE   0x00000002
    #define XDEINT_CTL_ENABLE   0x00000002
    #define XDEINT_CTL_ACCEPT_VIDEO   0x00000004
    #define XDEINT_CTL_ACCEPT_VIDEO   0x00000004

    Deinterlacer Mode Fields

    #define XDEINT_MODE_ALGORITHM_0   0x00000001

    Deinterlacer Mode Fields:

    #define XDEINT_MODE_ALGORITHM_0   0x00000001
    #define XDEINT_MODE_ALGORITHM_1   0x00000002
    #define XDEINT_MODE_ALGORITHM_1   0x00000002
    #define XDEINT_MODE_COL   0x00000004
    #define XDEINT_MODE_COL   0x00000004
    #define XDEINT_MODE_PACKING_0   0x00000008
    #define XDEINT_MODE_PACKING_0   0x00000008
    #define XDEINT_MODE_PACKING_1   0x00000010
    #define XDEINT_MODE_PACKING_1   0x00000010
    #define XDEINT_MODE_FIELD_ORDER   0x00000020
    #define XDEINT_MODE_FIELD_ORDER   0x00000020
    #define XDEINT_MODE_PSF_ENABLE   0x00000040
    #define XDEINT_MODE_PSF_ENABLE   0x00000040
    #define XDEINT_MODE_PULL_32_ENABLE   0x00000080
    #define XDEINT_MODE_PULL_32_ENABLE   0x00000080
    #define XDEINT_MODE_PULL_22_ENABLE   0x00000100
    #define XDEINT_MODE_PULL_22_ENABLE   0x00000100
    #define XDEINT_MODE_COLOUR_RGB   0x00000000
    #define XDEINT_MODE_PULL_22_FIELDP   0x00000200
    #define XDEINT_MODE_COLOUR_YUV   0x00000004
    #define XDEINT_MODE_COLOUR_RGB   0x00000000
    #define XDEINT_MODE_ALGORITHM_RAW   0x00000000
    #define XDEINT_MODE_COLOUR_YUV   0x00000004
    #define XDEINT_MODE_ALGORITHM_DIAG   0x00000001
    #define XDEINT_MODE_ALGORITHM_RAW   0x00000000
    #define XDEINT_MODE_ALGORITHM_MOTION   0x00000002
    #define XDEINT_MODE_ALGORITHM_DIAG   0x00000001
    #define XDEINT_MODE_ALGORITHM_FULL   0x00000003
    #define XDEINT_MODE_ALGORITHM_MOTION   0x00000002
    #define XDEINT_MODE_PACKING_420   0x00000000
    #define XDEINT_MODE_ALGORITHM_FULL   0x00000003
    #define XDEINT_MODE_PACKING_422   0x00000008
    #define XDEINT_MODE_PACKING_420   0x00000000
    #define XDEINT_MODE_PACKING_444   0x00000010
    #define XDEINT_MODE_PACKING_422   0x00000008
    #define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020
    #define XDEINT_MODE_PACKING_444   0x00000010
    #define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000
    #define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020
    #define XDEINT_MODE_ALGORITHM_MASK   0x00000003
    #define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000
    #define XDEINT_MODE_COL_MASK   0x00000004
    #define XDEINT_MODE_ALGORITHM_MASK   0x00000003
    #define XDEINT_MODE_PACKING_MASK   0x00000018
    #define XDEINT_MODE_COL_MASK   0x00000004
    #define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020
    #define XDEINT_MODE_PACKING_MASK   0x00000018
    #define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040
    #define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020
    #define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180
    #define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040

    Device register I/O APIs

    #define XDeint_ReadReg(BaseAddress, RegOffset)   XDeint_In32((BaseAddress) + (RegOffset))
    #define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180
    #define XDeint_WriteReg(BaseAddress, RegOffset, Data)   XDeint_Out32((BaseAddress) + (RegOffset), (Data))

    Deinterlacer height bit definitions:

    #define XDEINT_HEIGHT_MASK   0x000007FF

    Deinterlacer width bit definitions:

    #define XDEINT_WIDTH_MASK   0x000007FF

    Deinterlacer Threshold T1 /T2 bit definitions:

    #define XDEINT_THRESHOLD_MASK   0x000003FF

    Deinterlacer cross fade cycle bit definitions:

    #define XDEINT_XFADE_MASK   0x0000FFFF

    Deinterlacer Buffer cycle bit definitions:

    #define XDEINT_BUF_SIZE_MASK   0x00FFFFFF

    Backward compatibility macros

    #define XDEINT_CONTROL   XDEINT_CONTROL_OFFSET
    #define XDEINT_MODE   XDEINT_MODE_OFFSET
    #define XDEINT_IER   XDEINT_IER_OFFSET
    #define XDEINT_ISR   XDEINT_ISR_OFFSET
    #define XDEINT_HEIGHT   XDEINT_HEIGHT_OFFSET
    #define XDEINT_WIDTH   XDEINT_WIDTH_OFFSET
    #define XDEINT_T1   XDEINT_THRESH1_OFFSET
    #define XDEINT_T2   XDEINT_THRESH2_OFFSET
    #define XDEINT_XFADE   XDEINT_XFADE_OFFSET
    #define XDEINT_FS_BASE0   XDEINT_BUFFER0_OFFSET
    #define XDEINT_FS_BASE1   XDEINT_BUFFER1_OFFSET
    #define XDEINT_FS_BASE2   XDEINT_BUFFER2_OFFSET
    #define XDEINT_FS_WORDS   XDEINT_BUFSIZE_OFFSET
    #define XDEINT_VER   XDEINT_VER_OFFSET
    #define XDEINT_RESET   XDEINT_RESET_OFFSET

    Core register I/O APIs:

    #define XDeint_In32   Xil_In32
    #define XDeint_Out32   Xil_Out32
    #define XDeint_ReadReg(BaseAddress, RegOffset)   XDeint_In32((BaseAddress) + (u32)(RegOffset))
    #define XDeint_WriteReg(BaseAddress, RegOffset, Data)   XDeint_Out32((BaseAddress) + (u32)(RegOffset), (Data))

    Defines

    #define XDEINT_RESET_RESET_MASK   0x00000001
    #define XDEINT_HW_H
    #define XDEINT_RESET_RESET_MASK   0x00000001
    #define XDEINT_FADE_RATIO   1048576


    Define Documentation

    -

    - - - - -
    - + +
    +
    +
    - +
    #define XDEINT_CONTROL   0x000 #define XDEINT_BUF_SIZE_MASK   0x00FFFFFF
    -
    - - - - - -
    -   - + +

    -Deinterlacer Main Control

    -

    - - - - -
    - +Deinterlacer Buffer size mask + +

    + +

    +
    +
    - +
    #define XDEINT_CTL_ACCEPT_VIDEO   0x00000004 #define XDEINT_BUFFER0_OFFSET   0x024
    -
    - - - - - -
    -   - + +

    -Accept Video into the deinterlacer

    -

    - - - - -
    - +VFBC Field Buffer 0 Base + +

    + +

    +
    +
    - +
    #define XDEINT_CTL_ENABLE   0x00000002 #define XDEINT_BUFFER1_OFFSET   0x028
    -
    - - - - - -
    -   - + +

    -Enable/Disable deinterlacer algorithms

    -

    - - - - -
    - +VFBC Field Buffer 1 Base + +

    + +

    +
    +
    - +
    #define XDEINT_CTL_UPDATE_REQ   0x00000001 #define XDEINT_BUFFER2_OFFSET   0x02C
    -
    - - - - - -
    -   - + +

    -Queue a register update request

    -

    - - - - -
    - +VFBC Field Buffer 2 Base + +

    + +

    +
    +
    - +
    #define XDEINT_FS_BASE0   0x024 #define XDEINT_BUFSIZE_OFFSET   0x030
    -
    - - - - - -
    -   - + +

    -VFBC Field Buffer 0 Base

    -

    - - - - -
    - +VFBC Field Buffer Page size in 32bit Words + +

    + +

    +
    +
    - +
    #define XDEINT_FS_BASE1   0x028 #define XDEINT_CONTROL   XDEINT_CONTROL_OFFSET
    -
    - - - - - -
    -   - + +

    -VFBC Field Buffer 1 Base

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_FS_BASE2   0x02C #define XDEINT_CONTROL_OFFSET   0x000
    -
    - - - - - -
    -   - + +

    -VFBC Field Buffer 2 Base

    -

    - - - - -
    - +Deinterlacer Main Control + +

    + +

    +
    +
    - +
    #define XDEINT_FS_WORDS   0x030 #define XDEINT_CTL_ACCEPT_VIDEO   0x00000004
    -
    - - - - - -
    -   - + +

    -VFBC Field Buffer Page size in 32bit Words

    -

    - - - - -
    - +Accept Video into the Deinterlacer + +

    + +

    +
    +
    - +
    #define XDEINT_HEIGHT   0x010 #define XDEINT_CTL_ENABLE   0x00000002
    -
    - - - - - -
    -   - + +

    -Height

    -

    - - - - -
    - +Enable/Disable Deinterlacer algorithms + +

    + +

    +
    +
    - +
    #define XDEINT_IER   0x008 #define XDEINT_CTL_UPDATE_REQ   0x00000001
    -
    - - - - - -
    -   - + +

    -Interrupt Enable Control

    -

    - - - - -
    - +Queue a register update request + +

    + +

    +
    +
    - +
    #define XDEINT_ISR   0x00C #define XDEINT_FADE_RATIO   1048576
    -
    - - - - - -
    -   - + +

    -Interrupt Enable Status

    -

    - - - - -
    - +Fade ratio + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_ALLINTR_MASK #define XDEINT_FS_BASE0   XDEINT_BUFFER0_OFFSET
    -
    - - - - - -
    -   - + +
    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_ERROR_MASK   0x00000008 #define XDEINT_FS_BASE1   XDEINT_BUFFER1_OFFSET
    -
    - - - - - -
    -   - + +

    -Deinterlacer internal fifo error

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_FRAME_MASK   0x00000040 #define XDEINT_FS_BASE2   XDEINT_BUFFER2_OFFSET
    -
    - - - - - -
    -   - + +

    -Frame Tick

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100 #define XDEINT_FS_WORDS   XDEINT_BUFSIZE_OFFSET
    -
    - - - - - -
    -   - + +

    -Framestore Write setup error

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400 #define XDEINT_HEIGHT   XDEINT_HEIGHT_OFFSET
    -
    - - - - - -
    -   - + +

    -Framestore Read Field underrun

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800 #define XDEINT_HEIGHT_MASK   0x000007FF
    -
    - - - - - -
    -   - + +

    -Framestore Read Frame underrun

    -

    - - - - -
    - +Deinterlacer height + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200 #define XDEINT_HEIGHT_OFFSET   0x010
    -
    - - - - - -
    -   - + +

    -Framestore Write fifo overflow

    -

    - - - - -
    - +Height + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_LOCKED_MASK   0x00000002 #define XDEINT_HW_H
    -
    - - - - - -
    -   - + +

    -Deinterlacer is locked to incoming video

    -

    - - - - -
    - +Prevent circular inclusions by using protection macros + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_PULL_OFF_MASK   0x00000020 #define XDEINT_IER   XDEINT_IER_OFFSET
    -
    - - - - - -
    -   - + +

    -Pulldown cancelled

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_PULL_ON_MASK   0x00000010 #define XDEINT_IER_OFFSET   0x008
    -
    - - - - - -
    -   - + +

    -Pulldown activated

    -

    - - - - -
    - +Interrupt Enable Control + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_UNLOCKED_MASK   0x00000004 #define XDeint_In32   Xil_In32
    -
    - - - - - -
    -   - + +

    -Deinterlacer has lost lock to incoming video

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_IXR_UPDATE_MASK   0x00000001 #define XDEINT_ISR   XDEINT_ISR_OFFSET
    -
    - - - - - -
    -   - + +

    -Internal Register update done

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_MODE   0x004 #define XDEINT_ISR_OFFSET   0x00C
    -
    - - - - - -
    -   - + +

    -Deinterlacer internal Modes

    -

    - - - - -
    - +Interrupt Enable Status + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_0   0x00000001 #define XDEINT_IXR_ALLINTR_MASK
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm

    -

    - - - - -
    - +Value:Mask for all interrupts + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_1   0x00000002 #define XDEINT_IXR_ERROR_MASK   0x00000008
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm

    -

    - - - - -
    - +Deinterlacer internal FIFO error + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_DIAG   0x00000001 #define XDEINT_IXR_FRAME_MASK   0x00000040
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm option 1

    -

    - - - - -
    - +Frame Tick + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_FULL   0x00000003 #define XDEINT_IXR_FS_CFG_ERROR_MASK   0x00000100
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm option 3

    -

    - - - - -
    - +Frame store Write setup error + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_MASK   0x00000003 #define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK   0x00000400
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm

    -

    - - - - -
    - +Frame store Read Field under run + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_MOTION   0x00000002 #define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK   0x00000800
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm option 2

    -

    - - - - -
    - +Frame store Read Frame under run + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_ALGORITHM_RAW   0x00000000 #define XDEINT_IXR_FS_WR_ERROR_MASK   0x00000200
    -
    - - - - - -
    -   - + +

    -Deinterlacer algorithm option 0

    -

    - - - - -
    - +Frame store Write FIFO overflow + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_COL   0x00000004 #define XDEINT_IXR_LOCKED_MASK   0x00000002
    -
    - - - - - -
    -   - + +

    -Colour Space

    -

    - - - - -
    - +Deinterlacer is locked to incoming video + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_COL_MASK   0x00000004 #define XDEINT_IXR_PULL_OFF_MASK   0x00000020
    -
    - - - - - -
    -   - + +

    -Colour Space

    -

    - - - - -
    - +Pull down cancelled + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_COLOUR_RGB   0x00000000 #define XDEINT_IXR_PULL_ON_MASK   0x00000010
    -
    - - - - - -
    -   - + +

    -Deinterlacer colour space

    -

    - - - - -
    - +Pull down activated + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_COLOUR_YUV   0x00000004 #define XDEINT_IXR_UNLOCKED_MASK   0x00000004
    -
    - - - - - -
    -   - + +

    -Deinterlacer colour space

    -

    - - - - -
    - +Deinterlacer has lost lock to incoming video + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020 #define XDEINT_IXR_UPDATE_MASK   0x00000001
    -
    - - - - - -
    -   - + +

    -First field of frame contains even video lines

    -

    - - - - -
    - +Internal Register update done + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000 #define XDEINT_MODE   XDEINT_MODE_OFFSET
    -
    - - - - - -
    -   - + +

    -First field of frame contains odd video lines

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_FIELD_ORDER   0x00000020 #define XDEINT_MODE_ALGORITHM_0   0x00000001
    -
    - - - - - -
    -   - + +

    -First field order

    -

    - - - - -
    - +Deinterlacer algorithm + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020 #define XDEINT_MODE_ALGORITHM_1   0x00000002
    -
    - - - - - -
    -   - + +

    -First field order

    -

    - - - - -
    - +Deinterlacer algorithm + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_0   0x00000008 #define XDEINT_MODE_ALGORITHM_DIAG   0x00000001
    -
    - - - - - -
    -   - + +

    -XSVI Packing

    -

    - - - - -
    - +Deinterlacer algorithm option 1 + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_1   0x00000010 #define XDEINT_MODE_ALGORITHM_FULL   0x00000003
    -
    - - - - - -
    -   - + +

    -XSVI Packing

    -

    - - - - -
    - +Deinterlacer algorithm option 3 + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_420   0x00000000 #define XDEINT_MODE_ALGORITHM_MASK   0x00000003
    -
    - - - - - -
    -   - + +

    -XSVI Packing mode 420

    -

    - - - - -
    - +Deinterlacer algorithm + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_422   0x00000008 #define XDEINT_MODE_ALGORITHM_MOTION   0x00000002
    -
    - - - - - -
    -   - + +

    -XSVI Packing mode 422

    -

    - - - - -
    - +Deinterlacer algorithm option 2 + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_444   0x00000010 #define XDEINT_MODE_ALGORITHM_RAW   0x00000000
    -
    - - - - - -
    -   - + +

    -XSVI Packing mode 444

    -

    - - - - -
    - +Deinterlacer algorithm option 0 + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PACKING_MASK   0x00000018 #define XDEINT_MODE_COL   0x00000004
    -
    - - - - - -
    -   - + +

    -XSVI Packing

    -

    - - - - -
    - +Color Space + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PSF_ENABLE   0x00000040 #define XDEINT_MODE_COL_MASK   0x00000004
    -
    - - - - - -
    -   - + +

    -PSF passthrough enable

    -

    - - - - -
    - +Color Space + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040 #define XDEINT_MODE_COLOUR_RGB   0x00000000
    -
    - - - - - -
    -   - + +

    -PSF passthrough enable

    -

    - - - - -
    - +Deinterlacer color space + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PULL_22_ENABLE   0x00000100 #define XDEINT_MODE_COLOUR_YUV   0x00000004
    -
    - - - - - -
    -   - + +

    -Pulldown 3:2 control enable

    -

    - - - - -
    - +Deinterlacer color space + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PULL_32_ENABLE   0x00000080 #define XDEINT_MODE_FIELD_EVEN_FIRST   0x00000020
    -
    - - - - - -
    -   - + +

    -Pulldown 3:2 control enable

    -

    - - - - -
    - +First field of frame contains even video lines + +

    + +

    +
    +
    - +
    #define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180 #define XDEINT_MODE_FIELD_ODD_FIRST   0x00000000
    -
    - - - - - -
    -   - + +

    -Pulldown control enable

    -

    - - - - -
    - +First field of frame contains odd video lines + +

    + +

    +
    +
    - - - - - - - - - +
    #define XDeint_ReadReg BaseAddress,
    RegOffset   )    XDeint_In32((BaseAddress) + (RegOffset))#define XDEINT_MODE_FIELD_ORDER   0x00000020
    -
    - - - - - -
    -   - + +

    -Read the given register.

    +First field order +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_FIELD_ORDER_MASK   0x00000020
    +
    +
    + +

    +First field order +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_OFFSET   0x004
    +
    +
    + +

    +Deinterlacer internal Modes +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_0   0x00000008
    +
    +
    + +

    +XSVI Packing +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_1   0x00000010
    +
    +
    + +

    +XSVI Packing +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_420   0x00000000
    +
    +
    + +

    +XSVI Packing mode 420 +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_422   0x00000008
    +
    +
    + +

    +XSVI Packing mode 422 +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_444   0x00000010
    +
    +
    + +

    +XSVI Packing mode 444 +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PACKING_MASK   0x00000018
    +
    +
    + +

    +XSVI Packing +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PSF_ENABLE   0x00000040
    +
    +
    + +

    +PSF pass through enable +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PSF_ENABLE_MASK   0x00000040
    +
    +
    + +

    +PSF pass through enable +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PULL_22_ENABLE   0x00000100
    +
    +
    + +

    +Pull down 2:2 control enable +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PULL_22_FIELDP   0x00000200
    +
    +
    + +

    +Pull down 2:2 Field Precedence +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PULL_32_ENABLE   0x00000080
    +
    +
    + +

    +Pull down 3:2 control enable +

    +

    + +

    +
    + + + + +
    #define XDEINT_MODE_PULL_ENABLE_MASK   0x00000180
    +
    +
    + +

    +Pull down control enable +

    +

    + +

    +
    + + + + +
    #define XDeint_Out32   Xil_Out32
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + + + + + + + + + +
    #define XDeint_ReadReg (BaseAddress,
    RegOffset   )    XDeint_In32((BaseAddress) + (u32)(RegOffset))
    +
    +
    + +

    +This macro reads the given register.

    Parameters:
    - - + +
    BaseAddress is the base address of the device
    RegOffset is the register offset to be read
    BaseAddress is the base address of the core.
    RegOffset is the register offset to be read.
    -
    Returns:
    The 32-bit value of the register
    -
    Note:
    C-style signature: u32 XDeint_ReadReg(u32 BaseAddress, u32 RegOffset)
    -
    -

    - - - - -
    - +
    Returns:
    The 32-bit value of the register.
    +
    Note:
    C-style signature: u32 XDeint_ReadReg(u32 BaseAddress, u32 RegOffset)
    + + +

    + +

    +
    +
    - +
    #define XDEINT_RESET   0x100 #define XDEINT_RESET   XDEINT_RESET_OFFSET
    -
    - - - - - -
    -   - + +

    -Soft Reset

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_RESET_RESET_MASK   0x00000001 #define XDEINT_RESET_OFFSET   0x100
    -
    - - - - - -
    -   - + +

    -Software Reset

    -

    - - - - -
    - +Soft Reset + +

    + +

    +
    +
    - +
    #define XDEINT_STS_ERROR   0x00000008 #define XDEINT_RESET_RESET_MASK   0x00000001
    -
    - - - - - -
    -   - + +

    -Deinterlacer internal fifo error

    -

    - - - - -
    - +Software Reset + +

    + +

    +
    +
    - +
    #define XDEINT_STS_FS_CFG_ERROR   0x00000100 #define XDEINT_STS_ERROR_OFFSET   0x00000008
    -
    - - - - - -
    -   - + +

    -Framestore Write setup error

    -

    - - - - -
    - +Deinterlacer internal FIFO error + +

    + +

    +
    +
    - +
    #define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400 #define XDEINT_STS_FS_CFG_ERROR   0x00000100
    -
    - - - - - -
    -   - + +

    -Framestore Read Field underrun

    -

    - - - - -
    - +Frame store Write setup error + +

    + +

    +
    +
    - +
    #define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800 #define XDEINT_STS_FS_RD_FIELD_ERROR   0x00000400
    -
    - - - - - -
    -   - + +

    -Framestore Read Frame underrun

    -

    - - - - -
    - +Frame store Read Field under run + +

    + +

    +
    +
    - +
    #define XDEINT_STS_FS_WR_ERROR   0x00000200 #define XDEINT_STS_FS_RD_FRAME_ERROR   0x00000800
    -
    - - - - - -
    -   - + +

    -Framestore Write fifo overflow

    -

    - - - - -
    - +Frame store Read Frame under run + +

    + +

    +
    +
    - +
    #define XDEINT_T1   0x018 #define XDEINT_STS_FS_WR_ERROR   0x00000200
    -
    - - - - - -
    -   - + +

    -T1 Threshold

    -

    - - - - -
    - +Frame store Write FIFO overflow + +

    + +

    +
    +
    - +
    #define XDEINT_T2   0x01C #define XDEINT_T1   XDEINT_THRESH1_OFFSET
    -
    - - - - - -
    -   - + +

    -T2 Threshold

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_VER   0x0F0 #define XDEINT_T2   XDEINT_THRESH2_OFFSET
    -
    - - - - - -
    -   - + +

    -Hardware Version ID

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_VER_MAJOR_MASK   0xF0000000 #define XDEINT_THRESH1_OFFSET   0x018
    -
    - - - - - -
    -   - + +

    -Major Version

    -

    - - - - -
    - +T1 Threshold + +

    + +

    +
    +
    - +
    #define XDEINT_VER_MAJOR_SHIFT   28 #define XDEINT_THRESH2_OFFSET   0x01C
    -
    - - - - - -
    -   - + +

    -Major Bit Shift

    -

    - - - - -
    - +T2 Threshold + +

    + +

    +
    +
    - +
    #define XDEINT_VER_MINOR_MASK   0x0FF00000 #define XDEINT_THRESHOLD_MASK   0x000003FF
    -
    - - - - - -
    -   - + +

    -Minor Version

    -

    - - - - -
    - +Deinterlacer threshold + +

    + +

    +
    +
    - +
    #define XDEINT_VER_MINOR_SHIFT   20 #define XDEINT_VER   XDEINT_VER_OFFSET
    -
    - - - - - -
    -   - + +

    -Minor Bit Shift

    -

    - - - - -
    - + + +

    + +

    +
    +
    - +
    #define XDEINT_VER_REV_MASK   0x000F0000 #define XDEINT_VER_MAJOR_MASK   0xF0000000
    -
    - - - - - -
    -   - + +

    -Revision Version

    -

    - - - - -
    - +Major Version + +

    + +

    +
    +
    - +
    #define XDEINT_VER_REV_SHIFT   16 #define XDEINT_VER_MAJOR_SHIFT   28
    -
    - - - - - -
    -   - + +

    -Revision Bit Shift

    -

    - - - - -
    - +Major Bit Shift + +

    + +

    +
    +
    - +
    #define XDEINT_WIDTH   0x014 #define XDEINT_VER_MINOR_MASK   0x0FF00000
    -
    - - - - - -
    -   - + +

    -Width

    -

    - - - - -
    - +Minor Version + +

    + +

    +
    +
    - - - - - - - - - - - - +
    #define XDeint_WriteReg BaseAddress,
    RegOffset,
    Data   )    XDeint_Out32((BaseAddress) + (RegOffset), (Data))#define XDEINT_VER_MINOR_SHIFT   20
    -
    - - - - - -
    -   - + +

    -Write the given register.

    +Minor Bit Shift +

    +

    + +

    +
    + + + + +
    #define XDEINT_VER_OFFSET   0x0F0
    +
    +
    + +

    +Hardware Version ID +

    +

    + +

    +
    + + + + +
    #define XDEINT_VER_REV_MASK   0x000F0000
    +
    +
    + +

    +Revision Version +

    +

    + +

    +
    + + + + +
    #define XDEINT_VER_REV_SHIFT   16
    +
    +
    + +

    +Revision Bit Shift +

    +

    + +

    +
    + + + + +
    #define XDEINT_WIDTH   XDEINT_WIDTH_OFFSET
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define XDEINT_WIDTH_MASK   0x000007FF
    +
    +
    + +

    +Deinterlacer width +

    +

    + +

    +
    + + + + +
    #define XDEINT_WIDTH_OFFSET   0x014
    +
    +
    + +

    +Width +

    +

    + +

    +
    + + + + + + + + + + + + + + + +
    #define XDeint_WriteReg (BaseAddress,
    RegOffset,
    Data   )    XDeint_Out32((BaseAddress) + (u32)(RegOffset), (Data))
    +
    +
    + +

    +This macro writes the given register.

    Parameters:
    - - - + + +
    BaseAddress is the base address of the device
    RegOffset is the register offset to be written
    Data is the 32-bit value to write to the register
    BaseAddress is the base address of the core.
    RegOffset is the register offset to be written.
    Data is the 32-bit value to write to the register.
    Returns:
    None.
    -
    Note:
    C-style signature: void XDeint_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)
    -
    -

    - - - - -
    - +
    Note:
    C-style signature: void XDeint_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)
    + + +

    + +

    +
    +
    - +
    #define XDEINT_XFADE   0x020 #define XDEINT_XFADE   XDEINT_XFADE_OFFSET
    -
    - - - - - -
    -   - + +

    -Cross Fade Ration

    + + +

    + +

    +
    + + + + +
    #define XDEINT_XFADE_MASK   0x0000FFFF
    +
    +
    + +

    +Deinterlacer Cross fade cycle +

    +

    + +

    +
    + + + + +
    #define XDEINT_XFADE_OFFSET   0x020
    +
    +
    + +

    +Cross Fade Ration +

    +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__i_8h.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__i_8h.html index a1aac1ac..b2ec1658 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__i_8h.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__i_8h.html @@ -9,7 +9,7 @@

    Software Drivers
    - +

    xdeint_i.h File Reference


    Detailed Description

    -This code contains internal functions of the Xilinx Video Deinterlacer device driver. The application should not need the functions in this code to control the Video Deinterlacer device. Read xdeint.h for detailed information about the driver

    -Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 1.00a rjh 07/10/11 First release 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00 +This code contains internal functions of the Xilinx Video Deinterlacer core. The application should not need the functions in this code to control the Video Deinterlacer core. Read xdeint.h for detailed information about the core.

    + Ver   Who  Date     Changes
    + ----- ---- -------- -------------------------------------------------------
    + 1.00a rjh  07/10/11 First release.
    + 2.00a rjh  18/01/12 Updated for v_deinterlacer 2.00.
    + 3.2   adk  02/13/14 Added Doxygen support.
    + 

    + + + + +

    Defines

    #define XDEINT_I_H
    #define XDeint_BaseAddr(InstancePtr)   ((InstancePtr)->Config.BaseAddress)
    +


    Define Documentation

    + +
    +
    + + + + + + + + + +
    #define XDeint_BaseAddr (InstancePtr   )    ((InstancePtr)->Config.BaseAddress)
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define XDEINT_I_H
    +
    +
    + +

    +Prevent circular inclusions by using protection macros +

    +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__intr_8c.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__intr_8c.html index 69e47807..9d7e699e 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__intr_8c.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__intr_8c.html @@ -9,7 +9,7 @@

    Software Drivers
    - +

    xdeint_intr.c File Reference


    Detailed Description

    -This code contains interrupt related functions of Xilinx Video Deinterlacer (DEINT) device driver. Please see xdeint.h for more details of the driver.

    +This code contains interrupt related functions of Xilinx Video Deinterlacer (DEINT) core. Please see xdeint.h for more details of the core.

      MODIFICATION HISTORY:

    -

     Ver    Who     Date      Changes
    - ----- ---- -------- -------------------------------------------------------
    - 1.00a rjh 07/10/11 First release
    - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +
     Ver    Who  Date     Changes
    + ----- ----- -------- -------------------------------------------------------
    + 1.00a rjh   07/10/11 First release.
    + 2.00a rjh   18/01/12 Updated for v_deinterlacer 2.00.
    + 3.2   adk   02/13/14 Adherence to Xilinx coding, Doxygen guidelines.
      

    -#include "xdeint.h"
    +#include "xdeint.h"
    #include "xil_assert.h"
    - + - +

    Functions

    void XDeint_IntrHandler (void *InstancePtr)
    void XDeint_IntrHandler (void *InstancePtr)
    int XDeint_SetCallBack (XDeint *InstancePtr, void *CallBackFunc)
    int XDeint_SetCallBack (XDeint *InstancePtr, void *CallBackFunc)


    Function Documentation

    -

    - - - - -
    - + +
    +
    +
    - - - - - - + + + + + +
    void XDeint_IntrHandler void *  InstancePtr  ) void XDeint_IntrHandler (void *  InstancePtr  ) 
    -
    - - - - - -
    -   - + +

    -This function is the interrupt handler for the Deinterlacer

    +This function is the interrupt handler for the Deinterlacer core.

    This handler reads the pending interrupt from the IER/ISR, determines the source of the interrupts, calls according callback, and finally clears the interrupts.

    -The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDeint_SetCallBack() during initialization phase. An example delivered with this driver demonstrates how this could be done.

    +The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XDeint_SetCallBack() during initialization phase.

    Parameters:
    - +
    InstancePtr is a pointer to the XDeint instance that just interrupted.
    InstancePtr is a pointer to XDeint instance to be worked on.
    -
    Returns:
    None.
    -
    Note:
    The Error interrupt callback invoked in case an error interrupt or spurious interrupt happens should reset the DEINT device that just interrupted.
    -
    -

    - - - - -
    - +
    Returns:
    None.
    +
    Note:
    The Error interrupt callback invoked in case an error interrupt or spurious interrupt happens should reset the Deinterlacer core that just interrupted.
    + + +

    + +

    +
    +
    - - - - + + + + - - - - + + + + - - - + + +
    int XDeint_SetCallBack XDeint InstancePtr, int XDeint_SetCallBack (XDeint InstancePtr,
    void *  CallBackFuncvoid *  CallBackFunc 
    )
    -
    - - - - - -
    -   - + +

    This routine installs an asynchronous callback function.

    Parameters:
    - - + +
    InstancePtr is a pointer to the XDeint instance to be worked on.
    CallbackFunc is the address of the callback function.
    InstancePtr is a pointer to XDeint instance to be worked on.
    CallBackFunc is the address of the callback function.
    Returns:
    • XST_SUCCESS when handler is installed.
    • XST_INVALID_PARAM when HandlerType is invalid.
    Note:
    Invoking this function for a handler that already has been installed replaces it with the new handler.
    -
    + + +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__selftest_8c.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__selftest_8c.html new file mode 100644 index 00000000..387439d7 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__selftest_8c.html @@ -0,0 +1,72 @@ + + + + + xdeint_selftest.c File Reference + + + +

    +Software Drivers +
    + + + +

    xdeint_selftest.c File Reference


    Detailed Description

    +This file contains the self-test functions for the XCfa driver.

    +

    + MODIFICATION HISTORY:

    +

     Ver   Who  Date     Changes
    + ----- ---- -------- ----------------------------------------------
    + 3.2   adk  02/13/14 First Release.
    +                     Added the XDeint_Selftest function.
    + 
    +

    +#include "xdeint.h"
    +#include "xstatus.h"
    + + + + + +

    Functions

    int XDeint_Selftest (XDeint *InstancePtr)
    +


    Function Documentation

    + +
    +
    + + + + + + + + + +
    int XDeint_Selftest (XDeint InstancePtr  ) 
    +
    +
    + +

    +This function reads Version register of Deinterlacer core and compares with zero as part of self test.

    +

    Parameters:
    + + +
    InstancePtr is a pointer to XDeint instance to be worked on.
    +
    +
    Returns:
      +
    • XST_SUCCESS if the test was successful.
    • XST_FAILURE if the test failed.
    +
    + +
    +

    +Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__sinit_8c.html b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__sinit_8c.html index f4b60297..b6e1e899 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__sinit_8c.html +++ b/XilinxProcessorIPLib/drivers/deinterlacer/doc/html/api/xdeint__sinit_8c.html @@ -9,7 +9,7 @@

    Software Drivers
    - +

    xdeint_sinit.c File Reference


    Detailed Description

    -This file contains static initialization methods for Xilinx Video Deinterlacer (DEINT) device driver.

    +This file contains static initialization methods for Xilinx Video Deinterlacer (DEINT) core driver.

      MODIFICATION HISTORY:

    -

     Ver   Who  Date     Changes
    - ----- ---- -------- -------------------------------------------------------
    - 1.00a rjh 07/10/11 First release
    - 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +
     Ver   Who   Date     Changes
    + ----- ----- -------- ------------------------------------------------------
    + 1.00a rjh   07/10/11 First release.
    + 2.00a rjh   18/01/12 Updated for v_deinterlacer 2.00.
    + 3.2   adk   02/13/14 Added Doxygen support, adherence to Xilinx
    +                      coding standards.
      

    +#include "xdeint.h"
    #include "xparameters.h"
    -#include "xdeint.h"
    - +

    Functions

    XDeint_ConfigXDeint_LookupConfig (u16 DeviceId)
    XDeint_ConfigXDeint_LookupConfig (u16 DeviceId)


    Function Documentation

    -

    - - - - -
    - + +
    +
    +
    - - - - - - + + + + + +
    XDeint_Config* XDeint_LookupConfig u16  DeviceId  ) XDeint_Config* XDeint_LookupConfig (u16  DeviceId  ) 
    -
    - - - - - -
    -   - + +

    -XDeint_LookupConfig returns a reference to an XDeint_Config structure based on the unique device id, DeviceId. The return value will refer to an entry in the device configuration table defined in the xdeint_g.c file.

    +This function returns a reference to an XDeint_Config structure based on the unique device id, DeviceId. The return value will refer to an entry in the device configuration table defined in the xdeint_g.c file.

    Parameters:
    DeviceId is the unique device ID of the device for the lookup operation.
    -
    Returns:
    XDeint_LookupConfig returns a reference to a config record in the configuration table (in xDEINT_g.c) corresponding to DeviceId, or NULL if no match is found.
    -
    +

    Returns:
    XDeint_LookupConfig returns a reference to a config record in the configuration table (in xDEINT_g.c) corresponding to DeviceId or NULL if no match is found.
    +
    Note:
    None.
    + + +

    Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/examples/deint_selftest_example.c b/XilinxProcessorIPLib/drivers/deinterlacer/examples/deint_selftest_example.c new file mode 100755 index 00000000..fb33886c --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/examples/deint_selftest_example.c @@ -0,0 +1,163 @@ +/****************************************************************************** +* +* (c) Copyright 2014 Xilinx, Inc. All rights reserved. +* +* This file contains confidential and proprietary information of Xilinx, Inc. +* and is protected under U.S. and international copyright and other +* intellectual property laws. +* +* DISCLAIMER +* This disclaimer is not a license and does not grant any rights to the +* materials distributed herewith. Except as otherwise provided in a valid +* license issued to you by Xilinx, and to the maximum extent permitted by +* applicable law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND WITH ALL +* FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, +* IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF +* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE +* and (2) Xilinx shall not be liable (whether in contract or tort, including +* negligence, or under any other theory of liability) for any loss or damage +* of any kind or nature related to, arising under or in connection with these +* materials, including for any direct, or any indirect, special, incidental, +* or consequential loss or damage (including loss of data, profits, goodwill, +* or any type of loss or damage suffered as a result of any action brought by +* a third party) even if such damage or loss was reasonably foreseeable or +* Xilinx had been advised of the possibility of the same. +* +* CRITICAL APPLICATIONS +* Xilinx products are not designed or intended to be fail-safe, or for use in +* any application requiring fail-safe performance, such as life-support or +* safety devices or systems, Class III medical devices, nuclear facilities, +* applications related to the deployment of airbags, or any other applications +* that could lead to death, personal injury, or severe property or +* environmental damage (individually and collectively, "Critical +* Applications"). Customer assumes the sole risk and liability of any use of +* Xilinx products in Critical Applications, subject only to applicable laws +* and regulations governing limitations on product liability. +* +* THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS PART OF THIS FILE +* AT ALL TIMES. +* +******************************************************************************/ +/****************************************************************************/ +/** +* +* @file deint_selftest_example.c +* +* This file contains an example using the XDeint driver to do self test +* on the device. +* +* MODIFICATION HISTORY: +*

    +* Ver   Who    Date     Changes
    +* ----- ------ -------- -----------------------------------------------
    +* 1.00a drg/jz 01/13/10 First Release
    +* 1.03a sg     08/14/12 Updated the example for CR 666306. Modified
    +*                       the device ID to use the first Device Id
    +*                       Removed the printf at the start of the main
    +* 3.2   adk    01/15/14 Modified function names as per guidelines
    +*
    +* 
    +******************************************************************************/ + +/***************************** Include Files *********************************/ + +#include "xparameters.h" +#include "xdeint.h" +#include "xil_printf.h" + + +/************************** Constant Definitions *****************************/ + +/* + * The following constants map to the XPAR parameters created in the + * xparameters.h file. They are defined here such that a user can easily + * change all the needed parameters in one place. + */ + +/**************************** Type Definitions *******************************/ + + +/***************** Macros (Inline Functions) Definitions *********************/ + + +/************************** Function Prototypes ******************************/ + + +int XDeintSelfTestExample(u16 DeviceId); + +/************************** Variable Definitions *****************************/ + + +XDeint Deint; /**_DEVICE_ID value from +* xparameters.h. +* +* @return XST_SUCCESS if successful, otherwise XST_FAILURE. +* +* @note None. +* +****************************************************************************/ +int XDeintSelfTestExample(u16 DeviceId) +{ + int Status; + XDeint_Config *Config; + + + /* + * Initialize the Deinterlacer driver so that it's ready to use + * Look up the configuration in the config table, + * then initialize it. + */ + Config = XDeint_LookupConfig(DeviceId); + if (NULL == Config) { + return XST_FAILURE; + } + + Status = XDeint_ConfigInitialize(&Deint, Config, Config->BaseAddress); + if (Status != XST_SUCCESS) { + return XST_FAILURE; + } + + /* + * Perform a self-test to check hardware build. + */ + + Status = XDeint_Selftest(&Deint); + if (Status != XST_SUCCESS) { + return XST_FAILURE; + } + return XST_SUCCESS; +} diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/examples/index.html b/XilinxProcessorIPLib/drivers/deinterlacer/examples/index.html new file mode 100755 index 00000000..e05f02b3 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/examples/index.html @@ -0,0 +1,18 @@ + + + + + +Driver example applications + + + +

    Example Applications for the driver deinterlacer

    +
    + +

    Copyright ? 1995-2014 Xilinx, Inc. All rights reserved.

    + + + diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.c b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.c index e8d5c082..5334f95c 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.c +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.c @@ -32,18 +32,25 @@ /*****************************************************************************/ /** * -* @file XDeint.c +* @file xdeint.c * -* This is main code of Xilinx Vide Deinterlacer -* device driver. Please see xdeint.h for more details of the driver. +* This is main code of Xilinx Vide Deinterlacer core. +* Please see xdeint.h for more details of the driver. * *
     * MODIFICATION HISTORY:
     *
    -* Ver    Who     Date      Changes
    -* ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +* Ver   Who  Date     Changes
    +* ----- ---- -------- ------------------------------------------------------
    +* 1.00a rjh  07/10/11 First release
    +* 2.00a rjh  18/01/12 Updated for v_deinterlacer 2.00
    +* 3.2   adk  02/13/14 Changed the prototype of XDeint_GetVersion
    +*                     Implemented the following functions:
    +*                     XDeint_GetFramestore
    +*                     XDeint_GetVideo
    +*                     XDeint_GetThresholds
    +*                     XDeint_GetPulldown
    +*                     XDeint_GetSize
     * 
    * ******************************************************************************/ @@ -51,289 +58,475 @@ /***************************** Include Files *********************************/ #include "xdeint.h" -#include "xenv.h" #include "xil_assert.h" /************************** Constant Definitions *****************************/ -/**************************** Type Definitions *******************************/ - - /***************** Macros (Inline Functions) Definitions *********************/ +/**************************** Type Definitions *******************************/ + + /************************** Function Prototypes ******************************/ static void StubCallBack(void *CallBackRef); /************************** Function Definition ******************************/ -/*****************************************************************************/ -/** - * This function initializes an Deinterlacer device. This function must be called - * prior to using a Deinterlacer device. Initialization of an Deinterlacer includes - * setting up the instance data, and ensuring the hardware is in a quiescent - * state. - * - * @param InstancePtr is a pointer to the Deinterlacer device instance to be - * worked on. - * @param CfgPtr points to the configuration structure associated with the - * Deinterlacer device. - * @param EffectiveAddr is the base address of the device. If address - * translation is being used, then this parameter must reflect the - * virtual base address. Otherwise, the physical address should be - * used. - * @return XST_SUCCESS - * - *****************************************************************************/ -int XDeint_ConfigInitialize(XDeint *InstancePtr, XDeint_Config *CfgPtr, - u32 EffectiveAddr) -{ - /* Verify arguments */ - Xil_AssertNonvoid(InstancePtr != NULL); - Xil_AssertNonvoid(CfgPtr != NULL); - Xil_AssertNonvoid(EffectiveAddr != (u32)NULL); - - /* Setup the instance */ - memset((void *)InstancePtr, 0, sizeof(XDeint)); - memcpy((void *)&(InstancePtr->Config), (const void *)CfgPtr, - sizeof(XDeint_Config)); - InstancePtr->Config.BaseAddress = EffectiveAddr; - - /* Set all handlers to stub values, let user configure this data later - */ - InstancePtr->IntCallBack = (XDeint_CallBack) StubCallBack; - /* Reset the hardware and set the flag to indicate the driver is ready - */ - XDeint_Disable(InstancePtr); - /* Reset the deinterlacer - */ - XDeint_Reset(InstancePtr); - /* Wait for Soft reset to complete - */ - while(XDeint_InReset(InstancePtr)); - InstancePtr->IsReady = XIL_COMPONENT_IS_READY; - - return XST_SUCCESS; -} - -/*****************************************************************************/ -/** - * This function sets up input field buffer addresses of an Deinterlacer device. - * - * @param InstancePtr is a pointer to the DEINT device instance to be - * worked on. - * @param FieldAddr1 is the address of the 1st input field buffer. - * @param FieldAddr2 is the address of the 2nd input field buffer. - * @param FieldAddr3 is the address of the 3rd input field buffer. - * @param FrameSize is the size in 32bit words of a single field buffer - * @return None. - * - *****************************************************************************/ -void XDeint_SetFramestore(XDeint *InstancePtr, - u32 FieldAddr1, u32 FieldAddr2, - u32 FieldAddr3, u32 FrameSize) -{ - /* Verify arguments */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - Xil_AssertVoid(FrameSize != (u32)NULL); - - /* Set the input buffer addresses amd size of all fieldstores */ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_FS_BASE0,FieldAddr1); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_FS_BASE1,FieldAddr2); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_FS_BASE2,FieldAddr3); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_FS_WORDS,FrameSize); - - return; -} - - -/*****************************************************************************/ -/** - * This function sets up the video format - * - * @param Packing selects the XSVI video packing mode. - * @param Colour selects what colourspace to use - * @param Order selects which field ordering is being used - * @param psf enables psf (progressive segmented frame mode) - * @return None. - * - *****************************************************************************/ -void XDeint_SetVideo(XDeint *InstancePtr, - u32 Packing, u32 Colour, u32 Order, u32 PSF) -{ -u32 mode_reg; - - /* Verify arguments */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - - // Read modify write the mode register. - mode_reg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress,XDEINT_MODE); - mode_reg &= ~(XDEINT_MODE_PACKING_MASK | - XDEINT_MODE_COL_MASK | - XDEINT_MODE_FIELD_ORDER_MASK | - XDEINT_MODE_PSF_ENABLE_MASK); - mode_reg |= Packing | Colour | Order | PSF; - - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE,mode_reg); - - return; -} - -/*****************************************************************************/ -/** - * This function sets up the threshold used by the motion adaptive kernel - * - * @param InstancePtr is a pointer to the DEINT device instance to be - * worked on. - * @param T1 is the lower threshold of the motion kernel - * @param T2 is the upper threshold of the motion kernel - * @return None. - * - *****************************************************************************/ -void XDeint_SetThresholds(XDeint *InstancePtr, - u32 t1, u32 t2) -{ -u32 xfade; - /* Verify arguments */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - Xil_AssertVoid(t1 != (u32)NULL); - Xil_AssertVoid(t2 != (u32)NULL); - - // Determine the T1->T2 cross fade setting. - xfade = (256*4096)/(t2-t1); - - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_T1,t1); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_T2,t2); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_XFADE,xfade); - - return; -} - -/*****************************************************************************/ -/** - * This function sets up the pulldown controller - * - * @param InstancePtr is a pointer to the DEINT device instance to be - * worked on. - * @param enable - * @return None. - * - *****************************************************************************/ -void XDeint_SetPulldown(XDeint *InstancePtr, - u32 enable_32, - u32 enable_22) -{ -u32 mode_reg; - - /* Verify arguments */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - - // Read modify write the mode register. - mode_reg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress,XDEINT_MODE); - mode_reg &= ~(XDEINT_MODE_PULL_22_ENABLE | XDEINT_MODE_PULL_32_ENABLE); - if (enable_32) - mode_reg |= XDEINT_MODE_PULL_32_ENABLE; - if (enable_22) - mode_reg |= XDEINT_MODE_PULL_22_ENABLE; - - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE,mode_reg); - - return; -} - /*****************************************************************************/ /** * -* This function returns the version of a Deinterlacer device. +* This function initializes the Deinterlacer core. This function must be +* called prior to using a Deinterlacer core. Initialization of the +* Deinterlacer includes setting up the instance data, and ensuring the +* hardware is in a quiescent state. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be -* worked on. -* @param Major points to an unsigned 16-bit variable that will be assigned -* with the major version number after this function returns. Value -* range is from 0x0 to 0xF. -* @param Minor points to an unsigned 16-bit variable that will be assigned -* with the minor version number after this function returns. Value -* range is from 0x00 to 0xFF. -* @param Revision points to an unsigned 16-bit variable that will be assigned -* with the revision version number after this function returns. Value -* range is from 0xA to 0xF. -* @return None. -* @note Example: Device version should read v2.01.c if major version number -* is 0x2, minor version number is 0x1, and revision version number is -* 0xC. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param CfgPtr points to the configuration structure associated with +* the Deinterlacer core. +* @param EffectiveAddr is the base address of the core. If address +* translation is being used, then this parameter must reflect the +* virtual base address. Otherwise, the physical address should be +* used. +* +* @return +* - XST_SUCCESS if initialization was successful. +* +* @note None. * ******************************************************************************/ -void XDeint_GetVersion(XDeint *InstancePtr, u16 *Major, u16 *Minor, - u16 *Revision) +int XDeint_ConfigInitialize(XDeint *InstancePtr, XDeint_Config *CfgPtr, + u32 EffectiveAddr) +{ + /* Verify arguments. */ + Xil_AssertNonvoid(InstancePtr != NULL); + Xil_AssertNonvoid(CfgPtr != NULL); + Xil_AssertNonvoid(EffectiveAddr != (u32)0x0); + + /* Setup the instance */ + (void)memset((void *)InstancePtr, 0, sizeof(XDeint)); + (void)memcpy((void *)&(InstancePtr->Config), (const void *)CfgPtr, + sizeof(XDeint_Config)); + InstancePtr->Config.BaseAddress = EffectiveAddr; + + /* + * Set all handlers to stub values, let user configure this data later + */ + InstancePtr->IntCallBack = (XDeint_CallBack)((void *)StubCallBack); + + /* + * Reset the hardware and set the flag to indicate the driver is ready + */ + XDeint_Disable(InstancePtr); + + /* Reset the Deinterlacer */ + XDeint_Reset(InstancePtr); + + /* Wait for Soft reset to complete */ + while(XDeint_InReset(InstancePtr)); + + InstancePtr->IsReady = (u32)(XIL_COMPONENT_IS_READY); + + return (XST_SUCCESS); +} + +/*****************************************************************************/ +/** +* +* This function sets the input field buffer addresses of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param FieldAddr1 is the address of the 1st input field buffer. +* @param FieldAddr2 is the address of the 2nd input field buffer. +* @param FieldAddr3 is the address of the 3rd input field buffer. +* @param FrameSize is the size in 32bit words of a single field buffer. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_SetFramestore(XDeint *InstancePtr, + u32 FieldAddr1, u32 FieldAddr2, + u32 FieldAddr3, u32 FrameSize) +{ + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(FrameSize != (u32)0x0); + Xil_AssertVoid(FieldAddr1 != (u32)0x0); + Xil_AssertVoid(FieldAddr2 != (u32)0x0); + Xil_AssertVoid(FieldAddr3 != (u32)0x0); + + /* Set the input buffer addresses and size of all field stores. */ + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER0_OFFSET), FieldAddr1); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER1_OFFSET), FieldAddr2); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER2_OFFSET), FieldAddr3); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFSIZE_OFFSET), FrameSize); +} + +/*****************************************************************************/ +/** +* +* This function sets the video format of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Packing selects the XSVI video packing mode. +* @param Color selects what color space to use. +* @param Order selects which field ordering is being used. +* @param PSF enables psf (progressive segmented frame mode). +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_SetVideo(XDeint *InstancePtr, + u32 Packing, u32 Color, u32 Order, u32 PSF) +{ + u32 ModeReg; + + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + + /* Read modify write the mode register. */ + ModeReg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET)); + ModeReg &= ~((XDEINT_MODE_PACKING_MASK) | (XDEINT_MODE_COL_MASK) | + (XDEINT_MODE_FIELD_ORDER_MASK) | + (XDEINT_MODE_PSF_ENABLE_MASK)); + ModeReg |= Packing | Color | Order | PSF; + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET), ModeReg); +} + +/*****************************************************************************/ +/** +* +* This function sets the threshold used by the motion adaptive kernel of the +* Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param ThresholdT1 is the lower threshold of the motion kernel. +* @param ThresholdT2 is the upper threshold of the motion kernel. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_SetThresholds(XDeint *InstancePtr, u32 ThresholdT1, + u32 ThresholdT2) +{ + u32 XFade; + + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(ThresholdT1 != (u32)0x0); + Xil_AssertVoid(ThresholdT2 != (u32)0x0); + + /* Determine the T1->T2 cross fade setting. */ + XFade = (u32)((XDEINT_FADE_RATIO)/(ThresholdT2 - ThresholdT1)); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_THRESH1_OFFSET), ThresholdT1); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_THRESH2_OFFSET), ThresholdT2); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_XFADE_OFFSET), XFade); +} + +/*****************************************************************************/ +/** +* +* This function sets the pull down controller of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Enable_32 allows detectors to automatically control +* Deinterlacer core. +* @param Enable_22 allows detectors to automatically control +* Deinterlacer core. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_SetPulldown(XDeint *InstancePtr, u32 Enable_32, + u32 Enable_22) +{ + u32 ModeReg; + + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == + (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid((Enable_32 == (u32)0x00) || (Enable_32 == (u32)0x01)); + Xil_AssertVoid((Enable_22 == (u32)0x00) || (Enable_22 == (u32)0x01)); + + /* Read modify write the mode register.*/ + ModeReg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET)); + ModeReg &= ~(((u32)(XDEINT_MODE_PULL_22_ENABLE)) | + ((u32)(XDEINT_MODE_PULL_32_ENABLE))); + /* Checking for Enable_32 */ + if (Enable_32 == 1U) { + ModeReg |= ((u32)(XDEINT_MODE_PULL_32_ENABLE)); + } + /* Checking for Enable_22 */ + if (Enable_22 == 1U) { + ModeReg |= ((u32)(XDEINT_MODE_PULL_22_ENABLE)); + } + + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET), ModeReg); +} + +/*****************************************************************************/ +/** +* +* This function returns the contents of Version register. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return Returns the contents of the version register. +* +* @note None. +* +******************************************************************************/ +u32 XDeint_GetVersion(XDeint *InstancePtr) { u32 Version; - /* Verify arguments */ + /* Verify arguments. */ Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(Major != NULL); - Xil_AssertVoid(Minor != NULL); - Xil_AssertVoid(Revision != NULL); - /* Read device version */ - Version = XDeint_ReadReg(InstancePtr->Config.BaseAddress, XDEINT_VER); + /* Read core version. */ + Version = XDeint_ReadReg(InstancePtr->Config.BaseAddress, + (XDEINT_VER_OFFSET)); - /* Parse the version and pass the info to the caller via output - * parameter - */ - *Major = (u16) - ((Version & XDEINT_VER_MAJOR_MASK) >> XDEINT_VER_MAJOR_SHIFT); - - *Minor = (u16) - ((Version & XDEINT_VER_MINOR_MASK) >> XDEINT_VER_MINOR_SHIFT); - - *Revision = (u16) - ((Version & XDEINT_VER_REV_MASK) >> XDEINT_VER_REV_SHIFT); - - return; + return Version; } /*****************************************************************************/ /** - * This function sets up the input frame size of the deinterlacer - * - * @param InstancePtr is a pointer to the DEINT device instance to be - * worked on. - * @param Width - * @param Height - * @return None. - * - *****************************************************************************/ -void XDeint_SetSize(XDeint *InstancePtr, - u32 Width, u32 Height) +* +* This function sets the input frame size of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Width is the width of the frame. +* @param Height is the height of the frame. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_SetSize(XDeint *InstancePtr, u32 Width, u32 Height) { - /* Verify arguments */ - Xil_AssertVoid(InstancePtr != NULL); - Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - Xil_AssertVoid(Width != (u32)NULL); - Xil_AssertVoid(Height != (u32)NULL); + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(Width != (u32)0x00); + Xil_AssertVoid(Height != (u32)0x00); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_HEIGHT,Height); - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_WIDTH,Width); - - return; + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_HEIGHT_OFFSET), Height); + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, + (XDEINT_WIDTH_OFFSET), Width); } - /*****************************************************************************/ -/* - * This routine is a stub for the frame done interrupt callback. The stub is - * here in case the upper layer forgot to set the handler. On initialization, - * the frame done interrupt handler is set to this callback. It is considered - * an error for this handler to be invoked. - * - *****************************************************************************/ +/** +* +* This routine is a stub for the interrupt callback. The stub is here in case +* the upper layer forgot to set the handler. On initialization, +* interrupt handler is set to this callback. It is considered an error for +* this handler to be invoked. +* +*****************************************************************************/ static void StubCallBack(void *CallBackRef) { - Xil_AssertVoidAlways(); + (void)CallBackRef; + Xil_AssertVoidAlways(); } + +/*****************************************************************************/ +/** +* +* This function gets the video format of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return Returns the video format. +* +* @note None. +* +******************************************************************************/ +u32 XDeint_GetVideo(XDeint *InstancePtr) +{ + u32 ModeReg; + + /* Verify arguments. */ + Xil_AssertNonvoid(InstancePtr != NULL); + Xil_AssertNonvoid(InstancePtr->IsReady == + (u32)(XIL_COMPONENT_IS_READY)); + + /* Read modify write the mode register. */ + ModeReg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET)); + + return ModeReg; +} + +/*****************************************************************************/ +/** +* +* This function gets the pull down controller of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Enable_32 is a pointer which holds status of Enable_32 mode. +* - FALSE = Disabled. +* - TRUE = Enabled. +* @param Enable_22 is a pointer which holds status of Enable_22 mode. +* - FALSE = Disabled. +* - TRUE = Enabled. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_GetPulldown(XDeint *InstancePtr, u32 *Enable_32, + u32 *Enable_22) +{ + u32 ModeReg; + + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == + (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(Enable_32 != NULL); + Xil_AssertVoid(Enable_22 != NULL); + + /* Read modify write the mode register.*/ + ModeReg = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_MODE_OFFSET)); + *Enable_32 = FALSE; + *Enable_22 = FALSE; + if (((ModeReg) & (XDEINT_MODE_PULL_32_ENABLE)) == + XDEINT_MODE_PULL_32_ENABLE) { + *Enable_32 = TRUE; + } + if (((ModeReg) & (XDEINT_MODE_PULL_22_ENABLE)) == + XDEINT_MODE_PULL_22_ENABLE) { + *Enable_22 = TRUE; + } +} + +/*****************************************************************************/ +/** +* +* This function gets the input frame size of the Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Width is pointer to the width of the frame. +* @param Height is pointer to the height of the frame. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_GetSize(XDeint *InstancePtr, u32 *Width, u32 *Height) +{ + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(Width != NULL); + Xil_AssertVoid(Height != NULL); + + *Height = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_HEIGHT_OFFSET)); + *Width = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_WIDTH_OFFSET)); +} + +/*****************************************************************************/ +/** +* +* This function gets the threshold used by the motion adaptive kernel. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param ThresholdT1 is the pointer to lower threshold of the +* motion kernel. +* @param ThresholdT2 is the pointer to upper threshold of the +* motion kernel. +* +* @return None. +* +******************************************************************************/ +void XDeint_GetThresholds(XDeint *InstancePtr, u32 *ThresholdT1, + u32 *ThresholdT2) +{ + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == + (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(ThresholdT1 != NULL); + Xil_AssertVoid(ThresholdT2 != NULL); + + /* Determine the T1->T2 cross fade setting.*/ + *ThresholdT1 = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_THRESH1_OFFSET)); + *ThresholdT2 = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_THRESH2_OFFSET)); +} + +/*****************************************************************************/ +/** +* +* This function gets input field buffer addresses of an Deinterlacer core. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param FieldAddr1 is the pointer to the 1st input field buffer. +* @param FieldAddr2 is the pointer to the 2nd input field buffer. +* @param FieldAddr3 is the pointer to the 3rd input field buffer. +* @param FrameSize is the pointer to size in 32bit words of a single +* field buffer. +* +* @return None. +* +* @note None. +* +******************************************************************************/ +void XDeint_GetFramestore(XDeint *InstancePtr, + u32 *FieldAddr1, u32 *FieldAddr2, + u32 *FieldAddr3, u32 *FrameSize) +{ + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(InstancePtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertVoid(FrameSize != NULL); + Xil_AssertVoid(FieldAddr1 != NULL); + Xil_AssertVoid(FieldAddr2 != NULL); + Xil_AssertVoid(FieldAddr3 != NULL); + + /* Get the input buffer addresses and size of all field stores. */ + *FieldAddr1 = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER0_OFFSET)); + *FieldAddr2 = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER1_OFFSET)); + *FieldAddr3 = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFFER2_OFFSET)); + *FrameSize = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_BUFSIZE_OFFSET)); +} + diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.h b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.h index a7ef0d0b..79b80d64 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.h +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint.h @@ -34,7 +34,7 @@ * * @file xdeint.h * -* This is the main header file of Xilinx Video Deinterlacer device driver +* This is the main header file of Xilinx Video Deinterlacer core. * * Interrupt Service * @@ -42,21 +42,21 @@ * - Internal Register update done * - Deinterlacer is locked to incoming video * - Deinterlacer has lost lock to incoming video -* - Deinterlacer internal fifo error -* - Pulldown activated -* - Pulldown cancelled +* - Deinterlacer internal FIFO error +* - Pull down activated +* - Pull down cancelled * - Frame Tick -* - Framestore Write setup error -* - Framestore Write fifo overflow -* - Framestore Read Field underrun -* - Framestore Read Frame underrun +* - Frame store Write setup error +* - Frame store Write FIFO overflow +* - Frame store Read Field under run +* - Frame store Read Frame under run * * This driver provides functions to install callbacks for the interrupts and * enable/disable/clear any of them. * * Examples * -* Example(s) are provided with this driver to demonstrate the driver usage. +* Example(s) are provided with this driver to demonstrate the self test. * * Limitations * @@ -65,19 +65,47 @@ *
     * MODIFICATION HISTORY:
     *
    -* Ver   Who  Date     Changes
    +* Ver   Who     Date     Changes
     * ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    -* 3.0   adk  19/12/13 Updated as per the New Tcl API's
    -* 3.1   adk 09/05/14 Fixed the CR:798337 driver doesn't support the IP in the
    -*		     build.Changes are made in the driver mdd file.
    +* 1.00a rjh    07/10/11 First release
    +* 2.00a rjh    18/01/12 Updated for v_deinterlacer 2.00
    +* 3.0   adk    19/12/13 Updated as per the New Tcl API's.
    +* 3.2   adk    02/13/14 Added Doxygen support, adherence to Xilinx
    +*                       coding standards.
    +*
    +*                       Modification history of xdeint_sinit.c:
    +*                       Added Doxygen support, adherence to Xilinx
    +*                       coding standards.
    +*
    +*                       Modification history of xdeint_selftest.c:
    +*                       Added the XDeint_Selftest function.
    +*
    +*                       Modification history of xdeint_intr.c:
    +*                       Adherence to Xilinx coding, Doxygen guidelines.
    +*
    +*                       Modification history of xdeint_i.h:
    +*                       Added Doxygen support.
    +*
    +*                       Modification history of xdeint_hw.h:
    +*                       Suffixed "_OFFSET" to all register offset macros.
    +*                       Added bit masks for the registers and added
    +*                       backward compatibility for macros.
    +*
    +*                       Modification history of xdeint.c:
    +*                       Changed the prototype of XDeint_GetVersion
    +*                       Implemented the following functions:
    +*                       XDeint_GetFramestore
    +*                       XDeint_GetVideo
    +*                       XDeint_GetThresholds
    +*                       XDeint_GetPulldown
    +*                       XDeint_GetSize
     * 
    * ******************************************************************************/ -#ifndef XDeint_H /* prevent circular inclusions */ -#define XDeint_H /* by using protection macros */ +#ifndef XDEINT_H +#define XDEINT_H /**< Prevent circular inclusions + * by using protection macros */ #ifdef __cplusplus extern "C" { @@ -87,380 +115,426 @@ extern "C" { #include "xdeint_hw.h" #include "xstatus.h" +#include "xil_assert.h" /************************** Constant Definitions *****************************/ /** @name Interrupt types for setting up callbacks * @{ */ -#define XDeint_HANDLER /**< Internal Register update done */ +#define XDEINT_HANDLER /**< Internal Register update done */ /*@}*/ /**************************** Type Definitions *******************************/ /** - * Deinterlacer device configuration structure. - * Each Deinterlacer device should have a configuration structure associated. + * Deinterlacer core configuration structure. + * Each Deinterlacer core should have a configuration structure associated. */ typedef struct { - u16 DeviceId; /**< DeviceId is the unique ID of the device */ - u32 BaseAddress; /**< BaseAddress is the physical base address of the - * device's registers */ + u16 DeviceId; /**< DeviceId is the unique ID of the core */ + u32 BaseAddress; /**< BaseAddress is the physical base address + * of the core's registers */ } XDeint_Config; /** * Callback type for all interrupts - * - * @param none */ -typedef void (*XDeint_CallBack) (u32 status); +typedef void (*XDeint_CallBack)(u32 status); /** * The XDeint driver instance data. An instance must be allocated for each - * DEINT device in use. + * Deintlerlacer core in use. */ typedef struct { - XDeint_Config Config; /**< hardware configuration */ - u32 IsReady; /**< Device and the driver instance are initialized */ - u32 xsize; /**< X Input Dimension */ - u32 ysize; /**< Y Input Dimension */ - - XDeint_CallBack IntCallBack; /**< Call back for Status interrupt */ - + XDeint_Config Config; /**< Hardware configuration */ + u32 IsReady; /**< Core and the driver instance + * are initialized */ + u32 XSize; /**< X Input Dimension */ + u32 YSize; /**< Y Input Dimension */ + XDeint_CallBack IntCallBack; /**< Call back for Status interrupt */ + void *IntRef; /**< To be passed to interrupt + * call back */ } XDeint; +/***************** Macros (Inline Functions) Definitions *********************/ + /*****************************************************************************/ /** * -* This macro enables the deinterlacer algorithms +* This macro enables the Deinterlacer algorithms. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Enable(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_Enable(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_Enable(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL) | \ - XDEINT_CTL_ENABLE) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ENABLE)) /*****************************************************************************/ /** * -* This macro disables the deinterlacer algorithms +* This macro disables the Deinterlacer algorithms. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Disable(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_Disable(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_Disable(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL) & \ - ~XDEINT_CTL_ENABLE) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET)) & (~(XDEINT_CTL_ENABLE))) /*****************************************************************************/ /** * -* This macro enables the deinterlacer to accept video +* This macro enables the Deinterlacer core to accept video. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Start(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_Start(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_Start(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL) | \ - XDEINT_CTL_ACCEPT_VIDEO) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_ACCEPT_VIDEO)) /*****************************************************************************/ /** * -* This macro halts the deinterlacer on the next frame boundary +* This macro halts the Deinterlacer core on the next frame boundary. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Stop(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_Stop(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_Stop(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL) & \ - ~XDEINT_CTL_ACCEPT_VIDEO) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET)) & \ + (~(XDEINT_CTL_ACCEPT_VIDEO))) /*****************************************************************************/ /** * -* This macro soft resets the deinterlacer to its default mode. This register will clear -* once the reset is complete. Software should poll here until the reset has completed -* NOTE : Attempting to alter CPU registers during a soft reset will result in no register -* changes due to the CPU interface being reset... +* This macro soft resets the Deinterlacer to its default mode. This register +* will clear once the reset is complete. Software should poll here until the +* reset has completed. +* NOTE : Attempting to alter CPU registers during a soft reset will result +* in no register changes due to the CPU interface being reset. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Reset(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_Reset(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_Reset(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_RESET,XDEINT_RESET_RESET_MASK) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_RESET_OFFSET), (u32)(XDEINT_RESET_RESET_MASK)) /*****************************************************************************/ /** * -* This macro returns the current soft-reset state +* This macro returns the current soft-reset state. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return 1=In Reset, 0=Ready. +* @return 1=In Reset, 0=Ready. * -* @note -* C-style signature: -* void XDeint_InReset(XDeint *InstancePtr); +* @note C-style signature: +* u32 XDeint_InReset(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_InReset(InstancePtr) \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_RESET) - + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_RESET_OFFSET)) /*****************************************************************************/ /** * -* This macro tells an DEINT device to pick up all the register value changes -* made so far by the software at the next frame boundary. +* This macro tells the Deinterlacer core to pick up all the register value +* changes made so far by the software at the next frame boundary. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_RegUpdateReq(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_RegUpdateReq(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_RegUpdateReq(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_CONTROL) | \ - 0x00000001) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_CONTROL_OFFSET)) | (XDEINT_CTL_UPDATE_REQ)) /*****************************************************************************/ /** * -* This macro enables interrupts of an DEINT device. +* This macro enables the given individual interrupt(s) on the +* Deinterlacer core. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param IntrType is the bit-mask of the interrupts to be enabled. +* Bit positions of 1 will be enabled. Bit post ions of 0 will keep +* the previous setting.This mask is formed by OR'ing +* XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create +* this parameter value. * -* @param IntrType is the type of the interrupts to enable. Use OR'ing of -* XDeint_IXR_* constants defined in xdeint_hw.h to create this parameter -* value. +* @return None. * -* @return None +* @note The existing enabled interrupt(s) will remain enabled. * -* @note -* -* The existing enabled interrupt(s) will remain enabled. -* -* C-style signature: -* void XDeint_IntrEnable(XDeint *InstancePtr, u32 IntrType); +* C-style signature: +* void XDeint_IntrEnable(XDeint *InstancePtr, u32 IntrType) * ******************************************************************************/ #define XDeint_IntrEnable(InstancePtr, IntrType) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_IER, \ - ((IntrType) & XDEINT_IXR_ALLINTR_MASK) | \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_IER)) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_IER_OFFSET), ((IntrType) & \ + (XDEINT_IXR_ALLINTR_MASK)) | \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_IER_OFFSET))) /*****************************************************************************/ /** * -* This macro disables interrupts of an DEINT device. +* This macro disables the given individual interrupt(s) on the +* Deinterlacer core. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param IntrType is the bit-mask of the interrupts to be enabled. +* Bit positions of 1 will be disabled. Bit post ions of 0 will keep +* the previous setting.This mask is formed by OR'ing +* XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to create +* this parameter value. * -* @param IntrType is the type of the interrupts to disable. Use OR'ing of -* XDeint_IXR_* constants defined in xdeint_hw.h to create this parameter -* value. +* @return None. * -* @return None +* @note Any other interrupt not covered by parameter IntrType, if +* enabled before this macro is called, will remain enabled. * -* @note -* -* Any other interrupt not covered by parameter IntrType, if enabled before -* this macro is called, will remain enabled. -* -* C-style signature: -* void XDeint_IntrDisable(XDeint *InstancePtr, u32 IntrType); +* C-style signature: +* void XDeint_IntrDisable(XDeint *InstancePtr, u32 IntrType) * ******************************************************************************/ #define XDeint_IntrDisable(InstancePtr, IntrType) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_IER, \ - ((~(IntrType)) & XDEINT_IXR_ALLINTR_MASK) & \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_ISR)) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_IER_OFFSET), ((~(IntrType)) & \ + (XDEINT_IXR_ALLINTR_MASK)) & \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, (XDEINT_ISR_OFFSET))) /*****************************************************************************/ /** * -* This macro returns the pending interrupts of an DEINT device. +* This macro returns the pending interrupts of the Deinterlacer core. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return The pending interrupts of the DEINT. Use XDEINT_IXR_* constants -* defined in xdeint_hw.h to interpret this value. +* @return The pending interrupts of the Deinterlacer core. Use +* XDEINT_IXR_*_MASK constants defined in xdeint_hw.h to interpret +* this value. * -* @note -* -* C-style signature: -* u32 XDeint_IntrGetPending(XDeint *InstancePtr); +* @note C-style signature: +* u32 XDeint_IntrGetPending(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_IntrGetPending(InstancePtr) \ - (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_IER) & \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_ISR) \ - & XDEINT_IXR_ALLINTR_MASK) + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_IER_OFFSET)) & \ + (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_ISR_OFFSET)) & (XDEINT_IXR_ALLINTR_MASK)) /*****************************************************************************/ /** * -* This macro clears/acknowledges pending interrupts of an DEINT device. +* This macro clears/acknowledges pending interrupts of the +* Deinterlacer core. * -* @param InstancePtr is a pointer to the DEINT device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param IntrType is the pending interrupts to clear/acknowledge. +* Use OR'ing of XDEINT_IXR_*_MASK constants defined in +* xdeint_hw.h to create this parameter value. * -* @param IntrType is the pending interrupts to clear/acknowledge. Use OR'ing -* of XDeint_IXR_* constants defined in xdeint_hw.h to create this -* parameter value. +* @return None. * -* @return None -* -* @note -* -* C-style signature: -* void XDeint_IntrClear(XDeint *InstancePtr, u32 IntrType); +* @note C-style signature: +* void XDeint_IntrClear(XDeint *InstancePtr, u32 IntrType) * ******************************************************************************/ #define XDeint_IntrClear(InstancePtr, IntrType) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_ISR, \ - (IntrType) & XDeint_IntrGetPending(InstancePtr)) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_ISR_OFFSET), (IntrType) & \ + (XDeint_IntrGetPending(InstancePtr))) /*****************************************************************************/ /** * -* This macro set the deinterlacers colour space RGB. +* This macro sets the Deinterlacer's color space to RGB. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Enable(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_SetRGB(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_SetRGB(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE) \ - | XDEINT_MODE_COLOUR_RGB) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET)) | (XDEINT_MODE_COLOUR_RGB)) /*****************************************************************************/ /** * -* This macro set the deinterlacers colour space to YUV. +* This macro sets the Deinterlacer's color space to YUV. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be worked on. +* @param InstancePtr is a pointer to XDeint instance to be worked on. * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Enable(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_SetYUV(XDeint *InstancePtr) * ******************************************************************************/ #define XDeint_SetYUV(InstancePtr) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE, \ - XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE) \ - & ~XDEINT_MODE_COLOUR_RGB) + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET), \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET)) & (~(XDEINT_MODE_COLOUR_RGB))) /*****************************************************************************/ /** * -* This macro set the deinterlacers processing algorithm +* This macro sets the Deinterlacer's processing algorithm. * -* @param InstancePtr is a pointer to the Deinterlacer device instance to be worked on. -* @param Alg is a algorthim setting from XDEINT_MODE_ALGORITHM_???? +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param Alg is a algorithm setting from XDEINT_MODE_ALGORITHM_???? * -* @return None. +* @return None. * -* @note -* C-style signature: -* void XDeint_Enable(XDeint *InstancePtr); +* @note C-style signature: +* void XDeint_SetAlgorithm(XDeint *InstancePtr, u32 Alg) * ******************************************************************************/ -#define XDeint_SetAlgorithm(InstancePtr,Alg) \ - XDeint_WriteReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE, \ - (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, XDEINT_MODE) \ - & ~XDEINT_MODE_ALGORITHM_FULL) | Alg) +#define XDeint_SetAlgorithm(InstancePtr, Alg) \ + XDeint_WriteReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET), \ + (XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET)) & \ + (~(XDEINT_MODE_ALGORITHM_FULL))) | \ + (Alg)) +/*****************************************************************************/ +/** +* +* This macro gets the Deinterlacer's color space. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return Returns the color space. +* 0x00000004 - YUV color space, +* 0x00000000 - RGB color space. +* +* @note C-style signature: +* u32 XDeint_GetColorSpace(XDeint *InstancePtr) +* +******************************************************************************/ +#define XDeint_GetColorSpace(InstancePtr) \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET)) & (XDEINT_MODE_COLOUR_YUV) + +/*****************************************************************************/ +/** +* +* This macro gets the Deinterlacer's processing algorithm. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return Returns algorithm for deinterlacing method. +* - 0x00000000 = Pure field interpolating technique is used. +* - 0x00000001 = Diagonal engine is used. +* - 0x00000002 = Motion adaptive engine is used. +* - 0x00000003 = Motion and Diagonal engines are used. +* +* @note C-style signature: +* u32 XDeint_GetAlgorithm(XDeint *InstancePtr) +* +******************************************************************************/ +#define XDeint_GetAlgorithm(InstancePtr) \ + XDeint_ReadReg((InstancePtr)->Config.BaseAddress, \ + (XDEINT_MODE_OFFSET)) & (~(XDEINT_MODE_ALGORITHM_FULL)) /************************** Function Prototypes ******************************/ - /* * Initialization and control functions in xdeint.c */ - /* Initialization */ int XDeint_ConfigInitialize(XDeint *InstancePtr, XDeint_Config *CfgPtr, - u32 EffectiveAddr); - + u32 EffectiveAddr); /* * Initialization functions in xdeint_sinit.c */ XDeint_Config *XDeint_LookupConfig(u16 DeviceId); -// Framestore management -void XDeint_SetFramestore(XDeint *InstancePtr, - u32 FieldAddr1, u32 FieldAddr2, - u32 FieldAddr3, u32 FrameSize); - -// Deinterlacer Management -void XDeint_SetSize(XDeint *InstancePtr, - u32 Width, u32 Height); - -void XDeint_SetPulldown(XDeint *InstancePtr, - u32 enable_32, - u32 enable_22); -void XDeint_SetThresholds(XDeint *InstancePtr, - u32 t1, u32 t2); -void XDeint_SetVideo(XDeint *InstancePtr, - u32 Packing, u32 Colour, u32 Order, u32 PSF); - - +/* Frame store management*/ +void XDeint_SetFramestore(XDeint *InstancePtr, u32 FieldAddr1, u32 FieldAddr2, + u32 FieldAddr3, u32 FrameSize); +/* Deinterlacer Management */ +void XDeint_SetSize(XDeint *InstancePtr, u32 Width, u32 Height); +void XDeint_SetPulldown(XDeint *InstancePtr, u32 Enable_32, u32 Enable_22); +void XDeint_SetThresholds(XDeint *InstancePtr, u32 ThresholdT1, + u32 ThresholdT2); +void XDeint_SetVideo(XDeint *InstancePtr, u32 Packing, u32 Color, u32 Order, + u32 PSF); /* * Interrupt related functions in xdeint_intr.c */ void XDeint_IntrHandler(void *InstancePtr); int XDeint_SetCallBack(XDeint *InstancePtr, void *CallBackFunc); +u32 XDeint_GetVideo(XDeint *InstancePtr); +void XDeint_GetPulldown(XDeint *InstancePtr, u32 *Enable_32, u32 *Enable_22); +void XDeint_GetSize(XDeint *InstancePtr, u32 *Width, u32 *Height); +void XDeint_GetThresholds(XDeint *InstancePtr, u32 *ThresholdT1, + u32 *ThresholdT2); + +void XDeint_GetFramestore(XDeint *InstancePtr, + u32 *FieldAddr1, u32 *FieldAddr2, + u32 *FieldAddr3, u32 *FrameSize); +u32 XDeint_GetVersion(XDeint *InstancePtr); +int XDeint_Selftest(XDeint *InstancePtr); #ifdef __cplusplus } + #endif -#endif /* end of protection macro */ +#endif /* End of protection macro */ diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_g.c b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_g.c index 1d840396..4c436c51 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_g.c +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_g.c @@ -34,18 +34,19 @@ * * @file XDeint_g.c * -* This file contains a template for configuration table of Xilinx Video Deinterlacer -* For a real hardware system, -* Xilinx Platform Studio (XPS) will automatically generate a real configuration -* table to match the configuration of the Deinterlacer devices. +* This file contains a template for configuration table of Xilinx Video +* Deinterlacer For a real hardware system, Xilinx Platform Studio (XPS) will +* automatically generate a real configuration table to match the configuration +* of the Deinterlacer devices. * *
     * MODIFICATION HISTORY:
     *
    -* Ver   Who  Date     Changes
    -* ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +* Ver   Who     Date     Changes
    +* ----- ------ -------- -------------------------------------------------------
    +* 1.00a rjh    07/10/11 First release
    +* 2.00a rjh    18/01/12 Updated for v_deinterlacer 2.00
    +* 3.2   adk    02/13/14 Adherence to Xilinx coding, Doxygen guidelines.
     * 
    * ******************************************************************************/ @@ -53,15 +54,15 @@ /***************************** Include Files *********************************/ -#include "xparameters.h" #include "xdeint.h" +#include "xparameters.h" /** - * The configuration table for Video Deinterlacers devices - */ +* The configuration table for Video Deinterlacers devices +*/ XDeint_Config XDeint_ConfigTable[] = { { - XPAR_DEINTERLACER_0_DEVICE_ID, - XPAR_DEINTERLACER_0_BASEADDR + XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1_DEVICE_ID, + XPAR_FMC_SENSOR_INPUT_V_DEINTERLACER_1__BASEADDR } }; diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_hw.h b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_hw.h index 19c8b306..f35945e9 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_hw.h +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_hw.h @@ -35,25 +35,29 @@ * @file xdeint_hw.h * * This header file contains identifiers and register-level driver functions (or -* macros) that can be used to access the Xilinx Video Deinterlacer device. +* macros) that can be used to access the Xilinx Video Deinterlacer core. * -* For more information about the operation of this device, see the hardware -* specification and documentation in the higher level driver xdeint.h source +* For more information about the operation of this core, see the hardware +* specification and documentation in the higher level core xdeint.h source * code file. * *
     * MODIFICATION HISTORY:
     *
    -* Ver   Who  Date     Changes
    -* ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +* Ver   Who      Date     Changes
    +* ----- ------ -------- -------------------------------------------------------
    +* 1.00a rjh    07/10/11 First release.
    +* 2.00a rjh    18/01/12 Updated for v_deinterlacer 2.00.
    +* 3.2   adk    02/13/14 Suffixed "_OFFSET" to all register offset macros.
    +*                       Added bit masks for the registers and added
    +*                       backward compatibility for macros.
     * 
    * ******************************************************************************/ -#ifndef XDeint_HW_H /* prevent circular inclusions */ -#define XDeint_HW_H /* by using protection macros */ +#ifndef XDEINT_HW_H +#define XDEINT_HW_H /**< Prevent circular inclusions + * by using protection macros */ #ifdef __cplusplus extern "C" { @@ -65,180 +69,296 @@ extern "C" { /************************** Constant Definitions *****************************/ -/** @name Register Offsets +/** @name Register Offsets: * @{ */ -#define XDEINT_CONTROL 0x000 /**< Deinterlacer Main Control */ -#define XDEINT_MODE 0x004 /**< Deinterlacer internal Modes */ -#define XDEINT_IER 0x008 /**< Interrupt Enable Control */ -#define XDEINT_ISR 0x00C /**< Interrupt Enable Status */ -#define XDEINT_HEIGHT 0x010 /**< Height */ -#define XDEINT_WIDTH 0x014 /**< Width */ -#define XDEINT_T1 0x018 /**< T1 Threshold */ -#define XDEINT_T2 0x01C /**< T2 Threshold */ -#define XDEINT_XFADE 0x020 /**< Cross Fade Ration */ -#define XDEINT_FS_BASE0 0x024 /**< VFBC Field Buffer 0 Base */ -#define XDEINT_FS_BASE1 0x028 /**< VFBC Field Buffer 1 Base */ -#define XDEINT_FS_BASE2 0x02C /**< VFBC Field Buffer 2 Base */ -#define XDEINT_FS_WORDS 0x030 /**< VFBC Field Buffer Page size in 32bit Words */ -#define XDEINT_VER 0x0F0 /**< Hardware Version ID */ -#define XDEINT_RESET 0x100 /**< Soft Reset */ +#define XDEINT_CONTROL_OFFSET 0x000 /**< Deinterlacer Main + * Control */ +#define XDEINT_MODE_OFFSET 0x004 /**< Deinterlacer internal + * Modes */ +#define XDEINT_IER_OFFSET 0x008 /**< Interrupt Enable + * Control */ +#define XDEINT_ISR_OFFSET 0x00C /**< Interrupt Enable Status */ +#define XDEINT_HEIGHT_OFFSET 0x010 /**< Height */ +#define XDEINT_WIDTH_OFFSET 0x014 /**< Width */ +#define XDEINT_THRESH1_OFFSET 0x018 /**< T1 Threshold */ +#define XDEINT_THRESH2_OFFSET 0x01C /**< T2 Threshold */ +#define XDEINT_XFADE_OFFSET 0x020 /**< Cross Fade Ration */ +#define XDEINT_BUFFER0_OFFSET 0x024 /**< VFBC Field Buffer 0 + * Base */ +#define XDEINT_BUFFER1_OFFSET 0x028 /**< VFBC Field Buffer 1 + * Base */ +#define XDEINT_BUFFER2_OFFSET 0x02C /**< VFBC Field Buffer 2 + * Base */ +#define XDEINT_BUFSIZE_OFFSET 0x030 /**< VFBC Field Buffer Page + * size in 32bit Words */ +#define XDEINT_VER_OFFSET 0x0F0 /**< Hardware Version ID */ +#define XDEINT_RESET_OFFSET 0x100 /**< Soft Reset */ /*@}*/ -/** @name Interrupt Status/Enable Register bit definition +/** @name Interrupt Status/Enable Register bit definitions: * @{ */ -#define XDEINT_IXR_UPDATE_MASK 0x00000001 /**< Internal Register update done */ -#define XDEINT_IXR_LOCKED_MASK 0x00000002 /**< Deinterlacer is locked to incoming video */ -#define XDEINT_IXR_UNLOCKED_MASK 0x00000004 /**< Deinterlacer has lost lock to incoming video */ -#define XDEINT_IXR_ERROR_MASK 0x00000008 /**< Deinterlacer internal fifo error */ -#define XDEINT_IXR_PULL_ON_MASK 0x00000010 /**< Pulldown activated */ -#define XDEINT_IXR_PULL_OFF_MASK 0x00000020 /**< Pulldown cancelled */ -#define XDEINT_IXR_FRAME_MASK 0x00000040 /**< Frame Tick */ -#define XDEINT_IXR_FS_CFG_ERROR_MASK 0x00000100 /**< Framestore Write setup error */ -#define XDEINT_IXR_FS_WR_ERROR_MASK 0x00000200 /**< Framestore Write fifo overflow */ -#define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK 0x00000400 /**< Framestore Read Field underrun */ -#define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK 0x00000800 /**< Framestore Read Frame underrun */ +#define XDEINT_IXR_UPDATE_MASK 0x00000001 /**< Internal Register + * update done */ +#define XDEINT_IXR_LOCKED_MASK 0x00000002 /**< Deinterlacer is + * locked to incoming + * video */ +#define XDEINT_IXR_UNLOCKED_MASK 0x00000004 /**< Deinterlacer has + * lost lock to + * incoming + * video */ +#define XDEINT_IXR_ERROR_MASK 0x00000008 /**< Deinterlacer + * internal + * FIFO error */ +#define XDEINT_IXR_PULL_ON_MASK 0x00000010 /**< Pull down + * activated */ +#define XDEINT_IXR_PULL_OFF_MASK 0x00000020 /**< Pull down + * cancelled */ +#define XDEINT_IXR_FRAME_MASK 0x00000040 /**< Frame Tick */ +#define XDEINT_IXR_FS_CFG_ERROR_MASK 0x00000100 /**< Frame store Write + * setup error */ +#define XDEINT_IXR_FS_WR_ERROR_MASK 0x00000200 /**< Frame store Write + * FIFO overflow */ +#define XDEINT_IXR_FS_RD_FIELD_ERROR_MASK 0x00000400 /**< Frame store Read + * Field under run */ +#define XDEINT_IXR_FS_RD_FRAME_ERROR_MASK 0x00000800 /**< Frame store Read + * Frame under run */ -#define XDEINT_IXR_ALLINTR_MASK (XDEINT_IXR_UPDATE_MASK | \ - XDEINT_IXR_LOCKED_MASK | \ - XDEINT_IXR_UNLOCKED_MASK | \ - XDEINT_IXR_ERROR_MASK | \ - XDEINT_IXR_PULL_ON_MASK | \ - XDEINT_IXR_PULL_OFF_MASK | \ - XDEINT_IXR_FRAME_MASK | \ - XDEINT_IXR_FS_CFG_ERROR_MASK | \ - XDEINT_IXR_FS_WR_ERROR_MASK | \ - XDEINT_IXR_FS_RD_FIELD_ERROR_MASK | \ - XDEINT_IXR_FS_RD_FRAME_ERROR_MASK) /**< Mask for all interrupts */ +#define XDEINT_IXR_ALLINTR_MASK (XDEINT_IXR_UPDATE_MASK | \ + XDEINT_IXR_LOCKED_MASK | \ + XDEINT_IXR_UNLOCKED_MASK| \ + XDEINT_IXR_ERROR_MASK | \ + XDEINT_IXR_PULL_ON_MASK | \ + XDEINT_IXR_PULL_OFF_MASK| \ + XDEINT_IXR_FRAME_MASK | \ + XDEINT_IXR_FS_CFG_ERROR_MASK | \ + XDEINT_IXR_FS_WR_ERROR_MASK | \ + XDEINT_IXR_FS_RD_FIELD_ERROR_MASK | \ + XDEINT_IXR_FS_RD_FRAME_ERROR_MASK) + /**< Mask for all + * interrupts */ /*@}*/ -/** @name Error Status bit definition +/** @name Error Status/ bit definitions: * @{ */ -#define XDEINT_STS_ERROR 0x00000008 /**< Deinterlacer internal fifo error */ -#define XDEINT_STS_FS_CFG_ERROR 0x00000100 /**< Framestore Write setup error */ -#define XDEINT_STS_FS_WR_ERROR 0x00000200 /**< Framestore Write fifo overflow */ -#define XDEINT_STS_FS_RD_FIELD_ERROR 0x00000400 /**< Framestore Read Field underrun */ -#define XDEINT_STS_FS_RD_FRAME_ERROR 0x00000800 /**< Framestore Read Frame underrun */ +#define XDEINT_STS_ERROR_OFFSET 0x00000008 /**< Deinterlacer + * internal FIFO + * error */ +#define XDEINT_STS_FS_CFG_ERROR 0x00000100 /**< Frame store Write + * setup error */ +#define XDEINT_STS_FS_WR_ERROR 0x00000200 /**< Frame store Write + * FIFO overflow */ +#define XDEINT_STS_FS_RD_FIELD_ERROR 0x00000400 /**< Frame store Read + * Field under run */ +#define XDEINT_STS_FS_RD_FRAME_ERROR 0x00000800 /**< Frame store Read + * Frame under run */ /*@}*/ -#define XDEINT_RESET_RESET_MASK 0x00000001 /**< Software Reset */ +#define XDEINT_RESET_RESET_MASK 0x00000001 /**< Software Reset */ -/** @name Deinterlacer COntrol Fields +/** @name Deinterlacer Control Fields: * @{ */ -#define XDEINT_VER_MAJOR_MASK 0xF0000000 /**< Major Version */ -#define XDEINT_VER_MAJOR_SHIFT 28 /**< Major Bit Shift */ -#define XDEINT_VER_MINOR_MASK 0x0FF00000 /**< Minor Version */ -#define XDEINT_VER_MINOR_SHIFT 20 /**< Minor Bit Shift */ -#define XDEINT_VER_REV_MASK 0x000F0000 /**< Revision Version */ -#define XDEINT_VER_REV_SHIFT 16 /**< Revision Bit Shift */ +#define XDEINT_VER_MAJOR_MASK 0xF0000000 /**< Major Version */ +#define XDEINT_VER_MAJOR_SHIFT 28 /**< Major Bit Shift */ +#define XDEINT_VER_MINOR_MASK 0x0FF00000 /**< Minor Version */ +#define XDEINT_VER_MINOR_SHIFT 20 /**< Minor Bit Shift */ +#define XDEINT_VER_REV_MASK 0x000F0000 /**< Revision + * Version */ +#define XDEINT_VER_REV_SHIFT 16 /**< Revision Bit + * Shift */ /*@}*/ -/** @name Deinterlacer COntrol Fields +/** @name Deinterlacer Control Fields: * @{ */ -#define XDEINT_CTL_UPDATE_REQ 0x00000001 /**< Queue a register update request */ -#define XDEINT_CTL_ENABLE 0x00000002 /**< Enable/Disable deinterlacer algorithms*/ -#define XDEINT_CTL_ACCEPT_VIDEO 0x00000004 /**< Accept Video into the deinterlacer */ +#define XDEINT_CTL_UPDATE_REQ 0x00000001 /**< Queue a register update + * request */ +#define XDEINT_CTL_ENABLE 0x00000002 /**< Enable/Disable + * Deinterlacer algorithms */ +#define XDEINT_CTL_ACCEPT_VIDEO 0x00000004 /**< Accept Video into the + * Deinterlacer */ /*@}*/ -/** @name Deinterlacer Mode Fields +/** @name Deinterlacer Mode Fields: * @{ */ -#define XDEINT_MODE_ALGORITHM_0 0x00000001 /**< Deinterlacer algorithm */ -#define XDEINT_MODE_ALGORITHM_1 0x00000002 /**< Deinterlacer algorithm */ -#define XDEINT_MODE_COL 0x00000004 /**< Colour Space */ -#define XDEINT_MODE_PACKING_0 0x00000008 /**< XSVI Packing */ -#define XDEINT_MODE_PACKING_1 0x00000010 /**< XSVI Packing */ -#define XDEINT_MODE_FIELD_ORDER 0x00000020 /**< First field order */ -#define XDEINT_MODE_PSF_ENABLE 0x00000040 /**< PSF passthrough enable */ -#define XDEINT_MODE_PULL_32_ENABLE 0x00000080 /**< Pulldown 3:2 control enable */ -#define XDEINT_MODE_PULL_22_ENABLE 0x00000100 /**< Pulldown 3:2 control enable */ - -#define XDEINT_MODE_COLOUR_RGB 0x00000000 /**< Deinterlacer colour space*/ -#define XDEINT_MODE_COLOUR_YUV 0x00000004 /**< Deinterlacer colour space*/ - -#define XDEINT_MODE_ALGORITHM_RAW 0x00000000 /**< Deinterlacer algorithm option 0*/ -#define XDEINT_MODE_ALGORITHM_DIAG 0x00000001 /**< Deinterlacer algorithm option 1*/ -#define XDEINT_MODE_ALGORITHM_MOTION 0x00000002 /**< Deinterlacer algorithm option 2*/ -#define XDEINT_MODE_ALGORITHM_FULL 0x00000003 /**< Deinterlacer algorithm option 3*/ - -#define XDEINT_MODE_PACKING_420 0x00000000 /**< XSVI Packing mode 420*/ -#define XDEINT_MODE_PACKING_422 0x00000008 /**< XSVI Packing mode 422*/ -#define XDEINT_MODE_PACKING_444 0x00000010 /**< XSVI Packing mode 444*/ - -#define XDEINT_MODE_FIELD_EVEN_FIRST 0x00000020 /**< First field of frame contains even video lines*/ -#define XDEINT_MODE_FIELD_ODD_FIRST 0x00000000 /**< First field of frame contains odd video lines*/ - -// RMW Masking Bits. -#define XDEINT_MODE_ALGORITHM_MASK 0x00000003 /**< Deinterlacer algorithm */ -#define XDEINT_MODE_COL_MASK 0x00000004 /**< Colour Space */ -#define XDEINT_MODE_PACKING_MASK 0x00000018 /**< XSVI Packing */ -#define XDEINT_MODE_FIELD_ORDER_MASK 0x00000020 /**< First field order */ -#define XDEINT_MODE_PSF_ENABLE_MASK 0x00000040 /**< PSF passthrough enable */ -#define XDEINT_MODE_PULL_ENABLE_MASK 0x00000180 /**< Pulldown control enable */ +#define XDEINT_MODE_ALGORITHM_0 0x00000001 /**< Deinterlacer + * algorithm */ +#define XDEINT_MODE_ALGORITHM_1 0x00000002 /**< Deinterlacer + * algorithm */ +#define XDEINT_MODE_COL 0x00000004 /**< Color Space */ +#define XDEINT_MODE_PACKING_0 0x00000008 /**< XSVI Packing */ +#define XDEINT_MODE_PACKING_1 0x00000010 /**< XSVI Packing */ +#define XDEINT_MODE_FIELD_ORDER 0x00000020 /**< First field + * order */ +#define XDEINT_MODE_PSF_ENABLE 0x00000040 /**< PSF pass through + * enable */ +#define XDEINT_MODE_PULL_32_ENABLE 0x00000080 /**< Pull down 3:2 + * control enable */ +#define XDEINT_MODE_PULL_22_ENABLE 0x00000100 /**< Pull down 2:2 + * control enable */ +#define XDEINT_MODE_PULL_22_FIELDP 0x00000200 /**< Pull down 2:2 + * Field + * Precedence */ +#define XDEINT_MODE_COLOUR_RGB 0x00000000 /**< Deinterlacer + * color space */ +#define XDEINT_MODE_COLOUR_YUV 0x00000004 /**< Deinterlacer + * color space */ +#define XDEINT_MODE_ALGORITHM_RAW 0x00000000 /**< Deinterlacer + * algorithm + * option 0 */ +#define XDEINT_MODE_ALGORITHM_DIAG 0x00000001 /**< Deinterlacer + * algorithm + * option 1 */ +#define XDEINT_MODE_ALGORITHM_MOTION 0x00000002 /**< Deinterlacer + * algorithm + * option 2 */ +#define XDEINT_MODE_ALGORITHM_FULL 0x00000003 /**< Deinterlacer + * algorithm + * option 3 */ +#define XDEINT_MODE_PACKING_420 0x00000000 /**< XSVI Packing mode + * 420 */ +#define XDEINT_MODE_PACKING_422 0x00000008 /**< XSVI Packing mode + * 422 */ +#define XDEINT_MODE_PACKING_444 0x00000010 /**< XSVI Packing mode + * 444 */ +#define XDEINT_MODE_FIELD_EVEN_FIRST 0x00000020 /**< First field of + * frame + * contains even + * video lines */ +#define XDEINT_MODE_FIELD_ODD_FIRST 0x00000000 /**< First field of + * frame + * contains odd + * video lines */ +/* RMW Masking Bits.*/ +#define XDEINT_MODE_ALGORITHM_MASK 0x00000003 /**< Deinterlacer + * algorithm */ +#define XDEINT_MODE_COL_MASK 0x00000004 /**< Color Space */ +#define XDEINT_MODE_PACKING_MASK 0x00000018 /**< XSVI Packing */ +#define XDEINT_MODE_FIELD_ORDER_MASK 0x00000020 /**< First field + * order */ +#define XDEINT_MODE_PSF_ENABLE_MASK 0x00000040 /**< PSF pass through + * enable */ +#define XDEINT_MODE_PULL_ENABLE_MASK 0x00000180 /**< Pull down control + * enable */ /*@}*/ +/** @name Deinterlacer height bit definitions: + * @{ + */ +#define XDEINT_HEIGHT_MASK 0x000007FF /**< Deinterlacer height */ +/*@}*/ +/** @name Deinterlacer width bit definitions: + * @{ + */ +#define XDEINT_WIDTH_MASK 0x000007FF /**< Deinterlacer width */ +/*@}*/ + +/** @name Deinterlacer Threshold T1 /T2 bit definitions: + * @{ + */ +#define XDEINT_THRESHOLD_MASK 0x000003FF /**< Deinterlacer threshold */ +/*@}*/ + +/** @name Deinterlacer cross fade cycle bit definitions: + * @{ + */ +#define XDEINT_XFADE_MASK 0x0000FFFF /**< Deinterlacer Cross fade + * cycle */ +/*@}*/ + +/** @name Deinterlacer Buffer cycle bit definitions: + * @{ + */ +#define XDEINT_BUF_SIZE_MASK 0x00FFFFFF /**< Deinterlacer Buffer + * size mask */ +/*@}*/ + +/* (4096*256) */ +#define XDEINT_FADE_RATIO 1048576 /**< Fade ratio */ + +/**@name Backward compatibility macros + * @{ + */ +#define XDEINT_CONTROL XDEINT_CONTROL_OFFSET +#define XDEINT_MODE XDEINT_MODE_OFFSET +#define XDEINT_IER XDEINT_IER_OFFSET +#define XDEINT_ISR XDEINT_ISR_OFFSET +#define XDEINT_HEIGHT XDEINT_HEIGHT_OFFSET +#define XDEINT_WIDTH XDEINT_WIDTH_OFFSET +#define XDEINT_T1 XDEINT_THRESH1_OFFSET +#define XDEINT_T2 XDEINT_THRESH2_OFFSET +#define XDEINT_XFADE XDEINT_XFADE_OFFSET +#define XDEINT_FS_BASE0 XDEINT_BUFFER0_OFFSET +#define XDEINT_FS_BASE1 XDEINT_BUFFER1_OFFSET +#define XDEINT_FS_BASE2 XDEINT_BUFFER2_OFFSET +#define XDEINT_FS_WORDS XDEINT_BUFSIZE_OFFSET +#define XDEINT_VER XDEINT_VER_OFFSET +#define XDEINT_RESET XDEINT_RESET_OFFSET +/*@}*/ + +/***************** Macros (Inline Functions) Definitions *********************/ + +/** @name Core register I/O APIs: + * @{ + */ +#define XDeint_In32 Xil_In32 +#define XDeint_Out32 Xil_Out32 + +/*****************************************************************************/ +/** +* +* This macro reads the given register. +* +* @param BaseAddress is the base address of the core. +* @param RegOffset is the register offset to be read. +* +* @return The 32-bit value of the register. +* +* @note C-style signature: +* u32 XDeint_ReadReg(u32 BaseAddress, u32 RegOffset) +* +******************************************************************************/ +#define XDeint_ReadReg(BaseAddress, RegOffset) \ + XDeint_In32((BaseAddress) + (u32)(RegOffset)) + +/*****************************************************************************/ +/** +* +* This macro writes the given register. +* +* @param BaseAddress is the base address of the core. +* @param RegOffset is the register offset to be written. +* @param Data is the 32-bit value to write to the register. +* +* @return None. +* +* @note C-style signature: +* void XDeint_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data) +* +******************************************************************************/ +#define XDeint_WriteReg(BaseAddress, RegOffset, Data) \ + XDeint_Out32((BaseAddress) + (u32)(RegOffset), (Data)) + +/*@}*/ /**************************** Type Definitions *******************************/ -/***************** Macros (Inline Functions) Definitions *********************/ - -/** @name Device register I/O APIs - * @{ - */ - -#define XDeint_In32 Xil_In32 -#define XDeint_Out32 Xil_Out32 - -/*****************************************************************************/ -/** -* -* Read the given register. -* -* @param BaseAddress is the base address of the device -* @param RegOffset is the register offset to be read -* -* @return The 32-bit value of the register -* -* @note -* C-style signature: -* u32 XDeint_ReadReg(u32 BaseAddress, u32 RegOffset) -* -******************************************************************************/ -#define XDeint_ReadReg(BaseAddress, RegOffset) \ - XDeint_In32((BaseAddress) + (RegOffset)) - -/*****************************************************************************/ -/** -* -* Write the given register. -* -* @param BaseAddress is the base address of the device -* @param RegOffset is the register offset to be written -* @param Data is the 32-bit value to write to the register -* -* @return None. -* -* @note -* C-style signature: -* void XDeint_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data) -* -******************************************************************************/ -#define XDeint_WriteReg(BaseAddress, RegOffset, Data) \ - XDeint_Out32((BaseAddress) + (RegOffset), (Data)) - -/*@}*/ - /************************** Function Prototypes ******************************/ + +/************************** Variable Declarations ****************************/ + + #ifdef __cplusplus } + #endif -#endif /* end of protection macro */ +#endif /* End of protection macro */ diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_i.h b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_i.h index e0381317..f3d2dc3c 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_i.h +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_i.h @@ -34,30 +34,47 @@ * * @file xdeint_i.h * -* This code contains internal functions of the Xilinx Video Deinterlacer device -* driver. The application should not need the functions in this code to control -* the Video Deinterlacer device. Read xdeint.h for detailed information about the driver -* +* This code contains internal functions of the Xilinx Video Deinterlacer core. +* The application should not need the functions in this code to control +* the Video Deinterlacer core. Read xdeint.h for detailed information about +* the core. +*
     * Ver   Who  Date     Changes
     * ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +* 1.00a rjh  07/10/11 First release.
    +* 2.00a rjh  18/01/12 Updated for v_deinterlacer 2.00.
    +* 3.2   adk  02/13/14 Added Doxygen support.
     * 
    * ******************************************************************************/ -#ifndef XDeint_I_H /* prevent circular inclusions */ -#define XDeint_I_H /* by using protection macros */ +#ifndef XDEINT_I_H +#define XDEINT_I_H /**< Prevent circular inclusions + * by using protection macros */ #ifdef __cplusplus extern "C" { #endif +/***************************** Include Files *********************************/ + + +/************************** Constant Definitions *****************************/ + /* Base address fetch */ #define XDeint_BaseAddr(InstancePtr) ((InstancePtr)->Config.BaseAddress) +/***************** Macros (Inline Functions) Definitions *********************/ + + +/**************************** Type Definitions *******************************/ + + +/************************** Function Prototypes ******************************/ + + #ifdef __cplusplus } #endif -#endif /* end of protection macro */ +#endif /* End of protection macro */ diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_intr.c b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_intr.c index b5834b29..053e4c78 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_intr.c +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_intr.c @@ -35,27 +35,46 @@ * @file xdeint_intr.c * * This code contains interrupt related functions of Xilinx Video -* Deinterlacer (DEINT) device driver. Please see xdeint.h for -* more details of the driver. +* Deinterlacer (DEINT) core. Please see xdeint.h for more details of the core. * *
     * MODIFICATION HISTORY:
     *
    -* Ver    Who     Date      Changes
    -* ----- ---- -------- -------------------------------------------------------
    -* 1.00a rjh 07/10/11 First release
    -* 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    +* Ver    Who  Date     Changes
    +* ----- ----- -------- -------------------------------------------------------
    +* 1.00a rjh   07/10/11 First release.
    +* 2.00a rjh   18/01/12 Updated for v_deinterlacer 2.00.
    +* 3.2   adk   02/13/14 Adherence to Xilinx coding, Doxygen guidelines.
     * 
    * ******************************************************************************/ +/***************************** Include Files *********************************/ + #include "xdeint.h" #include "xil_assert.h" +/************************** Constant Definitions *****************************/ + + +/***************** Macros (Inline Functions) Definitions *********************/ + + +/**************************** Type Definitions *******************************/ + + +/************************** Function Prototypes ******************************/ + + +/************************** Variable Definitions *****************************/ + + +/************************** Function Definitions *****************************/ + /*****************************************************************************/ /** * -* This function is the interrupt handler for the Deinterlacer +* This function is the interrupt handler for the Deinterlacer core. * * This handler reads the pending interrupt from the IER/ISR, determines the * source of the interrupts, calls according callback, and finally clears the @@ -63,40 +82,38 @@ * * The application is responsible for connecting this function to the interrupt * system. Application beyond this driver is also responsible for providing -* callbacks to handle interrupts and installing the callbacks using -* XDeint_SetCallBack() during initialization phase. An example delivered with -* this driver demonstrates how this could be done. +* callbacks to handle interrupts and installing the callbacks using +* XDeint_SetCallBack() during initialization phase. * -* @param InstancePtr is a pointer to the XDeint instance that just -* interrupted. -* @return None. -* @note The Error interrupt callback invoked in case an error interrupt or -* spurious interrupt happens should reset the DEINT device that just -* interrupted. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return None. +* +* @note The Error interrupt callback invoked in case an error interrupt +* or spurious interrupt happens should reset the Deinterlacer +* core that just interrupted. * ******************************************************************************/ void XDeint_IntrHandler(void *InstancePtr) { - XDeint *XDeintPtr; - u32 PendingIntr; - u32 ErrorStatus; + XDeint *XDeintPtr; + u32 PendingIntr; - /* Validate parameters */ - XDeintPtr = (XDeint *) InstancePtr; - Xil_AssertVoid(XDeintPtr != NULL); - Xil_AssertVoid(XDeintPtr->IsReady == XIL_COMPONENT_IS_READY); + /* Verify arguments. */ + XDeintPtr = (XDeint *)((void *)InstancePtr); + Xil_AssertVoid(XDeintPtr != NULL); + Xil_AssertVoid(XDeintPtr->IsReady == (u32)(XIL_COMPONENT_IS_READY)); - /* Get pending interrupts */ - PendingIntr = XDeint_IntrGetPending(XDeintPtr); + /* Get pending interrupts. */ + PendingIntr = XDeint_IntrGetPending(XDeintPtr); - /* Clear pending interrupt(s) */ - XDeint_IntrClear(XDeintPtr, PendingIntr); + /* A known interrupt has happened. */ + if (PendingIntr == (u32)1) { + XDeintPtr->IntCallBack(PendingIntr); + } - /* A known interrupt has happened */ - if (PendingIntr) - XDeintPtr->IntCallBack(PendingIntr); - - return; + /* Clear pending interrupt(s). */ + XDeint_IntrClear(XDeintPtr, PendingIntr); } /*****************************************************************************/ @@ -104,25 +121,26 @@ void XDeint_IntrHandler(void *InstancePtr) * * This routine installs an asynchronous callback function. * -* @param InstancePtr is a pointer to the XDeint instance to be worked on. -* @param CallbackFunc is the address of the callback function. +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* @param CallBackFunc is the address of the callback function. * * @return -* - XST_SUCCESS when handler is installed. -* - XST_INVALID_PARAM when HandlerType is invalid. +* - XST_SUCCESS when handler is installed. +* - XST_INVALID_PARAM when HandlerType is invalid. * -* @note -* Invoking this function for a handler that already has been installed replaces -* it with the new handler. +* @note Invoking this function for a handler that already has been +* installed replaces it with the new handler. * ******************************************************************************/ -int XDeint_SetCallBack(XDeint *InstancePtr,void *CallBackFunc) +int XDeint_SetCallBack(XDeint *InstancePtr, void *CallBackFunc) { - Xil_AssertNonvoid(InstancePtr != NULL); - Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - Xil_AssertNonvoid(CallBackFunc != NULL); + /* Verify arguments. */ + Xil_AssertNonvoid(InstancePtr != NULL); + Xil_AssertNonvoid(InstancePtr->IsReady == + (u32)(XIL_COMPONENT_IS_READY)); + Xil_AssertNonvoid(CallBackFunc != NULL); - InstancePtr->IntCallBack = (XDeint_CallBack) CallBackFunc; + InstancePtr->IntCallBack = (XDeint_CallBack)((void *)CallBackFunc); - return XST_SUCCESS; + return (XST_SUCCESS); } diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_selftest.c b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_selftest.c new file mode 100755 index 00000000..4559e12a --- /dev/null +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_selftest.c @@ -0,0 +1,105 @@ +/****************************************************************************** +* +* Copyright (C) 2014 Xilinx, Inc. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* Use of the Software is limited solely to applications: +* (a) running on a Xilinx device, or +* (b) that interact with a Xilinx device through a bus or interconnect. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +* SOFTWARE. +* +* Except as contained in this notice, the name of the Xilinx shall not be used +* in advertising or otherwise to promote the sale, use or other dealings in +* this Software without prior written authorization from Xilinx. +* +******************************************************************************/ +/*****************************************************************************/ +/** +* +* @file xdeint_selftest.c +* +* This file contains the self-test functions for the XCfa driver. +* +*
    +* MODIFICATION HISTORY:
    +*
    +* Ver   Who  Date     Changes
    +* ----- ---- -------- ----------------------------------------------
    +* 3.2   adk  02/13/14 First Release.
    +*                     Added the XDeint_Selftest function.
    +* 
    +* +******************************************************************************/ + +/***************************** Include Files *********************************/ + +#include "xdeint.h" +#include "xstatus.h" + +/************************** Constant Definitions *****************************/ + + +/***************** Macros (Inline Functions) Definitions *********************/ + + +/**************************** Type Definitions *******************************/ + + +/************************** Function Prototypes ******************************/ + + +/************************** Variable Definitions *****************************/ + + +/************************** Function Definitions *****************************/ + +/*****************************************************************************/ +/** +* +* This function reads Version register of Deinterlacer core and compares +* with zero as part of self test. +* +* @param InstancePtr is a pointer to XDeint instance to be worked on. +* +* @return +* - XST_SUCCESS if the test was successful. +* - XST_FAILURE if the test failed. +* +******************************************************************************/ +int XDeint_Selftest(XDeint *InstancePtr) +{ + u32 Version; + int Status; + + /* Verify arguments. */ + Xil_AssertNonvoid(InstancePtr != NULL); + + Version = XDeint_ReadReg((InstancePtr)->Config.BaseAddress, + (XDEINT_VER_OFFSET)); + + /* Compare Version with zero */ + if (Version != (u32)0x0) { + Status = (XST_SUCCESS); + } + else { + Status = (XST_FAILURE); + } + + return Status; +} diff --git a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_sinit.c b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_sinit.c index bf36b9de..b293fa11 100755 --- a/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_sinit.c +++ b/XilinxProcessorIPLib/drivers/deinterlacer/src/xdeint_sinit.c @@ -31,66 +31,81 @@ ******************************************************************************/ /*****************************************************************************/ /** - * - * @file xdeint_sinit.c - * - * This file contains static initialization methods for Xilinx Video - * Deinterlacer (DEINT) device driver. - * - *
    - * MODIFICATION HISTORY:
    - *
    - * Ver   Who  Date     Changes
    - * ----- ---- -------- -------------------------------------------------------
    - * 1.00a rjh 07/10/11 First release
    - * 2.00a rjh 18/01/12 Updated for v_deinterlacer 2.00
    - * 
    - * - ******************************************************************************/ +* +* @file xdeint_sinit.c +* +* This file contains static initialization methods for Xilinx Video +* Deinterlacer (DEINT) core driver. +* +*
    +* MODIFICATION HISTORY:
    +*
    +* Ver   Who   Date     Changes
    +* ----- ----- -------- ------------------------------------------------------
    +* 1.00a rjh   07/10/11 First release.
    +* 2.00a rjh   18/01/12 Updated for v_deinterlacer 2.00.
    +* 3.2   adk   02/13/14 Added Doxygen support, adherence to Xilinx
    +*                      coding standards.
    +* 
    +* +******************************************************************************/ /***************************** Include Files *********************************/ -#include "xparameters.h" #include "xdeint.h" +#include "xparameters.h" /************************** Constant Definitions *****************************/ -/**************************** Type Definitions *******************************/ - - /***************** Macros (Inline Functions) Definitions *********************/ +/**************************** Type Definitions *******************************/ + + /************************** Function Prototypes ******************************/ + +/************************** Variable Definitions *****************************/ + + +/************************** Function Definitions *****************************/ + /*****************************************************************************/ /** - * XDeint_LookupConfig returns a reference to an XDeint_Config structure - * based on the unique device id, DeviceId. The return value will refer - * to an entry in the device configuration table defined in the xdeint_g.c - * file. - * - * @param DeviceId is the unique device ID of the device for the lookup - * operation. - * - * @return XDeint_LookupConfig returns a reference to a config record in the - * configuration table (in xDEINT_g.c) corresponding to DeviceId, - * or NULL if no match is found. - * - ******************************************************************************/ +* +* This function returns a reference to an XDeint_Config structure +* based on the unique device id, DeviceId. The return value will refer +* to an entry in the device configuration table defined in the xdeint_g.c +* file. +* +* @param DeviceId is the unique device ID of the device for the lookup +* operation. +* +* @return XDeint_LookupConfig returns a reference to a config record +* in the configuration table (in xDEINT_g.c) corresponding to +* DeviceId or NULL if no match is found. +* +* @note None. +* +******************************************************************************/ XDeint_Config *XDeint_LookupConfig(u16 DeviceId) { - extern XDeint_Config XDeint_ConfigTable[]; + extern XDeint_Config XDeint_ConfigTable[XPAR_XDEINT_NUM_INSTANCES]; XDeint_Config *CfgPtr = NULL; - int i; + u32 Index; - for (i = 0; i < XPAR_XDEINT_NUM_INSTANCES; i++) { - if (XDeint_ConfigTable[i].DeviceId == DeviceId) { - CfgPtr = &XDeint_ConfigTable[i]; + /* To get the reference pointer to XDeint_Config structure */ + for (Index = (u32)0x0; Index < (u32)(XPAR_XDEINT_NUM_INSTANCES); + Index++) { + + /* Compare device Id with configTable's device Id */ + if (XDeint_ConfigTable[Index].DeviceId == DeviceId) { + CfgPtr = &XDeint_ConfigTable[Index]; break; } } - return (CfgPtr); + return (XDeint_Config *)(CfgPtr); }