Skip to main content
FB__1
Associate III
Aug 21, 2025 7:56 PM UTC
Solved

Update the color config for the VD66GY sensor

 

Hello,


On the STM32N6, I am using DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1.
I am seeing the correct coloring when using CMW_MIRRORFLIP_NONE and the incorrect coloring when setting CMW_MIRRORFLIP_FLIP.

 

Any help getting the correct DCMIPP_ColorConversionConfTypeDef color_conf for the CMW_MIRRORFLIP_FLIP ?

 

...

 
if (HAL_DCMIPP_PIPE_EnableRedBlueSwap(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK)

 {

Error_Handler();

 }



#define N10(val) (((val) ^ 0x7FF) + 1)
 DCMIPP_ColorConversionConfTypeDef color_conf = {
 .ClampOutputSamples = ENABLE,
 .OutputSamplesType = DCMIPP_CLAMP_YUV,
 .RR = N10(26), .RG = N10(87), .RB = 112, .RA = 128,
 .GR = 47, .GG = 157, .GB = 16, .GA = 16,
 .BR = 112, .BG = N10(102), .BB = N10(10), .BA = 128,
 };



if (HAL_DCMIPP_PIPE_SetYUVConversionConfig(&hcamera_dcmipp, DCMIPP_PIPE1, &color_conf) != HAL_OK)

 {

Error_Handler();

 }



if (HAL_DCMIPP_PIPE_EnableYUVConversion(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK)

 {

Error_Handler();

 }

 

This topic has been closed for replies.
Saket_OmBest answer
ST Technical Moderator
Aug 27, 2025 2:43 PM UTC

Hello @FB__1 

When using the STM32N6 DCMIPP with the YUV422_1 pixel packer format, it’s common to encounter color issues after applying a flip operation (such as CMW_MIRRORFLIP_FLIP). This is typically due to the U and V chroma components being swapped during the flip, which affects color conversion. To resolve this, you need to adjust the color conversion matrix in your DCMIPP_ColorConversionConfTypeDef configuration by swapping the U and V coefficients for each output channel. This ensures that the color channels are mapped correctly after the flip

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om

1 reply

Saket_OmBest answer
ST Technical Moderator
Aug 27, 2025 2:43 PM UTC

Hello @FB__1 

When using the STM32N6 DCMIPP with the YUV422_1 pixel packer format, it’s common to encounter color issues after applying a flip operation (such as CMW_MIRRORFLIP_FLIP). This is typically due to the U and V chroma components being swapped during the flip, which affects color conversion. To resolve this, you need to adjust the color conversion matrix in your DCMIPP_ColorConversionConfTypeDef configuration by swapping the U and V coefficients for each output channel. This ensures that the color channels are mapped correctly after the flip

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om