MX27 pre-processor colorspace conversion

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MX27 pre-processor colorspace conversion

Jump to solution
1,515 Views
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

Labels (4)
0 Kudos
1 Solution
1,222 Views
Dilebo
Contributor III

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

function mx27_camera_set_bus_param()

View solution in original post

0 Kudos
9 Replies
1,223 Views
Dilebo
Contributor III

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

function mx27_camera_set_bus_param()

0 Kudos
1,222 Views
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 Kudos
1,222 Views
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 Kudos
1,222 Views
Dilebo
Contributor III
0 Kudos
1,222 Views
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 Kudos
1,222 Views
Dilebo
Contributor III

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

Thank you.

0 Kudos
1,222 Views
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 Kudos
1,222 Views
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 Kudos
1,222 Views
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.