High quality camera sensors usually output only raw RGB(Bayer pattern) data.
But FSL camera HAL can only preview HAL_PIXEL_FORMAT_YCbCr_420_SP format, which is supported by IPU and VPU both(see below codes in BSP).
void DeviceAdapter::setPreviewPixelFormat()
{
int vpuFormats[MAX_VPU_SUPPORT_FORMAT];
memset(vpuFormats, 0, sizeof(vpuFormats));
int ret = mMetadaManager->getSupportedRecordingFormat(&vpuFormats[0],
MAX_VPU_SUPPORT_FORMAT);
if (ret != NO_ERROR) {
FLOGE("getSupportedRecordingFormat failed");
mPreviewPixelFormat = HAL_PIXEL_FORMAT_YCbCr_420_SP;
return;
}
mPreviewPixelFormat = getMatchFormat(vpuFormats, MAX_VPU_SUPPORT_FORMAT,
mAvailableFormats, MAX_SENSOR_FORMAT);
}
How to modify the camera HALL to preview this type of sensor data?
Solved! Go to Solution.
For RAW RGB format, it was not supported by IMX6 IPU, so the driver can only capture it into memory as RAW format. In this case, preview was not supported, you need use software to convert it for preview.
For VPU, RAW RGB format was also not supported. So camera record function can't be supported too. You also need use software to convert RAW to NV12 format for VPU encode.
Bruce
Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
No. I still only use sensor which support YUV format.
Due to the i.MX6 Solo DualLite Reference Manual(Rev. 1, 04/2013, page 2788), the camera port can NOT convert Bayer RGB data On-The-Fly. So I don't think i.MX6 can preview the camera data that support bayer raw data only(e.g. Aptina AR0330 which is used in automovie market widely). But I really want to use it.
Is there any way to preview this type of data format? And how does VPU can use these data to compress.
Bruce
Had your question got answered? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
For RAW RGB format, it was not supported by IMX6 IPU, so the driver can only capture it into memory as RAW format. In this case, preview was not supported, you need use software to convert it for preview.
For VPU, RAW RGB format was also not supported. So camera record function can't be supported too. You also need use software to convert RAW to NV12 format for VPU encode.
Hi Qiang,
I also have the same issue for RAW RGB camera.
Do you have any suggested software or library for conversion? And how to capture the data from memory to deal with?
If using software to convert, does it influence the performance obviously?
Or you suggest to add an IC to do the conversion?
Thanks
Best Regards,
Jason
hello Jason,
Have you find something about the conversion ? I am also interrested in finding a solution for an OV9712 sensor
Thank you for your help
Sincerely
Aurelien BOUIN
Hi Aurelien,
I'm also using raw camera. Can you please suggest any software or library to convert Raw camera data to NV12 or any other android supported format.
Regards,
Aravinth
FYI you should look to this forum : http://forum.solid-run.com/linux-kernel-and-bootloaders-on-cubox-i-and-hummin-f10/ov5647-driver--t17...
My OV9712 is working now ! it takes process ... but it works ...
More info : Home · n-aizu/linux-linaro-stable-mx6 Wiki · GitHub
Regards
Hi Jason, I can't help you on this, I had never used software or hardware for RAW RGB to RGB/YUV converting. You can search it in Google.
Bruce, I am going to branch your issue into an interenal group and assign an engineer to look into it.
Thanks,
Yixing
Bruce
We are sorry for getting back to you so late. Are you still stuck with the issue? If you have somehow to resolved the issue, can we close the discussion? If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing