summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kwangkyu Park <kk48.park@samsung.com> 2022-12-22 16:35:59 +0900
committer Kwangkyu Park <kk48.park@samsung.com> 2022-12-22 17:04:33 +0900
commit15390d0a40d1433a6eeae15ab8a3a2e2df4debac (patch)
treef35f0122514f02c0a0af097778e3035698641df3
parent0b62dccbbc3f2081902a5426ac5c924c687bef88 (diff)
ImageUtils: Fix estimated bytes factor for P010
For P010, each pixel is a 16-bit and a 4:2:0 subsampled. So, the estimated byte factor should be 3. Bug: 263433055 Change-Id: I86cfa005f0769a65104cad6378f7ba1af759162a
-rw-r--r--media/java/android/media/ImageUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/ImageUtils.java b/media/java/android/media/ImageUtils.java
index 2f1a36cba9d0..4957300dd062 100644
--- a/media/java/android/media/ImageUtils.java
+++ b/media/java/android/media/ImageUtils.java
@@ -255,10 +255,10 @@ class ImageUtils {
case ImageFormat.RAW_SENSOR:
case ImageFormat.RAW_PRIVATE: // round estimate, real size is unknown
case ImageFormat.DEPTH16:
- case ImageFormat.YCBCR_P010:
estimatedBytePerPixel = 2.0;
break;
case PixelFormat.RGB_888:
+ case ImageFormat.YCBCR_P010:
estimatedBytePerPixel = 3.0;
break;
case PixelFormat.RGBA_8888: