MX27 pre-processor colorspace conversion

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

MX27 pre-processor colorspace conversion

跳至解决方案
2,311 次查看
Dilebo
Contributor III

Hi,

I have program on an i.MX27 working as follow :

RGB565 video stream input ---> RGB565 to YUV420 colorspace conversion ---> H.264 encoding ---> rtp stream

I wrote an algorithm to convert RGB to YUV but it's a bit slow for large resolution and I saw that I could use the pre-processor for the conversion (see http://www.freescale.com/files/32bit/doc/ref_manual/MCIMX27RM.pdf section 41.5.5). But I have no idea how to use/configure the pre-processor.

So I'm looking for any tutorial or documentation about how to use the pre-processor on an MX27.

I only found https://community.freescale.com/message/33151 which is about post-processor.

Thank you for any help,

Florentin

标签 (4)
0 项奖励
回复
1 解答
2,018 次查看
Dilebo
Contributor III

The pre-processor is configured in the file driver/media/video/mx27_camera.c

function mx27_camera_set_bus_param()

在原帖中查看解决方案

0 项奖励
回复
9 回复数
2,019 次查看
Dilebo
Contributor III

The pre-processor is configured in the file driver/media/video/mx27_camera.c

function mx27_camera_set_bus_param()

0 项奖励
回复
2,018 次查看
Dilebo
Contributor III

Thank you for your replies.

Yossi Shukron: As you said, I only need to convert RGB to YUV before to encode. So I will try to use the post-processor.

Now I have to find the source files where the ppConfigData structure and other post-processor tools are defined.

Guanqiong Xie: You are telling me that I can use the pre-processor when Yossi Shukron tell me to use the post-processor, so I'm a bit confused. Maybe both can do the job. As the post-processor is independent of the IPU, it seems easier to use.

0 项奖励
回复
2,018 次查看
joanxie
NXP TechSupport
NXP TechSupport

Refer to the RM, PP performs postprocessing functions after video decoding, if you would like to changer format before decoding, I think Prp is better.

0 项奖励
回复
2,018 次查看
Dilebo
Contributor III
0 项奖励
回复
2,018 次查看
joanxie
NXP TechSupport
NXP TechSupport

I find application note 2676 is useful for you, you can refer to it, though it's for imx21.

<http://cache.freescale.com/files/32bit/doc/app_note/AN2676.pdf?fpsp=1&WT_TYPE=Application%20Notes&WT...>.

0 项奖励
回复
2,018 次查看
Dilebo
Contributor III

This document seems to be mostly hardware oriented but the section 8 Software Design should help.

Thank you.

0 项奖励
回复
2,018 次查看
joanxie
NXP TechSupport
NXP TechSupport

yes, PP has CSC module too, but let me remind, VPU just can support yuv format, you must change RGB to YUV before sending video to VPU.

0 项奖励
回复
2,018 次查看
joanxie
NXP TechSupport
NXP TechSupport

for your case, I think you can refer to the Table 41-26. Pre-Processing Block Diagram of mx27 RM, your video path is channel 2,The CSC block provides conversion from YUV to RGB and RGB to YUV for CH-1 and RGB to YUV for Channel-2.

After CSC, the data is channelled into memory.

detailed information about CSC, you can refer to the 41.5.5 RGB to YUV of mx27RM, hope helpful for you.

0 项奖励
回复
2,018 次查看
yossishukron
Contributor III

the reason is that only the post processor can be used as stand alone convertor from RGB to YUV.

the pre processor have to be used together with other parts of the IPU you can look for examples how

to use it in the IPU driver.

but if you just need to convert RGB to YUV you need to use the post processor to do it.