summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2019-03-20 11:16:09 -0700
committerDan Albert <danalbert@google.com>2019-04-18 15:07:13 -0700
commiteb4679ec2bb0dbb2abf2499bdbbe76126b8308b0 (patch)
tree92b1d3590010a9899c5a05b19512c65c255aa882
parent2f5d5468bea5bc28ab71807c3c3880c779bc5af9 (diff)
downloadndk-eb4679ec2bb0dbb2abf2499bdbbe76126b8308b0.tar.gz
Update NDK platform prebuilts to build 5388771.
Test: ndk/checkbuild.py && ndk/run_tests.py Bug: None (cherry picked from commit 43151c109c297fb3c1dea2416e0441d4f9eeccd7)
-rwxr-xr-xplatform/platforms/android-29/arch-arm/usr/lib/libandroid.sobin63536 -> 63872 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-arm/usr/lib/libmediandk.sobin57096 -> 57408 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-arm64/usr/lib/libandroid.sobin74808 -> 75224 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-arm64/usr/lib/libmediandk.sobin73040 -> 73488 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-x86/usr/lib/libandroid.sobin64636 -> 64944 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-x86/usr/lib/libmediandk.sobin55328 -> 55640 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-x86_64/usr/lib64/libandroid.sobin70512 -> 70856 bytes
-rwxr-xr-xplatform/platforms/android-29/arch-x86_64/usr/lib64/libmediandk.sobin64488 -> 64840 bytes
-rw-r--r--platform/sysroot/usr/include/android/NeuralNetworks.h114
-rw-r--r--platform/sysroot/usr/include/android/dlext.h26
-rw-r--r--platform/sysroot/usr/include/android/hardware_buffer.h56
-rw-r--r--platform/sysroot/usr/include/android/hdr_metadata.h9
-rw-r--r--platform/sysroot/usr/include/android/surface_control.h10
-rw-r--r--platform/sysroot/usr/include/camera/NdkCameraMetadataTags.h111
-rw-r--r--platform/sysroot/usr/include/media/NdkImage.h19
-rw-r--r--platform/sysroot/usr/include/media/NdkMediaFormat.h3
-rw-r--r--platform/sysroot/usr/lib/aarch64-linux-android/libc.abin15021356 -> 15028512 bytes
-rw-r--r--platform/sysroot/usr/lib/arm-linux-androideabi/libc.abin9611198 -> 9617350 bytes
-rw-r--r--platform/sysroot/usr/lib/i686-linux-android/libc.abin8802560 -> 8802972 bytes
-rw-r--r--platform/sysroot/usr/lib/x86_64-linux-android/libc.abin14379148 -> 14384816 bytes
20 files changed, 321 insertions, 27 deletions
diff --git a/platform/platforms/android-29/arch-arm/usr/lib/libandroid.so b/platform/platforms/android-29/arch-arm/usr/lib/libandroid.so
index 6966c0d93..eb6693795 100755
--- a/platform/platforms/android-29/arch-arm/usr/lib/libandroid.so
+++ b/platform/platforms/android-29/arch-arm/usr/lib/libandroid.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-arm/usr/lib/libmediandk.so b/platform/platforms/android-29/arch-arm/usr/lib/libmediandk.so
index c203502a7..61ed93bb8 100755
--- a/platform/platforms/android-29/arch-arm/usr/lib/libmediandk.so
+++ b/platform/platforms/android-29/arch-arm/usr/lib/libmediandk.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-arm64/usr/lib/libandroid.so b/platform/platforms/android-29/arch-arm64/usr/lib/libandroid.so
index a141741a1..fb3059eb7 100755
--- a/platform/platforms/android-29/arch-arm64/usr/lib/libandroid.so
+++ b/platform/platforms/android-29/arch-arm64/usr/lib/libandroid.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-arm64/usr/lib/libmediandk.so b/platform/platforms/android-29/arch-arm64/usr/lib/libmediandk.so
index 19dfeb275..5a501006b 100755
--- a/platform/platforms/android-29/arch-arm64/usr/lib/libmediandk.so
+++ b/platform/platforms/android-29/arch-arm64/usr/lib/libmediandk.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-x86/usr/lib/libandroid.so b/platform/platforms/android-29/arch-x86/usr/lib/libandroid.so
index e849ba066..c2a841477 100755
--- a/platform/platforms/android-29/arch-x86/usr/lib/libandroid.so
+++ b/platform/platforms/android-29/arch-x86/usr/lib/libandroid.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-x86/usr/lib/libmediandk.so b/platform/platforms/android-29/arch-x86/usr/lib/libmediandk.so
index 78a57c2a2..572dc180d 100755
--- a/platform/platforms/android-29/arch-x86/usr/lib/libmediandk.so
+++ b/platform/platforms/android-29/arch-x86/usr/lib/libmediandk.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-x86_64/usr/lib64/libandroid.so b/platform/platforms/android-29/arch-x86_64/usr/lib64/libandroid.so
index 7246de827..ad1c9636a 100755
--- a/platform/platforms/android-29/arch-x86_64/usr/lib64/libandroid.so
+++ b/platform/platforms/android-29/arch-x86_64/usr/lib64/libandroid.so
Binary files differ
diff --git a/platform/platforms/android-29/arch-x86_64/usr/lib64/libmediandk.so b/platform/platforms/android-29/arch-x86_64/usr/lib64/libmediandk.so
index ed6419189..f4d49d851 100755
--- a/platform/platforms/android-29/arch-x86_64/usr/lib64/libmediandk.so
+++ b/platform/platforms/android-29/arch-x86_64/usr/lib64/libmediandk.so
Binary files differ
diff --git a/platform/sysroot/usr/include/android/NeuralNetworks.h b/platform/sysroot/usr/include/android/NeuralNetworks.h
index 30243929f..93acf715e 100644
--- a/platform/sysroot/usr/include/android/NeuralNetworks.h
+++ b/platform/sysroot/usr/include/android/NeuralNetworks.h
@@ -75,7 +75,7 @@ typedef enum {
/**
* A tensor of 8 bit unsigned integers that represent real numbers.
*
- * Attached to this tensor are two numbers that be used to convert the
+ * Attached to this tensor are two numbers that can be used to convert the
* 8 bit integer to the real value and vice versa. These two numbers are:
* - scale: a 32 bit floating point value greater than zero.
* - zeroPoint: a 32 bit integer, in range [0, 255].
@@ -373,7 +373,7 @@ typedef enum {
* * * input.scale * filter.scale).
*
* Available since API level 29:
- * * Quantized with symetric per channel quantization for the filter:
+ * * Quantized with symmetric per channel quantization for the filter:
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
* * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (scale set to 0.0,
@@ -522,7 +522,7 @@ typedef enum {
* * * input.scale * filter.scale).
*
* Available since API level 29:
- * * Quantized with symetric per channel quantization for the filter:
+ * * Quantized with symmetric per channel quantization for the filter:
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
* * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (scale set to 0.0,
@@ -2002,7 +2002,8 @@ typedef enum {
* must be >= 1.
* * 2: A 2-D Tensor of {@link ANEURALNETWORKS_TENSOR_INT32}, the paddings
* for each spatial dimension of the input tensor. All values must be
- * >= 0. The shape of the tensor must be {rank(input0), 2}.
+ * >= 0. The shape of the tensor must be {M, 2}, where M is the number
+ * of spatial dimensions.
* padding[i, 0] specifies the number of element to be padded in the
* front of dimension i.
* padding[i, 1] specifies the number of element to be padded after the
@@ -2249,6 +2250,7 @@ typedef enum {
* Supported tensor {@link OperandCode}:
* * {@link ANEURALNETWORKS_TENSOR_FLOAT16}
* * {@link ANEURALNETWORKS_TENSOR_FLOAT32}
+ * * {@link ANEURALNETWORKS_TENSOR_QUANT16_ASYMM}
*
* Inputs:
* * 0: A 2-D Tensor of shape [num_rois, 4], specifying the locations of the
@@ -2265,7 +2267,8 @@ typedef enum {
* {@link ANEURALNETWORKS_TENSOR_QUANT16_ASYMM}, this tensor should be
* of {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}.
* * 2: An 1-D {@link ANEURALNETWORKS_TENSOR_INT32} tensor, of shape
- * [batches], specifying the number of output boxes for each batch.
+ * [num_rois], specifying the batch index of each box. Boxes with
+ * the same batch index are grouped together.
* * 3: A 2-D Tensor of shape [batches, 2], specifying the information of
* each image in the batch, each line with format
* [image_height, image_width].
@@ -2915,6 +2918,9 @@ typedef enum {
* {@link ANEURALNETWORKS_TENSOR_QUANT16_SYMM}, with scale of 0.125.
* * 3: A 2-D Tensor of shape [batches, 2], specifying the size of
* each image in the batch, with format [image_height, image_width].
+ * For input0 of type {@link OperandType::TENSOR_QUANT8_ASYMM}, this
+ * tensor should be of {@link OperandType::TENSOR_QUANT16_SYMM}, with
+ * scale of 0.125.
* * 4: An {@link ANEURALNETWORKS_FLOAT32} scalar, specifying the ratio
* from the height of original image to the height of feature map.
* * 5: An {@link ANEURALNETWORKS_FLOAT32} scalar, specifying the ratio
@@ -2941,7 +2947,7 @@ typedef enum {
* each batch is not guaranteed. For type of
* {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}, the scale and zero
* point must be the same as input0.
- * * 1: A tensor of the same {@link OperandCode} as input1, of shape
+ * * 1: A tensor of the same {@link OperandCode} as input3, of shape
* [num_output_rois, 4], specifying the coordinates of each output
* bounding box for each class, with format [x1, y1, x2, y2].
* The sequential order of the boxes corresponds with output0.
@@ -3046,7 +3052,7 @@ typedef enum {
* * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (with scale set to
* * * input.scale * filter.scale).
*
- * * Quantized with symetric per channel quantization for the filter:
+ * * Quantized with symmetric per channel quantization for the filter:
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} for input, and output.
* * * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
* * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (scale set to 0.0,
@@ -3943,7 +3949,8 @@ typedef enum {
* this tensor should be of {@link ANEURALNETWORKS_TENSOR_QUANT16_ASYMM},
* with zeroPoint of 0 and scale of 0.125.
* * 2: An 1-D {@link ANEURALNETWORKS_TENSOR_INT32} tensor, of shape
- * [batches], specifying the number of output boxes for each batch.
+ * [num_rois], specifying the batch index of each box. Boxes with
+ * the same batch index are grouped together.
* * 3: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
* height of the output tensor.
* * 4: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
@@ -3999,7 +4006,8 @@ typedef enum {
* this tensor should be of {@link ANEURALNETWORKS_TENSOR_QUANT16_ASYMM},
* with zeroPoint of 0 and scale of 0.125.
* * 2: An 1-D {@link ANEURALNETWORKS_TENSOR_INT32} tensor, of shape
- * [batches], specifying the number of output boxes for each batch.
+ * [num_rois], specifying the batch index of each box. Boxes with
+ * the same batch index are grouped together.
* * 3: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
* height of the output tensor.
* * 4: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
@@ -4232,10 +4240,21 @@ typedef enum {
* The output dimensions are functions of the filter dimensions, stride, and
* padding.
*
- * Supported tensor {@link OperandCode}:
- * * {@link ANEURALNETWORKS_TENSOR_FLOAT16}
- * * {@link ANEURALNETWORKS_TENSOR_FLOAT32}
- * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}
+ * Supported tensor {@link OperandCode} configurations:
+ * * 32 bit Floating point :
+ * * * {@link ANEURALNETWORKS_TENSOR_FLOAT32} for input, filter, output, and bias.
+ *
+ * * Quantized:
+ * * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} for input, filter, and output.
+ * * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (with scale set to
+ * * * input.scale * filter.scale).
+ *
+ * Available since API level 29:
+ * * Quantized with symmetric per channel quantization for the filter:
+ * * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM} for input, and output.
+ * * * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
+ * * * {@link ANEURALNETWORKS_TENSOR_INT32} for bias (scale set to 0.0,
+ * * * each value scaling is separate and equal to input.scale * filter.scales[channel]).
*
* Supported tensor rank: 4, with "NHWC" or "NCHW" data layout.
* With the default data layout NHWC, the data is stored in the order of:
@@ -4249,14 +4268,20 @@ typedef enum {
* specifying the input.
* * 1: A 4-D tensor, of shape
* [depth_out, filter_height, filter_width, depth_in], specifying the
- * filter.
+ * filter. For tensor of type
+ * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} the channel
+ * dimension (extraParams.channelQuant.channelDim) must be set to 0.
* * 2: A 1-D tensor, of shape [depth_out], specifying the bias. For input
* tensor of type {@link ANEURALNETWORKS_TENSOR_FLOAT32} or
* {@link ANEURALNETWORKS_TENSOR_FLOAT16}, the bias should be of the
* same type. For input tensor of type
* {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}, the bias should be
* of {@link ANEURALNETWORKS_TENSOR_INT32}, with zeroPoint of 0 and
- * bias_scale == input_scale * filter_scale.
+ * bias_scale == input_scale * filter_scale. For filter tensor of
+ * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL}, the bias
+ * must be of {@link ANEURALNETWORKS_TENSOR_INT32}, with zeroPoint of
+ * 0 and bias_scale of 0. The actual scale of each value 'i' is equal
+ * to bias_scale[i] = input_scale * filter_scale[i].
* * 3: An {@link ANEURALNETWORKS_INT32} scalar, specifying the padding on
* the left, in the ‘width’ dimension.
* * 4: An {@link ANEURALNETWORKS_INT32} scalar, specifying the padding on
@@ -4280,14 +4305,20 @@ typedef enum {
* specifying the input.
* * 1: A 4-D tensor, of shape
* [depth_out, filter_height, filter_width, depth_in], specifying the
- * filter.
+ * filter. For tensor of type
+ * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL} the channel
+ * dimension (extraParams.channelQuant.channelDim) must be set to 0.
* * 2: A 1-D tensor, of shape [depth_out], specifying the bias. For input
* tensor of type {@link ANEURALNETWORKS_TENSOR_FLOAT32} or
* {@link ANEURALNETWORKS_TENSOR_FLOAT16}, the bias should be of the
* same type. For input tensor of type
* {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}, the bias should be
* of {@link ANEURALNETWORKS_TENSOR_INT32}, with zeroPoint of 0 and
- * bias_scale == input_scale * filter_scale.
+ * bias_scale == input_scale * filter_scale. For filter tensor of
+ * {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL}, the bias
+ * must be of {@link ANEURALNETWORKS_TENSOR_INT32}, with zeroPoint of
+ * 0 and bias_scale of 0. The actual scale of each value 'i' is equal
+ * to bias_scale[i] = input_scale * filter_scale[i].
* * 3: An {@link ANEURALNETWORKS_TENSOR_INT32} tensor, specifying the output
* tensor shape.
* * 4: An {@link ANEURALNETWORKS_INT32} scalar, specifying the implicit
@@ -4307,7 +4338,9 @@ typedef enum {
* * 0: The output 4-D tensor, of shape
* [batches, out_height, out_width, depth_out]. For output tensor of
* {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}, the following condition
- * must be satisfied: output_scale > input_scale * filter_scale.
+ * must be satisfied: output_scale > input_scale * filter_scale (for
+ * filter tensor of {@link ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL}
+ * this condition must be true for all filter scales).
*
* Available since API level 29.
*/
@@ -4480,6 +4513,41 @@ typedef enum {
* Available since API level 29.
*/
ANEURALNETWORKS_UNIDIRECTIONAL_SEQUENCE_RNN = 93,
+
+ /**
+ * Resizes images to given size using the nearest neighbor interpretation.
+ *
+ * Resized images must be distorted if their output aspect ratio is not the
+ * same as input aspect ratio. The corner pixels of output may not be the
+ * same as corner pixels of input.
+ *
+ * Supported tensor {@link OperandCode}:
+ * * {@link ANEURALNETWORKS_TENSOR_FLOAT16}
+ * * {@link ANEURALNETWORKS_TENSOR_FLOAT32}
+ * * {@link ANEURALNETWORKS_TENSOR_QUANT8_ASYMM}
+ *
+ * Supported tensor rank: 4, with "NHWC" or "NCHW" data layout.
+ * With the default data layout NHWC, the data is stored in the order of:
+ * [batch, height, width, channels]. Alternatively, the data layout could
+ * be NCHW, the data storage order of: [batch, channels, height, width].
+ *
+ * Inputs:
+ * * 0: A 4-D tensor, of shape [batches, height, width, depth], specifying
+ * the input.
+ * * 1: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
+ * height of the output tensor.
+ * * 2: An {@link ANEURALNETWORKS_INT32} scalar, specifying the output
+ * width of the output tensor.
+ * * 3: An {@link ANEURALNETWORKS_BOOL} scalar, default to false.
+ * Set to true to specify NCHW data layout for input0 and output0.
+ *
+ * Outputs:
+ * * 0: The output 4-D tensor, of shape
+ * [batches, new_height, new_width, depth].
+ *
+ * Available since API level 29.
+ */
+ ANEURALNETWORKS_RESIZE_NEAREST_NEIGHBOR = 94,
} OperationCode;
/**
@@ -5037,7 +5105,7 @@ int ANeuralNetworksDevice_getType(const ANeuralNetworksDevice* device, int32_t*
* @param device The representation of the specified device.
* @param version The returned version string of the driver for the specified device. The
* string will be in UTF-8 and will be null-terminated. For devices with feature
- * level 28 or lower, "UNKOWN" will be returned. The version string will remain
+ * level 28 or lower, "UNKNOWN" will be returned. The version string will remain
* valid for the duration of the application.
*
* @return ANEURALNETWORKS_NO_ERROR if successful.
@@ -5863,8 +5931,8 @@ int ANeuralNetworksExecution_setInput(ANeuralNetworksExecution* execution, int32
* <p>The provided memory must outlive the execution.</p>
*
* If the input is optional, you can indicate that it is omitted by
- * using {@link ANeuralNetworks_setInput} instead, passing nullptr for buffer
- * and 0 for length.
+ * using {@link ANeuralNetworksExecution_setInput} instead, passing nullptr for
+ * buffer and 0 for length.
*
* See {@link ANeuralNetworksExecution} for information on multithreaded usage.
* See {@link ANeuralNetworksMemory_createFromAHardwarBuffer} for information on
@@ -5948,8 +6016,8 @@ int ANeuralNetworksExecution_setOutput(ANeuralNetworksExecution* execution, int3
* {@link ANeuralNetworksExecution}.
*
* If the output is optional, you can indicate that it is omitted by
- * using {@link ANeuralNetworks_setOutput} instead, passing nullptr for buffer
- * and 0 for length.
+ * using {@link ANeuralNetworksExecution_setOutput} instead, passing nullptr for
+ * buffer and 0 for length.
*
* <p>The provided memory must outlive the execution.</p>
*
diff --git a/platform/sysroot/usr/include/android/dlext.h b/platform/sysroot/usr/include/android/dlext.h
index 105b38485..154b15a8c 100644
--- a/platform/sysroot/usr/include/android/dlext.h
+++ b/platform/sysroot/usr/include/android/dlext.h
@@ -114,6 +114,29 @@ enum {
*/
ANDROID_DLEXT_USE_NAMESPACE = 0x200,
+ /**
+ * Instructs dlopen to apply `ANDROID_DLEXT_RESERVED_ADDRESS`,
+ * `ANDROID_DLEXT_RESERVED_ADDRESS_HINT`, `ANDROID_DLEXT_WRITE_RELRO` and
+ * `ANDROID_DLEXT_USE_RELRO` to any libraries loaded as dependencies of the
+ * main library as well.
+ *
+ * This means that if the main library depends on one or more not-already-loaded libraries, they
+ * will be loaded consecutively into the region starting at `reserved_addr`, and `reserved_size`
+ * must be large enough to contain all of the libraries. The libraries will be loaded in the
+ * deterministic order constructed from the DT_NEEDED entries, rather than the more secure random
+ * order used by default.
+ *
+ * Each library's GNU RELRO sections will be written out to `relro_fd` in the same order they were
+ * loaded. This will mean that the resulting file is dependent on which of the libraries were
+ * already loaded, as only the newly loaded libraries will be included, not any already-loaded
+ * dependencies. The caller should ensure that the set of libraries newly loaded is consistent
+ * for this to be effective.
+ *
+ * This is mainly useful for the system WebView implementation.
+ */
+ ANDROID_DLEXT_RESERVED_ADDRESS_RECURSIVE = 0x400,
+
+
/** Mask of valid bits. */
ANDROID_DLEXT_VALID_FLAG_BITS = ANDROID_DLEXT_RESERVED_ADDRESS |
ANDROID_DLEXT_RESERVED_ADDRESS_HINT |
@@ -122,7 +145,8 @@ enum {
ANDROID_DLEXT_USE_LIBRARY_FD |
ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET |
ANDROID_DLEXT_FORCE_LOAD |
- ANDROID_DLEXT_USE_NAMESPACE,
+ ANDROID_DLEXT_USE_NAMESPACE |
+ ANDROID_DLEXT_RESERVED_ADDRESS_RECURSIVE,
};
struct android_namespace_t;
diff --git a/platform/sysroot/usr/include/android/hardware_buffer.h b/platform/sysroot/usr/include/android/hardware_buffer.h
index 2796c75f0..02c7c1b93 100644
--- a/platform/sysroot/usr/include/android/hardware_buffer.h
+++ b/platform/sysroot/usr/include/android/hardware_buffer.h
@@ -150,6 +150,14 @@ enum AHardwareBuffer_Format {
* OpenGL ES: GL_STENCIL_INDEX8
*/
AHARDWAREBUFFER_FORMAT_S8_UINT = 0x35,
+
+ /**
+ * YUV 420 888 format.
+ * Must have an even width and height. Can be accessed in OpenGL
+ * shaders through an external sampler. Does not support mip-maps
+ * cube-maps or multi-layered textures.
+ */
+ AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420 = 0x23,
};
/**
@@ -302,6 +310,24 @@ typedef struct AHardwareBuffer_Desc {
} AHardwareBuffer_Desc;
/**
+ * Holds data for a single image plane.
+ */
+typedef struct AHardwareBuffer_Plane {
+ void* data; ///< Points to first byte in plane
+ uint32_t pixelStride; ///< Distance in bytes from the color channel of one pixel to the next
+ uint32_t rowStride; ///< Distance in bytes from the first value of one row of the image to
+ /// the first value of the next row.
+} AHardwareBuffer_Plane;
+
+/**
+ * Holds all image planes that contain the pixel data.
+ */
+typedef struct AHardwareBuffer_Planes {
+ uint32_t planeCount; ///< Number of distinct planes
+ AHardwareBuffer_Plane planes[4]; ///< Array of image planes
+} AHardwareBuffer_Planes;
+
+/**
* Opaque handle for a native hardware buffer.
*/
typedef struct AHardwareBuffer AHardwareBuffer;
@@ -323,7 +349,7 @@ int AHardwareBuffer_allocate(const AHardwareBuffer_Desc* desc,
AHardwareBuffer** outBuffer) __INTRODUCED_IN(26);
/**
* Acquire a reference on the given AHardwareBuffer object.
- *
+ *
* This prevents the object from being deleted until the last reference
* is removed.
*/
@@ -396,6 +422,34 @@ int AHardwareBuffer_lock(AHardwareBuffer* buffer, uint64_t usage,
int32_t fence, const ARect* rect, void** outVirtualAddress) __INTRODUCED_IN(26);
/**
+ * Lock a potentially multi-planar AHardwareBuffer for direct CPU access.
+ *
+ * This function is similar to AHardwareBuffer_lock, but can lock multi-planar
+ * formats. The locked planes are returned in the \a outPlanes argument. Note,
+ * that multi-planar should not be confused with multi-layer images, which this
+ * locking function does not support.
+ *
+ * YUV formats are always represented by three separate planes of data, one for
+ * each color plane. The order of planes in the array is guaranteed such that
+ * plane #0 is always Y, plane #1 is always U (Cb), and plane #2 is always V
+ * (Cr). All other formats are represented by a single plane.
+ *
+ * Additional information always accompanies the buffers, describing the row
+ * stride and the pixel stride for each plane.
+ *
+ * In case the buffer cannot be locked, \a outPlanes will contain zero planes.
+ *
+ * See the AHardwareBuffer_lock documentation for all other locking semantics.
+ *
+ * \return 0 on success. -EINVAL if \a buffer is NULL, the usage flags
+ * are not a combination of AHARDWAREBUFFER_USAGE_CPU_*, or the buffer
+ * has more than one layer. Error number if the lock fails for any other
+ * reason.
+ */
+int AHardwareBuffer_lockPlanes(AHardwareBuffer* buffer, uint64_t usage,
+ int32_t fence, const ARect* rect, AHardwareBuffer_Planes* outPlanes) __INTRODUCED_IN(29);
+
+/**
* Unlock the AHardwareBuffer from direct CPU access.
*
* Must be called after all changes to the buffer are completed by the
diff --git a/platform/sysroot/usr/include/android/hdr_metadata.h b/platform/sysroot/usr/include/android/hdr_metadata.h
index 7e1313b99..88772a92f 100644
--- a/platform/sysroot/usr/include/android/hdr_metadata.h
+++ b/platform/sysroot/usr/include/android/hdr_metadata.h
@@ -33,6 +33,15 @@ __BEGIN_DECLS
*/
/**
+ * HDR metadata standards that are supported by Android.
+ */
+enum AHdrMetadataType : uint32_t {
+ HDR10_SMPTE2086 = 1,
+ HDR10_CTA861_3 = 2,
+ HDR10PLUS_SEI = 3,
+};
+
+/**
* Color is defined in CIE XYZ coordinates.
*/
struct AColor_xy {
diff --git a/platform/sysroot/usr/include/android/surface_control.h b/platform/sysroot/usr/include/android/surface_control.h
index 05731871d..0e79239ed 100644
--- a/platform/sysroot/usr/include/android/surface_control.h
+++ b/platform/sysroot/usr/include/android/surface_control.h
@@ -28,6 +28,7 @@
#include <sys/cdefs.h>
+#include <android/data_space.h>
#include <android/hardware_buffer.h>
#include <android/hdr_metadata.h>
#include <android/native_window.h>
@@ -316,6 +317,15 @@ void ASurfaceTransaction_setBufferAlpha(ASurfaceTransaction* transaction,
ASurfaceControl* surface_control, float alpha)
__INTRODUCED_IN(29);
+/**
+ * Sets the data space of the surface_control's buffers.
+ *
+ * If no data space is set, the surface control defaults to ADATASPACE_SRGB.
+ */
+void ASurfaceTransaction_setBufferDataSpace(ASurfaceTransaction* transaction,
+ ASurfaceControl* surface_control, ADataSpace data_space)
+ __INTRODUCED_IN(29);
+
/*
* SMPTE ST 2086 "Mastering Display Color Volume" static metadata
*
diff --git a/platform/sysroot/usr/include/camera/NdkCameraMetadataTags.h b/platform/sysroot/usr/include/camera/NdkCameraMetadataTags.h
index c1efa5fef..8c19e1d6c 100644
--- a/platform/sysroot/usr/include/camera/NdkCameraMetadataTags.h
+++ b/platform/sysroot/usr/include/camera/NdkCameraMetadataTags.h
@@ -71,6 +71,8 @@ typedef enum acamera_metadata_section {
ACAMERA_DEPTH,
ACAMERA_LOGICAL_MULTI_CAMERA,
ACAMERA_DISTORTION_CORRECTION,
+ ACAMERA_HEIC,
+ ACAMERA_HEIC_INFO,
ACAMERA_SECTION_COUNT,
ACAMERA_VENDOR = 0x8000
@@ -112,6 +114,8 @@ typedef enum acamera_metadata_section_start {
ACAMERA_DISTORTION_CORRECTION_START
= ACAMERA_DISTORTION_CORRECTION
<< 16,
+ ACAMERA_HEIC_START = ACAMERA_HEIC << 16,
+ ACAMERA_HEIC_INFO_START = ACAMERA_HEIC_INFO << 16,
ACAMERA_VENDOR_START = ACAMERA_VENDOR << 16
} acamera_metadata_section_start_t;
@@ -1912,6 +1916,7 @@ typedef enum acamera_metadata_tag {
* <li>ACaptureRequest</li>
* </ul></p>
*
+ * <p>This tag is also used for HEIC image capture.</p>
*/
ACAMERA_JPEG_GPS_COORDINATES = // double[3]
ACAMERA_JPEG_START,
@@ -1927,6 +1932,7 @@ typedef enum acamera_metadata_tag {
* <li>ACaptureRequest</li>
* </ul></p>
*
+ * <p>This tag is also used for HEIC image capture.</p>
*/
ACAMERA_JPEG_GPS_PROCESSING_METHOD = // byte
ACAMERA_JPEG_START + 1,
@@ -1942,6 +1948,7 @@ typedef enum acamera_metadata_tag {
* <li>ACaptureRequest</li>
* </ul></p>
*
+ * <p>This tag is also used for HEIC image capture.</p>
*/
ACAMERA_JPEG_GPS_TIMESTAMP = // int64
ACAMERA_JPEG_START + 2,
@@ -1986,6 +1993,10 @@ typedef enum acamera_metadata_tag {
* </code></pre>
* <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
* also be set to EXTERNAL. The above code is not relevant in such case.</p>
+ * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
+ * case the rotation is reflected by
+ * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
+ * rotating the image data itself.</p>
*
* @see ACAMERA_SENSOR_ORIENTATION
*/
@@ -2003,7 +2014,8 @@ typedef enum acamera_metadata_tag {
* <li>ACaptureRequest</li>
* </ul></p>
*
- * <p>85-95 is typical usage range.</p>
+ * <p>85-95 is typical usage range. This tag is also used to describe the quality
+ * of the HEIC image capture.</p>
*/
ACAMERA_JPEG_QUALITY = // byte
ACAMERA_JPEG_START + 4,
@@ -2019,6 +2031,7 @@ typedef enum acamera_metadata_tag {
* <li>ACaptureRequest</li>
* </ul></p>
*
+ * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
*/
ACAMERA_JPEG_THUMBNAIL_QUALITY = // byte
ACAMERA_JPEG_START + 5,
@@ -2055,6 +2068,10 @@ typedef enum acamera_metadata_tag {
* orientation is requested. LEGACY device will always report unrotated thumbnail
* size.</li>
* </ul>
+ * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
+ * the thumbnail rotation is reflected by
+ * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
+ * rotating the thumbnail data itself.</p>
*
* @see ACAMERA_JPEG_ORIENTATION
*/
@@ -2088,6 +2105,7 @@ typedef enum acamera_metadata_tag {
* and vice versa.</li>
* <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
* </ul>
+ * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
*
* @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
*/
@@ -5757,6 +5775,80 @@ typedef enum acamera_metadata_tag {
ACAMERA_DISTORTION_CORRECTION_START + 1,
ACAMERA_DISTORTION_CORRECTION_END,
+ /**
+ * <p>The available HEIC (ISO/IEC 23008-12) stream
+ * configurations that this camera device supports
+ * (i.e. format, width, height, output/input stream).</p>
+ *
+ * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)</p>
+ *
+ * <p>This tag may appear in:
+ * <ul>
+ * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
+ * </ul></p>
+ *
+ * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
+ * <p>If the camera device supports HEIC image format, it will support identical set of stream
+ * combinations involving HEIC image format, compared to the combinations involving JPEG
+ * image format as required by the device's hardware level and capabilities.</p>
+ * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
+ * Configuring JPEG and HEIC streams at the same time is not supported.</p>
+ * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
+ * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
+ */
+ ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS = // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)
+ ACAMERA_HEIC_START,
+ /**
+ * <p>This lists the minimum frame duration for each
+ * format/size combination for HEIC output formats.</p>
+ *
+ * <p>Type: int64[4*n]</p>
+ *
+ * <p>This tag may appear in:
+ * <ul>
+ * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
+ * </ul></p>
+ *
+ * <p>This should correspond to the frame duration when only that
+ * stream is active, with all processing (typically in android.*.mode)
+ * set to either OFF or FAST.</p>
+ * <p>When multiple streams are used in a request, the minimum frame
+ * duration will be max(individual stream min durations).</p>
+ * <p>See ACAMERA_SENSOR_FRAME_DURATION and
+ * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
+ * calculating the max frame rate.</p>
+ *
+ * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
+ * @see ACAMERA_SENSOR_FRAME_DURATION
+ */
+ ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS = // int64[4*n]
+ ACAMERA_HEIC_START + 1,
+ /**
+ * <p>This lists the maximum stall duration for each
+ * output format/size combination for HEIC streams.</p>
+ *
+ * <p>Type: int64[4*n]</p>
+ *
+ * <p>This tag may appear in:
+ * <ul>
+ * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
+ * </ul></p>
+ *
+ * <p>A stall duration is how much extra time would get added
+ * to the normal minimum frame duration for a repeating request
+ * that has streams with non-zero stall.</p>
+ * <p>This functions similarly to
+ * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for HEIC
+ * streams.</p>
+ * <p>All HEIC output stream formats may have a nonzero stall
+ * duration.</p>
+ *
+ * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
+ */
+ ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS = // int64[4*n]
+ ACAMERA_HEIC_START + 2,
+ ACAMERA_HEIC_END,
+
} acamera_metadata_tag_t;
/**
@@ -7608,6 +7700,13 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
*/
ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12,
+ /**
+ * <p>The camera device is capable of writing image data into a region of memory
+ * inaccessible to Android userspace or the Android kernel, and only accessible to
+ * trusted execution environments (TEE).</p>
+ */
+ ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13,
+
} acamera_metadata_enum_android_request_available_capabilities_t;
@@ -8366,6 +8465,16 @@ typedef enum acamera_metadata_enum_acamera_distortion_correction_mode {
} acamera_metadata_enum_android_distortion_correction_mode_t;
+// ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
+typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations {
+ ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT = 0,
+
+ ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT = 1,
+
+} acamera_metadata_enum_android_heic_available_heic_stream_configurations_t;
+
+
+
#endif /* __ANDROID_API__ >= 24 */
__END_DECLS
diff --git a/platform/sysroot/usr/include/media/NdkImage.h b/platform/sysroot/usr/include/media/NdkImage.h
index 15b340c2b..3e60de0ab 100644
--- a/platform/sysroot/usr/include/media/NdkImage.h
+++ b/platform/sysroot/usr/include/media/NdkImage.h
@@ -526,7 +526,24 @@ enum AIMAGE_FORMATS {
* (in bytes) between adjacent rows.</p>
*
*/
- AIMAGE_FORMAT_Y8 = 0x20203859
+ AIMAGE_FORMAT_Y8 = 0x20203859,
+
+ /**
+ * Compressed HEIC format.
+ *
+ * <p>This format defines the HEIC brand of High Efficiency Image File
+ * Format as described in ISO/IEC 23008-12.</p>
+ */
+ AIMAGE_FORMAT_HEIC = 0x48454946,
+
+ /**
+ * Depth augmented compressed JPEG format.
+ *
+ * <p>JPEG compressed main image along with XMP embedded depth metadata
+ * following ISO 16684-1:2011(E).</p>
+ */
+ AIMAGE_FORMAT_DEPTH_JPEG = 0x69656963,
+
};
/**
diff --git a/platform/sysroot/usr/include/media/NdkMediaFormat.h b/platform/sysroot/usr/include/media/NdkMediaFormat.h
index cc1d9efc3..56bcaabe1 100644
--- a/platform/sysroot/usr/include/media/NdkMediaFormat.h
+++ b/platform/sysroot/usr/include/media/NdkMediaFormat.h
@@ -214,7 +214,10 @@ extern const char* AMEDIAFORMAT_KEY_IS_SYNC_FRAME __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_LOCATION __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_LOOP __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_LYRICIST __INTRODUCED_IN(29);
+extern const char* AMEDIAFORMAT_KEY_MANUFACTURER __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_MAX_BIT_RATE __INTRODUCED_IN(29);
+extern const char* AMEDIAFORMAT_KEY_MAX_FPS_TO_ENCODER __INTRODUCED_IN(29);
+extern const char* AMEDIAFORMAT_KEY_MAX_PTS_GAP_TO_ENCODER __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_MPEG2_STREAM_HEADER __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_PCM_BIG_ENDIAN __INTRODUCED_IN(29);
extern const char* AMEDIAFORMAT_KEY_PSSH __INTRODUCED_IN(29);
diff --git a/platform/sysroot/usr/lib/aarch64-linux-android/libc.a b/platform/sysroot/usr/lib/aarch64-linux-android/libc.a
index 4f5773f77..41f97f6de 100644
--- a/platform/sysroot/usr/lib/aarch64-linux-android/libc.a
+++ b/platform/sysroot/usr/lib/aarch64-linux-android/libc.a
Binary files differ
diff --git a/platform/sysroot/usr/lib/arm-linux-androideabi/libc.a b/platform/sysroot/usr/lib/arm-linux-androideabi/libc.a
index 1bdd34202..7a35b4bd8 100644
--- a/platform/sysroot/usr/lib/arm-linux-androideabi/libc.a
+++ b/platform/sysroot/usr/lib/arm-linux-androideabi/libc.a
Binary files differ
diff --git a/platform/sysroot/usr/lib/i686-linux-android/libc.a b/platform/sysroot/usr/lib/i686-linux-android/libc.a
index e100508fb..737ec9b06 100644
--- a/platform/sysroot/usr/lib/i686-linux-android/libc.a
+++ b/platform/sysroot/usr/lib/i686-linux-android/libc.a
Binary files differ
diff --git a/platform/sysroot/usr/lib/x86_64-linux-android/libc.a b/platform/sysroot/usr/lib/x86_64-linux-android/libc.a
index 9186612a1..207b357ae 100644
--- a/platform/sysroot/usr/lib/x86_64-linux-android/libc.a
+++ b/platform/sysroot/usr/lib/x86_64-linux-android/libc.a
Binary files differ