Fix video format

Apparently, video pixel format expected by the camera framework is YU12, and not YV12
as it was implemented.

Change-Id: Id33d8aa7f62f6e68276774ca2a7d25c04acd71cc
This commit is contained in:
Vladimir Chtchetkine
2011-09-21 14:55:29 -07:00
parent 1f37cd45f6
commit 68ec4ac828
5 changed files with 29 additions and 27 deletions

View File

@@ -117,6 +117,13 @@ status_t EmulatedFakeCameraDevice::startDevice(int width,
/* Calculate U/V panes inside the framebuffer. */
switch (mPixelFormat) {
case V4L2_PIX_FMT_YVU420:
mFrameV = mCurrentFrame + mTotalPixels;
mFrameU = mFrameU + mTotalPixels / 4;
mUVStep = 1;
mUVTotalNum = mTotalPixels / 4;
break;
case V4L2_PIX_FMT_YUV420:
mFrameU = mCurrentFrame + mTotalPixels;
mFrameV = mFrameU + mTotalPixels / 4;
mUVStep = 1;