Use of PXP for image color conversion

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Use of PXP for image color conversion

1,139 次查看
sachinshewale
Contributor I

Hi,

We want to convert RGB image to RED/BLUE format. We are using PXP for this. Platform used: MCIMX6U8DVM10AC

Input Mode selected: DIRECT_RGB454

Output Mode Selected:  RGB888

Input Image format: RGB888

Output Image format: RGB888

Lookup Table Data: 16KB

Address = 8K

Lookup table values:

LUT Data format: RGB565

D15 D14 D13 D12 D11 D10 D09 D08 D07 D06 D05 D04 D03 D02 D01 D00

R      R    R      R     R   G      G     G     G    G     G    B      B      B     B     B

From 0 to 4096:

0xF800 <Red Colour>

From 4096 to 8192:

0x001F <Blue Colour>

Please check and let us know if understanding is correct.

0 项奖励
回复
1 回复

914 次查看
Yuri
NXP Employee
NXP Employee

Hello,

  As stated in section 53.3.19 (DIRECT_RGB454) of the i.MX6 S/DL RM,
the address in the LUT is generated as: R[23:20], G[15:11], B[7:4].

This means R[23] bit defines if output data are Red or Blue.

  I think, it would be better to use the most significant bits of each color : R[23], G[15], B[7] :

where these bits (12-th, 8-th, 3-th of LUT index) are set  content should be 0x001F <Blue Colour>,

all the rest as - 0xF800 <Red Colour>.


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复