AnsweredAssumed Answered

I.MX6 DualLite the performance in preview of UVC Camera

Question asked by RueiChang Chang on Jul 24, 2018
Latest reply on Jul 26, 2018 by RueiChang Chang

Hello everyone,

   Here I'm using the UVC camera on i.mx6 dual lite.  And there are three resolutions of my UVC camera. 1600x1200, 800x600, 720x480. 

 

   The preview performance of 800x600 and 720x400 are good, but 1600x1200 is not. So I think the bad preview performance of 1600x1200 might be caused by an insufficient framebuffer size. Is it possible that we can enlarge the framebuffer size for improving preview performance?

 

   Please correct me if I have the wrong concept. Thank you.

 

I found my default preview resolution is 800x600. And my capture resolution is 1600x1200. There is a function, named int32_t VideoStream::configure, if the preview resolution is not equal to capture resolution, VideoStream will reconfigure Camera's parameter again. Then all of the actions will stock there until the configuration is done.

 

   Is it a limitation from camera device? Or can I enlarge something for improving capture speed?

 

 

 

int32_t VideoStream::configure(sp<Stream> stream, int isCapture)
{
ALOGV("%s", __func__);
if ((stream->width() == 0) || (stream->height() == 0)
|| (stream->format() == 0)) {
ALOGE("%s: invalid stream parameters", __func__);
return BAD_VALUE;
}

int32_t sensorFormat = mCamera->getSensorFormat(stream->format());

Mutex::Autolock lock(mLock);
// when width&height&format are same, keep it to reduce start/stop time.
if ((mWidth == stream->width()) && (mHeight == stream->height())
&& (mFormat == sensorFormat) && (stream->isJpeg() || (mFps == stream->fps()))) {
return 0;
}

ConfigureParam* params = new ConfigureParam();
params->mWidth = stream->width();
params->mHeight = stream->height();
params->mFormat = sensorFormat;
params->mFps = stream->fps();
params->mBuffers = stream->bufferNum();
mChanged = true;

ALOGI("%s: w:%d, h:%d, sensor format:0x%x, stream format:0x%x, fps:%d, num:%d",
__func__, mWidth, mHeight, mFormat, stream->format(), mFps, mNumBuffers);
mMessageQueue.postMessage(new CMessage(MSG_CONFIG, (int32_t)params), 0);

return 0;
}

Outcomes