gralloc: Add Raw10 support in allocator
CRs-Fixed: 810651 Change-Id: I231979626e073887ae42d5bec2d25138c3dd763f
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
a4ccb3fddd
commit
e9912a6857
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
|
||||||
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are
|
* modification, are permitted provided that the following conditions are
|
||||||
@@ -143,6 +143,9 @@ void AdrenoMemInfo::getAlignedWidthAndHeight(int width, int height, int format,
|
|||||||
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
||||||
aligned_w = ALIGN(width, 32);
|
aligned_w = ALIGN(width, 32);
|
||||||
break;
|
break;
|
||||||
|
case HAL_PIXEL_FORMAT_RAW10:
|
||||||
|
aligned_w = ALIGN(width * 10 /8, 16);
|
||||||
|
break;
|
||||||
case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
|
case HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED:
|
||||||
aligned_w = ALIGN(width, 128);
|
aligned_w = ALIGN(width, 128);
|
||||||
break;
|
break;
|
||||||
@@ -451,6 +454,9 @@ unsigned int getSize(int format, int width, int height, int usage,
|
|||||||
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
||||||
size = alignedw * alignedh * 2;
|
size = alignedw * alignedh * 2;
|
||||||
break;
|
break;
|
||||||
|
case HAL_PIXEL_FORMAT_RAW10:
|
||||||
|
size = ALIGN(alignedw * alignedh, 4096);
|
||||||
|
break;
|
||||||
|
|
||||||
// adreno formats
|
// adreno formats
|
||||||
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: // NV21
|
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: // NV21
|
||||||
@@ -656,6 +662,7 @@ int getYUVPlaneInfo(private_handle_t* hnd, struct android_ycbcr* ycbcr)
|
|||||||
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
|
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO:
|
||||||
case HAL_PIXEL_FORMAT_NV21_ZSL:
|
case HAL_PIXEL_FORMAT_NV21_ZSL:
|
||||||
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
case HAL_PIXEL_FORMAT_RAW_SENSOR:
|
||||||
|
case HAL_PIXEL_FORMAT_RAW10:
|
||||||
ystride = cstride = width;
|
ystride = cstride = width;
|
||||||
ycbcr->y = (void*)hnd->base;
|
ycbcr->y = (void*)hnd->base;
|
||||||
ycbcr->cr = (void*)(hnd->base + ystride * height);
|
ycbcr->cr = (void*)(hnd->base + ystride * height);
|
||||||
|
|||||||
Reference in New Issue
Block a user