Loading camera/ndk/impl/ACameraMetadata.cpp +26 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,28 @@ using namespace android; // Formats not listed in the public API, but still available to AImageReader // Enum value must match corresponding enum in ui/PublicFormat.h (which is not // available to VNDK) enum AIMAGE_PRIVATE_FORMATS { /** * Unprocessed implementation-dependent raw * depth measurements, opaque with 16 bit * samples. * */ AIMAGE_FORMAT_RAW_DEPTH = 0x1002, /** * Device specific 10 bits depth RAW image format. * * <p>Unprocessed implementation-dependent raw depth measurements, opaque with 10 bit samples * and device specific bit layout.</p> */ AIMAGE_FORMAT_RAW_DEPTH10 = 0x1003, }; /** * ACameraMetadata Implementation */ Loading Loading @@ -290,6 +312,10 @@ ACameraMetadata::filterStreamConfigurations() { format = AIMAGE_FORMAT_DEPTH_POINT_CLOUD; } else if (format == HAL_PIXEL_FORMAT_Y16) { format = AIMAGE_FORMAT_DEPTH16; } else if (format == HAL_PIXEL_FORMAT_RAW16) { format = static_cast<int32_t>(AIMAGE_FORMAT_RAW_DEPTH); } else if (format == HAL_PIXEL_FORMAT_RAW10) { format = static_cast<int32_t>(AIMAGE_FORMAT_RAW_DEPTH10); } filteredDepthStreamConfigs.push_back(format); Loading media/ndk/NdkImagePriv.h +8 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,14 @@ enum AIMAGE_PRIVATE_FORMATS { */ AIMAGE_FORMAT_RAW_DEPTH = 0x1002, /** * Device specific 10 bits depth RAW image format. * * <p>Unprocessed implementation-dependent raw depth measurements, opaque with 10 bit samples * and device specific bit layout.</p> */ AIMAGE_FORMAT_RAW_DEPTH10 = 0x1003, }; // TODO: this only supports ImageReader Loading media/ndk/NdkImageReader.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ AImageReader::isSupportedFormatAndUsage(int32_t format, uint64_t usage) { case AIMAGE_FORMAT_Y8: case AIMAGE_FORMAT_HEIC: case AIMAGE_FORMAT_DEPTH_JPEG: case AIMAGE_FORMAT_RAW_DEPTH10: return true; case AIMAGE_FORMAT_PRIVATE: // For private format, cpu usage is prohibited. Loading Loading @@ -102,6 +103,7 @@ AImageReader::getNumPlanesForFormat(int32_t format) { case AIMAGE_FORMAT_Y8: case AIMAGE_FORMAT_HEIC: case AIMAGE_FORMAT_DEPTH_JPEG: case AIMAGE_FORMAT_RAW_DEPTH10: return 1; case AIMAGE_FORMAT_PRIVATE: return 0; Loading Loading
camera/ndk/impl/ACameraMetadata.cpp +26 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,28 @@ using namespace android; // Formats not listed in the public API, but still available to AImageReader // Enum value must match corresponding enum in ui/PublicFormat.h (which is not // available to VNDK) enum AIMAGE_PRIVATE_FORMATS { /** * Unprocessed implementation-dependent raw * depth measurements, opaque with 16 bit * samples. * */ AIMAGE_FORMAT_RAW_DEPTH = 0x1002, /** * Device specific 10 bits depth RAW image format. * * <p>Unprocessed implementation-dependent raw depth measurements, opaque with 10 bit samples * and device specific bit layout.</p> */ AIMAGE_FORMAT_RAW_DEPTH10 = 0x1003, }; /** * ACameraMetadata Implementation */ Loading Loading @@ -290,6 +312,10 @@ ACameraMetadata::filterStreamConfigurations() { format = AIMAGE_FORMAT_DEPTH_POINT_CLOUD; } else if (format == HAL_PIXEL_FORMAT_Y16) { format = AIMAGE_FORMAT_DEPTH16; } else if (format == HAL_PIXEL_FORMAT_RAW16) { format = static_cast<int32_t>(AIMAGE_FORMAT_RAW_DEPTH); } else if (format == HAL_PIXEL_FORMAT_RAW10) { format = static_cast<int32_t>(AIMAGE_FORMAT_RAW_DEPTH10); } filteredDepthStreamConfigs.push_back(format); Loading
media/ndk/NdkImagePriv.h +8 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,14 @@ enum AIMAGE_PRIVATE_FORMATS { */ AIMAGE_FORMAT_RAW_DEPTH = 0x1002, /** * Device specific 10 bits depth RAW image format. * * <p>Unprocessed implementation-dependent raw depth measurements, opaque with 10 bit samples * and device specific bit layout.</p> */ AIMAGE_FORMAT_RAW_DEPTH10 = 0x1003, }; // TODO: this only supports ImageReader Loading
media/ndk/NdkImageReader.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ AImageReader::isSupportedFormatAndUsage(int32_t format, uint64_t usage) { case AIMAGE_FORMAT_Y8: case AIMAGE_FORMAT_HEIC: case AIMAGE_FORMAT_DEPTH_JPEG: case AIMAGE_FORMAT_RAW_DEPTH10: return true; case AIMAGE_FORMAT_PRIVATE: // For private format, cpu usage is prohibited. Loading Loading @@ -102,6 +103,7 @@ AImageReader::getNumPlanesForFormat(int32_t format) { case AIMAGE_FORMAT_Y8: case AIMAGE_FORMAT_HEIC: case AIMAGE_FORMAT_DEPTH_JPEG: case AIMAGE_FORMAT_RAW_DEPTH10: return 1; case AIMAGE_FORMAT_PRIVATE: return 0; Loading