IMX Android 8.0.0 add yuyv format support

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMX Android 8.0.0 add yuyv format support

457件の閲覧回数
wangaizhi
Contributor I

I download Android 8.0.0 Oreo (O8.0.0_1.0.0, 4.9 kernel)  from Official website。We connected a camera with DVP interface,and need to get the raw data in YUYV format in the android application layer。I modified the camera file to add yuyv support in vendor\nxp-opensource\imx\libcamera3\InfraredCsi.cpp as follows:

sensorFormats[index] = v4l2_fourcc('Y', 'U', 'Y', 'V');
availFormats[index++] = v4l2_fourcc('Y', 'U', 'Y', 'V');
mSensorFormatCount = changeSensorFormats(sensorFormats, mSensorFormats, index);
if (mSensorFormatCount == 0) {
   ALOGE("%s no sensor format enum", __func__);
   close(fd);
   return BAD_VALUE;
}

Also I add print in vendor\nxp-opensource\imx\libcamera3\Metadata.cpp :

m.addInt32(ANDROID_SCALER_AVAILABLE_FORMATS,
sensor.mAvailableFormatCount,
sensor.mAvailableFormats);
int i = 0;
for(i = 0; i < sensor.mAvailableFormatCount; i++)
{
   ALOGE("====waz: mAvailableFormats = %d\n", sensor.mAvailableFormats[i]);
}

Only one value is printed here is 20, represents the yuyv format。

But use the camera2 interface to view in the application layer, and there is no such format。

Add yuyv support, what else needs to be modified?

Thanks!

0 件の賞賛
1 返信

402件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what board and bsp are you talking about?

0 件の賞賛