RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerator | Variables
Pxp_driver

Data Structures

struct  _pxp_output_buffer_config
 PXP output buffer configuration. More...
 
struct  _pxp_ps_buffer_config
 PXP process surface buffer configuration. More...
 
struct  _pxp_as_buffer_config
 PXP alphs surface buffer configuration. More...
 
struct  _pxp_as_blend_config
 PXP alpha surface blending configuration. More...
 
struct  _pxp_csc2_config
 PXP CSC2 configuration. More...
 
struct  _pxp_lut_config
 PXP LUT configuration. More...
 
struct  _pxp_dither_final_lut_data
 PXP dither final LUT data. More...
 
struct  _pxp_dither_config
 PXP dither configuration. More...
 
struct  pxp_porter_duff_config_t
 PXP Porter Duff configuration. More...
 
struct  _pxp_pic_copy_config
 PXP Porter Duff blend mode. Note: don't change the enum item value. More...
 

Macros

#define PXP_LUT_TABLE_BYTE   (16UL * 1024UL)
 
#define PXP_INTERNAL_RAM_LUT_BYTE   (256)
 

Variables

pxp_output_pixel_format_t _pxp_output_buffer_config::pixelFormat
 
pxp_interlaced_output_mode_t _pxp_output_buffer_config::interlacedMode
 
uint32_t _pxp_output_buffer_config::buffer0Addr
 
uint32_t _pxp_output_buffer_config::buffer1Addr
 
uint16_t _pxp_output_buffer_config::pitchBytes
 
uint16_t _pxp_output_buffer_config::width
 
uint16_t _pxp_output_buffer_config::height
 
pxp_ps_pixel_format_t _pxp_ps_buffer_config::pixelFormat
 
bool _pxp_ps_buffer_config::swapByte
 
uint32_t _pxp_ps_buffer_config::bufferAddr
 
uint32_t _pxp_ps_buffer_config::bufferAddrU
 
uint32_t _pxp_ps_buffer_config::bufferAddrV
 
uint16_t _pxp_ps_buffer_config::pitchBytes
 
pxp_as_pixel_format_t _pxp_as_buffer_config::pixelFormat
 
uint32_t _pxp_as_buffer_config::bufferAddr
 
uint16_t _pxp_as_buffer_config::pitchBytes
 
uint8_t _pxp_as_blend_config::alpha
 
bool _pxp_as_blend_config::invertAlpha
 
pxp_alpha_mode_t _pxp_as_blend_config::alphaMode
 
pxp_rop_mode_t _pxp_as_blend_config::ropMode
 
pxp_csc2_mode_t _pxp_csc2_config::mode
 
float _pxp_csc2_config::A1
 
float _pxp_csc2_config::A2
 
float _pxp_csc2_config::A3
 
float _pxp_csc2_config::B1
 
float _pxp_csc2_config::B2
 
float _pxp_csc2_config::B3
 
float _pxp_csc2_config::C1
 
float _pxp_csc2_config::C2
 
float _pxp_csc2_config::C3
 
int16_t _pxp_csc2_config::D1
 
int16_t _pxp_csc2_config::D2
 
int16_t _pxp_csc2_config::D3
 
pxp_lut_lookup_mode_t _pxp_lut_config::lookupMode
 
pxp_lut_out_mode_t _pxp_lut_config::outMode
 
uint32_t _pxp_lut_config::cfaValue
 
uint32_t _pxp_dither_final_lut_data::data_3_0
 
uint32_t _pxp_dither_final_lut_data::data_7_4
 
uint32_t _pxp_dither_final_lut_data::data_11_8
 
uint32_t _pxp_dither_final_lut_data::data_15_12
 
uint32_t _pxp_dither_config::enableDither0: 1
 
uint32_t _pxp_dither_config::enableDither1: 1
 
uint32_t _pxp_dither_config::enableDither2: 1
 
uint32_t _pxp_dither_config::ditherMode0: 3
 
uint32_t _pxp_dither_config::ditherMode1: 3
 
uint32_t _pxp_dither_config::ditherMode2: 3
 
uint32_t _pxp_dither_config::quantBitNum: 3
 
uint32_t _pxp_dither_config::lutMode: 2
 
uint32_t _pxp_dither_config::idxMatrixSize0: 2
 
uint32_t _pxp_dither_config::idxMatrixSize1: 2
 
uint32_t _pxp_dither_config::idxMatrixSize2: 2
 
uint32_t _pxp_dither_config::enableFinalLut: 1
 
uint32_t _pxp_dither_config::__pad0__: 8
 
uint32_t pxp_porter_duff_config_t::enable: 1
 
uint32_t pxp_porter_duff_config_t::srcFactorMode: 2
 
uint32_t pxp_porter_duff_config_t::dstGlobalAlphaMode: 2
 
uint32_t pxp_porter_duff_config_t::dstAlphaMode: 1
 
uint32_t pxp_porter_duff_config_t::dstColorMode: 1
 
uint32_t pxp_porter_duff_config_t::__pad0__: 1
 
uint32_t pxp_porter_duff_config_t::dstFactorMode: 2
 
uint32_t pxp_porter_duff_config_t::srcGlobalAlphaMode: 2
 
uint32_t pxp_porter_duff_config_t::srcAlphaMode: 1
 
uint32_t pxp_porter_duff_config_t::srcColorMode: 1
 
uint32_t pxp_porter_duff_config_t::__pad1__: 2
 
uint32_t pxp_porter_duff_config_t::dstGlobalAlpha: 8
 
uint32_t pxp_porter_duff_config_t::srcGlobalAlpha: 8
 
uint32_t _pxp_pic_copy_config::srcPicBaseAddr
 
uint16_t _pxp_pic_copy_config::srcPitchBytes
 
uint16_t _pxp_pic_copy_config::srcOffsetX
 
uint16_t _pxp_pic_copy_config::srcOffsetY
 
uint32_t _pxp_pic_copy_config::destPicBaseAddr
 
uint16_t _pxp_pic_copy_config::destPitchBytes
 
uint16_t _pxp_pic_copy_config::destOffsetX
 
uint16_t _pxp_pic_copy_config::destOffsetY
 
uint16_t _pxp_pic_copy_config::width
 
uint16_t _pxp_pic_copy_config::height
 
pxp_as_pixel_format_t _pxp_pic_copy_config::pixelFormat
 

Driver version

enum  _pxp_interrupt_enable { kPXP_CompleteInterruptEnable = PXP_CTRL_IRQ_ENABLE_MASK , kPXP_CommandLoadInterruptEnable = PXP_CTRL_NEXT_IRQ_ENABLE_MASK , kPXP_LutDmaLoadInterruptEnable }
 PXP interrupts to enable. More...
 
enum  _pxp_flags {
  kPXP_CompleteFlag = PXP_STAT_IRQ0_MASK , kPXP_Axi0WriteErrorFlag = PXP_STAT_AXI_WRITE_ERROR_0_MASK , kPXP_Axi0ReadErrorFlag = PXP_STAT_AXI_READ_ERROR_0_MASK , kPXP_CommandLoadFlag = PXP_STAT_NEXT_IRQ_MASK ,
  kPXP_LutDmaLoadFlag = PXP_STAT_LUT_DMA_LOAD_DONE_IRQ_MASK
}
 PXP status flags. More...
 
enum  _pxp_flip_mode { kPXP_FlipDisable = 0U , kPXP_FlipHorizontal = 0x01U , kPXP_FlipVertical = 0x02U , kPXP_FlipBoth = 0x03U }
 PXP output flip mode. More...
 
enum  _pxp_rotate_position { kPXP_RotateOutputBuffer = 0U , kPXP_RotateProcessSurface }
 PXP rotate mode. More...
 
enum  _pxp_rotate_degree { kPXP_Rotate0 = 0U , kPXP_Rotate90 , kPXP_Rotate180 , kPXP_Rotate270 }
 PXP rotate degree. More...
 
enum  _pxp_interlaced_output_mode { kPXP_OutputProgressive = 0U , kPXP_OutputField0 , kPXP_OutputField1 , kPXP_OutputInterlaced }
 PXP interlaced output mode. More...
 
enum  _pxp_output_pixel_format {
  kPXP_OutputPixelFormatARGB8888 = 0x0 , kPXP_OutputPixelFormatRGB888 = 0x4 , kPXP_OutputPixelFormatRGB888P = 0x5 , kPXP_OutputPixelFormatARGB1555 = 0x8 ,
  kPXP_OutputPixelFormatARGB4444 = 0x9 , kPXP_OutputPixelFormatRGB555 = 0xC , kPXP_OutputPixelFormatRGB444 = 0xD , kPXP_OutputPixelFormatRGB565 = 0xE ,
  kPXP_OutputPixelFormatYUV1P444 = 0x10 , kPXP_OutputPixelFormatUYVY1P422 = 0x12 , kPXP_OutputPixelFormatVYUY1P422 = 0x13 , kPXP_OutputPixelFormatY8 = 0x14 ,
  kPXP_OutputPixelFormatY4 = 0x15 , kPXP_OutputPixelFormatYUV2P422 = 0x18 , kPXP_OutputPixelFormatYUV2P420 = 0x19 , kPXP_OutputPixelFormatYVU2P422 = 0x1A ,
  kPXP_OutputPixelFormatYVU2P420 = 0x1B
}
 PXP output buffer format. More...
 
enum  _pxp_ps_pixel_format {
  kPXP_PsPixelFormatRGB888 = 0x4 , kPXP_PsPixelFormatRGB555 = 0xC , kPXP_PsPixelFormatRGB444 = 0xD , kPXP_PsPixelFormatRGB565 = 0xE ,
  kPXP_PsPixelFormatYUV1P444 = 0x10 , kPXP_PsPixelFormatUYVY1P422 = 0x12 , kPXP_PsPixelFormatVYUY1P422 = 0x13 , kPXP_PsPixelFormatY8 = 0x14 ,
  kPXP_PsPixelFormatY4 = 0x15 , kPXP_PsPixelFormatYUV2P422 = 0x18 , kPXP_PsPixelFormatYUV2P420 = 0x19 , kPXP_PsPixelFormatYVU2P422 = 0x1A ,
  kPXP_PsPixelFormatYVU2P420 = 0x1B , kPXP_PsPixelFormatYVU422 = 0x1E , kPXP_PsPixelFormatYVU420 = 0x1F
}
 PXP process surface buffer pixel format. More...
 
enum  _pxp_ps_yuv_format { kPXP_PsYUVFormatYUV = 0U , kPXP_PsYUVFormatYCbCr }
 PXP process surface buffer YUV format. More...
 
enum  _pxp_as_pixel_format {
  kPXP_AsPixelFormatARGB8888 = 0x0 , kPXP_AsPixelFormatRGB888 = 0x4 , kPXP_AsPixelFormatARGB1555 = 0x8 , kPXP_AsPixelFormatARGB4444 = 0x9 ,
  kPXP_AsPixelFormatRGB555 = 0xC , kPXP_AsPixelFormatRGB444 = 0xD , kPXP_AsPixelFormatRGB565 = 0xE
}
 PXP alpha surface buffer pixel format. More...
 
enum  _pxp_alpha_mode { kPXP_AlphaEmbedded , kPXP_AlphaOverride , kPXP_AlphaMultiply , kPXP_AlphaRop }
 PXP alpha mode during blending. More...
 
enum  _pxp_rop_mode {
  kPXP_RopMaskAs = 0x0 , kPXP_RopMaskNotAs = 0x1 , kPXP_RopMaskAsNot = 0x2 , kPXP_RopMergeAs = 0x3 ,
  kPXP_RopMergeNotAs = 0x4 , kPXP_RopMergeAsNot = 0x5 , kPXP_RopNotCopyAs = 0x6 , kPXP_RopNot = 0x7 ,
  kPXP_RopNotMaskAs = 0x8 , kPXP_RopNotMergeAs = 0x9 , kPXP_RopXorAs = 0xA , kPXP_RopNotXorAs = 0xB
}
 PXP ROP mode during blending. More...
 
enum  _pxp_block_size { kPXP_BlockSize8 = 0U , kPXP_BlockSize16 }
 PXP process block size. More...
 
enum  _pxp_csc1_mode { kPXP_Csc1YUV2RGB = 0U , kPXP_Csc1YCbCr2RGB }
 PXP CSC1 mode. More...
 
enum  _pxp_csc2_mode { kPXP_Csc2YUV2RGB = 0U , kPXP_Csc2YCbCr2RGB , kPXP_Csc2RGB2YUV , kPXP_Csc2RGB2YCbCr }
 PXP CSC2 mode. More...
 
enum  _pxp_lut_lookup_mode { kPXP_LutCacheRGB565 = 0U , kPXP_LutDirectY8 , kPXP_LutDirectRGB444 , kPXP_LutDirectRGB454 }
 PXP LUT lookup mode. More...
 
enum  _pxp_lut_out_mode { kPXP_LutOutY8 = 1U , kPXP_LutOutRGBW4444CFA , kPXP_LutOutRGB888 }
 PXP LUT output mode. More...
 
enum  _pxp_lut_8k_bank { kPXP_Lut8kBank0 = 0U , kPXP_Lut8kBank1 }
 PXP LUT 8K bank index used when lookup mode is kPXP_LutDirectRGB444. More...
 
enum  _pxp_ram { kPXP_RamDither0Lut = 0U , kPXP_RamDither1Lut = 3U , kPXP_RamDither2Lut = 4U }
 PXP internal memory. More...
 
enum  _pxp_dither_mode {
  kPXP_DitherPassThrough = 0U , kPXP_DitherFloydSteinberg = 1U , kPXP_DitherAtkinson = 2U , kPXP_DitherOrdered = 3U ,
  kPXP_DitherQuantOnly = 4U , kPXP_DitherSierra = 5U
}
 PXP dither mode. More...
 
enum  _pxp_dither_lut_mode { kPXP_DitherLutOff = 0U , kPXP_DitherLutPreDither , kPXP_DitherLutPostDither }
 PXP dither LUT mode. More...
 
enum  _pxp_dither_matrix_size { kPXP_DitherMatrix4 = 0 , kPXP_DitherMatrix8 , kPXP_DitherMatrix16 }
 PXP dither matrix size. More...
 
enum  { kPXP_PorterDuffFactorOne = 0U , kPXP_PorterDuffFactorZero , kPXP_PorterDuffFactorStraight , kPXP_PorterDuffFactorInversed }
 Porter Duff factor mode. . More...
 
enum  { kPXP_PorterDuffGlobalAlpha = 0U , kPXP_PorterDuffLocalAlpha , kPXP_PorterDuffScaledAlpha }
 Porter Duff global alpha mode. . More...
 
enum  { kPXP_PorterDuffAlphaStraight = 0U , kPXP_PorterDuffAlphaInversed }
 Porter Duff alpha mode. . More...
 
enum  { kPXP_PorterDuffColorStraight = 0 , kPXP_PorterDuffColorInversed = 1 , kPXP_PorterDuffColorNoAlpha = 0 , kPXP_PorterDuffColorWithAlpha = 1 }
 Porter Duff color mode. . More...
 
enum  _pxp_porter_duff_blend_mode {
  kPXP_PorterDuffSrc = 0 , kPXP_PorterDuffAtop , kPXP_PorterDuffOver , kPXP_PorterDuffIn ,
  kPXP_PorterDuffOut , kPXP_PorterDuffDst , kPXP_PorterDuffDstAtop , kPXP_PorterDuffDstOver ,
  kPXP_PorterDuffDstIn , kPXP_PorterDuffDstOut , kPXP_PorterDuffXor , kPXP_PorterDuffClear ,
  kPXP_PorterDuffMax
}
 PXP Porter Duff blend mode. Note: don't change the enum item value. More...
 
typedef enum _pxp_flip_mode pxp_flip_mode_t
 PXP output flip mode.
 
typedef enum _pxp_rotate_position pxp_rotate_position_t
 PXP rotate mode.
 
typedef enum _pxp_rotate_degree pxp_rotate_degree_t
 PXP rotate degree.
 
typedef enum _pxp_interlaced_output_mode pxp_interlaced_output_mode_t
 PXP interlaced output mode.
 
typedef enum _pxp_output_pixel_format pxp_output_pixel_format_t
 PXP output buffer format.
 
typedef struct _pxp_output_buffer_config pxp_output_buffer_config_t
 PXP output buffer configuration.
 
typedef enum _pxp_ps_pixel_format pxp_ps_pixel_format_t
 PXP process surface buffer pixel format.
 
typedef enum _pxp_ps_yuv_format pxp_ps_yuv_format_t
 PXP process surface buffer YUV format.
 
typedef struct _pxp_ps_buffer_config pxp_ps_buffer_config_t
 PXP process surface buffer configuration.
 
typedef enum _pxp_as_pixel_format pxp_as_pixel_format_t
 PXP alpha surface buffer pixel format.
 
typedef struct _pxp_as_buffer_config pxp_as_buffer_config_t
 PXP alphs surface buffer configuration.
 
typedef enum _pxp_alpha_mode pxp_alpha_mode_t
 PXP alpha mode during blending.
 
typedef enum _pxp_rop_mode pxp_rop_mode_t
 PXP ROP mode during blending.
 
typedef struct _pxp_as_blend_config pxp_as_blend_config_t
 PXP alpha surface blending configuration.
 
typedef enum _pxp_block_size pxp_block_size_t
 PXP process block size.
 
typedef enum _pxp_csc1_mode pxp_csc1_mode_t
 PXP CSC1 mode.
 
typedef enum _pxp_csc2_mode pxp_csc2_mode_t
 PXP CSC2 mode.
 
typedef struct _pxp_csc2_config pxp_csc2_config_t
 PXP CSC2 configuration.
 
typedef enum _pxp_lut_lookup_mode pxp_lut_lookup_mode_t
 PXP LUT lookup mode.
 
typedef enum _pxp_lut_out_mode pxp_lut_out_mode_t
 PXP LUT output mode.
 
typedef enum _pxp_lut_8k_bank pxp_lut_8k_bank_t
 PXP LUT 8K bank index used when lookup mode is kPXP_LutDirectRGB444.
 
typedef struct _pxp_lut_config pxp_lut_config_t
 PXP LUT configuration.
 
typedef enum _pxp_ram pxp_ram_t
 PXP internal memory.
 
typedef struct _pxp_dither_final_lut_data pxp_dither_final_lut_data_t
 PXP dither final LUT data.
 
typedef struct _pxp_dither_config pxp_dither_config_t
 PXP dither configuration.
 
typedef enum _pxp_porter_duff_blend_mode pxp_porter_duff_blend_mode_t
 PXP Porter Duff blend mode. Note: don't change the enum item value.
 
typedef struct _pxp_pic_copy_config pxp_pic_copy_config_t
 PXP Porter Duff blend mode. Note: don't change the enum item value.
 
#define FSL_PXP_DRIVER_VERSION   (MAKE_VERSION(2, 4, 1))
 
#define PXP_SHARE_ROTATE   0
 
#define PXP_USE_PATH   0
 

Initialization and deinitialization

void PXP_Init (PXP_Type *base)
 Initialize the PXP.
 
void PXP_Deinit (PXP_Type *base)
 De-initialize the PXP.
 
void PXP_Reset (PXP_Type *base)
 Reset the PXP.
 
void PXP_ResetControl (PXP_Type *base)
 Reset the PXP and the control register to initialized state.
 

Alpha surface

void PXP_SetAlphaSurfaceBufferConfig (PXP_Type *base, const pxp_as_buffer_config_t *config)
 Set the alpha surface input buffer configuration.
 
void PXP_SetAlphaSurfaceBlendConfig (PXP_Type *base, const pxp_as_blend_config_t *config)
 Set the alpha surface blending configuration.
 
void PXP_SetAlphaSurfaceOverlayColorKey (PXP_Type *base, uint32_t colorKeyLow, uint32_t colorKeyHigh)
 Set the alpha surface overlay color key.
 
void PXP_SetAlphaSurfacePosition (PXP_Type *base, uint16_t upperLeftX, uint16_t upperLeftY, uint16_t lowerRightX, uint16_t lowerRightY)
 Set the alpha surface position in output buffer.
 

Process surface

void PXP_SetProcessSurfaceBufferConfig (PXP_Type *base, const pxp_ps_buffer_config_t *config)
 Set the process surface input buffer configuration.
 
void PXP_SetProcessSurfaceScaler (PXP_Type *base, uint16_t inputWidth, uint16_t inputHeight, uint16_t outputWidth, uint16_t outputHeight)
 Set the process surface scaler configuration.
 
void PXP_SetProcessSurfacePosition (PXP_Type *base, uint16_t upperLeftX, uint16_t upperLeftY, uint16_t lowerRightX, uint16_t lowerRightY)
 Set the process surface position in output buffer.
 
void PXP_SetProcessSurfaceColorKey (PXP_Type *base, uint32_t colorKeyLow, uint32_t colorKeyHigh)
 Set the process surface color key.
 

Output buffer

void PXP_SetOutputBufferConfig (PXP_Type *base, const pxp_output_buffer_config_t *config)
 Set the PXP outpt buffer configuration.
 
void PXP_BuildRect (PXP_Type *base, pxp_output_pixel_format_t outFormat, uint32_t value, uint16_t width, uint16_t height, uint16_t pitch, uint32_t outAddr)
 Build a solid rectangle of given pixel value.
 

Command queue

void PXP_SetNextCommand (PXP_Type *base, void *commandAddr)
 Set the next command.
 

Color space conversion

void PXP_SetCsc2Config (PXP_Type *base, const pxp_csc2_config_t *config)
 Set the CSC2 configuration.
 
void PXP_SetCsc1Mode (PXP_Type *base, pxp_csc1_mode_t mode)
 Set the CSC1 mode.
 

LUT operations

void PXP_SetLutConfig (PXP_Type *base, const pxp_lut_config_t *config)
 Set the LUT configuration.
 
status_t PXP_LoadLutTable (PXP_Type *base, pxp_lut_lookup_mode_t lookupMode, uint32_t bytesNum, uint32_t memAddr, uint16_t lutStartAddr)
 Set the look up table to PXP.
 

Porter Duff

void PXP_SetPorterDuffConfig (PXP_Type *base, const pxp_porter_duff_config_t *config)
 Set the Porter Duff configuration.
 
status_t PXP_GetPorterDuffConfig (pxp_porter_duff_blend_mode_t mode, pxp_porter_duff_config_t *config)
 Get the Porter Duff configuration by blend mode.
 

Buffer copy

status_t PXP_StartPictureCopy (PXP_Type *base, const pxp_pic_copy_config_t *config)
 Copy picture from one buffer to another buffer.
 
status_t PXP_StartMemCopy (PXP_Type *base, uint32_t srcAddr, uint32_t destAddr, uint32_t size)
 Copy continous memory.
 
status_t PXP_MemCopy (PXP_Type *base, uint32_t srcAddr, uint32_t destAddr, uint32_t size)
 Copy continous memory.
 

Detailed Description

Typedef Documentation

◆ pxp_csc2_config_t

PXP CSC2 configuration.

Converting from YUV/YCbCr color spaces to the RGB color space uses the following equation structure:

R = A1(Y+D1) + A2(U+D2) + A3(V+D3) G = B1(Y+D1) + B2(U+D2) + B3(V+D3) B = C1(Y+D1) + C2(U+D2) + C3(V+D3)

Converting from the RGB color space to YUV/YCbCr color spaces uses the following equation structure:

Y = A1*R + A2*G + A3*B + D1 U = B1*R + B2*G + B3*B + D2 V = C1*R + C2*G + C3*B + D3

◆ pxp_rop_mode_t

PXP ROP mode during blending.

Explanation:

  • AS: Alpha surface
  • PS: Process surface
  • nAS: Alpha surface NOT value
  • nPS: Process surface NOT value

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Porter Duff factor mode. .

Enumerator
kPXP_PorterDuffFactorOne 

Use 1.

kPXP_PorterDuffFactorZero 

Use 0.

kPXP_PorterDuffFactorStraight 

Use straight alpha.

kPXP_PorterDuffFactorInversed 

Use inversed alpha.

◆ anonymous enum

anonymous enum

Porter Duff global alpha mode. .

Enumerator
kPXP_PorterDuffGlobalAlpha 

Use global alpha.

kPXP_PorterDuffLocalAlpha 

Use local alpha in each pixel.

kPXP_PorterDuffScaledAlpha 

Use global alpha * local alpha.

◆ anonymous enum

anonymous enum

Porter Duff alpha mode. .

Enumerator
kPXP_PorterDuffAlphaStraight 

Use straight alpha, s0_alpha' = s0_alpha.

kPXP_PorterDuffAlphaInversed 

Use inversed alpha, s0_alpha' = 0xFF - s0_alpha.

◆ anonymous enum

anonymous enum

Porter Duff color mode. .

Enumerator
kPXP_PorterDuffColorStraight 
Deprecated:
Use kPXP_PorterDuffColorNoAlpha.
kPXP_PorterDuffColorInversed 
Deprecated:
Use kPXP_PorterDuffColorWithAlpha.
kPXP_PorterDuffColorNoAlpha 

s0_pixel' = s0_pixel.

kPXP_PorterDuffColorWithAlpha 

s0_pixel' = s0_pixel * s0_alpha".

◆ _pxp_alpha_mode

PXP alpha mode during blending.

Enumerator
kPXP_AlphaEmbedded 

The alpha surface pixel alpha value will be used for blend.

kPXP_AlphaOverride 

The user defined alpha value will be used for blend directly.

kPXP_AlphaMultiply 

The alpha surface pixel alpha value scaled the user defined alpha value will be used for blend, for example, pixel alpha set set to 200, user defined alpha set to 100, then the reault alpha is 200 * 100 / 255.

kPXP_AlphaRop 

Raster operation.

◆ _pxp_as_pixel_format

PXP alpha surface buffer pixel format.

Enumerator
kPXP_AsPixelFormatARGB8888 

32-bit pixels with alpha.

kPXP_AsPixelFormatRGB888 

32-bit pixels without alpha (unpacked 24-bit format)

kPXP_AsPixelFormatARGB1555 

16-bit pixels with alpha.

kPXP_AsPixelFormatARGB4444 

16-bit pixels with alpha.

kPXP_AsPixelFormatRGB555 

16-bit pixels without alpha.

kPXP_AsPixelFormatRGB444 

16-bit pixels without alpha.

kPXP_AsPixelFormatRGB565 

16-bit pixels without alpha.

◆ _pxp_block_size

PXP process block size.

Enumerator
kPXP_BlockSize8 

Process 8x8 pixel blocks.

kPXP_BlockSize16 

Process 16x16 pixel blocks.

◆ _pxp_csc1_mode

PXP CSC1 mode.

Enumerator
kPXP_Csc1YUV2RGB 

YUV to RGB.

kPXP_Csc1YCbCr2RGB 

YCbCr to RGB.

◆ _pxp_csc2_mode

PXP CSC2 mode.

Enumerator
kPXP_Csc2YUV2RGB 

YUV to RGB.

kPXP_Csc2YCbCr2RGB 

YCbCr to RGB.

kPXP_Csc2RGB2YUV 

RGB to YUV.

kPXP_Csc2RGB2YCbCr 

RGB to YCbCr.

◆ _pxp_dither_lut_mode

PXP dither LUT mode.

Enumerator
kPXP_DitherLutOff 

The LUT memory is not used for LUT, could be used as ordered dither index matrix.

kPXP_DitherLutPreDither 

Use LUT at the pre-dither stage, The pre-dither LUT could only be used in Floyd mode or Atkinson mode, which are not supported by current PXP module.

kPXP_DitherLutPostDither 

Use LUT at the post-dither stage.

◆ _pxp_dither_matrix_size

PXP dither matrix size.

Enumerator
kPXP_DitherMatrix4 

The dither index matrix is 4x4.

kPXP_DitherMatrix8 

The dither index matrix is 8x8.

kPXP_DitherMatrix16 

The dither index matrix is 16x16.

◆ _pxp_dither_mode

PXP dither mode.

Enumerator
kPXP_DitherPassThrough 

Pass through, no dither.

kPXP_DitherFloydSteinberg 

Floyd-Steinberg. For dither engine 0 only.

kPXP_DitherAtkinson 

Atkinson. For dither engine 0 only.

kPXP_DitherOrdered 

Ordered dither.

kPXP_DitherQuantOnly 

No dithering, only quantization.

kPXP_DitherSierra 

Sierra. For dither engine 0 only.

◆ _pxp_flags

enum _pxp_flags

PXP status flags.

Note
These enumerations are meant to be OR'd together to form a bit mask.
Enumerator
kPXP_CompleteFlag 

PXP process completed. bit 0

kPXP_Axi0WriteErrorFlag 

PXP encountered an AXI write error and processing has been terminated. bit 1

kPXP_Axi0ReadErrorFlag 

PXP encountered an AXI read error and processing has been terminated. bit 2

kPXP_CommandLoadFlag 

The command set by PXP_SetNextCommand has been loaded, could set new command. bit 3

kPXP_LutDmaLoadFlag 

The LUT table has been loaded by DMA. bit 8

◆ _pxp_flip_mode

PXP output flip mode.

Enumerator
kPXP_FlipDisable 

Flip disable.

kPXP_FlipHorizontal 

Horizontal flip.

kPXP_FlipVertical 

Vertical flip.

kPXP_FlipBoth 

Flip both directions.

◆ _pxp_interlaced_output_mode

PXP interlaced output mode.

Enumerator
kPXP_OutputProgressive 

All data written in progressive format to output buffer 0.

kPXP_OutputField0 

Only write field 0 data to output buffer 0.

kPXP_OutputField1 

Only write field 1 data to output buffer 0.

kPXP_OutputInterlaced 

Field 0 write to buffer 0, field 1 write to buffer 1.

◆ _pxp_interrupt_enable

PXP interrupts to enable.

Enumerator
kPXP_CompleteInterruptEnable 

PXP process completed. bit 1

kPXP_CommandLoadInterruptEnable 

Interrupt to show that the command set by PXP_SetNextCommand has been loaded. bit 2

kPXP_LutDmaLoadInterruptEnable 

The LUT table has been loaded by DMA. bit 3

◆ _pxp_lut_8k_bank

PXP LUT 8K bank index used when lookup mode is kPXP_LutDirectRGB444.

Enumerator
kPXP_Lut8kBank0 

The first 8K bank used.

kPXP_Lut8kBank1 

The second 8K bank used.

◆ _pxp_lut_lookup_mode

PXP LUT lookup mode.

Enumerator
kPXP_LutCacheRGB565 

LUT ADDR = R[7:3],G[7:2],B[7:3]. Use all 16KB of LUT for indirect cached 128KB lookup.

kPXP_LutDirectY8 

LUT ADDR = 16'b0,Y[7:0]. Use the first 256 bytes of LUT. Only third data path byte is tranformed.

kPXP_LutDirectRGB444 

LUT ADDR = R[7:4],G[7:4],B[7:4]. Use one 8KB bank of LUT selected by PXP_Select8kLutBank.

kPXP_LutDirectRGB454 

LUT ADDR = R[7:4],G[7:3],B[7:4]. Use all 16KB of LUT.

◆ _pxp_lut_out_mode

PXP LUT output mode.

Enumerator
kPXP_LutOutY8 

R/Y byte lane 2 lookup, bytes 1,0 bypassed.

kPXP_LutOutRGBW4444CFA 

Byte lane 2 = CFA_Y8, byte lane 1,0 = RGBW4444.

kPXP_LutOutRGB888 

RGB565->RGB888 conversion for Gamma correction.

◆ _pxp_output_pixel_format

PXP output buffer format.

Enumerator
kPXP_OutputPixelFormatARGB8888 

32-bit pixels with alpha.

kPXP_OutputPixelFormatRGB888 

32-bit pixels without alpha (unpacked 24-bit format)

kPXP_OutputPixelFormatRGB888P 

24-bit pixels without alpha (packed 24-bit format)

kPXP_OutputPixelFormatARGB1555 

16-bit pixels with alpha.

kPXP_OutputPixelFormatARGB4444 

16-bit pixels with alpha.

kPXP_OutputPixelFormatRGB555 

16-bit pixels without alpha.

kPXP_OutputPixelFormatRGB444 

16-bit pixels without alpha.

kPXP_OutputPixelFormatRGB565 

16-bit pixels without alpha.

kPXP_OutputPixelFormatYUV1P444 

32-bit pixels (1-plane XYUV unpacked).

kPXP_OutputPixelFormatUYVY1P422 

16-bit pixels (1-plane U0,Y0,V0,Y1 interleaved bytes)

kPXP_OutputPixelFormatVYUY1P422 

16-bit pixels (1-plane V0,Y0,U0,Y1 interleaved bytes)

kPXP_OutputPixelFormatY8 

8-bit monochrome pixels (1-plane Y luma output)

kPXP_OutputPixelFormatY4 

4-bit monochrome pixels (1-plane Y luma, 4 bit truncation)

kPXP_OutputPixelFormatYUV2P422 

16-bit pixels (2-plane UV interleaved bytes)

kPXP_OutputPixelFormatYUV2P420 

16-bit pixels (2-plane UV)

kPXP_OutputPixelFormatYVU2P422 

16-bit pixels (2-plane VU interleaved bytes)

kPXP_OutputPixelFormatYVU2P420 

16-bit pixels (2-plane VU)

◆ _pxp_porter_duff_blend_mode

PXP Porter Duff blend mode. Note: don't change the enum item value.

Enumerator
kPXP_PorterDuffSrc 

Source Only

kPXP_PorterDuffAtop 

Source Atop

kPXP_PorterDuffOver 

Source Over

kPXP_PorterDuffIn 

Source In.

kPXP_PorterDuffOut 

Source Out.

kPXP_PorterDuffDst 

Destination Only.

kPXP_PorterDuffDstAtop 

Destination Atop.

kPXP_PorterDuffDstOver 

Destination Over.

kPXP_PorterDuffDstIn 

Destination In.

kPXP_PorterDuffDstOut 

Destination Out.

kPXP_PorterDuffXor 

XOR.

kPXP_PorterDuffClear 

Clear.

◆ _pxp_ps_pixel_format

PXP process surface buffer pixel format.

Enumerator
kPXP_PsPixelFormatRGB888 

32-bit pixels without alpha (unpacked 24-bit format)

kPXP_PsPixelFormatRGB555 

16-bit pixels without alpha.

kPXP_PsPixelFormatRGB444 

16-bit pixels without alpha.

kPXP_PsPixelFormatRGB565 

16-bit pixels without alpha.

kPXP_PsPixelFormatYUV1P444 

32-bit pixels (1-plane XYUV unpacked).

kPXP_PsPixelFormatUYVY1P422 

16-bit pixels (1-plane U0,Y0,V0,Y1 interleaved bytes)

kPXP_PsPixelFormatVYUY1P422 

16-bit pixels (1-plane V0,Y0,U0,Y1 interleaved bytes)

kPXP_PsPixelFormatY8 

8-bit monochrome pixels (1-plane Y luma output)

kPXP_PsPixelFormatY4 

4-bit monochrome pixels (1-plane Y luma, 4 bit truncation)

kPXP_PsPixelFormatYUV2P422 

16-bit pixels (2-plane UV interleaved bytes)

kPXP_PsPixelFormatYUV2P420 

16-bit pixels (2-plane UV)

kPXP_PsPixelFormatYVU2P422 

16-bit pixels (2-plane VU interleaved bytes)

kPXP_PsPixelFormatYVU2P420 

16-bit pixels (2-plane VU)

kPXP_PsPixelFormatYVU422 

16-bit pixels (3-plane)

kPXP_PsPixelFormatYVU420 

16-bit pixels (3-plane)

◆ _pxp_ps_yuv_format

PXP process surface buffer YUV format.

Enumerator
kPXP_PsYUVFormatYUV 

YUV format.

kPXP_PsYUVFormatYCbCr 

YCbCr format.

◆ _pxp_ram

enum _pxp_ram

PXP internal memory.

Enumerator
kPXP_RamDither0Lut 

Dither 0 LUT memory.

kPXP_RamDither1Lut 

Dither 1 LUT memory.

kPXP_RamDither2Lut 

Dither 2 LUT memory.

◆ _pxp_rop_mode

PXP ROP mode during blending.

Explanation:

  • AS: Alpha surface
  • PS: Process surface
  • nAS: Alpha surface NOT value
  • nPS: Process surface NOT value
Enumerator
kPXP_RopMaskAs 

AS AND PS.

kPXP_RopMaskNotAs 

nAS AND PS.

kPXP_RopMaskAsNot 

AS AND nPS.

kPXP_RopMergeAs 

AS OR PS.

kPXP_RopMergeNotAs 

nAS OR PS.

kPXP_RopMergeAsNot 

AS OR nPS.

kPXP_RopNotCopyAs 

nAS.

kPXP_RopNot 

nPS.

kPXP_RopNotMaskAs 

AS NAND PS.

kPXP_RopNotMergeAs 

AS NOR PS.

kPXP_RopXorAs 

AS XOR PS.

kPXP_RopNotXorAs 

AS XNOR PS.

◆ _pxp_rotate_degree

PXP rotate degree.

Enumerator
kPXP_Rotate0 

Clock wise rotate 0 deg.

kPXP_Rotate90 

Clock wise rotate 90 deg.

kPXP_Rotate180 

Clock wise rotate 180 deg.

kPXP_Rotate270 

Clock wise rotate 270 deg.

◆ _pxp_rotate_position

PXP rotate mode.

Enumerator
kPXP_RotateOutputBuffer 

Rotate the output buffer.

kPXP_RotateProcessSurface 

Rotate the process surface.

Function Documentation

◆ PXP_BuildRect()

void PXP_BuildRect ( PXP_Type base,
pxp_output_pixel_format_t  outFormat,
uint32_t  value,
uint16_t  width,
uint16_t  height,
uint16_t  pitch,
uint32_t  outAddr 
)

Build a solid rectangle of given pixel value.

Parameters
basePXP peripheral base address.
outFormatoutput pixel format.
valueThe value of the pixel to be filled in the rectangle in ARGB8888 format.
widthwidth of the rectangle.
heightheight of the rectangle.
pitchoutput pitch in byte.
outAddraddress of the memory to store the rectangle.

brief Build a solid rectangle of given pixel value.

param base PXP peripheral base address. param outFormat output pixel format. param value The value of the pixel to be filled in the rectangle in ARGB8888 format. param width width of the rectangle. param height height of the rectangle. param pitch output pitch in byte. param outAddr address of the memory to store the rectangle.

◆ PXP_Deinit()

void PXP_Deinit ( PXP_Type base)

De-initialize the PXP.

This function disables the PXP peripheral clock.

Parameters
basePXP peripheral base address.

brief De-initialize the PXP.

This function disables the PXP peripheral clock.

param base PXP peripheral base address.

◆ PXP_GetPorterDuffConfig()

status_t PXP_GetPorterDuffConfig ( pxp_porter_duff_blend_mode_t  mode,
pxp_porter_duff_config_t config 
)

Get the Porter Duff configuration by blend mode.

The FactorMode are selected based on blend mode, the AlphaMode are set to kPXP_PorterDuffAlphaStraight, the ColorMode are set to kPXP_PorterDuffColorWithAlpha, the GlobalAlphaMode are set to kPXP_PorterDuffLocalAlpha. These values could be modified after calling this function.

Parameters
modeThe blend mode.
configPointer to the configuration.
Return values
kStatus_SuccessSuccessfully get the configuratoin.
kStatus_InvalidArgumentThe blend mode not supported.

brief Get the Porter Duff configuration by blend mode.

param mode The blend mode. param config Pointer to the configuration. retval kStatus_Success Successfully get the configuratoin. retval kStatus_InvalidArgument The blend mode not supported.

◆ PXP_Init()

void PXP_Init ( PXP_Type base)

Initialize the PXP.

This function enables the PXP peripheral clock, and resets the PXP registers to default status.

Parameters
basePXP peripheral base address.

brief Initialize the PXP.

This function enables the PXP peripheral clock, and resets the PXP registers to default status.

param base PXP peripheral base address.

◆ PXP_LoadLutTable()

status_t PXP_LoadLutTable ( PXP_Type base,
pxp_lut_lookup_mode_t  lookupMode,
uint32_t  bytesNum,
uint32_t  memAddr,
uint16_t  lutStartAddr 
)

Set the look up table to PXP.

If lookup mode is DIRECT mode, this function loads bytesNum of values from the address memAddr into PXP LUT address lutStartAddr. So this function allows only update part of the PXP LUT.

If lookup mode is CACHE mode, this function sets the new address to memAddr and invalid the PXP LUT cache.

Parameters
basePXP peripheral base address.
lookupModeWhich lookup mode is used. Note that this parameter is only used to distinguish DIRECT mode and CACHE mode, it does not change the register value PXP_LUT_CTRL[LOOKUP_MODE]. To change that value, use function PXP_SetLutConfig.
bytesNumHow many bytes to set. This value must be divisable by 8.
memAddrAddress of look up table to set.
lutStartAddrThe LUT value will be loaded to LUT from index lutAddr. It should be 8 bytes aligned.
Return values
kStatus_SuccessLoad successfully.
kStatus_InvalidArgumentFailed because of invalid argument.

brief Set the look up table to PXP.

If lookup mode is DIRECT mode, this function loads p bytesNum of values from the address p memAddr into PXP LUT address p lutStartAddr. So this function allows only update part of the PXP LUT.

If lookup mode is CACHE mode, this function sets the new address to p memAddr and invalid the PXP LUT cache.

param base PXP peripheral base address. param lookupMode Which lookup mode is used. Note that this parameter is only used to distinguish DIRECT mode and CACHE mode, it does not change the register value PXP_LUT_CTRL[LOOKUP_MODE]. To change that value, use function ref PXP_SetLutConfig. param bytesNum How many bytes to set. This value must be divisable by 8. param memAddr Address of look up table to set. param lutStartAddr The LUT value will be loaded to LUT from index lutAddr. It should be 8 bytes aligned.

retval kStatus_Success Load successfully. retval kStatus_InvalidArgument Failed because of invalid argument.

◆ PXP_MemCopy()

status_t PXP_MemCopy ( PXP_Type base,
uint32_t  srcAddr,
uint32_t  destAddr,
uint32_t  size 
)

Copy continous memory.

Note
This function resets the old PXP settings, which means the settings like rotate, flip, will be reseted to disabled status.
Compare with @PXP_StartMemCopy, this function supports size not aligned to 512 bytes. This function returns when copy finished, upper layer doesn't need to wait kPXP_CompleteFlag.
Parameters
basePXP peripheral base address.
srcAddrSource memory address.
destAddrDestination memory address.
sizeHow many bytes to copy, should be 512 byte aligned.
Return values
kStatus_SuccessSuccessfully started the copy process.
kStatus_InvalidArgumentInvalid argument.

brief Copy continous memory.

param base PXP peripheral base address. retval kStatus_Success Successfully started the copy process. retval kStatus_InvalidArgument Invalid argument.

◆ PXP_Reset()

void PXP_Reset ( PXP_Type base)

Reset the PXP.

This function resets the PXP peripheral registers to default status.

Parameters
basePXP peripheral base address.

brief Reset the PXP.

This function resets the PXP peripheral registers to default status.

param base PXP peripheral base address.

◆ PXP_ResetControl()

void PXP_ResetControl ( PXP_Type base)

Reset the PXP and the control register to initialized state.

Parameters
basePXP peripheral base address.

brief Reset the PXP and the control register to initialized state.

param base PXP peripheral base address.

◆ PXP_SetAlphaSurfaceBlendConfig()

void PXP_SetAlphaSurfaceBlendConfig ( PXP_Type base,
const pxp_as_blend_config_t config 
)

Set the alpha surface blending configuration.

Parameters
basePXP peripheral base address.
configPointer to the configuration structure.

brief Set the alpha surface blending configuration.

param base PXP peripheral base address. param config Pointer to the configuration structure.

◆ PXP_SetAlphaSurfaceBufferConfig()

void PXP_SetAlphaSurfaceBufferConfig ( PXP_Type base,
const pxp_as_buffer_config_t config 
)

Set the alpha surface input buffer configuration.

Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the alpha surface input buffer configuration.

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetAlphaSurfaceOverlayColorKey()

void PXP_SetAlphaSurfaceOverlayColorKey ( PXP_Type base,
uint32_t  colorKeyLow,
uint32_t  colorKeyHigh 
)

Set the alpha surface overlay color key.

If a pixel in the current overlay image with a color that falls in the range from the p colorKeyLow to p colorKeyHigh range, it will use the process surface pixel value for that location. If no PS image is present or if the PS image also matches its colorkey range, the PS background color is used.

Parameters
basePXP peripheral base address.
colorKeyLowColor key low range.
colorKeyHighColor key high range.
Note
Colorkey operations are higher priority than alpha or ROP operations

brief Set the alpha surface overlay color key.

If a pixel in the current overlay image with a color that falls in the range from the p colorKeyLow to p colorKeyHigh range, it will use the process surface pixel value for that location. If no PS image is present or if the PS image also matches its colorkey range, the PS background color is used.

param base PXP peripheral base address. param colorKeyLow Color key low range. param colorKeyHigh Color key high range.

note Colorkey operations are higher priority than alpha or ROP operations

◆ PXP_SetAlphaSurfacePosition()

void PXP_SetAlphaSurfacePosition ( PXP_Type base,
uint16_t  upperLeftX,
uint16_t  upperLeftY,
uint16_t  lowerRightX,
uint16_t  lowerRightY 
)

Set the alpha surface position in output buffer.

Parameters
basePXP peripheral base address.
upperLeftXX of the upper left corner.
upperLeftYY of the upper left corner.
lowerRightXX of the lower right corner.
lowerRightYY of the lower right corner.

brief Set the alpha surface position in output buffer.

param base PXP peripheral base address. param upperLeftX X of the upper left corner. param upperLeftY Y of the upper left corner. param lowerRightX X of the lower right corner. param lowerRightY Y of the lower right corner.

◆ PXP_SetCsc1Mode()

void PXP_SetCsc1Mode ( PXP_Type base,
pxp_csc1_mode_t  mode 
)

Set the CSC1 mode.

The CSC1 module receives scaled YUV/YCbCr444 pixels from the scale engine and converts the pixels to the RGB888 color space. It could only be used by process surface.

Parameters
basePXP peripheral base address.
modeThe conversion mode.

brief Set the CSC1 mode.

The CSC1 module receives scaled YUV/YCbCr444 pixels from the scale engine and converts the pixels to the RGB888 color space. It could only be used by process surface.

param base PXP peripheral base address. param mode The conversion mode.

◆ PXP_SetCsc2Config()

void PXP_SetCsc2Config ( PXP_Type base,
const pxp_csc2_config_t config 
)

Set the CSC2 configuration.

The CSC2 module receives pixels in any color space and can convert the pixels into any of RGB, YUV, or YCbCr color spaces. The output pixels are passed onto the LUT and rotation engine for further processing

Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the CSC2 configuration.

The CSC2 module receives pixels in any color space and can convert the pixels into any of RGB, YUV, or YCbCr color spaces. The output pixels are passed onto the LUT and rotation engine for further processing

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetLutConfig()

void PXP_SetLutConfig ( PXP_Type base,
const pxp_lut_config_t config 
)

Set the LUT configuration.

The lookup table (LUT) is used to modify pixels in a manner that is not linear and that cannot be achieved by the color space conversion modules. To setup the LUT, the complete workflow is:

  1. Use PXP_SetLutConfig to set the configuration, such as the lookup mode.
  2. Use PXP_LoadLutTable to load the lookup table to PXP.
  3. Use PXP_EnableLut to enable the function.
Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the LUT configuration.

The lookup table (LUT) is used to modify pixels in a manner that is not linear and that cannot be achieved by the color space conversion modules. To setup the LUT, the complete workflow is:

  1. Use ref PXP_SetLutConfig to set the configuration, such as the lookup mode.
  2. Use ref PXP_LoadLutTable to load the lookup table to PXP.
  3. Use ref PXP_EnableLut to enable the function.

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetNextCommand()

void PXP_SetNextCommand ( PXP_Type base,
void *  commandAddr 
)

Set the next command.

The PXP supports a primitive ability to queue up one operation while the current operation is running. Workflow:

  1. Prepare the PXP register values except STAT, CSCCOEFn, NEXT in the memory in the order they appear in the register map.
  2. Call this function sets the new operation to PXP.
  3. There are two methods to check whether the PXP has loaded the new operation. The first method is using PXP_IsNextCommandPending. If there is new operation not loaded by the PXP, this function returns true. The second method is checking the flag kPXP_CommandLoadFlag, if command loaded, this flag asserts. User could enable interrupt kPXP_CommandLoadInterruptEnable to get the loaded signal in interrupt way.
  4. When command loaded by PXP, a new command could be set using this function.
uint32_t pxp_command1[48];
uint32_t pxp_command2[48];
pxp_command1[0] = ...;
pxp_command1[1] = ...;
...
pxp_command2[0] = ...;
pxp_command2[1] = ...;
...
while (PXP_IsNextCommandPending(PXP))
{
}
PXP_SetNextCommand(PXP, pxp_command1);
while (PXP_IsNextCommandPending(PXP))
{
}
PXP_SetNextCommand(PXP, pxp_command2);
#define PXP
Definition: MIMXRT1052.h:39363
void PXP_SetNextCommand(PXP_Type *base, void *commandAddr)
Set the next command.
Definition: fsl_pxp.c:736
Parameters
basePXP peripheral base address.
commandAddrAddress of the new command.

brief Set the next command.

The PXP supports a primitive ability to queue up one operation while the current operation is running. Workflow:

  1. Prepare the PXP register values except STAT, CSCCOEFn, NEXT in the memory in the order they appear in the register map.
  2. Call this function sets the new operation to PXP.
  3. There are two methods to check whether the PXP has loaded the new operation. The first method is using ref PXP_IsNextCommandPending. If there is new operation not loaded by the PXP, this function returns true. The second method is checking the flag ref kPXP_CommandLoadFlag, if command loaded, this flag asserts. User could enable interrupt ref kPXP_CommandLoadInterruptEnable to get the loaded signal in interrupt way.
  4. When command loaded by PXP, a new command could be set using this function.

param base PXP peripheral base address. param commandAddr Address of the new command.

◆ PXP_SetOutputBufferConfig()

void PXP_SetOutputBufferConfig ( PXP_Type base,
const pxp_output_buffer_config_t config 
)

Set the PXP outpt buffer configuration.

Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the PXP outpt buffer configuration.

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetPorterDuffConfig()

void PXP_SetPorterDuffConfig ( PXP_Type base,
const pxp_porter_duff_config_t config 
)

Set the Porter Duff configuration.

Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the Porter Duff configuration.

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetProcessSurfaceBufferConfig()

void PXP_SetProcessSurfaceBufferConfig ( PXP_Type base,
const pxp_ps_buffer_config_t config 
)

Set the process surface input buffer configuration.

Parameters
basePXP peripheral base address.
configPointer to the configuration.

brief Set the process surface input buffer configuration.

param base PXP peripheral base address. param config Pointer to the configuration.

◆ PXP_SetProcessSurfaceColorKey()

void PXP_SetProcessSurfaceColorKey ( PXP_Type base,
uint32_t  colorKeyLow,
uint32_t  colorKeyHigh 
)

Set the process surface color key.

If the PS image matches colorkey range, the PS background color is output. Set colorKeyLow to 0xFFFFFFFF and colorKeyHigh to 0 will disable the colorkeying.

Parameters
basePXP peripheral base address.
colorKeyLowColor key low range.
colorKeyHighColor key high range.

brief Set the process surface color key.

If the PS image matches colorkey range, the PS background color is output. Set p colorKeyLow to 0xFFFFFFFF and p colorKeyHigh to 0 will disable the colorkeying.

param base PXP peripheral base address. param colorKeyLow Color key low range. param colorKeyHigh Color key high range.

◆ PXP_SetProcessSurfacePosition()

void PXP_SetProcessSurfacePosition ( PXP_Type base,
uint16_t  upperLeftX,
uint16_t  upperLeftY,
uint16_t  lowerRightX,
uint16_t  lowerRightY 
)

Set the process surface position in output buffer.

Parameters
basePXP peripheral base address.
upperLeftXX of the upper left corner.
upperLeftYY of the upper left corner.
lowerRightXX of the lower right corner.
lowerRightYY of the lower right corner.

brief Set the process surface position in output buffer.

param base PXP peripheral base address. param upperLeftX X of the upper left corner. param upperLeftY Y of the upper left corner. param lowerRightX X of the lower right corner. param lowerRightY Y of the lower right corner.

◆ PXP_SetProcessSurfaceScaler()

void PXP_SetProcessSurfaceScaler ( PXP_Type base,
uint16_t  inputWidth,
uint16_t  inputHeight,
uint16_t  outputWidth,
uint16_t  outputHeight 
)

Set the process surface scaler configuration.

The valid down scale fact is 1/(2^12) ~ 16.

Parameters
basePXP peripheral base address.
inputWidthInput image width.
inputHeightInput image height.
outputWidthOutput image width.
outputHeightOutput image height.

brief Set the process surface scaler configuration.

The valid down scale fact is 1/(2^12) ~ 16.

param base PXP peripheral base address. param inputWidth Input image width. param inputHeight Input image height. param outputWidth Output image width. param outputHeight Output image height.

◆ PXP_StartMemCopy()

status_t PXP_StartMemCopy ( PXP_Type base,
uint32_t  srcAddr,
uint32_t  destAddr,
uint32_t  size 
)

Copy continous memory.

Note
The copy size should be 512 byte aligned.
This function resets the old PXP settings, which means the settings like rotate, flip, will be reseted to disabled status.
Parameters
basePXP peripheral base address.
srcAddrSource memory address.
destAddrDestination memory address.
sizeHow many bytes to copy, should be 512 byte aligned.
Return values
kStatus_SuccessSuccessfully started the copy process.
kStatus_InvalidArgumentInvalid argument.

brief Copy continous memory.

The copy size should be 512 byte aligned.

param base PXP peripheral base address. retval kStatus_Success Successfully started the copy process. retval kStatus_InvalidArgument Invalid argument.

◆ PXP_StartPictureCopy()

status_t PXP_StartPictureCopy ( PXP_Type base,
const pxp_pic_copy_config_t config 
)

Copy picture from one buffer to another buffer.

This function copies a rectangle from one buffer to another buffer.

                   Source buffer:
srcPicBaseAddr
+-----------------------------------------------------------+
|                                                           |
|  (srcOffsetX, srcOffsetY)                                 |
|           +-------------------+                           |
|           |                   |                           |
|           |                   |                           |
|           |                   | height                    |
|           |                   |                           |
|           |                   |                           |
|           +-------------------+                           |
|                 width                                     |
|                                                           |
|                       srcPicthBytes                       |
+-----------------------------------------------------------+

                  Destination buffer:
destPicBaseAddr
+-------------------------------------------+
|                                           |
|                                           |
|                                           |
|  (destOffsetX, destOffsetY)               |
|       +-------------------+               |
|       |                   |               |
|       |                   |               |
|       |                   | height        |
|       |                   |               |
|       |                   |               |
|       +-------------------+               |
|             width                         |
|                                           |
|                                           |
|                                           |
|                  destPicthBytes           |
+-------------------------------------------+
Note
This function resets the old PXP settings, which means the settings like rotate, flip, will be reseted to disabled status.
Parameters
basePXP peripheral base address.
configPointer to the picture copy configuration structure.
Return values
kStatus_SuccessSuccessfully started the copy process.
kStatus_InvalidArgumentInvalid argument.

brief Copy picture from one buffer to another buffer.

This function copies a rectangle from one buffer to another buffer.

param base PXP peripheral base address. retval kStatus_Success Successfully started the copy process. retval kStatus_InvalidArgument Invalid argument.

Variable Documentation

◆ A1

float _pxp_csc2_config::A1

A1.

◆ A2

float _pxp_csc2_config::A2

A2.

◆ A3

float _pxp_csc2_config::A3

A3.

◆ alpha

uint8_t _pxp_as_blend_config::alpha

User defined alpha value, only used when alphaMode is kPXP_AlphaOverride or kPXP_AlphaRop.

◆ alphaMode

pxp_alpha_mode_t _pxp_as_blend_config::alphaMode

Alpha mode.

◆ B1

float _pxp_csc2_config::B1

B1.

◆ B2

float _pxp_csc2_config::B2

B2.

◆ B3

float _pxp_csc2_config::B3

B3.

◆ buffer0Addr

uint32_t _pxp_output_buffer_config::buffer0Addr

Output buffer 0 address.

◆ buffer1Addr

uint32_t _pxp_output_buffer_config::buffer1Addr

Output buffer 1 address, used for UV data in YUV 2-plane mode, or field 1 in output interlaced mode.

◆ bufferAddr [1/2]

uint32_t _pxp_ps_buffer_config::bufferAddr

Input buffer address for the first panel.

◆ bufferAddr [2/2]

uint32_t _pxp_as_buffer_config::bufferAddr

Input buffer address.

◆ bufferAddrU

uint32_t _pxp_ps_buffer_config::bufferAddrU

Input buffer address for the second panel.

◆ bufferAddrV

uint32_t _pxp_ps_buffer_config::bufferAddrV

Input buffer address for the third panel.

◆ C1

float _pxp_csc2_config::C1

C1.

◆ C2

float _pxp_csc2_config::C2

C2.

◆ C3

float _pxp_csc2_config::C3

C3.

◆ cfaValue

uint32_t _pxp_lut_config::cfaValue

The CFA value used when look up mode is kPXP_LutOutRGBW4444CFA.

◆ D1

int16_t _pxp_csc2_config::D1

D1.

◆ D2

int16_t _pxp_csc2_config::D2

D2.

◆ D3

int16_t _pxp_csc2_config::D3

D3.

◆ data_11_8

uint32_t _pxp_dither_final_lut_data::data_11_8

Data 11 to data 8. Data 8 is the least significant byte.

◆ data_15_12

uint32_t _pxp_dither_final_lut_data::data_15_12

Data 15 to data 12. Data 12 is the least significant byte.

◆ data_3_0

uint32_t _pxp_dither_final_lut_data::data_3_0

Data 3 to data 0. Data 0 is the least significant byte.

◆ data_7_4

uint32_t _pxp_dither_final_lut_data::data_7_4

Data 7 to data 4. Data 4 is the least significant byte.

◆ destOffsetX

uint16_t _pxp_pic_copy_config::destOffsetX

Copy position in destination picture.

◆ destOffsetY

uint16_t _pxp_pic_copy_config::destOffsetY

Copy position in destination picture.

◆ destPicBaseAddr

uint32_t _pxp_pic_copy_config::destPicBaseAddr

Destination picture base address.

◆ destPitchBytes

uint16_t _pxp_pic_copy_config::destPitchBytes

Pitch of the destination buffer.

◆ ditherMode0

uint32_t _pxp_dither_config::ditherMode0

Dither mode for dither engine 0. See _pxp_dither_mode.

◆ ditherMode1

uint32_t _pxp_dither_config::ditherMode1

Dither mode for dither engine 1. See _pxp_dither_mode.

◆ ditherMode2

uint32_t _pxp_dither_config::ditherMode2

Dither mode for dither engine 2. See _pxp_dither_mode.

◆ dstAlphaMode

uint32_t pxp_porter_duff_config_t::dstAlphaMode

Destination layer (or PS, s0) alpha mode, see pxp_porter_duff_alpha_mode.

◆ dstColorMode

uint32_t pxp_porter_duff_config_t::dstColorMode

Destination layer (or PS, s0) color mode, see pxp_porter_duff_color_mode.

◆ dstFactorMode

uint32_t pxp_porter_duff_config_t::dstFactorMode

Destination layer (or PS, s0) factor mode, see pxp_porter_duff_factor_mode.

◆ dstGlobalAlpha

uint32_t pxp_porter_duff_config_t::dstGlobalAlpha

Destination layer (or PS, s0) global alpha value, 0~255.

◆ dstGlobalAlphaMode

uint32_t pxp_porter_duff_config_t::dstGlobalAlphaMode

Destination layer (or PS, s0) global alpha mode, see pxp_porter_duff_global_alpha_mode.

◆ enable

uint32_t pxp_porter_duff_config_t::enable

Enable or disable Porter Duff.

◆ enableDither0

uint32_t _pxp_dither_config::enableDither0

Enable dither engine 0 or not, set 1 to enable, 0 to disable.

◆ enableDither1

uint32_t _pxp_dither_config::enableDither1

Enable dither engine 1 or not, set 1 to enable, 0 to disable.

◆ enableDither2

uint32_t _pxp_dither_config::enableDither2

Enable dither engine 2 or not, set 1 to enable, 0 to disable.

◆ enableFinalLut

uint32_t _pxp_dither_config::enableFinalLut

Enable the final LUT, set 1 to enable, 0 to disable.

◆ height [1/2]

uint16_t _pxp_output_buffer_config::height

How many lines in output buffer.

◆ height [2/2]

uint16_t _pxp_pic_copy_config::height

Lines to copy.

◆ idxMatrixSize0

uint32_t _pxp_dither_config::idxMatrixSize0

Size of index matrix used for dither for dither engine 0, see _pxp_dither_matrix_size.

◆ idxMatrixSize1

uint32_t _pxp_dither_config::idxMatrixSize1

Size of index matrix used for dither for dither engine 1, see _pxp_dither_matrix_size.

◆ idxMatrixSize2

uint32_t _pxp_dither_config::idxMatrixSize2

Size of index matrix used for dither for dither engine 2, see _pxp_dither_matrix_size.

◆ interlacedMode

pxp_interlaced_output_mode_t _pxp_output_buffer_config::interlacedMode

Interlaced output mode.

◆ invertAlpha

bool _pxp_as_blend_config::invertAlpha

Set true to invert the alpha.

◆ lookupMode

pxp_lut_lookup_mode_t _pxp_lut_config::lookupMode

Look up mode.

◆ lutMode

uint32_t _pxp_dither_config::lutMode

How to use the memory LUT, see _pxp_dither_lut_mode. This must be set to kPXP_DitherLutOff if any dither engine uses kPXP_DitherOrdered mode.

◆ mode

pxp_csc2_mode_t _pxp_csc2_config::mode

Convertion mode.

◆ outMode

pxp_lut_out_mode_t _pxp_lut_config::outMode

Out mode.

◆ pitchBytes [1/3]

uint16_t _pxp_output_buffer_config::pitchBytes

Number of bytes between two vertically adjacent pixels.

◆ pitchBytes [2/3]

uint16_t _pxp_ps_buffer_config::pitchBytes

Number of bytes between two vertically adjacent pixels.

◆ pitchBytes [3/3]

uint16_t _pxp_as_buffer_config::pitchBytes

Number of bytes between two vertically adjacent pixels.

◆ pixelFormat [1/4]

pxp_output_pixel_format_t _pxp_output_buffer_config::pixelFormat

Output buffer pixel format.

◆ pixelFormat [2/4]

pxp_ps_pixel_format_t _pxp_ps_buffer_config::pixelFormat

PS buffer pixel format.

◆ pixelFormat [3/4]

pxp_as_pixel_format_t _pxp_as_buffer_config::pixelFormat

AS buffer pixel format.

◆ pixelFormat [4/4]

pxp_as_pixel_format_t _pxp_pic_copy_config::pixelFormat

Buffer pixel format.

◆ quantBitNum

uint32_t _pxp_dither_config::quantBitNum

Number of bits quantize down to, the valid value is 1~7.

◆ ropMode

pxp_rop_mode_t _pxp_as_blend_config::ropMode

ROP mode, only valid when alphaMode is kPXP_AlphaRop.

◆ srcAlphaMode

uint32_t pxp_porter_duff_config_t::srcAlphaMode

Source layer (or AS, s1) alpha mode, see pxp_porter_duff_alpha_mode.

◆ srcColorMode

uint32_t pxp_porter_duff_config_t::srcColorMode

Source layer (or AS, s1) color mode, see pxp_porter_duff_color_mode.

◆ srcFactorMode

uint32_t pxp_porter_duff_config_t::srcFactorMode

Source layer (or AS, s1) factor mode, see pxp_porter_duff_factor_mode.

◆ srcGlobalAlpha

uint32_t pxp_porter_duff_config_t::srcGlobalAlpha

Source layer (or AS, s1) global alpha value, 0~255.

◆ srcGlobalAlphaMode

uint32_t pxp_porter_duff_config_t::srcGlobalAlphaMode

Source layer (or AS, s1) global alpha mode, see pxp_porter_duff_global_alpha_mode.

◆ srcOffsetX

uint16_t _pxp_pic_copy_config::srcOffsetX

Copy position in source picture.

◆ srcOffsetY

uint16_t _pxp_pic_copy_config::srcOffsetY

Copy position in source picture.

◆ srcPicBaseAddr

uint32_t _pxp_pic_copy_config::srcPicBaseAddr

Source picture base address.

◆ srcPitchBytes

uint16_t _pxp_pic_copy_config::srcPitchBytes

Pitch of the source buffer.

◆ swapByte

bool _pxp_ps_buffer_config::swapByte

For each 16 bit word, set true to swap the two bytes.

◆ width [1/2]

uint16_t _pxp_output_buffer_config::width

Pixels per line.

◆ width [2/2]

uint16_t _pxp_pic_copy_config::width

Pixel number each line to copy.