Loading core/java/android/hardware/camera2/params/StreamConfigurationMap.java +7 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,8 @@ public final class StreamConfigurationMap { return ImageFormat.DEPTH16; case HAL_PIXEL_FORMAT_RAW16: return ImageFormat.RAW_DEPTH; case HAL_PIXEL_FORMAT_RAW10: return ImageFormat.RAW_DEPTH10; case ImageFormat.JPEG: throw new IllegalArgumentException( "ImageFormat.JPEG is an unknown internal format"); Loading Loading @@ -1393,6 +1395,8 @@ public final class StreamConfigurationMap { return HAL_PIXEL_FORMAT_Y16; case ImageFormat.RAW_DEPTH: return HAL_PIXEL_FORMAT_RAW16; case ImageFormat.RAW_DEPTH10: return HAL_PIXEL_FORMAT_RAW10; default: return format; } Loading Loading @@ -1437,6 +1441,7 @@ public final class StreamConfigurationMap { case ImageFormat.DEPTH_POINT_CLOUD: case ImageFormat.DEPTH16: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: return HAL_DATASPACE_DEPTH; case ImageFormat.DEPTH_JPEG: return HAL_DATASPACE_DYNAMIC_DEPTH; Loading Loading @@ -1878,6 +1883,8 @@ public final class StreamConfigurationMap { return "DEPTH_JPEG"; case ImageFormat.RAW_DEPTH: return "RAW_DEPTH"; case ImageFormat.RAW_DEPTH10: return "RAW_DEPTH10"; case ImageFormat.PRIVATE: return "PRIVATE"; case ImageFormat.HEIC: Loading graphics/java/android/graphics/ImageFormat.java +12 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class ImageFormat { DEPTH16, DEPTH_POINT_CLOUD, RAW_DEPTH, RAW_DEPTH10, PRIVATE, HEIC }) Loading Loading @@ -724,6 +725,15 @@ public class ImageFormat { */ public static final int RAW_DEPTH = 0x1002; /** * Unprocessed implementation-dependent raw * depth measurements, opaque with 10 bit * samples and device specific bit layout. * * @hide */ public static final int RAW_DEPTH10 = 0x1003; /** * Android private opaque image format. * <p> Loading Loading @@ -797,6 +807,7 @@ public class ImageFormat { case RAW_DEPTH: case RAW_SENSOR: return 16; case RAW_DEPTH10: case RAW10: return 10; case RAW12: Loading Loading @@ -838,6 +849,7 @@ public class ImageFormat { case DEPTH_POINT_CLOUD: case PRIVATE: case RAW_DEPTH: case RAW_DEPTH10: case Y8: case DEPTH_JPEG: case HEIC: Loading media/java/android/media/ImageUtils.java +7 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ class ImageUtils { case ImageFormat.DEPTH16: case ImageFormat.DEPTH_POINT_CLOUD: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: case ImageFormat.DEPTH_JPEG: case ImageFormat.HEIC: return 1; Loading Loading @@ -110,6 +111,10 @@ class ImageUtils { throw new IllegalArgumentException( "Copy of RAW_DEPTH format has not been implemented"); } if (src.getFormat() == ImageFormat.RAW_DEPTH10) { throw new IllegalArgumentException( "Copy of RAW_DEPTH10 format has not been implemented"); } if (!(dst.getOwner() instanceof ImageWriter)) { throw new IllegalArgumentException("Destination image is not from ImageWriter. Only" + " the images from ImageWriter are writable"); Loading Loading @@ -202,6 +207,7 @@ class ImageUtils { estimatedBytePerPixel = 1.0; break; case ImageFormat.RAW10: case ImageFormat.RAW_DEPTH10: estimatedBytePerPixel = 1.25; break; case ImageFormat.YV12: Loading Loading @@ -264,6 +270,7 @@ class ImageUtils { case ImageFormat.RAW10: case ImageFormat.RAW12: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: case ImageFormat.HEIC: return new Size(image.getWidth(), image.getHeight()); case ImageFormat.PRIVATE: Loading Loading
core/java/android/hardware/camera2/params/StreamConfigurationMap.java +7 −0 Original line number Diff line number Diff line Loading @@ -1320,6 +1320,8 @@ public final class StreamConfigurationMap { return ImageFormat.DEPTH16; case HAL_PIXEL_FORMAT_RAW16: return ImageFormat.RAW_DEPTH; case HAL_PIXEL_FORMAT_RAW10: return ImageFormat.RAW_DEPTH10; case ImageFormat.JPEG: throw new IllegalArgumentException( "ImageFormat.JPEG is an unknown internal format"); Loading Loading @@ -1393,6 +1395,8 @@ public final class StreamConfigurationMap { return HAL_PIXEL_FORMAT_Y16; case ImageFormat.RAW_DEPTH: return HAL_PIXEL_FORMAT_RAW16; case ImageFormat.RAW_DEPTH10: return HAL_PIXEL_FORMAT_RAW10; default: return format; } Loading Loading @@ -1437,6 +1441,7 @@ public final class StreamConfigurationMap { case ImageFormat.DEPTH_POINT_CLOUD: case ImageFormat.DEPTH16: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: return HAL_DATASPACE_DEPTH; case ImageFormat.DEPTH_JPEG: return HAL_DATASPACE_DYNAMIC_DEPTH; Loading Loading @@ -1878,6 +1883,8 @@ public final class StreamConfigurationMap { return "DEPTH_JPEG"; case ImageFormat.RAW_DEPTH: return "RAW_DEPTH"; case ImageFormat.RAW_DEPTH10: return "RAW_DEPTH10"; case ImageFormat.PRIVATE: return "PRIVATE"; case ImageFormat.HEIC: Loading
graphics/java/android/graphics/ImageFormat.java +12 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class ImageFormat { DEPTH16, DEPTH_POINT_CLOUD, RAW_DEPTH, RAW_DEPTH10, PRIVATE, HEIC }) Loading Loading @@ -724,6 +725,15 @@ public class ImageFormat { */ public static final int RAW_DEPTH = 0x1002; /** * Unprocessed implementation-dependent raw * depth measurements, opaque with 10 bit * samples and device specific bit layout. * * @hide */ public static final int RAW_DEPTH10 = 0x1003; /** * Android private opaque image format. * <p> Loading Loading @@ -797,6 +807,7 @@ public class ImageFormat { case RAW_DEPTH: case RAW_SENSOR: return 16; case RAW_DEPTH10: case RAW10: return 10; case RAW12: Loading Loading @@ -838,6 +849,7 @@ public class ImageFormat { case DEPTH_POINT_CLOUD: case PRIVATE: case RAW_DEPTH: case RAW_DEPTH10: case Y8: case DEPTH_JPEG: case HEIC: Loading
media/java/android/media/ImageUtils.java +7 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ class ImageUtils { case ImageFormat.DEPTH16: case ImageFormat.DEPTH_POINT_CLOUD: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: case ImageFormat.DEPTH_JPEG: case ImageFormat.HEIC: return 1; Loading Loading @@ -110,6 +111,10 @@ class ImageUtils { throw new IllegalArgumentException( "Copy of RAW_DEPTH format has not been implemented"); } if (src.getFormat() == ImageFormat.RAW_DEPTH10) { throw new IllegalArgumentException( "Copy of RAW_DEPTH10 format has not been implemented"); } if (!(dst.getOwner() instanceof ImageWriter)) { throw new IllegalArgumentException("Destination image is not from ImageWriter. Only" + " the images from ImageWriter are writable"); Loading Loading @@ -202,6 +207,7 @@ class ImageUtils { estimatedBytePerPixel = 1.0; break; case ImageFormat.RAW10: case ImageFormat.RAW_DEPTH10: estimatedBytePerPixel = 1.25; break; case ImageFormat.YV12: Loading Loading @@ -264,6 +270,7 @@ class ImageUtils { case ImageFormat.RAW10: case ImageFormat.RAW12: case ImageFormat.RAW_DEPTH: case ImageFormat.RAW_DEPTH10: case ImageFormat.HEIC: return new Size(image.getWidth(), image.getHeight()); case ImageFormat.PRIVATE: Loading