Merge "gralloc: Add support for 8-bit RAW MIPI stream"

This commit is contained in:
Linux Build Service Account
2017-03-05 21:39:05 -08:00
committed by Gerrit - the friendly Code Review server
4 changed files with 16 additions and 1 deletions

View File

@@ -260,6 +260,9 @@ void AdrenoMemInfo::getAlignedWidthAndHeight(int width, int height, int format,
case HAL_PIXEL_FORMAT_RAW10:
aligned_w = ALIGN(width * 10 / 8, 8);
break;
case HAL_PIXEL_FORMAT_RAW8:
aligned_w = ALIGN(width, 8);
break;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
aligned_w = ALIGN(width, 128);
break;
@@ -571,7 +574,9 @@ unsigned int getSize(int format, int width, int height, int usage,
case HAL_PIXEL_FORMAT_RAW10:
size = ALIGN(alignedw * alignedh, 4096);
break;
case HAL_PIXEL_FORMAT_RAW8:
size = alignedw * alignedh;
break;
// adreno formats
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: // NV21
size = ALIGN(alignedw*alignedh, 4096);
@@ -810,6 +815,7 @@ int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr)
case HAL_PIXEL_FORMAT_RAW16:
case HAL_PIXEL_FORMAT_RAW12:
case HAL_PIXEL_FORMAT_RAW10:
case HAL_PIXEL_FORMAT_RAW8:
getYuvSPPlaneInfo(hnd->base, width, height, 1, ycbcr);
std::swap(ycbcr->cb, ycbcr->cr);
break;