20bit YCbCr interface to i.MX53 processor

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

20bit YCbCr interface to i.MX53 processor

1,841 Views
AhmedShameemM_1
Contributor I

Dear Sir,

We want to interface 20bit YCbCr camera to i.MX53 Processor; also our YCbCr input doesn’t support SAV (start of active video) and EAV (end of active video).

Can we directly connect the camera output to the processor?
Will the i.MX53 supports for 20bit YCbCr interface?
The information given in the datasheet is bit confusing. Hardware side 20bit port is provided but IPU-CSI register supports only 16bit data for CSI interface.

 

Note:An image is attached for your reference.

 

Waiting for your valuable feedback.

 

Thanks in advance.
Regards
Shameem

Labels (1)
4 Replies

1,060 Views
TheAdmiral
NXP Employee
NXP Employee

"YCbCr is a scaled and offset version of the YUV color space" I think this line is the best description that I have seen. While YCbCr and YUV are commonly interchanged, they are not exactly equal. YUV values go from 0 - 256, which YCrCb values don't use some of the low and high values. There are a couple (3?) of register setting that refer to SAT_MOD. The value for this field should be 1, I believe, for YCrCb video. You should probably experiment with the settings to see which one is correct.

CSI0_SENS_PRTCL, Sensor Protocol, depends on how your camera outputs its data signal in releation to a pixel clock. The datasheet should tell you if it is a Progressive or Interlaced signal, if it is following BT.656 or BT.1120 standards and if operating in Single or Double data rate mode. If none of those, then look at the pixel clock signal. If the signal is always running, it is not gated. If there are small periods where the clock signal is off, it is gated.

I think you want to at least set CSI0_CCIR_ERR_DET_EN to '0' to disable error correction. You can probably then ignore the rest of the fields.

I would like to offer you a warning. I am trying to help you, but I am a hardware engineer. Most of what we are discussing here are in the area of driver development, and is very dependent on the sensor you are using. Your probably need to reach out to a video driver expert.

0 Kudos

1,060 Views
AhmedShameemM_1
Contributor I

Yes you are correct, the camera is outputting YCr (10-bit, + 10-bit) in the first data word and YCb (10-bit + 10-bit) in the second data word. So as per your explanation, we need to set CSI0_DATA_WIDTH as 10bit and CSI0_SENS_
DATA_FORMAT as YUV422 (YCbCr 422 and YUV 422 are same we believe). Is that correct?

Also what is the CSI0_SENS_PRTCL we need to set? And since our input doesn’t support SAV and EAV, we believe CSI0_CCIR_CODE registers need not to be written..

Regards

Shameem

0 Kudos

1,060 Views
TheAdmiral
NXP Employee
NXP Employee

After further looking at the CSI0_DATA_WIDTH register setting, this is for color width only, not for actual data width. What is the data width of a single color/pixel for your camera? Is it 10-bit? Maybe your camera is outputing YCr (10-bit, + 10-bit) in the first data word and YCb (10-bit + 10-bit) in the second data word.

You need to select the correct number of bits per color for this setting, and the correct data format in the CSI0_SENS_DATA_FORMAT setting. Together, the processor will then know how many data words will be used for one pixel (1 or 2) and how wide the data word must be to provide enough information.

If the format is not listed specifically, use the Generic data setting, but then you will have to define the specific data structure in code.

Hope this helps. I really can't speak to writing code, but the hardware will definately support what you want to do.

Cheers,

Mark

0 Kudos

1,060 Views
TheAdmiral
NXP Employee
NXP Employee

Hello,

Yes, the i.MX53 processor can input 20-bit data into the camera port. Although only 16 bits (D4 - D19) are listed on the hardware datasheet, there are four pins that have alternate MUX options to become D0 - D3 (EIM_D26, D27, D30, D31).

You can connect your camera directly to the processor, but you will probably have to select a register setting for IPU_CSI0_SENS_CONF[10:8] for Bayer or Generic data, unless the data comes in one of the formats specifically listed in Table 2 of the IPU chapter.

I am going to ask the expert on the IPU module about the data width registery settings. They can be over-riden by using a generic data input setting, but I think that maybe there is a 20-bit setting that might not be listed. I will get back to you.

Cheers,

Mark

0 Kudos