Fix getBytesSize for YUV allocations.

bug 12134914

Change-Id: I128e75b756a5bd129077177e254f1db6c94182f1
This commit is contained in:
Tim Murray
2013-12-17 17:15:25 -08:00
parent 355707e4f6
commit e6eaaf6a8e

View File

@@ -223,6 +223,9 @@ public class Allocation extends BaseObj {
*
*/
public int getBytesSize() {
if (mType.mDimYuv != 0) {
return (int)Math.ceil(mType.getCount() * mType.getElement().getBytesSize() * 1.5);
}
return mType.getCount() * mType.getElement().getBytesSize();
}