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;
}
Solved! Go to Solution.
Hello Chang,
You can calculate the data speed for 1600x1200, see below, please!
Let assume 1600x1200@30fps:
data speed should be : 1600x1200x3x8x30=1,382,400,000bps = 1382.4Mbps
What we all know, USB's max speed is 480Mbps, it's hardware couldn't support 1600x1200@30fps with real time.
So performance is limitted by USB hardware!
Have a nice day!
Best regards,
Weidong Sun
Hello Chang,
You can calculate the data speed for 1600x1200, see below, please!
Let assume 1600x1200@30fps:
data speed should be : 1600x1200x3x8x30=1,382,400,000bps = 1382.4Mbps
What we all know, USB's max speed is 480Mbps, it's hardware couldn't support 1600x1200@30fps with real time.
So performance is limitted by USB hardware!
Have a nice day!
Best regards,
Weidong Sun
Thank you, Wigros. Thank you for your reply. This information is very useful for me.