Coefficients of the YUV->RGB conversion formula.
Definition: y2r.h:70
u16 r_V
Red per unit V.
Definition: y2r.h:72
u16 b_offset
Blue offset.
Definition: y2r.h:78
u16 b_U
Blue per unit U.
Definition: y2r.h:75
u16 g_V
Green per unit V.
Definition: y2r.h:73
u16 rgb_Y
RGB per unit Y.
Definition: y2r.h:71
u16 g_U
Green per unit U.
Definition: y2r.h:74
u16 g_offset
Green offset.
Definition: y2r.h:77
u16 r_offset
Red offset.
Definition: y2r.h:76
Structure used to configure all parameters at once.
Definition: y2r.h:100
Y2RU_OutputFormat output_format
Value passed to Y2RU_SetOutputFormat.
Definition: y2r.h:102
s16 input_lines
Value passed to Y2RU_SetInputLines.
Definition: y2r.h:106
u16 alpha
Value passed to Y2RU_SetAlpha.
Definition: y2r.h:109
Y2RU_Rotation rotation
Value passed to Y2RU_SetRotation.
Definition: y2r.h:103
u8 unused
Unused.
Definition: y2r.h:108
s16 input_line_width
Value passed to Y2RU_SetInputLineWidth.
Definition: y2r.h:105
Y2RU_InputFormat input_format
Value passed to Y2RU_SetInputFormat.
Definition: y2r.h:101
Y2RU_StandardCoefficient standard_coefficient
Value passed to Y2RU_SetStandardCoefficient.
Definition: y2r.h:107
Y2RU_BlockAlignment block_alignment
Value passed to Y2RU_SetBlockAlignment.
Definition: y2r.h:104
Dithering weights.
Definition: y2r.h:114
u16 w0_xEven_yOdd
Weight 0 for even X, odd Y.
Definition: y2r.h:117
u16 w1_xEven_yEven
Weight 1 for even X, even Y.
Definition: y2r.h:119
u16 w1_xEven_yOdd
Weight 1 for even X, odd Y.
Definition: y2r.h:121
u16 w3_xEven_yEven
Weight 3 for even X, even Y.
Definition: y2r.h:127
u16 w2_xOdd_yEven
Weight 2 for odd X, even Y.
Definition: y2r.h:124
u16 w2_xOdd_yOdd
Weight 2 for odd X, odd Y.
Definition: y2r.h:126
u16 w2_xEven_yEven
Weight 2 for even X, even Y.
Definition: y2r.h:123
u16 w1_xOdd_yOdd
Weight 1 for odd X, odd Y.
Definition: y2r.h:122
u16 w2_xEven_yOdd
Weight 2 for even X, odd Y.
Definition: y2r.h:125
u16 w0_xEven_yEven
Weight 0 for even X, even Y.
Definition: y2r.h:115
u16 w3_xEven_yOdd
Weight 3 for even X, odd Y.
Definition: y2r.h:129
u16 w1_xOdd_yEven
Weight 1 for odd X, even Y.
Definition: y2r.h:120
u16 w0_xOdd_yEven
Weight 0 for odd X, even Y.
Definition: y2r.h:116
u16 w3_xOdd_yEven
Weight 3 for odd X, even Y.
Definition: y2r.h:128
u16 w0_xOdd_yOdd
Weight 0 for odd X, odd Y.
Definition: y2r.h:118
u16 w3_xOdd_yOdd
Weight 3 for odd X, odd Y.
Definition: y2r.h:130
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
int16_t s16
16-bit signed integer
Definition: types.h:27
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Y2RU_Rotation
Rotation to be applied to the output.
Definition: y2r.h:37
@ ROTATION_CLOCKWISE_270
Clockwise 270 degrees.
Definition: y2r.h:41
@ ROTATION_NONE
No rotation.
Definition: y2r.h:38
@ ROTATION_CLOCKWISE_180
Clockwise 180 degrees.
Definition: y2r.h:40
@ ROTATION_CLOCKWISE_90
Clockwise 90 degrees.
Definition: y2r.h:39
Result Y2RU_IsDoneReceiving(bool *is_done)
Checks if the DMA has finished sending the converted result.
Result Y2RU_GetInputFormat(Y2RU_InputFormat *format)
Gets the configured input format.
Result Y2RU_SetConversionParams(const Y2RU_ConversionParams *params)
Sets all of the parameters of Y2RU_ConversionParams at once.
Result Y2RU_IsDoneSendingU(bool *is_done)
Checks if the DMA has finished sending the U buffer.
void y2rExit(void)
Closes the y2r service.
Result Y2RU_SetSendingYUYV(const void *src_buf, u32 image_size, s16 transfer_unit, s16 transfer_gap)
Configures the YUYV source buffer.
Result Y2RU_GetStandardCoefficient(Y2RU_ColorCoefficients *coefficients, Y2RU_StandardCoefficient standardCoeff)
Gets the color coefficient parameters of a standard coefficient.
Result Y2RU_SetTemporalDithering(bool enable)
Sets whether to use temporal dithering.
Result Y2RU_SetSendingY(const void *src_buf, u32 image_size, s16 transfer_unit, s16 transfer_gap)
Configures the Y plane buffer.
Result Y2RU_GetAlpha(u16 *alpha)
Gets the configured output alpha value.
Result Y2RU_GetSpacialDithering(bool *enabled)
Gets whether to use spacial dithering.
Y2RU_StandardCoefficient
Preset conversion coefficients based on ITU standards for the YUV->RGB formula.
Definition: y2r.h:87
@ COEFFICIENT_ITU_R_BT_601_SCALING
Coefficients from the ITU-R BT.601 standard with TV ranges.
Definition: y2r.h:90
@ COEFFICIENT_ITU_R_BT_709_SCALING
Coefficients from the ITU-R BT.709 standard with TV ranges.
Definition: y2r.h:91
@ COEFFICIENT_ITU_R_BT_601
Coefficients from the ITU-R BT.601 standard with PC ranges.
Definition: y2r.h:88
@ COEFFICIENT_ITU_R_BT_709
Coefficients from the ITU-R BT.709 standard with PC ranges.
Definition: y2r.h:89
Result Y2RU_IsDoneSendingYUYV(bool *is_done)
Checks if the DMA has finished sending the YUYV buffer.
Result y2rInit(void)
Initializes the y2r service.
Result Y2RU_SetOutputFormat(Y2RU_OutputFormat format)
Used to configure the output format.
Result Y2RU_SetSendingV(const void *src_buf, u32 image_size, s16 transfer_unit, s16 transfer_gap)
Configures the V plane buffer.
Result Y2RU_SetTransferEndInterrupt(bool should_interrupt)
Used to enable the end of conversion interrupt.
Result Y2RU_GetTransferEndInterrupt(bool *should_interrupt)
Gets whether the transfer end interrupt is enabled.
Result Y2RU_SetCoefficients(const Y2RU_ColorCoefficients *coefficients)
Used to configure the color conversion formula.
Result Y2RU_IsDoneSendingY(bool *is_done)
Checks if the DMA has finished sending the Y buffer.
Result Y2RU_GetDitheringWeightParams(Y2RU_DitheringWeightParams *params)
Gets the configured dithering weight parameters.
Result Y2RU_GetCoefficients(Y2RU_ColorCoefficients *coefficients)
Gets the configured color coefficients.
Result Y2RU_SetStandardCoefficient(Y2RU_StandardCoefficient coefficient)
Used to configure the color conversion formula with ITU stantards coefficients.
Result Y2RU_GetInputLineWidth(u16 *line_width)
Gets the configured input line width.
Result Y2RU_IsBusyConversion(bool *is_busy)
Checks if the conversion and DMA transfer are finished.
Result Y2RU_SetRotation(Y2RU_Rotation rotation)
Used to configure the rotation of the output.
Result Y2RU_SetSendingU(const void *src_buf, u32 image_size, s16 transfer_unit, s16 transfer_gap)
Configures the U plane buffer.
Result Y2RU_SetSpacialDithering(bool enable)
Sets whether to use spacial dithering.
Result Y2RU_DriverInitialize(void)
Initializes the Y2R driver.
Result Y2RU_StartConversion(void)
Starts the conversion process.
Result Y2RU_StopConversion(void)
Cancels the conversion.
Result Y2RU_SetInputLines(u16 num_lines)
Used to configure the height of the image.
Result Y2RU_GetBlockAlignment(Y2RU_BlockAlignment *alignment)
Gets the configured alignment.
Result Y2RU_GetOutputFormat(Y2RU_OutputFormat *format)
Gets the configured output format.
Result Y2RU_IsDoneSendingV(bool *is_done)
Checks if the DMA has finished sending the V buffer.
Y2RU_BlockAlignment
Block alignment of output.
Definition: y2r.h:50
@ BLOCK_8_BY_8
The result will be stored as 8x8 blocks in Z-order. Useful for textures since it is the format used ...
Definition: y2r.h:52
@ BLOCK_LINE
The result buffer will be laid out in linear format, the usual way.
Definition: y2r.h:51
Result Y2RU_GetRotation(Y2RU_Rotation *rotation)
Gets the configured rotation.
Result Y2RU_SetDitheringWeightParams(const Y2RU_DitheringWeightParams *params)
Configures the dithering weight parameters.
Result Y2RU_SetBlockAlignment(Y2RU_BlockAlignment alignment)
Used to configure the alignment of the output buffer.
Y2RU_InputFormat
Input color formats.
Definition: y2r.h:14
@ INPUT_YUV420_INDIV_16
16-bit per component, planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples)....
Definition: y2r.h:18
@ INPUT_YUV422_INDIV_16
16-bit per component, planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples)....
Definition: y2r.h:17
@ INPUT_YUV422_BATCH
8-bit per component, packed YUV 4:2:2, 16bpp, (Y0 Cb Y1 Cr). Usually named YUYV422.
Definition: y2r.h:19
@ INPUT_YUV422_INDIV_8
8-bit per component, planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)....
Definition: y2r.h:15
@ INPUT_YUV420_INDIV_8
8-bit per component, planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)....
Definition: y2r.h:16
Y2RU_OutputFormat
Output color formats.
Definition: y2r.h:28
@ OUTPUT_RGB_32
32-bit RGBA8888. The alpha component is the 8-bit value set by Y2RU_SetAlpha
Definition: y2r.h:29
@ OUTPUT_RGB_24
24-bit RGB888.
Definition: y2r.h:30
@ OUTPUT_RGB_16_565
16-bit RGB565.
Definition: y2r.h:32
@ OUTPUT_RGB_16_555
16-bit RGBA5551. The alpha bit is the 7th bit of the alpha value set by Y2RU_SetAlpha
Definition: y2r.h:31
Result Y2RU_SetReceiving(void *dst_buf, u32 image_size, s16 transfer_unit, s16 transfer_gap)
Configures the destination buffer.
Result Y2RU_SetInputLineWidth(u16 line_width)
Used to configure the width of the image.
Result Y2RU_GetInputLines(u16 *num_lines)
Gets the configured number of input lines.
Result Y2RU_DriverFinalize(void)
Terminates the Y2R driver.
Result Y2RU_SetInputFormat(Y2RU_InputFormat format)
Used to configure the input format.
Result Y2RU_GetTemporalDithering(bool *enabled)
Gets whether to use temporal dithering.
Result Y2RU_GetTransferEndEvent(Handle *end_event)
Gets an handle to the end of conversion event.
Result Y2RU_PingProcess(u8 *ping)
Checks whether Y2R is ready to be used.
Result Y2RU_SetAlpha(u16 alpha)
Used to configure the alpha value of the output.