Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15390d0a authored by Kwangkyu Park's avatar Kwangkyu Park
Browse files

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
parent 0b62dccb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -255,10 +255,10 @@ class ImageUtils {
            case ImageFormat.RAW_SENSOR:
            case ImageFormat.RAW_SENSOR:
            case ImageFormat.RAW_PRIVATE: // round estimate, real size is unknown
            case ImageFormat.RAW_PRIVATE: // round estimate, real size is unknown
            case ImageFormat.DEPTH16:
            case ImageFormat.DEPTH16:
            case ImageFormat.YCBCR_P010:
                estimatedBytePerPixel = 2.0;
                estimatedBytePerPixel = 2.0;
                break;
                break;
            case PixelFormat.RGB_888:
            case PixelFormat.RGB_888:
            case ImageFormat.YCBCR_P010:
                estimatedBytePerPixel = 3.0;
                estimatedBytePerPixel = 3.0;
                break;
                break;
            case PixelFormat.RGBA_8888:
            case PixelFormat.RGBA_8888: