NV_CHECK_ERROR_CLEANUP(OFDCopyModePropString(pHwTable, modeIndex,
"pixel_t", temp_str));
if (strncmp(temp_str, "uyvy", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_UYVY;
pSensorMode->PixelInfo.ModeInfo.SensorModeType =NvPclSensorModeType_Yuv;
}
else if (strncmp(temp_str, "vyuy", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_VYUY;
pSensorMode->PixelInfo.ModeInfo.SensorModeType =NvPclSensorModeType_Yuv;
}
else if (strncmp(temp_str, "yuyv", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_YUYV;
pSensorMode->PixelInfo.ModeInfo.SensorModeType =NvPclSensorModeType_Yuv;
}
else if (strncmp(temp_str, "yvyu", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_YVYU;
pSensorMode->PixelInfo.ModeInfo.SensorModeType =NvPclSensorModeType_Yuv;
}
else if (strncmp(temp_str, "bayer_rggb", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerRGGB;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_bggr", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerBGGR;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_grbg", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGRBG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_gbrg", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGBRG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_rggb8", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerRGGB;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_bggr8", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerBGGR;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_grbg8", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGRBG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_gbrg8", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGBRG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 8;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_rggb12", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerRGGB;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_bggr12", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerBGGR;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_grbg12", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGRBG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_gbrg12", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGBRG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 12;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_rggb14", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerRGGB;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_bggr14", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerBGGR;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_grbg14", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGRBG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "bayer_gbrg14", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGBRG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 14;
pSensorMode->PixelInfo.ModeInfo.SensorModeType =NvPclSensorModeType_Bayer;
}
else if (strncmp(temp_str, "rgb888", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_RGB888;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Rgb ;
}
else if (strncmp(temp_str, "a8b8g8r8", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_A8B8G8R8;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Rgb;
}
else if (strncmp(temp_str, "hdr_rggb", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerRGGB;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer_Wdr_Interleave;
}
else if (strncmp(temp_str, "hdr_bggr", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerBGGR;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer_Wdr_Interleave;
}
else if (strncmp(temp_str, "hdr_grbg", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGRBG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer_Wdr_Interleave;
}
else if (strncmp(temp_str, "hdr_gbrg", sizeof(temp_str)) == 0)
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_BayerGBRG;
pSensorMode->PixelInfo.ModeInfo.DynamicPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.CSIPixelBitDepth = 10;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Bayer_Wdr_Interleave;
}
else
{
pSensorMode->PixelInfo.PixelType = NvPclSensorPixelType_Unspecified;
pSensorMode->PixelInfo.ModeInfo.SensorModeType = NvPclSensorModeType_Unspecified;
}
if (strstr(temp_str, "hdr_") != 0)
{
pSensorMode->PixelInfo.ModeInfo.ModeType = NvOdmImagerModeType_Aohdr;
}