Video library for GR-PEACH

Dependents:   Trace_Program2 GR-PEACH_Camera_in_barcode GR-PEACH_LCD_sample GR-PEACH_LCD_4_3inch_sample ... more

Embed: (wiki syntax)

« Back to documentation index

r_vdc5.c File Reference

r_vdc5.c File Reference

VDC5 driver API function. More...

Go to the source code of this file.

Functions

static vdc5_scaling_type_t ConvertRwProcId2SclId (const vdc5_layer_id_t layer_id)
 Convert read/write process ID into scaling type ID.
static vdc5_graphics_type_t ConvertRwProcId2GrId (const vdc5_layer_id_t layer_id)
 Convert read/write process ID into graphics type ID.
vdc5_error_t R_VDC5_Initialize (const vdc5_channel_t ch, const vdc5_init_t *const param, void(*const init_func)(uint32_t), const uint32_t user_num)
 VDC5 driver initialization.
vdc5_error_t R_VDC5_Terminate (const vdc5_channel_t ch, void(*const quit_func)(uint32_t), const uint32_t user_num)
 VDC5 driver termination.
vdc5_error_t R_VDC5_VideoInput (const vdc5_channel_t ch, const vdc5_input_t *const param)
 Video input setup.
vdc5_error_t R_VDC5_SyncControl (const vdc5_channel_t ch, const vdc5_sync_ctrl_t *const param)
 Sync control setup.
vdc5_error_t R_VDC5_DisplayOutput (const vdc5_channel_t ch, const vdc5_output_t *const param)
 Display output setup.
vdc5_error_t R_VDC5_CallbackISR (const vdc5_channel_t ch, const vdc5_int_t *const param)
 Interrupt callback setup.
vdc5_error_t R_VDC5_WriteDataControl (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_write_t *const param)
 Data write control processing.
vdc5_error_t R_VDC5_ChangeWriteProcess (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_write_chg_t *const param)
 Data write change processing.
vdc5_error_t R_VDC5_ReadDataControl (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_read_t *const param)
 Data read control processing.
vdc5_error_t R_VDC5_ChangeReadProcess (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_read_chg_t *const param)
 Data read change processing.
vdc5_error_t R_VDC5_StartProcess (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_start_t *const param)
 Data write/read start processing.
vdc5_error_t R_VDC5_StopProcess (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id)
 Data write/read stop processing.
vdc5_error_t R_VDC5_ReleaseDataControl (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id)
 Data write/read control release processing.
vdc5_error_t R_VDC5_VideoNoiseReduction (const vdc5_channel_t ch, const vdc5_onoff_t nr1d_on, const vdc5_noise_reduction_t *const param)
 Noise reduction setup.
vdc5_error_t R_VDC5_ImageColorMatrix (const vdc5_channel_t ch, const vdc5_color_matrix_t *const param)
 Color matrix setup.
vdc5_error_t R_VDC5_ImageEnhancement (const vdc5_channel_t ch, const vdc5_imgimprv_id_t imgimprv_id, const vdc5_onoff_t shp_h_on, const vdc5_enhance_sharp_t *const sharp_param, const vdc5_onoff_t lti_h_on, const vdc5_enhance_lti_t *const lti_param, const vdc5_period_rect_t *const enh_area)
 Image enhancement processing.
vdc5_error_t R_VDC5_ImageBlackStretch (const vdc5_channel_t ch, const vdc5_imgimprv_id_t imgimprv_id, const vdc5_onoff_t bkstr_on, const vdc5_black_t *const param)
 Black stretch setup.
vdc5_error_t R_VDC5_AlphaBlending (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_alpha_blending_t *const param)
 Alpha blending setup.
vdc5_error_t R_VDC5_AlphaBlendingRect (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_onoff_t gr_arc_on, const vdc5_alpha_blending_rect_t *const param)
 Rectangle alpha blending setup.
vdc5_error_t R_VDC5_Chromakey (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_onoff_t gr_ck_on, const vdc5_chromakey_t *const param)
 Chroma-key setup.
vdc5_error_t R_VDC5_CLUT (const vdc5_channel_t ch, const vdc5_layer_id_t layer_id, const vdc5_clut_t *const param)
 CLUT setup.
vdc5_error_t R_VDC5_DisplayCalibration (const vdc5_channel_t ch, const vdc5_disp_calibration_t *const param)
 Display calibration processing.
vdc5_error_t R_VDC5_GammaCorrection (const vdc5_channel_t ch, const vdc5_onoff_t gam_on, const vdc5_gamma_correction_t *const param)
 Gamma correction setup.

Detailed Description

VDC5 driver API function.

Version:
1.00
Rev:
199
Date:
2014-05-23 16:33:52 +0900#

Definition in file r_vdc5.c.


Function Documentation

static vdc5_graphics_type_t ConvertRwProcId2GrId ( const vdc5_layer_id_t  layer_id ) [static]

Convert read/write process ID into graphics type ID.

Parameters:
[in]layer_id: Layer ID
Return values:
Graphicstype ID

Definition at line 1195 of file r_vdc5.c.

static vdc5_scaling_type_t ConvertRwProcId2SclId ( const vdc5_layer_id_t  layer_id ) [static]

Convert read/write process ID into scaling type ID.

Parameters:
[in]layer_id: Layer ID
Return values:
Scalingtype ID

Definition at line 1168 of file r_vdc5.c.

vdc5_error_t R_VDC5_AlphaBlending ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_alpha_blending_t *const   param 
)

Alpha blending setup.

Description:
This function performs the following processing:

  • Sets up the alpha value of the ARGB1555/RGBA5551 formats.
  • Make settings for premultiplication processing at alpha blending in one-pixel.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_1_RD
    • VDC5_LAYER_ID_2_RD
    • VDC5_LAYER_ID_3_RD
    [in]param: Alpha blending setup parameter
    Return values:
    Errorcode

Definition at line 891 of file r_vdc5.c.

vdc5_error_t R_VDC5_AlphaBlendingRect ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_onoff_t  gr_arc_on,
const vdc5_alpha_blending_rect_t *const   param 
)

Rectangle alpha blending setup.

Description:
This function performs the following processing:

  • Turns on and off alpha blending in a rectangular area.
  • Sets up the rectangular area subjected to alpha blending.
  • Sets up the alpha value for alpha blending in a rectangular area.
  • Makes fade-in/-out settings to be applied to rectangle alpha blending.
  • Allocates graphics 0 and 1 to the lower-layer/current graphics in the VIN synthesizer.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_1_RD
    • VDC5_LAYER_ID_2_RD
    • VDC5_LAYER_ID_3_RD
    • VDC5_LAYER_ID_VIN_RD
    [in]gr_arc_on: ON/OFF setting for alpha blending in a rectangular area
    [in]param: Setup parameter for alpha blending in a rectangular area
    Return values:
    Errorcode

Definition at line 941 of file r_vdc5.c.

vdc5_error_t R_VDC5_CallbackISR ( const vdc5_channel_t  ch,
const vdc5_int_t *const   param 
)

Interrupt callback setup.

Description:
This function performs the following processing:

  • Enables the interrupt when the pointer to the corresponding interrupt callback function is specified.
  • Registers the specified interrupt callback function.
  • Disables the interrupt when the pointer to the corresponding interrupt callback function is not specified.
    Parameters:
    [in]ch: Channel
    [in]param: Interrupt callback setup parameter
    Return values:
    Errorcode

Definition at line 310 of file r_vdc5.c.

vdc5_error_t R_VDC5_ChangeReadProcess ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_read_chg_t *const   param 
)

Data read change processing.

Description:
This function performs the following processing:

  • Changes the frame buffer base address.
  • Changes the frame buffer read size (image scale-up control) (layers 0 and 1 only).
  • Changes the display area for graphics images.
  • Changes the graphics display mode.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_0_RD
    • VDC5_LAYER_ID_1_RD
    • VDC5_LAYER_ID_2_RD
    • VDC5_LAYER_ID_3_RD
    • VDC5_LAYER_ID_OIR_RD
    [in]param: Data read change parameter
    Return values:
    Errorcode

Definition at line 522 of file r_vdc5.c.

vdc5_error_t R_VDC5_ChangeWriteProcess ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_write_chg_t *const   param 
)

Data write change processing.

Description:
This function performs the following processing:

  • Changes the input image area to be captured.
  • Makes changes with respect to scaling-down/rotation control of the input image (layers 0 and 1 only).
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_0_WR
    • VDC5_LAYER_ID_1_WR
    • VDC5_LAYER_ID_OIR_WR
    [in]param: Data write change parameter
    Return values:
    Errorcode

Definition at line 419 of file r_vdc5.c.

vdc5_error_t R_VDC5_Chromakey ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_onoff_t  gr_ck_on,
const vdc5_chromakey_t *const   param 
)

Chroma-key setup.

Description:
This function performs the following processing:

  • Turns on and off the chroma-key processing.
  • Sets up the color signals to be subject to chroma-key processing and the color signals after replacement.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_0_RD
    • VDC5_LAYER_ID_1_RD
    • VDC5_LAYER_ID_2_RD
    • VDC5_LAYER_ID_3_RD
    • VDC5_LAYER_ID_OIR_RD
    [in]gr_ck_on: Chroma-key ON/OFF setting
    [in]param: Chroma-key setup parameter
    Return values:
    Errorcode

Definition at line 1002 of file r_vdc5.c.

vdc5_error_t R_VDC5_CLUT ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_clut_t *const   param 
)

CLUT setup.

Description:
This function sets up CLUT for the specified layer.

Parameters:
[in]ch: Channel
[in]layer_id: Layer ID

  • VDC5_LAYER_ID_0_RD
  • VDC5_LAYER_ID_1_RD
  • VDC5_LAYER_ID_2_RD
  • VDC5_LAYER_ID_3_RD
  • VDC5_LAYER_ID_OIR_RD
[in]param: CLUT setup parameter
Return values:
Errorcode

Definition at line 1057 of file r_vdc5.c.

vdc5_error_t R_VDC5_DisplayCalibration ( const vdc5_channel_t  ch,
const vdc5_disp_calibration_t *const   param 
)

Display calibration processing.

Description:
This function performs the following processing:

  • Sets up panel brightness adjustment.
  • Sets up contrast adjustment.
  • Sets up panel dithering.
  • Makes control settings for the correction circuit sequence.
    Parameters:
    [in]ch: Channel
    [in]param: Display calibration parameter
    Return values:
    Errorcode

Definition at line 1097 of file r_vdc5.c.

vdc5_error_t R_VDC5_DisplayOutput ( const vdc5_channel_t  ch,
const vdc5_output_t *const   param 
)

Display output setup.

Description:
This function performs the following processing:

  • Sets up the timing signals for driving the LCD panel.
  • Sets up the phase, data sequence, and format of the LCD panel output data.
  • Sets up the background color.
    Parameters:
    [in]ch: Channel
    [in]param: Display output configuration parameter
    Return values:
    Errorcode

Definition at line 265 of file r_vdc5.c.

vdc5_error_t R_VDC5_GammaCorrection ( const vdc5_channel_t  ch,
const vdc5_onoff_t  gam_on,
const vdc5_gamma_correction_t *const   param 
)

Gamma correction setup.

Description:
This function performs the following processing:

  • Turns on and off gamma correction processing.
  • Sets up the gamma correction gain adjustment values for the G/B/R signals.
  • Sets up the gamma correction start threshold values for the G/B/R signals.
    Parameters:
    [in]ch: Channel
    [in]gam_on: Gamma correction ON/OFF setting
    [in]param: Gamma correction setup parameter
    Return values:
    Errorcode

Definition at line 1133 of file r_vdc5.c.

vdc5_error_t R_VDC5_ImageBlackStretch ( const vdc5_channel_t  ch,
const vdc5_imgimprv_id_t  imgimprv_id,
const vdc5_onoff_t  bkstr_on,
const vdc5_black_t *const   param 
)

Black stretch setup.

Description:
This function performs the following processing:

  • Turns on and off black stretch processing.
  • Sets up the black stretch parameters.
    Parameters:
    [in]ch: Channel
    [in]imgimprv_id: Image quality improver ID
    [in]bkstr_on: Black stretch ON/OFF setting
    [in]param: Black stretch setup parameter
    Return values:
    Errorcode

Definition at line 836 of file r_vdc5.c.

vdc5_error_t R_VDC5_ImageColorMatrix ( const vdc5_channel_t  ch,
const vdc5_color_matrix_t *const   param 
)

Color matrix setup.

Description:
This function sets up the specified color matrix.

Parameters:
[in]ch: Channel
[in]param: Color matrix setup parameter
Return values:
Errorcode

Definition at line 726 of file r_vdc5.c.

vdc5_error_t R_VDC5_ImageEnhancement ( const vdc5_channel_t  ch,
const vdc5_imgimprv_id_t  imgimprv_id,
const vdc5_onoff_t  shp_h_on,
const vdc5_enhance_sharp_t *const   sharp_param,
const vdc5_onoff_t  lti_h_on,
const vdc5_enhance_lti_t *const   lti_param,
const vdc5_period_rect_t *const   enh_area 
)

Image enhancement processing.

Description:
This function performs the following processing:

  • Turns on and off sharpness processing.
  • Sets up the sharpness parameter.
  • Turns on and off LTI processing.
  • Sets up the LTI parameter.
  • Sets up the enhancer-enabled area to be subjected to sharpness and LTI processing.
    Parameters:
    [in]ch: Channel
    [in]imgimprv_id: Image quality improver ID
    [in]shp_h_on: Sharpness ON/OFF setting
    [in]sharp_param: Sharpness setup parameter
    [in]lti_h_on: LTI ON/OFF setting
    [in]lti_param: LTI setup parameter
    [in]enh_area: Enhancer-enabled area setup parameter
    Return values:
    Errorcode

Definition at line 780 of file r_vdc5.c.

vdc5_error_t R_VDC5_Initialize ( const vdc5_channel_t  ch,
const vdc5_init_t *const   param,
void(*)(uint32_t)  init_func,
const uint32_t  user_num 
)

VDC5 driver initialization.

Description:
This function performs the following processing:

  • Initializes the VDC5 driver's internal variables.
  • Calls the user-defined function specified in init_func.
  • Sets up and enables the VDC5's panel clock.
  • Sets up and enables the LVDS only if LVDS is used.
  • Disables all the VDC5 interrupts.
    Parameters:
    [in]ch: Channel
    [in]param: Initialization parameter
    [in]init_func: Pointer to a user-defined function
    [in]user_num: User defined number
    Return values:
    Errorcode

Definition at line 72 of file r_vdc5.c.

vdc5_error_t R_VDC5_ReadDataControl ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_read_t *const   param 
)

Data read control processing.

Description:
This function performs the following processing:

  • Sets up the display area for graphics images.
  • Makes image scale-up control settings (layers 0 and 1 only).
  • Makes frame buffer read control settings.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_0_RD
    • VDC5_LAYER_ID_1_RD
    • VDC5_LAYER_ID_2_RD
    • VDC5_LAYER_ID_3_RD
    • VDC5_LAYER_ID_OIR_RD
    [in]param: Data read control parameter
    Return values:
    Errorcode

Definition at line 469 of file r_vdc5.c.

vdc5_error_t R_VDC5_ReleaseDataControl ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id 
)

Data write/read control release processing.

Description:
This function performs the following processing:

  • Disables the specified layer.
  • Initializes the cascaded connection settings (layer 1 read processing only).
  • Initializes the VIN synthesizer settings (layer 0 and 1 read processing only).
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID
    Return values:
    Errorcode

Definition at line 651 of file r_vdc5.c.

vdc5_error_t R_VDC5_StartProcess ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_start_t *const   param 
)

Data write/read start processing.

Description:
This function performs layer start processing. If the layer ID specified in layer_id is VDC5_LAYER_ID_ALL, the function starts all the layers that are in the stopped state and also enabled. If the layer ID is not VDC5_LAYER_ID_ALL, the function starts only the specified layer.
When performing start processing for write, the function starts a write to the frame buffer. When performing start processing for read, the function starts a read from the frame buffer and sets the graphics display mode to the specified values for each layer.

Parameters:
[in]ch: Channel
[in]layer_id: Layer ID
[in]param: Data write/read start parameter
Return values:
Errorcode

Definition at line 570 of file r_vdc5.c.

vdc5_error_t R_VDC5_StopProcess ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id 
)

Data write/read stop processing.

Description:
This function performs layer stop processing. If the layer ID specified in layer_id is VDC5_LAYER_ID_ALL, the function stops all the layers that are enabled and running. If the layer ID is not VDC5_LAYER_ID_ALL, the function stops only the specified layer.
When performing stop processing for write, the function stops the write to the frame buffer. When performing stop processing for read, the function stops the read from the frame buffer and resets the graphics display mode to the initial values for each of the layers.

Parameters:
[in]ch: Channel
[in]layer_id: Layer ID
Return values:
Errorcode

Definition at line 613 of file r_vdc5.c.

vdc5_error_t R_VDC5_SyncControl ( const vdc5_channel_t  ch,
const vdc5_sync_ctrl_t *const   param 
)

Sync control setup.

Description:
This function performs the following processing:

  • Selects the vertical sync signal.
  • Sets up the period of the sync signal.
  • Sets up the delay of the vertical sync signal.
  • Sets up the full-screen enable signal.
  • Sets up the compensation for the vertical sync signal.
    Parameters:
    [in]ch: Channel
    [in]param: Sync control parameter
    Return values:
    Errorcode

Definition at line 209 of file r_vdc5.c.

vdc5_error_t R_VDC5_Terminate ( const vdc5_channel_t  ch,
void(*)(uint32_t)  quit_func,
const uint32_t  user_num 
)

VDC5 driver termination.

Description:
This function performs the following processing:

  • Disables all the VDC5 interrupts.
  • Disables the VDC5 panel clock.
  • Disables the LVDS if one is used and becomes unnecessary as the result of calling this function.
  • Calls the user-defined function specified in quit_func.
    Parameters:
    [in]ch: Channel
    [in]quit_func: Pointer to a user-defined function
    [in]user_num: User defined number
    Return values:
    Errorcode

Definition at line 131 of file r_vdc5.c.

vdc5_error_t R_VDC5_VideoInput ( const vdc5_channel_t  ch,
const vdc5_input_t *const   param 
)

Video input setup.

Description:
This function performs the following processing:

  • Selects the video input.
  • Sets up the phase timing of the input signals.
  • Performs delay control on the sync signal for the video inputs.
  • Sets up the parameters for the external input video signals only when they are used.
    Parameters:
    [in]ch: Channel
    [in]param: Video input setup parameter
    Return values:
    Errorcode

Definition at line 176 of file r_vdc5.c.

vdc5_error_t R_VDC5_VideoNoiseReduction ( const vdc5_channel_t  ch,
const vdc5_onoff_t  nr1d_on,
const vdc5_noise_reduction_t *const   param 
)

Noise reduction setup.

Description:
This function performs the following processing:

  • Turns on and off noise reduction processing.
  • Sets up the noise reduction parameters for the Y/G, Cb/B, and Cr/R signals.
    Parameters:
    [in]ch: Channel
    [in]nr1d_on: Noise reduction ON/OFF setting
    [in]param: Noise reduction setup parameter
    Return values:
    Errorcode

Definition at line 691 of file r_vdc5.c.

vdc5_error_t R_VDC5_WriteDataControl ( const vdc5_channel_t  ch,
const vdc5_layer_id_t  layer_id,
const vdc5_write_t *const   param 
)

Data write control processing.

Description:
This function performs the following processing:

  • Sets up the input image area to be captured.
  • Makes input image scale-down/rotation control settings (layers 0 and 1 only).
  • Makes frame buffer write control settings.
    Parameters:
    [in]ch: Channel
    [in]layer_id: Layer ID

    • VDC5_LAYER_ID_0_WR
    • VDC5_LAYER_ID_1_WR
    • VDC5_LAYER_ID_OIR_WR
    [in]param: Data write control parameter
    Return values:
    Errorcode

Definition at line 354 of file r_vdc5.c.