vitasdk
Documentation of the vitasdk

Exports for Kernel. More...

Data Structures

struct  SceIftuCscParams
 
struct  SceIftuConvParams
 
struct  SceIftuFrameBuf
 
struct  SceIftuPlaneState
 

Enumerations

enum  SceIftuErrorCode { SCE_IFTU_ERROR_INVALID_PLANE = 0x803F0700 , SCE_IFTU_ERROR_INVALID_PARAM = 0x803F0701 , SCE_IFTU_ERROR_INVALID_PIXELFORMAT = 0x803F0703 , SCE_IFTU_ERROR_PLANE_BUSY = 0x803F0704 }
 
enum  SceIftuPixelformat {
  SCE_IFTU_PIXELFORMAT_BGR565 = 0x01 , SCE_IFTU_PIXELFORMAT_RGB565 = 0x02 , SCE_IFTU_PIXELFORMAT_BGRA5551 = 0x04 , SCE_IFTU_PIXELFORMAT_RGBA5551 = 0x08 ,
  SCE_IFTU_PIXELFORMAT_BGRX8888 = 0x10 , SCE_IFTU_PIXELFORMAT_RGBX8888 = 0x20 , SCE_IFTU_PIXELFORMAT_BGRA1010102 = 0x40 , SCE_IFTU_PIXELFORMAT_RGBA1010102 = 0x80 ,
  SCE_IFTU_PIXELFORMAT_BGRP = 0x100 , SCE_IFTU_PIXELFORMAT_RGBX8888_MULT = 0x1000 , SCE_IFTU_PIXELFORMAT_BGRX8888_MULT = 0x2000 , SCE_IFTU_PIXELFORMAT_RGBA1010102_MULT = 0x4000 ,
  SCE_IFTU_PIXELFORMAT_BGRA1010102_MULT = 0x8000 , SCE_IFTU_PIXELFORMAT_NV12 = 0x10000 , SCE_IFTU_PIXELFORMAT_YUV420 = 0x20000 , SCE_IFTU_PIXELFORMAT_YUV422 = 0x200000
}
 
enum  SceIftuFilterMode { SCE_IFTU_FILTER_MODE_NEAREST = 0 , SCE_IFTU_FILTER_MODE_BILINEAR = 1 }
 
enum  SceIftuFieldMode { SCE_IFTU_FIELD_MODE_PROGRESSIVE = 0 , SCE_IFTU_FIELD_MODE_UNK_1 = 1 , SCE_IFTU_FIELD_MODE_INTERLACED_FIELD_0 = 2 , SCE_IFTU_FIELD_MODE_INTERLACED_FIELD_1 = 3 }
 

Functions

 VITASDK_BUILD_ASSERT_EQ (1, SceIftuFilterMode)
 
 VITASDK_BUILD_ASSERT_EQ (1, SceIftuFieldMode)
 
 VITASDK_BUILD_ASSERT_EQ (0x3C, SceIftuCscParams)
 
 VITASDK_BUILD_ASSERT_EQ (0x28, SceIftuConvParams)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceIftuFrameBuf)
 
 VITASDK_BUILD_ASSERT_EQ (0x54, SceIftuPlaneState)
 
int ksceIftuCsc (SceIftuFrameBuf *dst, SceIftuPlaneState *src, SceIftuConvParams *params)
 Convert a frame with the standalone IFTU2 engine and wait for completion.
 
int ksceIftuDisable (unsigned int plane_index)
 Disable a display-plane IFTU context and its interrupt.
 
int ksceIftuEnable (unsigned int plane_index)
 Enable a display-plane IFTU context using its cached configuration.
 
int ksceIftuSetInputFrameBuffer (unsigned int plane_index, const SceIftuPlaneState *plane_state, int bilinear, int sync)
 Store an IFTU input-plane state in the cache and submit it.
 
int ksceIftuSetMergeSetting (unsigned int plane_index, int control)
 Set an overlay plane's merge/blending control.
 
int ksceIftuSetOutputFormat (unsigned int plane_index, unsigned int width, unsigned int height, unsigned int pixel_format, unsigned int interlaced)
 Configure an IFTU display plane's output size and format.
 

Variables

unsigned int SceIftuCscParams::post_add_0
 10-bit post-add offset for component 0.
 
unsigned int SceIftuCscParams::post_add_1_2
 10-bit post-add value shared by components 1 and 2.
 
unsigned int SceIftuCscParams::post_clamp_max_0
 10-bit upper clamp limit for component 0.
 
unsigned int SceIftuCscParams::post_clamp_min_0
 10-bit lower clamp limit for component 0.
 
unsigned int SceIftuCscParams::post_clamp_max_1_2
 10-bit upper clamp limit shared by components 1 and 2.
 
unsigned int SceIftuCscParams::post_clamp_min_1_2
 10-bit lower clamp limit shared by components 1 and 2.
 
unsigned int SceIftuCscParams::ctm [3][3]
 Signed S3.9 fixed-point values stored as 12-bit two's-complement register fields.
 
unsigned int SceIftuConvParams::size
 Structure size; FW 3.60 does not validate it.
 
unsigned int SceIftuConvParams::unk04
 
SceIftuCscParams * SceIftuConvParams::csc_params1
 Optional read-only parameters for the CSC register block starting at 0x130.
 
SceIftuCscParams * SceIftuConvParams::csc_params2
 Optional read-only parameters for the CSC register block starting at 0x104.
 
unsigned int SceIftuConvParams::csc_control
 Raw CSC control-register value.
 
unsigned int SceIftuConvParams::unk14
 
unsigned int SceIftuConvParams::unk18
 
unsigned int SceIftuConvParams::unk1C
 
unsigned int SceIftuConvParams::alpha
 Alpha value. The default is 0xFF.
 
unsigned int SceIftuConvParams::unk24
 
unsigned int SceIftuFrameBuf::pixelformat
 One of SceIftuPixelformat or a documented extended format.
 
unsigned int SceIftuFrameBuf::width
 Frame width in pixels; known FW 3.60 callers align it to 16 pixels.
 
unsigned int SceIftuFrameBuf::height
 Frame height in pixels; known FW 3.60 callers align it to 8 pixels.
 
unsigned int SceIftuFrameBuf::leftover_stride
 Additional bytes after each luma or packed-pixel row.
 
unsigned int SceIftuFrameBuf::leftover_align
 
unsigned int SceIftuFrameBuf::paddr0
 Physical address of plane 0.
 
unsigned int SceIftuFrameBuf::paddr1
 Physical address of plane 1, or zero when unused.
 
unsigned int SceIftuFrameBuf::paddr2
 Physical address of plane 2, or zero when unused.
 
SceIftuFrameBuf SceIftuPlaneState::fb
 
unsigned int SceIftuPlaneState::unk20
 
unsigned int SceIftuPlaneState::src_x
 Horizontal source-sampling offset in unsigned 8.8 fixed-point format.
 
unsigned int SceIftuPlaneState::src_y
 Vertical source-sampling offset in unsigned 8.8 fixed-point format.
 
unsigned int SceIftuPlaneState::src_w
 Horizontal source-sampling step per destination pixel in 16.16 fixed-point format.
 
unsigned int SceIftuPlaneState::src_h
 Vertical source-sampling step per destination pixel in 16.16 fixed-point format.
 
unsigned int SceIftuPlaneState::dst_x
 Destination X coordinate in pixels.
 
unsigned int SceIftuPlaneState::dst_y
 Destination Y coordinate in pixels.
 
unsigned int SceIftuPlaneState::dst_w
 
unsigned int SceIftuPlaneState::dst_h
 
unsigned int SceIftuPlaneState::vtop_padding
 
unsigned int SceIftuPlaneState::vbot_padding
 
unsigned int SceIftuPlaneState::hleft_padding
 
unsigned int SceIftuPlaneState::hright_padding
 

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceIftuForDriver_stub




Data Structure Documentation

◆ SceIftuCscParams

struct SceIftuCscParams
Data Fields
unsigned int post_add_0 10-bit post-add offset for component 0.
unsigned int post_add_1_2 10-bit post-add value shared by components 1 and 2.
unsigned int post_clamp_max_0 10-bit upper clamp limit for component 0.
unsigned int post_clamp_min_0 10-bit lower clamp limit for component 0.
unsigned int post_clamp_max_1_2 10-bit upper clamp limit shared by components 1 and 2.
unsigned int post_clamp_min_1_2 10-bit lower clamp limit shared by components 1 and 2.
unsigned int ctm[3][3] Signed S3.9 fixed-point values stored as 12-bit two's-complement register fields.

◆ SceIftuConvParams

struct SceIftuConvParams
Data Fields
unsigned int size Structure size; FW 3.60 does not validate it.
unsigned int unk04
SceIftuCscParams * csc_params1 Optional read-only parameters for the CSC register block starting at 0x130.
SceIftuCscParams * csc_params2 Optional read-only parameters for the CSC register block starting at 0x104.
unsigned int csc_control Raw CSC control-register value.
unsigned int unk14
unsigned int unk18
unsigned int unk1C
unsigned int alpha Alpha value. The default is 0xFF.
unsigned int unk24

◆ SceIftuFrameBuf

struct SceIftuFrameBuf
Data Fields
unsigned int pixelformat One of SceIftuPixelformat or a documented extended format.
unsigned int width Frame width in pixels; known FW 3.60 callers align it to 16 pixels.
unsigned int height Frame height in pixels; known FW 3.60 callers align it to 8 pixels.
unsigned int leftover_stride Additional bytes after each luma or packed-pixel row.
unsigned int leftover_align
unsigned int paddr0 Physical address of plane 0.
unsigned int paddr1 Physical address of plane 1, or zero when unused.
unsigned int paddr2 Physical address of plane 2, or zero when unused.

◆ SceIftuPlaneState

struct SceIftuPlaneState
Data Fields
SceIftuFrameBuf fb
unsigned int unk20
unsigned int src_x Horizontal source-sampling offset in unsigned 8.8 fixed-point format.
unsigned int src_y Vertical source-sampling offset in unsigned 8.8 fixed-point format.
unsigned int src_w Horizontal source-sampling step per destination pixel in 16.16 fixed-point format.
unsigned int src_h Vertical source-sampling step per destination pixel in 16.16 fixed-point format.
unsigned int dst_x Destination X coordinate in pixels.
unsigned int dst_y Destination Y coordinate in pixels.
unsigned int dst_w
unsigned int dst_h
unsigned int vtop_padding
unsigned int vbot_padding
unsigned int hleft_padding
unsigned int hright_padding

Enumeration Type Documentation

◆ SceIftuErrorCode

Enumerator
SCE_IFTU_ERROR_INVALID_PLANE 
SCE_IFTU_ERROR_INVALID_PARAM 
SCE_IFTU_ERROR_INVALID_PIXELFORMAT 
SCE_IFTU_ERROR_PLANE_BUSY 

◆ SceIftuPixelformat

Enumerator
SCE_IFTU_PIXELFORMAT_BGR565 
SCE_IFTU_PIXELFORMAT_RGB565 
SCE_IFTU_PIXELFORMAT_BGRA5551 
SCE_IFTU_PIXELFORMAT_RGBA5551 
SCE_IFTU_PIXELFORMAT_BGRX8888 
SCE_IFTU_PIXELFORMAT_RGBX8888 
SCE_IFTU_PIXELFORMAT_BGRA1010102 
SCE_IFTU_PIXELFORMAT_RGBA1010102 
SCE_IFTU_PIXELFORMAT_BGRP 
SCE_IFTU_PIXELFORMAT_RGBX8888_MULT 
SCE_IFTU_PIXELFORMAT_BGRX8888_MULT 
SCE_IFTU_PIXELFORMAT_RGBA1010102_MULT 
SCE_IFTU_PIXELFORMAT_BGRA1010102_MULT 
SCE_IFTU_PIXELFORMAT_NV12 
SCE_IFTU_PIXELFORMAT_YUV420 
SCE_IFTU_PIXELFORMAT_YUV422 

◆ SceIftuFilterMode

Enumerator
SCE_IFTU_FILTER_MODE_NEAREST 
SCE_IFTU_FILTER_MODE_BILINEAR 

◆ SceIftuFieldMode

Enumerator
SCE_IFTU_FIELD_MODE_PROGRESSIVE 
SCE_IFTU_FIELD_MODE_UNK_1 
SCE_IFTU_FIELD_MODE_INTERLACED_FIELD_0 
SCE_IFTU_FIELD_MODE_INTERLACED_FIELD_1 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/6]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceIftuFilterMode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/6]

VITASDK_BUILD_ASSERT_EQ ( 1  ,
SceIftuFieldMode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/6]

VITASDK_BUILD_ASSERT_EQ ( 0x3C  ,
SceIftuCscParams   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/6]

VITASDK_BUILD_ASSERT_EQ ( 0x28  ,
SceIftuConvParams   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/6]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceIftuFrameBuf   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/6]

VITASDK_BUILD_ASSERT_EQ ( 0x54  ,
SceIftuPlaneState   
)

◆ ksceIftuCsc()

int ksceIftuCsc ( SceIftuFrameBuf *  dst,
SceIftuPlaneState *  src,
SceIftuConvParams *  params 
)

Convert a frame with the standalone IFTU2 engine and wait for completion.

dst and src must be non-NULL; FW 3.60 dereferences them without checking for NULL. The structures they point to are read-only. params may be NULL, which selects bilinear filtering, no CSC control, a zero background, alpha 0xFF, and progressive field mode.

FW 3.60 does not read or validate SceIftuConvParams::size. Interlaced callers perform one conversion with field mode 2 or 3 and a second conversion with the other mode. How these modes correspond to the top and bottom fields depends on the source description and is not established.

The source accepts every SceIftuPixelformat value, zero, 0x80020000, 0x80140000, and 0x80180000. The purpose of these three extended formats is unknown. The destination accepts every SceIftuPixelformat value and ignores bit 31 while validating it.

Parameters
[in]dst- Destination frame-buffer description.
[in]src- Source plane state.
[in]params- Optional conversion parameters.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PIXELFORMAT for an unsupported source or destination pixel format, or a negative fast-mutex error.

◆ ksceIftuDisable()

int ksceIftuDisable ( unsigned int  plane_index)

Disable a display-plane IFTU context and its interrupt.

Parameters
[in]plane_index- Display-plane index in the range 0 to 3.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PLANE for an invalid plane.

◆ ksceIftuEnable()

int ksceIftuEnable ( unsigned int  plane_index)

Enable a display-plane IFTU context using its cached configuration.

Parameters
[in]plane_index- Display-plane index in the range 0 to 3.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PLANE for an invalid plane.

◆ ksceIftuSetInputFrameBuffer()

int ksceIftuSetInputFrameBuffer ( unsigned int  plane_index,
const SceIftuPlaneState *  plane_state,
int  bilinear,
int  sync 
)

Store an IFTU input-plane state in the cache and submit it.

FW 3.60 copies all 0x54 bytes when plane_state is non-NULL. A zero pixel format disables the input. When the plane is enabled, a zero sync updates only the physical addresses and the three reserved register words in both configuration banks. A nonzero value submits the complete cached state. In addition to SceIftuPixelformat, FW 3.60 accepts input formats 0x80020000, 0x80140000, and 0x80180000; their purpose is unknown.

Parameters
[in]plane_index- Global IFTU plane index in the range 0 to 4.
[in]plane_state- New complete state, or NULL to reuse the cached state. The structure is read-only.
[in]bilinear- A nonnegative value replaces the cached filter setting; a negative value preserves it. Known FW 3.60 callers use SCE_IFTU_FILTER_MODE_NEAREST or SCE_IFTU_FILTER_MODE_BILINEAR.
[in]sync- Zero to update only addresses and reserved register words when the plane is enabled, or nonzero to submit the complete state.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PLANE for an invalid plane, or SCE_IFTU_ERROR_INVALID_PIXELFORMAT for an unsupported input format.

◆ ksceIftuSetMergeSetting()

int ksceIftuSetMergeSetting ( unsigned int  plane_index,
int  control 
)

Set an overlay plane's merge/blending control.

Parameters
[in]plane_index- Overlay plane index; only 1 and 3 are accepted.
[in]control- Raw merge-control value. 0x80 disables the associated blend-enable bit.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PLANE for an invalid plane.

◆ ksceIftuSetOutputFormat()

int ksceIftuSetOutputFormat ( unsigned int  plane_index,
unsigned int  width,
unsigned int  height,
unsigned int  pixel_format,
unsigned int  interlaced 
)

Configure an IFTU display plane's output size and format.

Parameters
[in]plane_index- Display-plane index in the range 0 to 3.
[in]width- Output width in pixels; must be a multiple of 16.
[in]height- Output height in pixels; must be a multiple of 8.
[in]pixel_format- One of SceIftuPixelformat. FW 3.60 accepts values 0x10, 0x20, 0x40, 0x80, 0x1000, 0x2000, 0x4000, and 0x8000.
[in]interlaced- Set to 1 to enable interlaced output handling. All other values select progressive handling.
Returns
0 on success, SCE_IFTU_ERROR_INVALID_PLANE for an invalid plane, SCE_IFTU_ERROR_INVALID_PARAM for a misaligned width or height, SCE_IFTU_ERROR_INVALID_PIXELFORMAT for an unsupported output format, or SCE_IFTU_ERROR_PLANE_BUSY if the plane is enabled.

Variable Documentation

◆ post_add_0

unsigned int SceIftuCscParams::post_add_0

10-bit post-add offset for component 0.

◆ post_add_1_2

unsigned int SceIftuCscParams::post_add_1_2

10-bit post-add value shared by components 1 and 2.

◆ post_clamp_max_0

unsigned int SceIftuCscParams::post_clamp_max_0

10-bit upper clamp limit for component 0.

◆ post_clamp_min_0

unsigned int SceIftuCscParams::post_clamp_min_0

10-bit lower clamp limit for component 0.

◆ post_clamp_max_1_2

unsigned int SceIftuCscParams::post_clamp_max_1_2

10-bit upper clamp limit shared by components 1 and 2.

◆ post_clamp_min_1_2

unsigned int SceIftuCscParams::post_clamp_min_1_2

10-bit lower clamp limit shared by components 1 and 2.

◆ ctm

unsigned int SceIftuCscParams::ctm[3][3]

Signed S3.9 fixed-point values stored as 12-bit two's-complement register fields.

◆ size

unsigned int SceIftuConvParams::size

Structure size; FW 3.60 does not validate it.

◆ unk04

unsigned int SceIftuConvParams::unk04

◆ csc_params1

SceIftuCscParams* SceIftuConvParams::csc_params1

Optional read-only parameters for the CSC register block starting at 0x130.

◆ csc_params2

SceIftuCscParams* SceIftuConvParams::csc_params2

Optional read-only parameters for the CSC register block starting at 0x104.

◆ csc_control

unsigned int SceIftuConvParams::csc_control

Raw CSC control-register value.

◆ unk14

unsigned int SceIftuConvParams::unk14

◆ unk18

unsigned int SceIftuConvParams::unk18

◆ unk1C

unsigned int SceIftuConvParams::unk1C

◆ alpha

unsigned int SceIftuConvParams::alpha

Alpha value. The default is 0xFF.

◆ unk24

unsigned int SceIftuConvParams::unk24

◆ pixelformat

unsigned int SceIftuFrameBuf::pixelformat

One of SceIftuPixelformat or a documented extended format.

◆ width

unsigned int SceIftuFrameBuf::width

Frame width in pixels; known FW 3.60 callers align it to 16 pixels.

◆ height

unsigned int SceIftuFrameBuf::height

Frame height in pixels; known FW 3.60 callers align it to 8 pixels.

◆ leftover_stride

unsigned int SceIftuFrameBuf::leftover_stride

Additional bytes after each luma or packed-pixel row.

◆ leftover_align

unsigned int SceIftuFrameBuf::leftover_align

◆ paddr0

unsigned int SceIftuFrameBuf::paddr0

Physical address of plane 0.

◆ paddr1

unsigned int SceIftuFrameBuf::paddr1

Physical address of plane 1, or zero when unused.

◆ paddr2

unsigned int SceIftuFrameBuf::paddr2

Physical address of plane 2, or zero when unused.

◆ fb

SceIftuFrameBuf SceIftuPlaneState::fb

◆ unk20

unsigned int SceIftuPlaneState::unk20

◆ src_x

unsigned int SceIftuPlaneState::src_x

Horizontal source-sampling offset in unsigned 8.8 fixed-point format.

◆ src_y

unsigned int SceIftuPlaneState::src_y

Vertical source-sampling offset in unsigned 8.8 fixed-point format.

◆ src_w

unsigned int SceIftuPlaneState::src_w

Horizontal source-sampling step per destination pixel in 16.16 fixed-point format.

◆ src_h

unsigned int SceIftuPlaneState::src_h

Vertical source-sampling step per destination pixel in 16.16 fixed-point format.

◆ dst_x

unsigned int SceIftuPlaneState::dst_x

Destination X coordinate in pixels.

◆ dst_y

unsigned int SceIftuPlaneState::dst_y

Destination Y coordinate in pixels.

◆ dst_w

unsigned int SceIftuPlaneState::dst_w

◆ dst_h

unsigned int SceIftuPlaneState::dst_h

◆ vtop_padding

unsigned int SceIftuPlaneState::vtop_padding

◆ vbot_padding

unsigned int SceIftuPlaneState::vbot_padding

◆ hleft_padding

unsigned int SceIftuPlaneState::hleft_padding

◆ hright_padding

unsigned int SceIftuPlaneState::hright_padding