Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2 from Seinlin/b2g-5.1.0_r1
Browse files Browse the repository at this point in the history
Bug 1147266 - Update changes for b2g to mr1.
  • Loading branch information
seinlin committed Apr 1, 2015
2 parents cbb846a + 7c83e14 commit d8a56d7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions msm8974/libgralloc/mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,18 @@ int gralloc_lock_ycbcr(gralloc_module_t const* module,
ycbcr->cstride = ystride;
ycbcr->chroma_step = 2;
break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS:
ystride = cstride = hnd->width;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS: {
int ylines = ALIGN(hnd->height, 32);
ystride = ALIGN(hnd->width, 128);
ycbcr->y = (void*)hnd->base;
ycbcr->cb = (void*)(hnd->base + ystride * hnd->height);
ycbcr->cr = (void*)(hnd->base + ystride * hnd->height + 1);
ycbcr->cr = (void*)(hnd->base + ystride * ylines + 1);
ycbcr->cb = (void*)(hnd->base + ystride * ylines);
ycbcr->ystride = ystride;
ycbcr->cstride = cstride;
ycbcr->cstride = ystride;
ycbcr->chroma_step = 2;
memset(ycbcr->reserved, 0, sizeof(ycbcr->reserved));
break;
}
default:
ALOGD("%s: Invalid format passed: 0x%x", __FUNCTION__,
hnd->format);
Expand Down

0 comments on commit d8a56d7

Please sign in to comment.