This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EVM5777: Custom Camera running on TDA2 board in RTOS

Part Number: TDA2EVM5777
Other Parts Discussed in Thread: TDA2

Hi experts:

I have a project that using camera module with ISP IC which output format to 720p's YUV422 10-bits.

I created an new usecase (Capture -> Alg_custom_frame_copy(DSP1) -> Display(YUV420sp_uv)) for testing this camera.

I'd like to do color space transformation on Alg_custom_frame_copy node,

so I assigned those following custom settings for this camera after calling ChainsCommon_SingleCam_SetCapturePrms()

1: videoIfWidth -> SYSTEM_VIFW_16BIT

2: pInprms->dataFormat -> SYSTEM_DF_YUV422I_YUYV

3: pOutprms->dataFormat -> SYSTEM_DF_RAW16

and i transform data on Alg_custom_frame_copy by the following code:

	Int32 row_idx , col_idx ;
	UInt8 *src_gray = (UInt8 *)inPtr[0];
	UInt8 *dst_gray = (UInt8 *)outPtr[0];
	UInt16 *row_ptr = 0;
	UInt16 tmp;

	for (row_idx = 0 ; row_idx < 720 ; ++row_idx, src_gray += inPitch[0], dst_gray += outPitch[0])
	{

		row_ptr = (UInt16 *)src_gray;

		for(col_idx = 0 ; col_idx < 1280 ; ++col_idx)
		{

			tmp = (row_ptr[col_idx] >> 6);
			dst_gray[col_idx] = (UInt8 )(tmp & 0xFFU);
		}
	}
memset( outPtr[1], 0x80, 1280 * 720 / 2); // try the gray channel first, so set UV channel to empty

and i got those following error on the display(see figure):

1. one-fourth camera's FOV.

2. image noisy.

3. pixel-gap on x-direction of image.

so, a few questions below:

1. does my settings/code wrong to transform color space?

2. I try 0 shifting on Alg_custom_frame_copy, I will get dark display. So, I wonder how the bit-ordering of input image. How to get that?(camera's data pin is connected to v1d0~v1d9 by pin-to-pin)

3. Due to there is only one-fourth camera's FOV and pixel-gaping, does VIP module output wrong size of image?

4. Or any good suggestion of my project?

Best / Regard

Wxchen