refactor(ppa): avoid the use of yuv422_pack_order field in PPA driver

This commit is contained in:
Song Ruo Jing
2025-11-24 11:38:07 +08:00
parent 222d81976a
commit d5c0ab7ad2
12 changed files with 144 additions and 96 deletions
@@ -287,7 +287,7 @@ extern "C" {
#define PPA_RGB2YUV_PROTOCOL_V 0x00000001U
#define PPA_RGB2YUV_PROTOCOL_S 11
/** PPA_YUV422_RX_BYTE_ORDER : R/W; bitpos: [13:12]; default: 0;
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY (high addr -> low addr)
*/
#define PPA_YUV422_RX_BYTE_ORDER 0x00000003U
#define PPA_YUV422_RX_BYTE_ORDER_M (PPA_YUV422_RX_BYTE_ORDER_V << PPA_YUV422_RX_BYTE_ORDER_S)
@@ -351,7 +351,7 @@ extern "C" {
#define PPA_BLEND_TX_RGB2YUV_PROTOCOL_V 0x00000001U
#define PPA_BLEND_TX_RGB2YUV_PROTOCOL_S 15
/** PPA_BLEND0_RX_YUV422_BYTE_ORDER : R/W; bitpos: [17:16]; default: 0;
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY (high addr -> low addr)
*/
#define PPA_BLEND0_RX_YUV422_BYTE_ORDER 0x00000003U
#define PPA_BLEND0_RX_YUV422_BYTE_ORDER_M (PPA_BLEND0_RX_YUV422_BYTE_ORDER_V << PPA_BLEND0_RX_YUV422_BYTE_ORDER_S)
@@ -116,7 +116,7 @@ typedef union {
*/
uint32_t rgb2yuv_protocol:1;
/** yuv422_rx_byte_order : R/W; bitpos: [13:12]; default: 0;
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY (high addr -> low addr)
*/
uint32_t yuv422_rx_byte_order:2;
uint32_t reserved_14:18;
@@ -161,7 +161,7 @@ typedef union {
*/
uint32_t blend_tx_rgb2yuv_protocol:1;
/** blend0_rx_yuv422_byte_order : R/W; bitpos: [17:16]; default: 0;
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY
* YUV422 input byte order when reg_sr_rx_cm is 4'd9. 0: YVYU, 1:YUYV, 2: VYUY, 3: UYVY (high addr -> low addr)
*/
uint32_t blend0_rx_yuv422_byte_order:2;
uint32_t reserved_18:14;