From 9a7f3d8bb9ee046da2bc9b45fd78fc4e70f7a0ef Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Tue, 15 Jul 2014 10:43:01 -0700 Subject: [PATCH] camera_metadata: Rename DNG capability to RAW. While this capability allows for saving DNG files, it's really about the camera device producing usable RAW data, either for application processing or saving as a DNG. Leave in the DNG name as an alias to ease transition; it will be removed when the next metadata update is made. Bug: 15415688 Change-Id: I1ea9f65b03c4fa06a5004f9d1d485935742001c8 --- camera/docs/docs.html | 84 ++++++++++++++-------------- camera/docs/metadata_properties.xml | 75 +++++++++++++------------ camera/include/system/camera_metadata_tags.h | 7 +-- camera/src/camera_metadata_tag_info.c | 4 +- 4 files changed, 88 insertions(+), 82 deletions(-) diff --git a/camera/docs/docs.html b/camera/docs/docs.html index 4aae59ae..92087c8a 100644 --- a/camera/docs/docs.html +++ b/camera/docs/docs.html @@ -3107,8 +3107,7 @@ use case.

image while recording video) use case.

The camera device should take the highest-quality image possible (given the other settings) without disrupting the -frame rate of video recording.
-

+frame rate of video recording.

  • ZERO_SHUTTER_LAG @@ -6761,8 +6760,7 @@ use case.

    image while recording video) use case.

    The camera device should take the highest-quality image possible (given the other settings) without disrupting the -frame rate of video recording.
    -

    +frame rate of video recording.

  • ZERO_SHUTTER_LAG @@ -8727,7 +8725,7 @@ of reducing frame rate relative to sensor raw output.

    @@ -8812,7 +8810,7 @@ camera device.

    @@ -8918,7 +8916,7 @@ of reducing frame rate relative to sensor raw output.

    @@ -13082,10 +13080,13 @@ will accurately report the values applied by AWB in the result.

    controls, but this capability only covers the above list of controls.

  • - DNG + RAW [optional] -

    The camera device supports outputting RAW buffers that can be -saved offline into a DNG format.

    +

    The camera device supports outputting RAW buffers and +metadata for interpreting them.

    +

    Devices supporting the RAW capability allow both for +saving DNG files, and for direct application processing of +raw sensor images.

    • RAW_SENSOR is supported as an output format.
    • The maximum available resolution for RAW_SENSOR streams @@ -14505,17 +14506,17 @@ if its dependent capability is supported:

      RAW_OPAQUE RAW16 -DNG +RAW RAW16 YUV_420_888 -DNG +RAW RAW16 JPEG -DNG +RAW @@ -14554,7 +14555,7 @@ for (size_t i = 0; i < entry.count; ) { i += length; } -// writing (static example, DNG+ZSL) +// writing (static example, RAW+ZSL) int32_t[] contents = { RAW_OPAQUE, 3, RAW16, YUV_420_888, BLOB, RAW16, 2, YUV_420_888, BLOB, @@ -15857,7 +15858,7 @@ active pixels.

      @@ -15984,7 +15985,7 @@ the sensor, in reading order.

      @@ -16240,7 +16241,7 @@ including black calibration pixels.

      @@ -16295,7 +16296,7 @@ raw sensor image will include black pixels.

      @@ -16514,7 +16515,7 @@ calculating the android.s @@ -16542,7 +16543,8 @@ information for improved quality, including

      The first reference illuminant (android.sensor.referenceIlluminant1) -and corresponding matrices must be present to support DNG output.

      +and corresponding matrices must be present to support the RAW capability +and DNG output.

      When producing raw images with a color profile that has only been calibrated against a single light source, it is valid to omit android.sensor.referenceIlluminant2 along with the @@ -16596,7 +16598,7 @@ calculating the android.s

      @@ -16654,7 +16656,7 @@ reference sensor colorspace to the actual device sensor colorspace.

      @@ -16715,7 +16717,7 @@ reference sensor colorspace to the actual device sensor colorspace @@ -16777,7 +16779,7 @@ reference sensor color space.

      @@ -16841,7 +16843,7 @@ reference sensor color space.

      @@ -16907,7 +16909,7 @@ sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

      @@ -16969,7 +16971,7 @@ sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.

      @@ -17074,7 +17076,7 @@ ISO=100

      @@ -17243,7 +17245,7 @@ Value >= 1

      @@ -17298,7 +17300,7 @@ element.

      @@ -17821,7 +17823,7 @@ the time of capture.

      @@ -17883,7 +17885,7 @@ for each pixel.

      @@ -17946,7 +17948,7 @@ sample is required to be (1, 1).

      @@ -17997,7 +17999,7 @@ The curve is interpolated using a cubic spline.

      @@ -18854,7 +18856,7 @@ generation

      @@ -19264,7 +19266,7 @@ map

      @@ -20299,7 +20301,7 @@ into this metadata field. See @@ -20357,7 +20359,7 @@ The (x, y) coordinates must be bounded by @@ -22467,8 +22469,8 @@ to know when sensor settings have been applied.

    • android.noiseReduction.mode (dynamic)
  • -
  • DNG - - Needed for DNG file support +
  • RAW - + Needed for useful RAW image processing and DNG file support -
  • +
  • HAL2 - Entry is only used by camera device HAL 2.x diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml index 3867f7b5..1ba6dd1d 100644 --- a/camera/docs/metadata_properties.xml +++ b/camera/docs/metadata_properties.xml @@ -24,8 +24,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata New features for first camera 2 release (API1) - - Needed for DNG file support + + Needed for useful RAW image processing and DNG file support Entry is only used by camera device HAL 2.x @@ -2477,7 +2477,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata are stuck at an arbitrary value). - + @@ -2500,13 +2500,13 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata pixels than actual pixels on the camera sensor. - + - + @@ -3635,10 +3635,14 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata controls, but this capability only covers the above list of controls. - DNG + RAW - The camera device supports outputting RAW buffers that can be - saved offline into a DNG format. + The camera device supports outputting RAW buffers and + metadata for interpreting them. + + Devices supporting the RAW capability allow both for + saving DNG files, and for direct application processing of + raw sensor images. * RAW_SENSOR is supported as an output format. * The maximum available resolution for RAW_SENSOR streams @@ -4155,9 +4159,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata :---------------|:-----------------|:---------- RAW_OPAQUE | JPEG | ZSL RAW_OPAQUE | YUV_420_888 | ZSL - RAW_OPAQUE | RAW16 | DNG - RAW16 | YUV_420_888 | DNG - RAW16 | JPEG | DNG + RAW_OPAQUE | RAW16 | RAW + RAW16 | YUV_420_888 | RAW + RAW16 | JPEG | RAW For ZSL-capable camera devices, using the RAW_OPAQUE format as either input or output will never hurt maximum frame rate (i.e. @@ -4193,7 +4197,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata i += length; } - // writing (static example, DNG+ZSL) + // writing (static example, RAW+ZSL) int32_t[] contents = { RAW_OPAQUE, 3, RAW16, YUV_420_888, BLOB, RAW16, 2, YUV_420_888, BLOB, @@ -4679,7 +4683,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
    It is smaller or equal to sensor full pixel array, which could include the black calibration pixels.
    - + + @@ -4806,7 +4810,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata If a size corresponding to pixelArraySize is listed, the resulting raw sensor image will include black pixels. - + @@ -4831,7 +4835,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata so the value for linear sensors should not be significantly lower than maximum raw value supported, i.e. 2^(sensor bits per pixel). - + @@ -4914,7 +4918,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata The first reference illuminant (android.sensor.referenceIlluminant1) - and corresponding matrices must be present to support DNG output. + and corresponding matrices must be present to support the RAW capability + and DNG output. When producing raw images with a color profile that has only been calibrated against a single light source, it is valid to omit @@ -4934,7 +4939,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata temperature illuminant such as D65 will be chosen for the second reference illuminant. - + @@ -4952,7 +4957,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata android.sensor.calibrationTransform2, and android.sensor.forwardMatrix2 will also be present. - + + + + + + + @@ -5161,7 +5166,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata The values are given in row-column scan order, with the first value corresponding to the element of the CFA in row=0, column=0. - + @@ -5207,7 +5212,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata dimensions given is hue, saturation, value; where hue is the 0th element. - + + @@ -5323,7 +5328,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata The order of the values is R, G, B; where R is in the lowest index. - + + + @@ -5428,7 +5433,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata set of images. Other methods of calculation that produce equivalent results, and can be interpreted in the same manner, may be used. - + @@ -5760,7 +5765,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata This must be set to a valid mode from android.statistics.info.availableHotPixelMapModes. - + @@ -5840,7 +5845,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata the ON and OFF options. - + @@ -6194,7 +6199,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata pixels than actual pixels on the camera sensor. - + diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h index 7a5329b1..982888c9 100644 --- a/camera/include/system/camera_metadata_tags.h +++ b/camera/include/system/camera_metadata_tags.h @@ -338,7 +338,7 @@ typedef enum camera_metadata_tag { ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, // enum | public ANDROID_STATISTICS_END, - ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = + ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = // byte[] | public ANDROID_STATISTICS_INFO_START, ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT, // int32 | system @@ -660,7 +660,8 @@ typedef enum camera_metadata_enum_android_request_available_capabilities { ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING, - ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DNG, + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DNG = 3, // temporary manual edit + ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW = 3, ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ZSL, } camera_metadata_enum_android_request_available_capabilities_t; @@ -833,5 +834,3 @@ typedef enum camera_metadata_enum_android_sync_max_latency { ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0, ANDROID_SYNC_MAX_LATENCY_UNKNOWN = -1, } camera_metadata_enum_android_sync_max_latency_t; - - diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c index 29955395..d8c0f84f 100644 --- a/camera/src/camera_metadata_tag_info.c +++ b/camera/src/camera_metadata_tag_info.c @@ -1637,8 +1637,8 @@ int camera_metadata_enum_snprint(uint32_t tag, msg = "MANUAL_POST_PROCESSING"; ret = 0; break; - case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DNG: - msg = "DNG"; + case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW: + msg = "RAW"; ret = 0; break; case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ZSL: -- 2.11.0