From: Igor Murashkin Date: Thu, 29 Nov 2012 23:23:03 +0000 (-0800) Subject: Camera: Generate camera_metadata_tags and HTML docs from XML X-Git-Tag: android-x86-7.1-r1~546 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=08b8aadab1b04a4451d06f152580df2a3ac3afef;p=android-x86%2Fsystem-media.git Camera: Generate camera_metadata_tags and HTML docs from XML Change-Id: Ib7e9bf4855adff91a317c910aaec960f1422302a --- diff --git a/camera/docs/docs.html b/camera/docs/docs.html new file mode 100644 index 00000000..bcf28c87 --- /dev/null +++ b/camera/docs/docs.html @@ -0,0 +1,9727 @@ + + + + + + + Android Camera HAL2.0 Properties + + + + + + + + + +

Android Camera HAL2.0 Properties

+ +

Table of Contents

+ + +

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property NameTypeDescriptionUnitsRangeNotesTags
colorCorrection
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.colorCorrection.mode + enum + + + +
    +
  • + TRANSFORM_MATRIX + Use the android.colorCorrection.transform matrix + to do color conversion +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ + + +
android.colorCorrection.transform + float + x + + + 3 x 3 + + +
3x3 float matrix in row-major order
+ + +
+ A transform matrix to chromatically adapt + pixels in the CIE XYZ (1931) color space from the scene + illuminant to the sRGB-standard + D65-illuminant + + + Output values are expected to be in the range + (0,1) + + Values outside (0,1) should be clamped. Need to + provide utilities to go from CCT (+hue?), or (x,y) white + point, (or AWB mode) to matrix; use linear Bradford + algorithm. +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.colorCorrection.mode + enum + + + +
    +
  • + TRANSFORM_MATRIX + Use the android.colorCorrection.transform matrix + to do color conversion +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ + + +
control
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.control.aeAntibandingMode + enum + + + +
    +
  • + OFF +
  • +
  • + 50HZ +
  • +
  • + 60HZ +
  • +
  • + AUTO +
  • +
+ +
+ Enum for controlling + antibanding + + + + android.control.aeAvailableAntibandingModes + +
android.control.aeExposureCompensation + int32 + + + + + + Adjustment to AE target image + brightness + + count of positive/negative EV steps + + + For example, if EV step is 0.333, '6' will mean an + exposure compensation of +2 EV; -3 will mean an exposure + compensation of -1 +
android.control.aeLock + enum + + + +
    +
  • + ON + Autoexposure lock is enabled; the AE algorithm + must not update the exposure and sensitivity parameters + while the lock is active +
  • +
  • + OFF + Autoexposure lock is disabled; the AE algorithm + is free to update its parameters. +
  • +
+ +
+ Whether AE is currently locked to its latest + calculated values + + + + Note that even when AE is locked, the flash may be + fired if the AE mode is ON_AUTO_FLASH / ON_ALWAYS_FLASH / + ON_AUTO_FLASH_REDEYE. +
android.control.aeMode + enum + + + +
    +
  • + OFF + Autoexposure is disabled; sensor.exposureTime + and sensor.sensitivity are used +
  • +
  • + ON + Autoexposure is active, no flash + control +
  • +
  • + ON_AUTO_FLASH + if flash exists Autoexposure is active, auto + flash control; flash may be fired when precapture + trigger is activated, and for captures for which + captureIntent = STILL_CAPTURE +
  • +
  • + ON_ALWAYS_FLASH + if flash exists Autoexposure is active, auto + flash control for precapture trigger and always flash + when captureIntent = STILL_CAPTURE +
  • +
  • + ON_AUTO_FLASH_REDEYE + optional Automatic red eye reduction with flash. + If deemed necessary, red eye reduction sequence should + fire when precapture trigger is activated, and final + flash should fire when captureIntent = + STILL_CAPTURE +
  • +
+ +
+ Whether AE is currently updating the sensor + exposure and sensitivity fields + + + android.control.aeAvailableModes + + Only effective if android.control.mode = + AUTO +
android.control.aeRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for + metering + + + + Each area is a rectangle plus weight: xmin, ymin, + xmax, ymax, weight. The coordinate system is based on the + active pixel array, with (0,0) being the top-left of the + active pixel array, and + (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific metering area needs to be used by the HAL. If + the metering region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.aeTargetFpsRange + int32 + x + + + 2 + + + + + + Range over which fps can be adjusted to + maintain exposure + + + android.control.aeAvailableTargetFpsRanges + + Only constrains AE algorithm, not manual control + of android.sensor.exposureTime +
android.control.afMode + enum + + + +
    +
  • + OFF + The 3A routines do not control the lens; + android.lens.focusPosition is controlled by the + application +
  • +
  • + AUTO + if lens is not fixed focus. Use + android.lens.minimumFocusDistance to determine if lens + is fixed focus In this mode, the lens does not move + unless the autofocus trigger action is called. When + that trigger is activated, AF must transition to + ACTIVE_SCAN, then to the outcome of the scan (FOCUSED + or NOT_FOCUSED). Triggering cancel AF resets the lens + position to default, and sets the AF state to + INACTIVE. +
  • +
  • + MACRO + In this mode, the lens does not move unless the + autofocus trigger action is called. When that trigger + is activated, AF must transition to ACTIVE_SCAN, then + to the outcome of the scan (FOCUSED or NOT_FOCUSED). + Triggering cancel AF resets the lens position to + default, and sets the AF state to + INACTIVE. +
  • +
  • + CONTINUOUS_VIDEO + In this mode, the AF algorithm modifies the lens + position continually to attempt to provide a + constantly-in-focus image stream. The focusing behavior + should be suitable for good quality video recording; + typically this means slower focus movement and no + overshoots. When the AF trigger is not involved, the AF + algorithm should start in INACTIVE state, and then + transition into PASSIVE_SCAN and PASSIVE_FOCUSED states + as appropriate. When the AF trigger is activated, the + algorithm should immediately transition into AF_FOCUSED + or AF_NOT_FOCUSED as appropriate, and lock the lens + position until a cancel AF trigger is received. Once + cancel is received, the algorithm should transition + back to INACTIVE and resume passive scan. Note that + this behavior is not identical to CONTINUOUS_PICTURE, + since an ongoing PASSIVE_SCAN must immediately be + canceled. +
  • +
  • + CONTINUOUS_PICTURE + In this mode, the AF algorithm modifies the lens + position continually to attempt to provide a + constantly-in-focus image stream. The focusing behavior + should be suitable for still image capture; typically + this means focusing as fast as possible. When the AF + trigger is not involved, the AF algorithm should start + in INACTIVE state, and then transition into + PASSIVE_SCAN and PASSIVE_FOCUSED states as appropriate + as it attempts to maintain focus. When the AF trigger + is activated, the algorithm should finish its + PASSIVE_SCAN if active, and then transition into + AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock + the lens position until a cancel AF trigger is + received. When the AF cancel trigger is activated, the + algorithm should transition back to INACTIVE and then + act as if it has just been started. +
  • +
  • + EDOF + Extended depth of field (digital focus). AF + trigger is ignored, AF state should always be + INACTIVE. +
  • +
+ +
+ Whether AF is currently enabled, and what + mode it is set to + + + +
android.control.afRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for focus + estimation + + + + Each area is a rectangle plus weight: xmin, ymin, + xmax, ymax, weight. The coordinate system is based on the + active pixel array, with (0,0) being the top-left of the + active pixel array, and + (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific focus area needs to be used by the HAL. If + the focusing region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.awbLock + enum + + + +
    +
  • + ON + Auto-whitebalance lock is enabled; the AWB + algorithm must not update the exposure and sensitivity + parameters while the lock is active +
  • +
  • + OFF + Auto-whitebalance lock is disabled; the AWB + algorithm is free to update its parameters if in AUTO + mode. +
  • +
+ +
+ Whether AWB is currently locked to its + latest calculated values + + + + Note that AWB lock is only meaningful for AUTO + mode; in other modes, AWB is already fixed to a specific + setting +
android.control.awbMode + enum + + + +
    +
  • + OFF +
  • +
  • + AUTO +
  • +
  • + INCANDESCENT +
  • +
  • + FLUORESCENT +
  • +
  • + WARM_FLUORESCENT +
  • +
  • + DAYLIGHT +
  • +
  • + CLOUDY_DAYLIGHT +
  • +
  • + TWILIGHT +
  • +
  • + SHADE +
  • +
+ +
+ Whether AWB is currently setting the color + transform fields, and what its illumination target + is + + + + [BC - AWB lock,AWB modes] +
android.control.awbRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for illuminant + estimation + + + + Only used in AUTO mode. Each area is a rectangle + plus weight: xmin, ymin, xmax, ymax, weight. The + coordinate system is based on the active pixel array, + with (0,0) being the top-left of the active pixel array, + and (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific metering area needs to be used by the HAL. If + the metering region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.captureIntent + enum + + + +
    +
  • + CUSTOM + This request doesn't fall into the other + categories. Default to preview-like + behavior. +
  • +
  • + PREVIEW + This request is for a preview-like usecase. The + precapture trigger may be used to start off a metering + w/flash sequence +
  • +
  • + STILL_CAPTURE + This request is for a still capture-type + usecase. +
  • +
  • + VIDEO_RECORD + This request is for a video recording + usecase. +
  • +
  • + VIDEO_SNAPSHOT + This request is for a video snapshot (still + image while recording video) usecase +
  • +
  • + ZERO_SHUTTER_LAG + This request is for a ZSL usecase; the + application will stream full-resolution images and + reprocess one or several later for a final + capture +
  • +
+ +
+ Information to 3A routines about the purpose + of this capture, to help decide optimal 3A + strategy + + + all must be supported + + Only used if android.control.mode != OFF. +
android.control.effectMode + enum + + + +
    +
  • + OFF +
  • +
  • + MONO + optional +
  • +
  • + NEGATIVE + optional +
  • +
  • + SOLARIZE + optional +
  • +
  • + SEPIA + optional +
  • +
  • + POSTERIZE + optional +
  • +
  • + WHITEBOARD + optional +
  • +
  • + BLACKBOARD + optional +
  • +
  • + AQUA + optional +
  • +
+ +
+ Whether any special color effect is in use. + Only used if android.control.mode != OFF + + + android.control.availableEffects + +
android.control.mode + enum + + + +
    +
  • + OFF + Full application control of pipeline. All 3A + routines are disabled, no other settings in + android.control.* have any effect +
  • +
  • + AUTO + Use settings for each individual 3A routine. + Manual control of capture parameters is disabled. All + controls in android.control.* besides sceneMode take + effect +
  • +
  • + USE_SCENE_MODE + Use specific scene mode. Enabling this disables + control.aeMode, control.awbMode and control.afMode + controls; the HAL must ignore those settings while + USE_SCENE_MODE is active (except for FACE_PRIORITY + scene mode). Other control entries are still active. + This setting can only be used if availableSceneModes != + UNSUPPORTED +
  • +
+ +
+ Overall mode of 3A control + routines + + + all must be supported + +
android.control.sceneMode + enum + + + +
    +
  • + UNSUPPORTED + 0 +
  • +
  • + FACE_PRIORITY + if face detection support exists Use face + detection data to drive 3A routines. If face detection + statistics are disabled, should still operate correctly + (but not return face detection statistics to the + framework). Unlike the other scene modes, aeMode, + awbMode, and afMode remain active when FACE_PRIORITY is + set. This is due to compatibility concerns with the old + camera API +
  • +
  • + ACTION + optional +
  • +
  • + PORTRAIT + optional +
  • +
  • + LANDSCAPE + optional +
  • +
  • + NIGHT + optional +
  • +
  • + NIGHT_PORTRAIT + optional +
  • +
  • + THEATRE + optional +
  • +
  • + BEACH + optional +
  • +
  • + SNOW + optional +
  • +
  • + SUNSET + optional +
  • +
  • + STEADYPHOTO + optional +
  • +
  • + FIREWORKS + optional +
  • +
  • + SPORTS + optional +
  • +
  • + PARTY + optional +
  • +
  • + CANDLELIGHT + optional +
  • +
  • + BARCODE + optional +
  • +
+ +
+ Which scene mode is active when + android.control.mode = SCENE_MODE + + + android.control.availableSceneModes + +
android.control.videoStabilizationMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON +
  • +
+ +
+ Whether video stabilization is + active + + + + If enabled, video stabilization can modify the + android.scaler.cropRegion to keep the video stream + stabilized +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.control.aeAvailableAntibandingModes + byte + x + + + n + + +
list of enums
+ + +
+ Which set of antibanding modes are + supported + + + +
android.control.aeAvailableModes + byte + x + + + n + + +
list of enums
+ + +
+ Which subset of AE modes is + supported + + + OFF, ON must be supported. + ON_AUTO_FLASH/ON_ALWAYS_FLASH must be supported if flash + unit is available + +
android.control.aeAvailableTargetFpsRanges + int32 + x + + + 2 x n + + +
list of pairs of frame rates
+ + +
+ List of frame rate ranges supported by the + AE algorithm/hardware + + + +
android.control.aeCompensationRange + int32 + x + + + 2 + + + + + + Maximum and minimum exposure compensation + setting, in counts of + android.control.aeCompensationStepSize + + + At least (-2,2)/(exp compensation step + size) + +
android.control.aeCompensationStep + rational + + + + + + Smallest step by which exposure compensation + can be changed + + + <= 1/2 + +
android.control.afAvailableModes + byte + x + + + n + + +
List of enums
+ + +
+ List of AF modes that can be + selected + + + OFF must be included. AUTO must be supported if + lens allows for changing focus + +
android.control.availableEffects + byte + x + + + n + + +
list of enums
+ + +
+ what subset of the full color effect enum + list is supported + + + OFF must be listed + +
android.control.availableSceneModes + byte + x + + + n + + +
list of enums from android.control.sceneMode, plus UNSUPPORTED to indicate no scene modes are supported
+ + +
+ what subset of the scene mode enum list is + supported. + + + SCENE_MODE_FACE_PRIORITY must be supported if face + detection is supported + +
android.control.availableVideoStabilizationModes + byte + x + + + n + + +
List of enums.
+ + +
+ List of video stabilization modes that can + be supported + + + OFF must be included + +
android.control.awbAvailableModes + byte + + + + + + + List of enums (android.control.awbMode) + + OFF, AUTO must be included + +
android.control.maxRegions + int32 + + + + + + For AE, AWB, and AF, how many individual + regions can be listed for metering? + + + >= 1 + +
android.control.sceneModeOverrides + byte + x + + + 3 x lengthavailablescenemodes + + + + + + List of AE, AWB, and AF modes to use for + each available scene mode + + + For each listed scene mode, lists the aeMode, + awbMode, and afMode that the HAL wants to use for that + scene mode. For each entry, the order is {aeMode, + awbMode, afMode} in order of increasing index + + When a scene mode is enabled, the HAL is expected + to override aeMode, awbMode, and afMode with its + preferred settings for that scene mode. To simplify + communication with old camera API applications, the + service wants this override list in the static metadata. + The order of this list matches that of + availableSceneModes, with 3 entires for each scene mode. + The overrides listed for SCENE_MODE_FACE_PRIORITY are + ignored, since for that mode, the application-set aeMode, + awbMode, and afMode are used instead, like they are when + android.control.mode is AUTO. It is recommended that for + FACE_PRIORITY, the overrides should be set to 0. As an + example, if availableSceneModes is { FACE_PRIORITY, + ACTION, NIGHT }, then the service expects this field to + have 9 entries; for example { 0 , 0, 0, ON_AUTO_FLASH, + AUTO, CONTINUOUS_PICTURE, ON_AUTO_FLASH, INCANDESCENT, + AUTO } +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.control.aePrecaptureId + int32 + + + + + + The ID sent with the latest + CAMERA2_TRIGGER_PRECAPTURE_METERING call + + + + Must be 0 if no + CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet + by HAL. Always updated even if AE algorithm ignores the + trigger +
android.control.aeRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for + metering + + + + Each area is a rectangle plus weight: xmin, ymin, + xmax, ymax, weight. The coordinate system is based on the + active pixel array, with (0,0) being the top-left of the + active pixel array, and + (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific metering area needs to be used by the HAL. If + the metering region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.aeState + enum + + + +
    +
  • + INACTIVE + AE is off +
  • +
  • + SEARCHING + AE doesn't yet have a good set of control values + for the current scene +
  • +
  • + CONVERGED + AE has a good set of control values for the + current scene +
  • +
  • + LOCKED + AE has been locked (aeMode = + LOCKED) +
  • +
  • + FLASH_REQUIRED + AE has a good set of control values, but flash + needs to be fired for good quality still + capture +
  • +
  • + PRECAPTURE + AE has been asked to do a precapture sequence + (through the + trigger_action(CAMERA2_TRIGGER_PRECAPTURE_METERING) + call), and is currently executing it. Once PRECAPTURE + completes, AE will transition to CONVERGED or + FLASH_REQUIRED as appropriate +
  • +
+ +
+ Current state of AE algorithm + + + + Whenever the AE algorithm state changes, a + MSG_AUTOEXPOSURE notification must be send if a + notification callback is registered. +
android.control.afMode + enum + + + +
    +
  • + OFF + The 3A routines do not control the lens; + android.lens.focusPosition is controlled by the + application +
  • +
  • + AUTO + if lens is not fixed focus. Use + android.lens.minimumFocusDistance to determine if lens + is fixed focus In this mode, the lens does not move + unless the autofocus trigger action is called. When + that trigger is activated, AF must transition to + ACTIVE_SCAN, then to the outcome of the scan (FOCUSED + or NOT_FOCUSED). Triggering cancel AF resets the lens + position to default, and sets the AF state to + INACTIVE. +
  • +
  • + MACRO + In this mode, the lens does not move unless the + autofocus trigger action is called. When that trigger + is activated, AF must transition to ACTIVE_SCAN, then + to the outcome of the scan (FOCUSED or NOT_FOCUSED). + Triggering cancel AF resets the lens position to + default, and sets the AF state to + INACTIVE. +
  • +
  • + CONTINUOUS_VIDEO + In this mode, the AF algorithm modifies the lens + position continually to attempt to provide a + constantly-in-focus image stream. The focusing behavior + should be suitable for good quality video recording; + typically this means slower focus movement and no + overshoots. When the AF trigger is not involved, the AF + algorithm should start in INACTIVE state, and then + transition into PASSIVE_SCAN and PASSIVE_FOCUSED states + as appropriate. When the AF trigger is activated, the + algorithm should immediately transition into AF_FOCUSED + or AF_NOT_FOCUSED as appropriate, and lock the lens + position until a cancel AF trigger is received. Once + cancel is received, the algorithm should transition + back to INACTIVE and resume passive scan. Note that + this behavior is not identical to CONTINUOUS_PICTURE, + since an ongoing PASSIVE_SCAN must immediately be + canceled. +
  • +
  • + CONTINUOUS_PICTURE + In this mode, the AF algorithm modifies the lens + position continually to attempt to provide a + constantly-in-focus image stream. The focusing behavior + should be suitable for still image capture; typically + this means focusing as fast as possible. When the AF + trigger is not involved, the AF algorithm should start + in INACTIVE state, and then transition into + PASSIVE_SCAN and PASSIVE_FOCUSED states as appropriate + as it attempts to maintain focus. When the AF trigger + is activated, the algorithm should finish its + PASSIVE_SCAN if active, and then transition into + AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock + the lens position until a cancel AF trigger is + received. When the AF cancel trigger is activated, the + algorithm should transition back to INACTIVE and then + act as if it has just been started. +
  • +
  • + EDOF + Extended depth of field (digital focus). AF + trigger is ignored, AF state should always be + INACTIVE. +
  • +
+ +
+ Whether AF is currently enabled, and what + mode it is set to + + + +
android.control.afRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for focus + estimation + + + + Each area is a rectangle plus weight: xmin, ymin, + xmax, ymax, weight. The coordinate system is based on the + active pixel array, with (0,0) being the top-left of the + active pixel array, and + (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific focus area needs to be used by the HAL. If + the focusing region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.afState + enum + + + +
    +
  • + INACTIVE + AF off or has not yet tried to scan/been asked + to scan +
  • +
  • + PASSIVE_SCAN + if CONTINUOUS_* modes are supported AF is + currently doing an AF scan initiated by a continuous + autofocus mode +
  • +
  • + PASSIVE_FOCUSED + if CONTINUOUS_* modes are supported AF currently + believes it is in focus, but may restart scanning at + any time. +
  • +
  • + ACTIVE_SCAN + if AUTO or MACRO modes are supported AF is doing + an AF scan because it was triggered by AF + trigger +
  • +
  • + FOCUSED_LOCKED + if any AF mode besides OFF is supported AF + believes it is focused correctly and is + locked +
  • +
  • + NOT_FOCUSED_LOCKED + if any AF mode besides OFF is supported AF has + failed to focus successfully and is + locked +
  • +
+ +
+ Current state of AF algorithm + + + + Whenever the AF algorithm state changes, a + MSG_AUTOFOCUS notification must be send if a notification + callback is registered. +
android.control.afTriggerId + int32 + + + + + + The ID sent with the latest + CAMERA2_TRIGGER_AUTOFOCUS call + + + + Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger + received yet by HAL. Always updated even if AF algorithm + ignores the trigger +
android.control.awbMode + enum + + + +
    +
  • + OFF +
  • +
  • + AUTO +
  • +
  • + INCANDESCENT +
  • +
  • + FLUORESCENT +
  • +
  • + WARM_FLUORESCENT +
  • +
  • + DAYLIGHT +
  • +
  • + CLOUDY_DAYLIGHT +
  • +
  • + TWILIGHT +
  • +
  • + SHADE +
  • +
+ +
+ Whether AWB is currently setting the color + transform fields, and what its illumination target + is + + + + [BC - AWB lock,AWB modes] +
android.control.awbRegions + int32 + x + + + 5 x area_count + + + + + + List of areas to use for illuminant + estimation + + + + Only used in AUTO mode. Each area is a rectangle + plus weight: xmin, ymin, xmax, ymax, weight. The + coordinate system is based on the active pixel array, + with (0,0) being the top-left of the active pixel array, + and (android.sensor.info.activeArraySize.width, + android.sensor.info.activeArraySize.height) being the + bottom-right point of the active pixel array. The weight + should be nonnegative. If all regions have 0 weight, then + no specific metering area needs to be used by the HAL. If + the metering region is outside the current + android.scaler.cropRegion, the HAL should ignore the + sections outside the region and output the used sections + in the frame metadata +
android.control.awbState + enum + + + +
    +
  • + INACTIVE + AWB is not in auto mode +
  • +
  • + SEARCHING + AWB doesn't yet have a good set of control + values for the current scene +
  • +
  • + CONVERGED + AWB has a good set of control values for the + current scene +
  • +
  • + LOCKED + AE has been locked (aeMode = + LOCKED) +
  • +
+ +
+ Current state of AWB algorithm + + + + Whenever the AWB algorithm state changes, a + MSG_AUTOWHITEBALANCE notification must be send if a + notification callback is registered. +
android.control.mode + enum + + + +
    +
  • + OFF + Full application control of pipeline. All 3A + routines are disabled, no other settings in + android.control.* have any effect +
  • +
  • + AUTO + Use settings for each individual 3A routine. + Manual control of capture parameters is disabled. All + controls in android.control.* besides sceneMode take + effect +
  • +
  • + USE_SCENE_MODE + Use specific scene mode. Enabling this disables + control.aeMode, control.awbMode and control.afMode + controls; the HAL must ignore those settings while + USE_SCENE_MODE is active (except for FACE_PRIORITY + scene mode). Other control entries are still active. + This setting can only be used if availableSceneModes != + UNSUPPORTED +
  • +
+ +
+ Overall mode of 3A control + routines + + + all must be supported + +
demosaic
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.demosaic.mode + enum + + + +
    +
  • + FAST + Minimal or no slowdown of frame rate compared to + Bayer RAW output +
  • +
  • + HIGH_QUALITY + High-quality may reduce output frame + rate +
  • +
+ +
+ Controls the quality of the demosaicing + processing + + + +
edge
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.edge.mode + enum + + + +
    +
  • + OFF + No edge enhancement is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Operation mode for edge + enhancement + + + +
android.edge.strength + byte + + + + + + Control the amount of edge enhancement + applied to the images + + 1-10; 10 is maximum sharpening + + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.edge.mode + enum + + + +
    +
  • + OFF + No edge enhancement is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Operation mode for edge + enhancement + + + +
flash
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.flash.firingPower + byte + + + + + + Power for flash firing/torch + + 10 is max power; 0 is no flash. Linear + + 0 - 10 + + Power for snapshot may use a different scale than + for torch mode. Only one entry for torch mode will be + used +
android.flash.firingTime + int64 + + + + + + Firing time of flash relative to start of + exposure + + nanoseconds + + 0-(exposure time-flash duration) + + Clamped to (0, exposure time - flash + duration). +
android.flash.mode + enum + + + +
    +
  • + OFF + Do not fire the flash for this + capture +
  • +
  • + SINGLE + if android.flash.available is true Fire flash + for this capture based on firingPower, + firingTime. +
  • +
  • + TORCH + if android.flash.available is true Flash + continuously on, power set by + firingPower +
  • +
+ +
+ Select flash operation mode + + + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.flash.info.available + byte + + + + + + Whether this camera has a + flash + + boolean (0 = false, otherwise true) + + + If no flash, none of the flash controls do + anything. All other metadata should return 0 +
android.flash.info.chargeDuration + int64 + + + + + + Time taken before flash can fire + again + + nanoseconds + + 0-1e9 + + 1 second too long/too short for recharge? Should + this be power-dependent? +
android.flash.colorTemperature + byte + + + + + + The x,y whitepoint of the + flash + + pair of floats + + 0-1 for both + +
android.flash.maxEnergy + byte + + + + + + Max energy output of the flash for a full + power single flash + + lumen-seconds + + >= 0 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.flash.firingPower + byte + + + + + + Power for flash firing/torch + + 10 is max power; 0 is no flash. Linear + + 0 - 10 + + Power for snapshot may use a different scale than + for torch mode. Only one entry for torch mode will be + used +
android.flash.firingTime + int64 + + + + + + Firing time of flash relative to start of + exposure + + nanoseconds + + 0-(exposure time-flash duration) + + Clamped to (0, exposure time - flash + duration). +
android.flash.mode + enum + + + +
    +
  • + OFF + Do not fire the flash for this + capture +
  • +
  • + SINGLE + if android.flash.available is true Fire flash + for this capture based on firingPower, + firingTime. +
  • +
  • + TORCH + if android.flash.available is true Flash + continuously on, power set by + firingPower +
  • +
+ +
+ Select flash operation mode + + + +
android.flash.state + enum + + + +
    +
  • + UNAVAILABLE + No flash on camera +
  • +
  • + CHARGING + if android.flash.available is true Flash is + charging and cannot be fired +
  • +
  • + READY + if android.flash.available is true Flash is + ready to fire +
  • +
  • + FIRED + if android.flash.available is true Flash fired + for this capture +
  • +
+ +
+ Current state of the flash + unit + + + +
geometric
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.geometric.mode + enum + + + +
    +
  • + OFF + No geometric correction is + applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Operating mode of geometric + correction + + + +
android.geometric.strength + byte + + + + + + Control the amount of shading correction + applied to the images + + unitless: 1-10; 10 is full shading + compensation + + +
hotPixel
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.hotPixel.mode + enum + + + +
    +
  • + OFF + No hot pixel correction can be + applied +
  • +
  • + FAST + Frame rate must not be reduced compared to raw + Bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Set operational mode for hot pixel + correction + + + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.hotPixel.info.map + int32 + x + + + 2 x n + + +
list of coordinates based on android.sensor.pixelArraySize
+ + +
+ Location of hot/defective pixels on + sensor + + + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.hotPixel.mode + enum + + + +
    +
  • + OFF + No hot pixel correction can be + applied +
  • +
  • + FAST + Frame rate must not be reduced compared to raw + Bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Set operational mode for hot pixel + correction + + + +
jpeg
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.jpeg.gpsCoordinates + double + x + + + 3 + + +
latitude, longitude, altitude. First two in degrees, the third in meters
+ + +
+ GPS coordinates to include in output JPEG + EXIF + + + (-180 - 180], [-90,90], [-inf, inf] + +
android.jpeg.gpsProcessingMethod + byte + + + + + + 32 characters describing GPS algorithm to + include in EXIF + + UTF-8 null-terminated string + + +
android.jpeg.gpsTimestamp + int64 + + + + + + Time GPS fix was made to include in + EXIF + + UTC in seconds since January 1, 1970 + + +
android.jpeg.orientation + int32 + + + + + + Orientation of JPEG image to + write + + Degrees in multiples of 90 + + 0, 90, 180, 270 + +
android.jpeg.quality + byte + + + + + + Compression quality of the final JPEG + image + + + 1-100; larger is higher quality + + 85-95 is typical usage range +
android.jpeg.thumbnailQuality + byte + + + + + + Compression quality of JPEG + thumbnail + + + 1-100; larger is higher quality + +
android.jpeg.thumbnailSize + int32 + x + + + 2 + + + + + + Resolution of embedded JPEG + thumbnail + + + from android.jpeg.availableThumbnailSizes + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.jpeg.availableThumbnailSizes + int32 + x + + + 2 x n + + +
list of resolution pairs
+ + +
+ Supported resolutions for the JPEG + thumbnail + + + Must include at least one valid resolution, plus + (0,0) for no thumbnail generation + +
android.jpeg.maxSize + int32 + + + + + + Maximum size in bytes for the compressed + JPEG buffer + + + Must be large enough to fit any JPEG produced by + the camera + + This is used for sizing the gralloc buffers for + JPEG +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.jpeg.gpsCoordinates + double + x + + + 3 + + +
latitude, longitude, altitude. First two in degrees, the third in meters
+ + +
+ GPS coordinates to include in output JPEG + EXIF + + + (-180 - 180], [-90,90], [-inf, inf] + +
android.jpeg.gpsProcessingMethod + byte + + + + + + 32 characters describing GPS algorithm to + include in EXIF + + UTF-8 null-terminated string + + +
android.jpeg.gpsTimestamp + int64 + + + + + + Time GPS fix was made to include in + EXIF + + UTC in seconds since January 1, 1970 + + +
android.jpeg.orientation + int32 + + + + + + Orientation of JPEG image to + write + + Degrees in multiples of 90 + + 0, 90, 180, 270 + +
android.jpeg.quality + byte + + + + + + Compression quality of the final JPEG + image + + + 1-100; larger is higher quality + + 85-95 is typical usage range +
android.jpeg.size + int32 + + + + + + The size of the compressed JPEG image, in + bytes + + + >= 0 + + If no JPEG output is produced for the request, + this must be 0. Otherwise, this describes the real size + of the compressed JPEG image placed in the output stream. + More specifically, if android.jpeg.maxSize = 1000000, and + a specific capture has android.jpeg.size = 500000, then + the output buffer from the JPEG stream will be 1000000 + bytes, of which the first 500000 make up the real + data. +
android.jpeg.thumbnailQuality + byte + + + + + + Compression quality of JPEG + thumbnail + + + 1-100; larger is higher quality + +
android.jpeg.thumbnailSize + int32 + x + + + 2 + + + + + + Resolution of embedded JPEG + thumbnail + + + from android.jpeg.availableThumbnailSizes + +
lens
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.lens.aperture + float + + + + + + Size of the lens aperture + + f-number (f/NNN) + + android.lens.info.availableApertures + + Will not be supported on most devices. Can only + pick from supported list +
android.lens.filterDensity + float + + + + + + State of lens neutral density + filter(s) + + number of stops of filtering + + android.lens.info.availableFilterDensities + + Will not be supported on most devices. Can only + pick from supported list +
android.lens.focalLength + float + + + + + + Lens optical zoom setting + + focal length in mm + + > 0 + + Will not be supported on most devices. +
android.lens.focusDistance + float + + + + + + Distance to plane of sharpest focus, + measured from frontmost surface of the lens + + diopters (1/m) + + >= 0 + + 0 = infinity focus. Used value should be clamped + to (0,minimum focus distance) +
android.lens.opticalStabilizationMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON + optional +
  • +
+ +
+ Whether optical image stabilization is + enabled. + + + android.lens.availableOpticalStabilization + + Will not be supported on most devices. +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.lens.info.availableApertures + float + x + + + n + + + + + + List of supported aperture + values + + + one entry required, > 0 + + If variable aperture not available, only setting + should be for the fixed aperture +
android.lens.info.availableFilterDensities + float + x + + + n + + + + + + List of supported ND filter + values + + + one entry required, >= 0 + + If not available, only setting is 0. Otherwise, + lists the available exposure index values for dimming + (2 would mean the filter is set to reduce incoming + light by two stops) +
android.lens.info.availableFocalLengths + float + x + + + n + + +
the list of available focal lengths
+ + +
+ If fitted with optical zoom, what focal + lengths are available. If not, the static focal + length + + + > 0 + + If optical zoom not supported, only one value + should be reported +
android.lens.info.availableOpticalStabilization + byte + x + + + n + + +
list of enums
+ + +
+ List of supported optical image + stabilization modes + + + +
android.lens.info.geometricCorrectionMap + float + x + + + 2 x 3 x n x m + + +
2D array of destination coordinate pairs for uniform grid points in source image, per color channel. Size in the range of 2x3x40x30
+ + +
+ A low-resolution map for correction of + geometric distortions and chromatic aberrations, per + color channel + + + N, M >= 2 + + [DNG wants a function instead]. What's easiest + for implementers? With an array size (M, N), entry (i, + j) provides the destination for pixel (i/(M-1) * width, + j/(N-1) * height). Data is row-major, with each array + entry being ( (X, Y)_r, (X, Y)_g, (X, Y)_b ) ) +
android.lens.info.geometricCorrectionMapSize + int32 + x + + + 2 + + +
width and height of geometric correction map
+ + +
+ Dimensions of geometric correction + map + + + Both values >= 2 + +
android.lens.info.hyperfocalDistance + float + + + + + + Hyperfocal distance for this lens; set to + 0 if fixed focus + + diopters + + >= 0 + + The hyperfocal distance is used for the old + API's 'fixed' setting +
android.lens.info.minimumFocusDistance + float + + + + + + Shortest distance from frontmost surface + of the lens that can be focused correctly + + diopters + + >= 0 + + If the lens is fixed-focus, this should be + 0 +
android.lens.info.shadingMap + float + x + + + 3 x n x m + + +
2D array of float gain factors per channel to correct for lens falloff. Should be on the order of 3x40x30
+ + +
+ A low-resolution map of lens shading, per + color channel + + + Each gain factor is >= 1 + + Assume bilinear interpolation of map. The least + shaded section of the image should have a gain factor + of 1; all other sections should have gains above + 1. +
android.lens.info.shadingMapSize + int32 + x + + + 2 + + +
width and height of lens shading map
+ + +
+ Dimensions of lens shading + map + + + Both values >= 1 + +
android.lens.facing + enum + + + +
    +
  • + FRONT +
  • +
  • + BACK +
  • +
+ +
+ Direction the camera faces relative to + device screen + + + +
android.lens.opticalAxisAngle + float + x + + + 2 + + +
degrees. First defines the angle of separation between the perpendicular to the screen and the camera optical axis. The second then defines the clockwise rotation of the optical axis from native device up.
+ + +
+ Relative angle of camera optical axis to the + perpendicular axis from the display + + + [0-90) for first angle, [0-360) for second + + Examples: (0,0) means that the camera optical axis + is perpendicular to the display surface; (45,0) means + that the camera points 45 degrees up when device is held + upright; (45,90) means the camera points 45 degrees to + the right when the device is held upright. Use FACING + field to determine perpendicular outgoing + direction +
android.lens.position + float + x + + + 3, location in mm, in the sensor coordinate + system + + + + + + Coordinates of camera optical axis on + device + + + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.lens.aperture + float + + + + + + Size of the lens aperture + + f-number (f/NNN) + + android.lens.info.availableApertures + + Will not be supported on most devices. Can only + pick from supported list +
android.lens.filterDensity + float + + + + + + State of lens neutral density + filter(s) + + number of stops of filtering + + android.lens.info.availableFilterDensities + + Will not be supported on most devices. Can only + pick from supported list +
android.lens.focalLength + float + + + + + + Lens optical zoom setting + + focal length in mm + + > 0 + + Will not be supported on most devices. +
android.lens.focusDistance + float + + + + + + Distance to plane of sharpest focus, + measured from frontmost surface of the lens + + diopters (1/m) + + >= 0 + + Should be zero for fixed-focus cameras +
android.lens.focusRange + float + + + + + + The range of scene distances that are in + sharp focus (depth of field) + + pair of focus distances in diopters: (near, + far) + + >=0 + + If variable focus not supported, can still report + fixed depth of field range +
android.lens.opticalStabilizationMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON + optional +
  • +
+ +
+ Whether optical image stabilization is + enabled. + + + android.lens.availableOpticalStabilization + + Will not be supported on most devices. +
android.lens.state + enum + + + +
    +
  • + STATIONARY +
  • +
+ +
+ Current lens status + + + +
noiseReduction
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.noiseReduction.mode + enum + + + +
    +
  • + OFF + No noise reduction is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + May slow down frame rate to provide highest + quality +
  • +
+ +
+ Mode of operation for the noise reduction + algorithm + + + android.noiseReduction.availableModes + +
android.noiseReduction.strength + byte + + + + + + Control the amount of noise reduction + applied to the images + + 1-10; 10 is max noise reduction + + 1 - 10 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.noiseReduction.mode + enum + + + +
    +
  • + OFF + No noise reduction is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + May slow down frame rate to provide highest + quality +
  • +
+ +
+ Mode of operation for the noise reduction + algorithm + + + android.noiseReduction.availableModes + +
quirks
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.quirks.meteringCropRegion + byte + + + + + + If set to 1, the camera service does not + scale 'normalized' coordinates with respect to the crop + region. This applies to metering input (a{e,f,wb}Region + and output (face rectangles). + + + + Normalized coordinates refer to those in the + (-1000,1000) range mentioned in the + android.hardware.Camera API. HAL implementations should + instead always use and emit sensor array-relative + coordinates for all region data. Does not need to be + listed in static metadata. Support will be removed in + future versions of camera service. +
android.quirks.triggerAfWithAuto + byte + + + + + + If set to 1, then the camera service always + switches to FOCUS_MODE_AUTO before issuing a AF + trigger. + + + + HAL implementations should implement AF trigger + modes for AUTO, MACRO, CONTINUOUS_FOCUS, and + CONTINUOUS_PICTURE modes instead of using this flag. Does + not need to be listed in static metadata. Support will be + removed in future versions of camera service +
android.quirks.useZslFormat + byte + + + + + + If set to 1, the camera service uses + CAMERA2_PIXEL_FORMAT_ZSL instead of + HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero + shutter lag stream + + + + HAL implementations should use gralloc usage flags + to determine that a stream will be used for + zero-shutter-lag, instead of relying on an explicit + format setting. Does not need to be listed in static + metadata. Support will be removed in future versions of + camera service. +
request
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.request.frameCount + int32 + + + + + + A frame counter set by the framework. Must + be maintained unchanged in output frame + + incrementing integer + + Any int + +
android.request.id + int32 + + + + + + An application-specified ID for the current + request. Must be maintained unchanged in output + frame + + arbitrary integer assigned by application + + Any int + +
android.request.inputStreams + byte + + + + + + List which camera reprocess stream is used + for the source of reprocessing data. + + List of camera reprocess stream IDs + + Typically, only one entry allowed, must be a valid + reprocess stream ID. If android.jpeg.needsThumbnail is + set, then multiple reprocess streams may be included in a + single request; they must be different scaled versions of + the same image. + + Only meaningful when android.request.type == + REPROCESS. Ignored otherwise +
android.request.metadataMode + enum + + + +
    +
  • + NONE + No metadata should be produced on output, except + for application-bound buffer data. If no + application-bound streams exist, no frame should be + placed in the output frame queue. If such streams + exist, a frame should be placed on the output queue + with null metadata but with the necessary output buffer + information. Timestamp information should still be + included with any output stream buffers +
  • +
  • + FULL + All metadata should be produced. Statistics will + only be produced if they are separately + enabled +
  • +
+ +
+ How much metadata to produce on + output + + + +
android.request.outputStreams + byte + + + + + + Lists which camera output streams image data + from this capture must be sent to + + List of camera stream IDs + + List must only include streams that have been + created + + If no output streams are listed, then the image + data should simply be discarded. The image data must + still be captured for metadata and statistics production, + and the lens and flash must operate as requested. +
android.request.type + enum + + + +
    +
  • + CAPTURE + Capture a new image from the imaging hardware, + and process it according to the + settings +
  • +
  • + REPROCESS + Process previously captured data; the + android.request.inputStream parameter determines the + source reprocessing stream. TODO: Mark dynamic metadata + needed for reprocessing with [RP] +
  • +
+ +
+ The type of the request; either CAPTURE or + REPROCESS + + + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.request.maxNumOutputStreams + int32 + x + + + 3 + + + + + + How many output streams can be allocated at + the same time for each type of stream + + The number of raw sensor streams; the number of + processed, uncompressed streams; and the number of + JPEG-compressed streams + + >=1 for Raw and JPEG-compressed stream. >= 3 + for processed, uncompressed streams + + Video snapshot with preview callbacks requires 3 + processed streams (preview, record, app callbacks) and + one JPEG stream (snapshot) +
android.request.maxNumReprocessStreams + int32 + x + + + 1 + + + + + + How many reprocessing streams of any type + can be allocated at the same time + + + >= 1 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.request.frameCount + int32 + + + + + + Number of frames captured since + open() + + count of frames + + > 0 + + Reset on release() +
android.request.id + int32 + + + + + + An application-specified ID for the current + request. Must be maintained unchanged in output + frame + + arbitrary integer assigned by application + + Any int + +
android.request.metadataMode + enum + + + +
    +
  • + NONE + No metadata should be produced on output, except + for application-bound buffer data. If no + application-bound streams exist, no frame should be + placed in the output frame queue. If such streams + exist, a frame should be placed on the output queue + with null metadata but with the necessary output buffer + information. Timestamp information should still be + included with any output stream buffers +
  • +
  • + FULL + All metadata should be produced. Statistics will + only be produced if they are separately + enabled +
  • +
+ +
+ How much metadata to produce on + output + + + +
android.request.outputStreams + byte + + + + + + Lists which camera output streams image data + from this capture must be sent to + + List of camera stream IDs + + List must only include streams that have been + created + + If no output streams are listed, then the image + data should simply be discarded. The image data must + still be captured for metadata and statistics production, + and the lens and flash must operate as requested. +
scaler
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.scaler.cropRegion + int32 + x + + + 3 + + + + + + Top-left corner and width of the output + region to select from the active pixel + array + + (x,y) of top-left corner, width of region in + pixels; (0,0) is top-left corner of + android.sensor.activePixelArray + + + [BC - zoom] Height determined based on width and + aspect ratio of output stream. Negative values for corner + are allowed for raw output if full pixel array is larger + than active pixel array. Width may be rounded to nearest + larger supportable width, especially for raw output, + where only a few fixed scales may be possible +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.scaler.availableFormats + enum + x + + + n + + +
values from HAL_PIXEL_FORMAT_* in /system/core/include/system/graphics.h
+ +
    +
  • + RAW_SENSOR + 0x20 +
  • +
  • + YV12 + 0x32315659 + YCrCb 4:2:0 Planar +
  • +
  • + YCbCr_420_SP + 0x11 + NV21 +
  • +
  • + JPEG + 0x21 + BLOB +
  • +
+ +
+ List of app-visible formats + + + +
android.scaler.availableJpegMinDurations + int64 + x + + + n + + + + + + The minimum frame duration that is supported + for each resolution in availableJpegSizes. Should + correspond to the frame duration when only that JPEG + stream is active, with all processing set to + FAST + + + + When multiple streams are configured, the minimum + frame duration will be >= max(individual stream min + durations) +
android.scaler.availableJpegSizes + int32 + x + + + n x 2 + + + + + + The resolutions available for output from + the JPEG block. Listed as width x height + + + Must include: - sensor maximum resolution Should + include: - half/quarter max resolution + +
android.scaler.availableMaxDigitalZoom + int32 + + + + + + TODO: have a real description here + + + +
android.scaler.availableProcessedMinDurations + int64 + x + + + n + + + + + + The minimum frame duration that is supported + for each resolution in availableProcessedSizes. Should + correspond to the frame duration when only that processed + stream is active, with all processing set to + FAST + + + + When multiple streams are configured, the minimum + frame duration will be >= max(individual stream min + durations) +
android.scaler.availableProcessedSizes + int32 + x + + + n x 2 + + + + + + The resolutions available for use with + processed output streams, such as YV12, NV12, and + platform opaque YUV/RGB streams to the GPU or video + encoders. Listed as width, height + + + Must include: - sensor maximum resolution - + standard QCIF, 240p, 480p, 720p, and 1080p + resolutions + +
android.scaler.availableRawMinDurations + int64 + x + + + n + + + + + + The minimum frame duration that is supported + for each raw resolution in availableRawSizes. Should + correspond to the frame duration when only the raw stream + is active. + + + + When multiple streams are configured, the minimum + frame duration will be >= max(individual stream min + durations) +
android.scaler.availableRawSizes + int32 + x + + + n x 2 + + + + + + The resolutions available for use with raw + sensor output streams, listed as width, + height + + + Must include: - sensor maximum resolution + +
android.scaler.maxDigitalZoom + float + + + + + + The maximum ratio between active area width + and crop region width, or between active area height and + crop region height, if the crop region height is larger + than width + + + >=1 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.scaler.cropRegion + int32 + x + + + 3 + + + + + + Top-left corner and width of the output + region to select from the active pixel + array + + (x,y) of top-left corner, width of region in + pixels; (0,0) is top-left corner of + android.sensor.activePixelArray + + + [BC - zoom] Height determined based on width and + aspect ratio of output stream. Negative values for corner + are allowed for raw output if full pixel array is larger + than active pixel array. Width may be rounded to nearest + larger supportable width, especially for raw output, + where only a few fixed scales may be possible +
sensor
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.sensor.exposureTime + int64 + + + + + + Duration each pixel is exposed to + light + + nanoseconds + + android.sensor.info.exposureTimeRange + + 1/10000 - 30 sec range. No bulb mode +
android.sensor.frameDuration + int64 + + + + + + Duration from start of frame exposure to + start of next frame exposure + + nanoseconds + + see android.sensor.info.maxFrameDuration, + android.scaler.info.availableMinFrameDurations + + Exposure time has priority, so duration is set to + max(duration, exposure time + overhead) +
android.sensor.sensitivity + int32 + + + + + + Gain applied to image data. Must be + implemented through analog gain only if set to values + below 'maximum analog sensitivity'. + + ISO arithmetic units + + android.sensor.info.sensitivityRange + + ISO 12232:2006 REI method +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.sensor.info.activeArraySize + int32 + x + + + 4 + + +
Four ints defining the active pixel rectangle
+ + +
+ Area of raw data which corresponds to only + active pixels; smaller or equal to + pixelArraySize. + + xmin, ymin, width, height. Top left of full + pixel array is (0,0) + + +
android.sensor.info.availableSensitivities + int32 + x + + + n + + +
List of supported sensitivity values
+ + +
+ Range of valid sensitivities + + + Must at least include 100, 200, 400, 800, + 1600 + +
android.sensor.info.colorFilterArrangement + enum + + + +
    +
  • + RGGB +
  • +
  • + GRBG +
  • +
  • + GBRG +
  • +
  • + BGGR +
  • +
  • + RGB + Sensor is not Bayer; output has 3 16-bit + values for each pixel, instead of just 1 16-bit value + per pixel. +
  • +
+ +
+ Arrangement of color filters on sensor; + represents the colors in the top-left 2x2 section of + the sensor, in reading order + + + +
android.sensor.info.exposureTimeRange + int64 + x + + + 2 + + +
nanoseconds
+ + +
+ Range of valid exposure + times + + + Min <= 100e3 (100 us), Max >= 30e9 (30 + sec) + +
android.sensor.info.maxFrameDuration + int64 + + + + + + Maximum frame duration (minimum frame + rate) + + nanoseconds + + >= 30e9 + + Minimum duration is a function of resolution, + processing settings. See + android.scaler.info.availableMinFrameDurations +
android.sensor.info.physicalSize + float + x + + + 2 + + +
width x height in millimeters
+ + +
+ The physical dimensions of the full pixel + array + + + + Needed for FOV calculation for old API +
android.sensor.info.pixelArraySize + int32 + x + + + 2 + + + + + + Dimensions of full pixel array, possibly + including black calibration pixels + + + + Maximum output resolution for raw format must + match this in + android.scaler.info.availableSizesPerFormat +
android.sensor.info.whiteLevel + int32 + + + + + + Maximum raw value output by + sensor + + + > 1024 (10-bit output) + + Defines sensor bit depth (10-14 bits is + expected) +
android.sensor.baseGainFactor + rational + + + + + + Gain factor from electrons to raw units when + ISO=100 + + + +
android.sensor.blackLevelPattern + int32 + x + + + 4 + + +
2x2 raw count block
+ + +
+ A fixed black level offset for each of the + Bayer mosaic channels + + + >= 0 each + + As per DNG BlackLevelRepeatDim / BlackLevel + tags +
android.sensor.calibrationTransform1 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Per-device calibration on top of color space + transform 1 + + + +
android.sensor.calibrationTransform2 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Per-device calibration on top of color space + transform 2 + + + +
android.sensor.colorTransform1 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Linear mapping from XYZ (D50) color space to + reference linear sensor color, for first reference + illuminant + + + + Use as follows XYZ = inv(transform) * clip( (raw - + black level(raw) ) / ( white level - max black level) ). + At least in the simple case +
android.sensor.colorTransform2 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Linear mapping from XYZ (D50) color space to + reference linear sensor color, for second reference + illuminant + + + +
android.sensor.forwardMatrix1 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Used by DNG for better WB + adaptation + + + +
android.sensor.forwardMatrix2 + rational + x + + + 9 + + +
3x3 matrix in row-major-order
+ + +
+ Used by DNG for better WB + adaptation + + + +
android.sensor.maxAnalogSensitivity + int32 + + + + + + Maximum sensitivity that is implemented + purely through analog gain + + + + For android.sensor.sensitivity values less than or + equal to this, all applied gain must be analog. For + values above this, it can be a mix of analog and + digital +
android.sensor.noiseModelCoefficients + float + x + + + 2 + + +
float constants A, B for the noise variance model
+ + +
+ Estimation of sensor noise + characteristics + + var(raw pixel value) = electrons * (baseGainFactor + * iso/100)^2 + A * (baseGainFactor * iso/100)^2 + + B + + + A represents sensor read noise before analog + amplification; B represents noise from A/D conversion and + other circuits after amplification. Both noise sources + are assumed to be gaussian, independent, and not to vary + across the sensor +
android.sensor.orientation + int32 + + + + + + Clockwise angle through which the output + image needs to be rotated to be upright on the device + screen in its native orientation. Also defines the + direction of rolling shutter readout, which is from top + to bottom in the sensor's coordinate system + + degrees clockwise rotation, only multiples of + 90 + + 0,90,180,270 + +
android.sensor.referenceIlluminant1 + enum + + + +
    +
  • + DAYLIGHT + 1 +
  • +
  • + FLUORESCENT + 2 +
  • +
  • + TUNGSTEN + 3 + Incandescent light +
  • +
  • + FLASH + 4 +
  • +
  • + FINE_WEATHER + 9 +
  • +
  • + CLOUDY_WEATHER + 10 +
  • +
  • + SHADE + 11 +
  • +
  • + DAYLIGHT_FLUORESCENT + 12 + D 5700 - 7100K +
  • +
  • + DAY_WHITE_FLUORESCENT + 13 + N 4600 - 5400K +
  • +
  • + COOL_WHITE_FLUORESCENT + 14 + W 3900 - 4500K +
  • +
  • + WHITE_FLUORESCENT + 15 + WW 3200 - 3700K +
  • +
  • + STANDARD_A + 17 +
  • +
  • + STANDARD_B + 18 +
  • +
  • + STANDARD_C + 19 +
  • +
  • + D55 + 20 +
  • +
  • + D65 + 21 +
  • +
  • + D75 + 22 +
  • +
  • + D50 + 23 +
  • +
  • + ISO_STUDIO_TUNGSTEN + 24 +
  • +
+ +
+ Light source used to define transform + 1 + + + + [EXIF LightSource tag] Must all these be + supported? Need CCT for each! +
android.sensor.referenceIlluminant2 + byte + + + + + + Light source used to define transform + 2 + + Same as illuminant 1 + + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.sensor.exposureTime + int64 + + + + + + Duration each pixel is exposed to + light + + nanoseconds + + android.sensor.info.exposureTimeRange + + 1/10000 - 30 sec range. No bulb mode +
android.sensor.frameDuration + int64 + + + + + + Duration from start of frame exposure to + start of next frame exposure + + nanoseconds + + see android.sensor.info.maxFrameDuration, + android.scaler.info.availableMinFrameDurations + + Exposure time has priority, so duration is set to + max(duration, exposure time + overhead) +
android.sensor.sensitivity + int32 + + + + + + Gain applied to image data. Must be + implemented through analog gain only if set to values + below 'maximum analog sensitivity'. + + ISO arithmetic units + + android.sensor.info.sensitivityRange + + ISO 12232:2006 REI method +
android.sensor.timestamp + int64 + + + + + + Time at start of exposure of first + row + + nanoseconds + + > 0 + + Monotonic, should be synced to other timestamps in + system +
shading
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.shading.mode + enum + + + +
    +
  • + OFF + No shading correction is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Quality of lens shading correction applied + to the image data + + + +
android.shading.strength + byte + + + + + + Control the amount of shading correction + applied to the images + + unitless: 1-10; 10 is full shading + compensation + + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.shading.mode + enum + + + +
    +
  • + OFF + No shading correction is applied +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ Quality of lens shading correction applied + to the image data + + + +
statistics
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.statistics.faceDetectMode + enum + + + +
    +
  • + OFF +
  • +
  • + SIMPLE + Optional Return rectangle and confidence + only +
  • +
  • + FULL + Optional Return all face + metadata +
  • +
+ +
+ State of the face detector + unit + + + + android.statistics.availableFaceDetectModes + +
android.statistics.histogramMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON +
  • +
+ +
+ Operating mode for histogram + generation + + + +
android.statistics.sharpnessMapMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON +
  • +
+ +
+ Operating mode for sharpness map + generation + + + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.statistics.info.availableFaceDetectModes + byte + x + + + n + + +
List of enums
+ + +
+ Which face detection modes are available, + if any + + + OFF + +
android.statistics.info.histogramBucketCount + int32 + + + + + + Number of histogram buckets + supported + + + >= 64 + +
android.statistics.info.maxFaceCount + int32 + + + + + + If face detection is supported, how many + faces can be detected at once + + + >= 4 if availableFaceDetectionModes lists + modes besides OFF, otherwise 0 + +
android.statistics.info.maxHistogramCount + int32 + + + + + + Maximum value possible for a histogram + bucket + + + +
android.statistics.info.maxSharpnessMapValue + int32 + + + + + + Maximum value possible for a sharpness map + region. + + + +
android.statistics.info.sharpnessMapSize + int32 + x + + + 2 + + +
width x height
+ + +
+ Dimensions of the sharpness + map + + + Must be at least 32 x 32 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.statistics.faceDetectMode + enum + + + +
    +
  • + OFF +
  • +
  • + SIMPLE + Optional Return rectangle and confidence + only +
  • +
  • + FULL + Optional Return all face + metadata +
  • +
+ +
+ State of the face detector + unit + + + + android.statistics.availableFaceDetectModes + +
android.statistics.faceIds + int32 + x + + + n + + + + + + List of unique IDs for detected + faces + + + + Only available if faceDetectMode == FULL +
android.statistics.faceLandmarks + int32 + x + + + n x 6 + + +
(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)
+ + +
+ List of landmarks for detected + faces + + + + Only available if faceDetectMode == FULL +
android.statistics.faceRectangles + int32 + x + + + n x 4 + + +
(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area
+ + +
+ List of the bounding rectangles for detected + faces + + + + Only available if faceDetectMode != OFF +
android.statistics.faceScores + byte + x + + + n + + + + + + List of the face confidence scores for + detected faces + + + 0-100 + + Only available if faceDetectMode != OFF +
android.statistics.histogram + int32 + x + + + n x 3 + + +
count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount
+ + +
+ A 3-channel histogram based on the raw + sensor data + + + + The k'th bucket (0-based) covers the input range + (with w = android.sensor.info.whiteLevel) of [ k * w/N, + (k + 1) * w / N ). If only a monochrome sharpness map is + supported, all channels should have the same data +
android.statistics.histogramMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON +
  • +
+ +
+ Operating mode for histogram + generation + + + +
android.statistics.sharpnessMap + int32 + x + + + n x m x 3 + + +
estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)
+ + +
+ A 3-channel sharpness map, based on the raw + sensor data + + + + If only a monochrome sharpness map is supported, + all channels should have the same data +
android.statistics.sharpnessMapMode + enum + + + +
    +
  • + OFF +
  • +
  • + ON +
  • +
+ +
+ Operating mode for sharpness map + generation + + + +
tonemap
controls
Property NameTypeDescriptionUnitsRangeNotesTags
android.tonemap.curveBlue + byte + + + + + + Table mapping blue input values to output + values + + same as android.tonemap.curveRed + + same as android.tonemap.curveRed + +
android.tonemap.curveGreen + byte + + + + + + Table mapping green input values to output + values + + same as android.tonemap.curveRed + + same as android.tonemap.curveRed + +
android.tonemap.curveRed + float + x + + + n x 2 + + +
A 1D array of pairs of floats. mapping a 0-1 input range to a 0-1 output range.
+ + +
+ Table mapping red input values to output + values + + + 0-1 on input and output coordinates. Max entry + count speciied by android.tonemap.maxCurvePoints + + .The input range must be monotonically increasing + with N, and values between entries should be linearly + interpolated. For example, if the array is: [0.0, 0.0, + 0.3, 0.5, 1.0, 1.0], then the input->output mapping + for a few sample points would be: 0 -> 0, 0.15 -> + 0.25, 0.3 -> 0.5, 0.5 -> 0.64 +
android.tonemap.mode + enum + + + +
    +
  • + CONTRAST_CURVE + Use the tone mapping curve specified in + android.tonemap.curve +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ + + +
static
Property NameTypeDescriptionUnitsRangeNotesTags
android.tonemap.maxCurvePoints + int32 + + + + + + Maximum number of supported points in the + tonemap curve + + + >= 128 + +
dynamic
Property NameTypeDescriptionUnitsRangeNotesTags
android.tonemap.curveBlue + byte + + + + + + Table mapping blue input values to output + values + + same as android.tonemap.curveRed + + same as android.tonemap.curveRed + +
android.tonemap.curveGreen + byte + + + + + + Table mapping green input values to output + values + + same as android.tonemap.curveRed + + same as android.tonemap.curveRed + +
android.tonemap.curveRed + float + x + + + n x 2 + + +
A 1D array of pairs of floats. mapping a 0-1 input range to a 0-1 output range.
+ + +
+ Table mapping red input values to output + values + + + 0-1 on input and output coordinates. Max entry + count speciied by android.tonemap.maxCurvePoints + + .The input range must be monotonically increasing + with N, and values between entries should be linearly + interpolated. For example, if the array is: [0.0, 0.0, + 0.3, 0.5, 1.0, 1.0], then the input->output mapping + for a few sample points would be: 0 -> 0, 0.15 -> + 0.25, 0.3 -> 0.5, 0.5 -> 0.64 +
android.tonemap.mode + enum + + + +
    +
  • + CONTRAST_CURVE + Use the tone mapping curve specified in + android.tonemap.curve +
  • +
  • + FAST + Must not slow down frame rate relative to raw + bayer output +
  • +
  • + HIGH_QUALITY + Frame rate may be reduced by high + quality +
  • +
+ +
+ + + +
+ +
+

Tags

+ +
+ + [ top ] + + + + diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h index 796e5713..c5fbec2b 100644 --- a/camera/include/system/camera_metadata_tags.h +++ b/camera/include/system/camera_metadata_tags.h @@ -20,6 +20,12 @@ * Include camera_metadata.h instead. */ +/** + * ! Do not edit this file directly ! + * + * Generated automatically from camera_metadata_tags.mako + */ + /** TODO: Nearly every enum in this file needs a description */ /** @@ -28,83 +34,63 @@ * New sections must be added right before ANDROID_SECTION_COUNT to maintain * existing enumerations. */ -enum { - ANDROID_REQUEST = 0, - ANDROID_LENS, - ANDROID_LENS_INFO, - ANDROID_SENSOR, - ANDROID_SENSOR_INFO, +typedef enum camera_metadata_section { + ANDROID_COLOR_CORRECTION, + ANDROID_CONTROL, + ANDROID_DEMOSAIC, + ANDROID_EDGE, ANDROID_FLASH, ANDROID_FLASH_INFO, + ANDROID_GEOMETRIC, ANDROID_HOT_PIXEL, ANDROID_HOT_PIXEL_INFO, - ANDROID_DEMOSAIC, - ANDROID_DEMOSAIC_INFO, - ANDROID_NOISE, - ANDROID_NOISE_INFO, + ANDROID_JPEG, + ANDROID_LENS, + ANDROID_LENS_INFO, + ANDROID_NOISE_REDUCTION, + ANDROID_QUIRKS, + ANDROID_REQUEST, + ANDROID_SCALER, + ANDROID_SENSOR, + ANDROID_SENSOR_INFO, ANDROID_SHADING, - ANDROID_SHADING_INFO, - ANDROID_GEOMETRIC, - ANDROID_GEOMETRIC_INFO, - ANDROID_COLOR, - ANDROID_COLOR_INFO, + ANDROID_STATISTICS, + ANDROID_STATISTICS_INFO, ANDROID_TONEMAP, - ANDROID_TONEMAP_INFO, - ANDROID_EDGE, - ANDROID_EDGE_INFO, - ANDROID_SCALER, - ANDROID_SCALER_INFO, - ANDROID_JPEG, - ANDROID_JPEG_INFO, - ANDROID_STATS, - ANDROID_STATS_INFO, - ANDROID_CONTROL, - ANDROID_CONTROL_INFO, - ANDROID_QUIRKS_INFO, ANDROID_SECTION_COUNT, VENDOR_SECTION = 0x8000 -}; +} camera_metadata_section_t; /** * Hierarchy positions in enum space. All vendor extension tags must be * defined with tag >= VENDOR_SECTION_START */ -enum { - ANDROID_REQUEST_START = ANDROID_REQUEST << 16, - ANDROID_LENS_START = ANDROID_LENS << 16, - ANDROID_LENS_INFO_START = ANDROID_LENS_INFO << 16, - ANDROID_SENSOR_START = ANDROID_SENSOR << 16, - ANDROID_SENSOR_INFO_START = ANDROID_SENSOR_INFO << 16, - ANDROID_FLASH_START = ANDROID_FLASH << 16, - ANDROID_FLASH_INFO_START = ANDROID_FLASH_INFO << 16, - ANDROID_HOT_PIXEL_START = ANDROID_HOT_PIXEL << 16, - ANDROID_HOT_PIXEL_INFO_START = ANDROID_HOT_PIXEL_INFO << 16, - ANDROID_DEMOSAIC_START = ANDROID_DEMOSAIC << 16, - ANDROID_DEMOSAIC_INFO_START = ANDROID_DEMOSAIC_INFO << 16, - ANDROID_NOISE_START = ANDROID_NOISE << 16, - ANDROID_NOISE_INFO_START = ANDROID_NOISE_INFO << 16, - ANDROID_SHADING_START = ANDROID_SHADING << 16, - ANDROID_SHADING_INFO_START = ANDROID_SHADING_INFO << 16, - ANDROID_GEOMETRIC_START = ANDROID_GEOMETRIC << 16, - ANDROID_GEOMETRIC_INFO_START = ANDROID_GEOMETRIC_INFO << 16, - ANDROID_COLOR_START = ANDROID_COLOR << 16, - ANDROID_COLOR_INFO_START = ANDROID_COLOR_INFO << 16, - ANDROID_TONEMAP_START = ANDROID_TONEMAP << 16, - ANDROID_TONEMAP_INFO_START = ANDROID_TONEMAP_INFO << 16, - ANDROID_EDGE_START = ANDROID_EDGE << 16, - ANDROID_EDGE_INFO_START = ANDROID_EDGE_INFO << 16, - ANDROID_SCALER_START = ANDROID_SCALER << 16, - ANDROID_SCALER_INFO_START = ANDROID_SCALER_INFO << 16, - ANDROID_JPEG_START = ANDROID_JPEG << 16, - ANDROID_JPEG_INFO_START = ANDROID_JPEG_INFO << 16, - ANDROID_STATS_START = ANDROID_STATS << 16, - ANDROID_STATS_INFO_START = ANDROID_STATS_INFO << 16, - ANDROID_CONTROL_START = ANDROID_CONTROL << 16, - ANDROID_CONTROL_INFO_START = ANDROID_CONTROL_INFO << 16, - ANDROID_QUIRKS_INFO_START = ANDROID_QUIRKS_INFO << 16, - VENDOR_SECTION_START = VENDOR_SECTION << 16 -}; +typedef enum camera_metadata_section_start { + ANDROID_COLOR_CORRECTION_START = ANDROID_COLOR_CORRECTION << 16, + ANDROID_CONTROL_START = ANDROID_CONTROL << 16, + ANDROID_DEMOSAIC_START = ANDROID_DEMOSAIC << 16, + ANDROID_EDGE_START = ANDROID_EDGE << 16, + ANDROID_FLASH_START = ANDROID_FLASH << 16, + ANDROID_FLASH_INFO_START = ANDROID_FLASH_INFO << 16, + ANDROID_GEOMETRIC_START = ANDROID_GEOMETRIC << 16, + ANDROID_HOT_PIXEL_START = ANDROID_HOT_PIXEL << 16, + ANDROID_HOT_PIXEL_INFO_START = ANDROID_HOT_PIXEL_INFO << 16, + ANDROID_JPEG_START = ANDROID_JPEG << 16, + ANDROID_LENS_START = ANDROID_LENS << 16, + ANDROID_LENS_INFO_START = ANDROID_LENS_INFO << 16, + ANDROID_NOISE_REDUCTION_START = ANDROID_NOISE_REDUCTION << 16, + ANDROID_QUIRKS_START = ANDROID_QUIRKS << 16, + ANDROID_REQUEST_START = ANDROID_REQUEST << 16, + ANDROID_SCALER_START = ANDROID_SCALER << 16, + ANDROID_SENSOR_START = ANDROID_SENSOR << 16, + ANDROID_SENSOR_INFO_START = ANDROID_SENSOR_INFO << 16, + ANDROID_SHADING_START = ANDROID_SHADING << 16, + ANDROID_STATISTICS_START = ANDROID_STATISTICS << 16, + ANDROID_STATISTICS_INFO_START = ANDROID_STATISTICS_INFO << 16, + ANDROID_TONEMAP_START = ANDROID_TONEMAP << 16, + VENDOR_SECTION_START = VENDOR_SECTION << 16 +} camera_metadata_section_start_t; /** * Main enum for defining camera metadata tags. New entries must always go @@ -112,318 +98,306 @@ enum { * addition, the name and type of the tag needs to be added to * system/media/camera/src/camera_metadata_tag_info.c */ -enum { - ANDROID_REQUEST_ID = ANDROID_REQUEST_START, - ANDROID_REQUEST_TYPE, - ANDROID_REQUEST_METADATA_MODE, - ANDROID_REQUEST_OUTPUT_STREAMS, - ANDROID_REQUEST_INPUT_STREAMS, - ANDROID_REQUEST_FRAME_COUNT, - ANDROID_REQUEST_END, - - ANDROID_LENS_FOCUS_DISTANCE = ANDROID_LENS_START, - ANDROID_LENS_APERTURE, - ANDROID_LENS_FOCAL_LENGTH, - ANDROID_LENS_FILTER_DENSITY, - ANDROID_LENS_OPTICAL_STABILIZATION_MODE, - ANDROID_LENS_FOCUS_RANGE, - ANDROID_LENS_END, - - ANDROID_LENS_MINIMUM_FOCUS_DISTANCE = ANDROID_LENS_INFO_START, - ANDROID_LENS_HYPERFOCAL_DISTANCE, - ANDROID_LENS_AVAILABLE_FOCAL_LENGTHS, - ANDROID_LENS_AVAILABLE_APERTURES, - ANDROID_LENS_AVAILABLE_FILTER_DENSITY, - ANDROID_LENS_AVAILABLE_OPTICAL_STABILIZATION, - ANDROID_LENS_SHADING_MAP_SIZE, - ANDROID_LENS_SHADING_MAP, - ANDROID_LENS_GEOMETRIC_CORRECTION_MAP_SIZE, - ANDROID_LENS_GEOMETRIC_CORRECTION_MAP, - ANDROID_LENS_FACING, - ANDROID_LENS_POSITION, - ANDROID_LENS_INFO_END, +typedef enum camera_metadata_tag { + ANDROID_COLOR_CORRECTION_MODE = ANDROID_COLOR_CORRECTION_START, + ANDROID_COLOR_CORRECTION_TRANSFORM, + ANDROID_COLOR_CORRECTION_END, + + ANDROID_CONTROL_AE_ANTIBANDING_MODE + = ANDROID_CONTROL_START, + ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION, + ANDROID_CONTROL_AE_LOCK, + ANDROID_CONTROL_AE_MODE, + ANDROID_CONTROL_AE_REGIONS, + ANDROID_CONTROL_AE_TARGET_FPS_RANGE, + ANDROID_CONTROL_AF_MODE, + ANDROID_CONTROL_AF_REGIONS, + ANDROID_CONTROL_AWB_LOCK, + ANDROID_CONTROL_AWB_MODE, + ANDROID_CONTROL_AWB_REGIONS, + ANDROID_CONTROL_CAPTURE_INTENT, + ANDROID_CONTROL_EFFECT_MODE, + ANDROID_CONTROL_MODE, + ANDROID_CONTROL_SCENE_MODE, + ANDROID_CONTROL_VIDEO_STABILIZATION_MODE, + ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, + ANDROID_CONTROL_AE_AVAILABLE_MODES, + ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES, + ANDROID_CONTROL_AE_COMPENSATION_RANGE, + ANDROID_CONTROL_AE_COMPENSATION_STEP, + ANDROID_CONTROL_AF_AVAILABLE_MODES, + ANDROID_CONTROL_AVAILABLE_EFFECTS, + ANDROID_CONTROL_AVAILABLE_SCENE_MODES, + ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES, + ANDROID_CONTROL_AWB_AVAILABLE_MODES, + ANDROID_CONTROL_MAX_REGIONS, + ANDROID_CONTROL_SCENE_MODE_OVERRIDES, + ANDROID_CONTROL_AE_PRECAPTURE_ID, + ANDROID_CONTROL_AE_STATE, + ANDROID_CONTROL_AF_STATE, + ANDROID_CONTROL_AF_TRIGGER_ID, + ANDROID_CONTROL_AWB_STATE, + ANDROID_CONTROL_END, - ANDROID_SENSOR_EXPOSURE_TIME = ANDROID_SENSOR_START, - ANDROID_SENSOR_FRAME_DURATION, - ANDROID_SENSOR_SENSITIVITY, - ANDROID_SENSOR_TIMESTAMP, - ANDROID_SENSOR_END, + ANDROID_DEMOSAIC_MODE = ANDROID_DEMOSAIC_START, + ANDROID_DEMOSAIC_END, - ANDROID_SENSOR_EXPOSURE_TIME_RANGE = ANDROID_SENSOR_INFO_START, - ANDROID_SENSOR_MAX_FRAME_DURATION, - ANDROID_SENSOR_AVAILABLE_SENSITIVITIES, - ANDROID_SENSOR_COLOR_FILTER_ARRANGEMENT, - ANDROID_SENSOR_PHYSICAL_SIZE, - ANDROID_SENSOR_PIXEL_ARRAY_SIZE, - ANDROID_SENSOR_ACTIVE_ARRAY_SIZE, - ANDROID_SENSOR_WHITE_LEVEL, - ANDROID_SENSOR_BLACK_LEVEL_PATTERN, - ANDROID_SENSOR_COLOR_TRANSFORM_1, - ANDROID_SENSOR_COLOR_TRANSFORM_2, - ANDROID_SENSOR_REFERENCE_ILLUMINANT_1, - ANDROID_SENSOR_REFERENCE_ILLUMINANT_2, - ANDROID_SENSOR_FORWARD_MATRIX_1, - ANDROID_SENSOR_FORWARD_MATRIX_2, - ANDROID_SENSOR_CALIBRATION_TRANSFORM_1, - ANDROID_SENSOR_CALIBRATION_TRANSFORM_2, - ANDROID_SENSOR_BASE_GAIN_FACTOR, - ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY, - ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS, - ANDROID_SENSOR_ORIENTATION, - ANDROID_SENSOR_INFO_END, + ANDROID_EDGE_MODE = ANDROID_EDGE_START, + ANDROID_EDGE_STRENGTH, + ANDROID_EDGE_END, - ANDROID_FLASH_MODE = ANDROID_FLASH_START, - ANDROID_FLASH_FIRING_POWER, + ANDROID_FLASH_FIRING_POWER = ANDROID_FLASH_START, ANDROID_FLASH_FIRING_TIME, + ANDROID_FLASH_MODE, + ANDROID_FLASH_COLOR_TEMPERATURE, + ANDROID_FLASH_MAX_ENERGY, + ANDROID_FLASH_STATE, ANDROID_FLASH_END, - ANDROID_FLASH_AVAILABLE = ANDROID_FLASH_INFO_START, - ANDROID_FLASH_CHARGE_DURATION, + ANDROID_FLASH_INFO_AVAILABLE = ANDROID_FLASH_INFO_START, + ANDROID_FLASH_INFO_CHARGE_DURATION, ANDROID_FLASH_INFO_END, - ANDROID_HOT_PIXEL_MODE = ANDROID_HOT_PIXEL_START, + ANDROID_GEOMETRIC_MODE = ANDROID_GEOMETRIC_START, + ANDROID_GEOMETRIC_STRENGTH, + ANDROID_GEOMETRIC_END, + + ANDROID_HOT_PIXEL_MODE = ANDROID_HOT_PIXEL_START, ANDROID_HOT_PIXEL_END, - ANDROID_HOT_PIXEL_INFO_END = ANDROID_HOT_PIXEL_INFO_START, + ANDROID_HOT_PIXEL_INFO_MAP = ANDROID_HOT_PIXEL_INFO_START, + ANDROID_HOT_PIXEL_INFO_END, - ANDROID_DEMOSAIC_MODE = ANDROID_DEMOSAIC_START, - ANDROID_DEMOSAIC_END, + ANDROID_JPEG_GPS_COORDINATES = ANDROID_JPEG_START, + ANDROID_JPEG_GPS_PROCESSING_METHOD, + ANDROID_JPEG_GPS_TIMESTAMP, + ANDROID_JPEG_ORIENTATION, + ANDROID_JPEG_QUALITY, + ANDROID_JPEG_THUMBNAIL_QUALITY, + ANDROID_JPEG_THUMBNAIL_SIZE, + ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES, + ANDROID_JPEG_MAX_SIZE, + ANDROID_JPEG_SIZE, + ANDROID_JPEG_END, - ANDROID_DEMOSAIC_INFO_END = ANDROID_DEMOSAIC_INFO_START, + ANDROID_LENS_APERTURE = ANDROID_LENS_START, + ANDROID_LENS_FILTER_DENSITY, + ANDROID_LENS_FOCAL_LENGTH, + ANDROID_LENS_FOCUS_DISTANCE, + ANDROID_LENS_OPTICAL_STABILIZATION_MODE, + ANDROID_LENS_FACING, + ANDROID_LENS_OPTICAL_AXIS_ANGLE, + ANDROID_LENS_POSITION, + ANDROID_LENS_FOCUS_RANGE, + ANDROID_LENS_STATE, + ANDROID_LENS_END, - ANDROID_NOISE_MODE = ANDROID_NOISE_START, - ANDROID_NOISE_STRENGTH, - ANDROID_NOISE_END, + ANDROID_LENS_INFO_AVAILABLE_APERTURES + = ANDROID_LENS_INFO_START, + ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES, + ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS, + ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION, + ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP, + ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE, + ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE, + ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE, + ANDROID_LENS_INFO_SHADING_MAP, + ANDROID_LENS_INFO_SHADING_MAP_SIZE, + ANDROID_LENS_INFO_END, - ANDROID_NOISE_INFO_END = ANDROID_NOISE_INFO_START, + ANDROID_NOISE_REDUCTION_MODE = ANDROID_NOISE_REDUCTION_START, + ANDROID_NOISE_REDUCTION_STRENGTH, + ANDROID_NOISE_REDUCTION_END, - ANDROID_SHADING_MODE = ANDROID_SHADING_START, - ANDROID_SHADING_END, + ANDROID_QUIRKS_METERING_CROP_REGION + = ANDROID_QUIRKS_START, + ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO, + ANDROID_QUIRKS_USE_ZSL_FORMAT, + ANDROID_QUIRKS_END, - ANDROID_SHADING_INFO_END = ANDROID_SHADING_INFO_START, + ANDROID_REQUEST_FRAME_COUNT = ANDROID_REQUEST_START, + ANDROID_REQUEST_ID, + ANDROID_REQUEST_INPUT_STREAMS, + ANDROID_REQUEST_METADATA_MODE, + ANDROID_REQUEST_OUTPUT_STREAMS, + ANDROID_REQUEST_TYPE, + ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, + ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS, + ANDROID_REQUEST_END, - ANDROID_GEOMETRIC_MODE = ANDROID_GEOMETRIC_START, - ANDROID_GEOMETRIC_END, + ANDROID_SCALER_CROP_REGION = ANDROID_SCALER_START, + ANDROID_SCALER_AVAILABLE_FORMATS, + ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS, + ANDROID_SCALER_AVAILABLE_JPEG_SIZES, + ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, + ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS, + ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, + ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS, + ANDROID_SCALER_AVAILABLE_RAW_SIZES, + ANDROID_SCALER_MAX_DIGITAL_ZOOM, + ANDROID_SCALER_END, - ANDROID_GEOMETRIC_INFO_END = ANDROID_GEOMETRIC_INFO_START, + ANDROID_SENSOR_EXPOSURE_TIME = ANDROID_SENSOR_START, + ANDROID_SENSOR_FRAME_DURATION, + ANDROID_SENSOR_SENSITIVITY, + ANDROID_SENSOR_BASE_GAIN_FACTOR, + ANDROID_SENSOR_BLACK_LEVEL_PATTERN, + ANDROID_SENSOR_CALIBRATION_TRANSFORM1, + ANDROID_SENSOR_CALIBRATION_TRANSFORM2, + ANDROID_SENSOR_COLOR_TRANSFORM1, + ANDROID_SENSOR_COLOR_TRANSFORM2, + ANDROID_SENSOR_FORWARD_MATRIX1, + ANDROID_SENSOR_FORWARD_MATRIX2, + ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY, + ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS, + ANDROID_SENSOR_ORIENTATION, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1, + ANDROID_SENSOR_REFERENCE_ILLUMINANT2, + ANDROID_SENSOR_TIMESTAMP, + ANDROID_SENSOR_END, - ANDROID_COLOR_MODE = ANDROID_COLOR_START, - ANDROID_COLOR_TRANSFORM, - ANDROID_COLOR_END, + ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE + = ANDROID_SENSOR_INFO_START, + ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES, + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, + ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, + ANDROID_SENSOR_INFO_MAX_FRAME_DURATION, + ANDROID_SENSOR_INFO_PHYSICAL_SIZE, + ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, + ANDROID_SENSOR_INFO_WHITE_LEVEL, + ANDROID_SENSOR_INFO_END, - ANDROID_COLOR_INFO_END = ANDROID_COLOR_INFO_START, + ANDROID_SHADING_MODE = ANDROID_SHADING_START, + ANDROID_SHADING_STRENGTH, + ANDROID_SHADING_END, - ANDROID_TONEMAP_MODE = ANDROID_TONEMAP_START, - ANDROID_TONEMAP_CURVE_RED, + ANDROID_STATISTICS_FACE_DETECT_MODE + = ANDROID_STATISTICS_START, + ANDROID_STATISTICS_HISTOGRAM_MODE, + ANDROID_STATISTICS_SHARPNESS_MAP_MODE, + ANDROID_STATISTICS_FACE_IDS, + ANDROID_STATISTICS_FACE_LANDMARKS, + ANDROID_STATISTICS_FACE_RECTANGLES, + ANDROID_STATISTICS_FACE_SCORES, + ANDROID_STATISTICS_HISTOGRAM, + ANDROID_STATISTICS_SHARPNESS_MAP, + ANDROID_STATISTICS_END, + + ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES + = ANDROID_STATISTICS_INFO_START, + ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT, + ANDROID_STATISTICS_INFO_MAX_FACE_COUNT, + ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT, + ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE, + ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE, + ANDROID_STATISTICS_INFO_END, + + ANDROID_TONEMAP_CURVE_BLUE = ANDROID_TONEMAP_START, ANDROID_TONEMAP_CURVE_GREEN, - ANDROID_TONEMAP_CURVE_BLUE, + ANDROID_TONEMAP_CURVE_RED, + ANDROID_TONEMAP_MODE, + ANDROID_TONEMAP_MAX_CURVE_POINTS, ANDROID_TONEMAP_END, - ANDROID_TONEMAP_MAX_CURVE_POINTS = ANDROID_TONEMAP_INFO_START, - ANDROID_TONEMAP_INFO_END, - - ANDROID_EDGE_MODE = ANDROID_EDGE_START, - ANDROID_EDGE_STRENGTH, - ANDROID_EDGE_END, - - ANDROID_EDGE_INFO_END = ANDROID_EDGE_INFO_START, - - ANDROID_SCALER_CROP_REGION = ANDROID_SCALER_START, - ANDROID_SCALER_END, - - ANDROID_SCALER_AVAILABLE_FORMATS = ANDROID_SCALER_INFO_START, - ANDROID_SCALER_AVAILABLE_RAW_SIZES, - ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS, - ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES, - ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS, - ANDROID_SCALER_AVAILABLE_JPEG_SIZES, - ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS, - ANDROID_SCALER_AVAILABLE_MAX_ZOOM, - ANDROID_SCALER_INFO_END, - - ANDROID_JPEG_QUALITY = ANDROID_JPEG_START, - ANDROID_JPEG_THUMBNAIL_SIZE, - ANDROID_JPEG_THUMBNAIL_QUALITY, - ANDROID_JPEG_GPS_COORDINATES, - ANDROID_JPEG_GPS_PROCESSING_METHOD, - ANDROID_JPEG_GPS_TIMESTAMP, - ANDROID_JPEG_ORIENTATION, - ANDROID_JPEG_SIZE, - ANDROID_JPEG_END, - - ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES = ANDROID_JPEG_INFO_START, - ANDROID_JPEG_MAX_SIZE, - ANDROID_JPEG_INFO_END, - - ANDROID_STATS_FACE_DETECT_MODE = ANDROID_STATS_START, - ANDROID_STATS_FACE_RECTANGLES, - ANDROID_STATS_FACE_SCORES, - ANDROID_STATS_FACE_LANDMARKS, - ANDROID_STATS_FACE_IDS, - ANDROID_STATS_HISTOGRAM_MODE, - ANDROID_STATS_HISTOGRAM, - ANDROID_STATS_SHARPNESS_MAP_MODE, - ANDROID_STATS_SHARPNESS_MAP, - ANDROID_STATS_END, - - ANDROID_STATS_AVAILABLE_FACE_DETECT_MODES = ANDROID_STATS_INFO_START, - ANDROID_STATS_MAX_FACE_COUNT, - ANDROID_STATS_HISTOGRAM_BUCKET_COUNT, - ANDROID_STATS_MAX_HISTOGRAM_COUNT, - ANDROID_STATS_SHARPNESS_MAP_SIZE, - ANDROID_STATS_MAX_SHARPNESS_MAP_VALUE, - ANDROID_STATS_INFO_END, - - ANDROID_CONTROL_CAPTURE_INTENT = ANDROID_CONTROL_START, - ANDROID_CONTROL_MODE, - ANDROID_CONTROL_EFFECT_MODE, - ANDROID_CONTROL_SCENE_MODE, - ANDROID_CONTROL_VIDEO_STABILIZATION_MODE, - ANDROID_CONTROL_AE_MODE, - ANDROID_CONTROL_AE_LOCK, - ANDROID_CONTROL_AE_REGIONS, - ANDROID_CONTROL_AE_EXP_COMPENSATION, - ANDROID_CONTROL_AE_TARGET_FPS_RANGE, - ANDROID_CONTROL_AE_ANTIBANDING_MODE, - ANDROID_CONTROL_AE_STATE, - ANDROID_CONTROL_AE_PRECAPTURE_ID, - ANDROID_CONTROL_AWB_MODE, - ANDROID_CONTROL_AWB_LOCK, - ANDROID_CONTROL_AWB_REGIONS, - ANDROID_CONTROL_AWB_STATE, - ANDROID_CONTROL_AF_MODE, - ANDROID_CONTROL_AF_REGIONS, - ANDROID_CONTROL_AF_STATE, - ANDROID_CONTROL_AF_TRIGGER_ID, - ANDROID_CONTROL_END, - - ANDROID_CONTROL_AVAILABLE_SCENE_MODES = ANDROID_CONTROL_INFO_START, - ANDROID_CONTROL_AVAILABLE_EFFECTS, - ANDROID_CONTROL_MAX_REGIONS, - ANDROID_CONTROL_AE_AVAILABLE_MODES, - ANDROID_CONTROL_AE_EXP_COMPENSATION_STEP, - ANDROID_CONTROL_AE_EXP_COMPENSATION_RANGE, - ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES, - ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES, - ANDROID_CONTROL_AWB_AVAILABLE_MODES, - ANDROID_CONTROL_AF_AVAILABLE_MODES, - ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES, - ANDROID_CONTROL_SCENE_MODE_OVERRIDES, - ANDROID_CONTROL_INFO_END, - - ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO = ANDROID_QUIRKS_INFO_START, - ANDROID_QUIRKS_USE_ZSL_FORMAT, - ANDROID_QUIRKS_METERING_CROP_REGION, - ANDROID_QUIRKS_INFO_END -}; +} camera_metadata_tag_t; /** * Enumeration definitions for the various entries that need them */ -// ANDROID_REQUEST_METADATA_TYPE -enum { - ANDROID_REQUEST_TYPE_CAPTURE = 0, - ANDROID_REQUEST_TYPE_REPROCESS -}; +// ANDROID_COLOR_CORRECTION_MODE +typedef enum camera_metadata_enum_android_color_correction_mode { + ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX, + ANDROID_COLOR_CORRECTION_MODE_FAST, + ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_color_correction_mode_t; -// ANDROID_REQUEST_METADATA_MODE -enum { - ANDROID_REQUEST_METADATA_NONE = 0, - ANDROID_REQUEST_METADATA_FULL -}; -// ANDROID_LENS_OPTICAL_STABILIZATION_MODE -enum { - ANDROID_LENS_OPTICAL_STABILIZATION_OFF = 0, - ANDROID_LENS_OPTICAL_STABILIZATION_ON -}; +// ANDROID_CONTROL_AE_ANTIBANDING_MODE +typedef enum camera_metadata_enum_android_control_ae_antibanding_mode { + ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF, + ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ, + ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ, + ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO, +} camera_metadata_enum_android_control_ae_antibanding_mode_t; -// ANDROID_LENS_FACING -enum { - ANDROID_LENS_FACING_BACK = 0, - ANDROID_LENS_FACING_FRONT -}; +// ANDROID_CONTROL_AE_LOCK +typedef enum camera_metadata_enum_android_control_ae_lock { + ANDROID_CONTROL_AE_LOCK_ON, + ANDROID_CONTROL_AE_LOCK_OFF, +} camera_metadata_enum_android_control_ae_lock_t; -// ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT -enum { - ANDROID_SENSOR_RGGB = 0, - ANDROID_SENSOR_GRBG, - ANDROID_SENSOR_GBRG, - ANDROID_SENSOR_BGGR, - ANDROID_SENSOR_RGB -}; +// ANDROID_CONTROL_AE_MODE +typedef enum camera_metadata_enum_android_control_ae_mode { + ANDROID_CONTROL_AE_MODE_OFF, + ANDROID_CONTROL_AE_MODE_ON, + ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH, + ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH, + ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE, +} camera_metadata_enum_android_control_ae_mode_t; -// ANDROID_FLASH_MODE -enum { - ANDROID_FLASH_OFF = 0, - ANDROID_FLASH_SINGLE, - ANDROID_FLASH_TORCH -}; - -// General processing block modes -enum { - ANDROID_PROCESSING_OFF = 0, - ANDROID_PROCESSING_FAST, - ANDROID_PROCESSING_HIGH_QUALITY -}; +// ANDROID_CONTROL_AF_MODE +typedef enum camera_metadata_enum_android_control_af_mode { + ANDROID_CONTROL_AF_MODE_OFF, + ANDROID_CONTROL_AF_MODE_AUTO, + ANDROID_CONTROL_AF_MODE_MACRO, + ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO, + ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE, + ANDROID_CONTROL_AF_MODE_EDOF, +} camera_metadata_enum_android_control_af_mode_t; -// ANDROID_DEMOSAIC_MODE -enum { - ANDROID_DEMOSAIC_FAST = 1, - ANDROID_DEMOSAIC_HIGH_QUALITY -}; - -// ANDROID_COLOR_MODE -enum { - ANDROID_COLOR_FAST = 1, - ANDROID_COLOR_HIGH_QUALITY, - ANDROID_COLOR_TRANSFORM_MATRIX -}; +// ANDROID_CONTROL_AWB_LOCK +typedef enum camera_metadata_enum_android_control_awb_lock { + ANDROID_CONTROL_AWB_LOCK_ON, + ANDROID_CONTROL_AWB_LOCK_OFF, +} camera_metadata_enum_android_control_awb_lock_t; -// ANDROID_TONEMAP_MODE -enum { - ANDROID_TONEMAP_FAST = 1, - ANDROID_TONEMAP_HIGH_QUALITY, - ANDROID_TONEMAP_CONTRAST_CURVE -}; - -// ANDROID_SCALER_AVAILABLE_FORMATS uses HAL_PIXEL_FORMAT_* from -// system/graphics.h - -// ANDROID_STATS_FACE_DETECTION_MODE -enum { - ANDROID_STATS_FACE_DETECTION_OFF = 0, - ANDROID_STATS_FACE_DETECTION_SIMPLE, - ANDROID_STATS_FACE_DETECTION_FULL -}; - -// ANDROID_STATS_HISTOGRAM/SHARPNESS_MAP_MODE -enum { - ANDROID_STATS_OFF = 0, - ANDROID_STATS_ON -}; +// ANDROID_CONTROL_AWB_MODE +typedef enum camera_metadata_enum_android_control_awb_mode { + ANDROID_CONTROL_AWB_MODE_OFF, + ANDROID_CONTROL_AWB_MODE_AUTO, + ANDROID_CONTROL_AWB_MODE_INCANDESCENT, + ANDROID_CONTROL_AWB_MODE_FLUORESCENT, + ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT, + ANDROID_CONTROL_AWB_MODE_DAYLIGHT, + ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT, + ANDROID_CONTROL_AWB_MODE_TWILIGHT, + ANDROID_CONTROL_AWB_MODE_SHADE, +} camera_metadata_enum_android_control_awb_mode_t; // ANDROID_CONTROL_CAPTURE_INTENT -enum { - ANDROID_CONTROL_INTENT_CUSTOM = 0, - ANDROID_CONTROL_INTENT_PREVIEW, - ANDROID_CONTROL_INTENT_STILL_CAPTURE, - ANDROID_CONTROL_INTENT_VIDEO_RECORD, - ANDROID_CONTROL_INTENT_VIDEO_SNAPSHOT, - ANDROID_CONTROL_INTENT_ZERO_SHUTTER_LAG -}; +typedef enum camera_metadata_enum_android_control_capture_intent { + ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM, + ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW, + ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE, + ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD, + ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT, + ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG, +} camera_metadata_enum_android_control_capture_intent_t; + +// ANDROID_CONTROL_EFFECT_MODE +typedef enum camera_metadata_enum_android_control_effect_mode { + ANDROID_CONTROL_EFFECT_MODE_OFF, + ANDROID_CONTROL_EFFECT_MODE_MONO, + ANDROID_CONTROL_EFFECT_MODE_NEGATIVE, + ANDROID_CONTROL_EFFECT_MODE_SOLARIZE, + ANDROID_CONTROL_EFFECT_MODE_SEPIA, + ANDROID_CONTROL_EFFECT_MODE_POSTERIZE, + ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD, + ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD, + ANDROID_CONTROL_EFFECT_MODE_AQUA, +} camera_metadata_enum_android_control_effect_mode_t; // ANDROID_CONTROL_MODE -enum { - ANDROID_CONTROL_OFF = 0, - ANDROID_CONTROL_AUTO, - ANDROID_CONTROL_USE_SCENE_MODE -}; +typedef enum camera_metadata_enum_android_control_mode { + ANDROID_CONTROL_MODE_OFF, + ANDROID_CONTROL_MODE_AUTO, + ANDROID_CONTROL_MODE_USE_SCENE_MODE, +} camera_metadata_enum_android_control_mode_t; // ANDROID_CONTROL_SCENE_MODE -enum { - ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED = 0, // Only for availableSceneModes +typedef enum camera_metadata_enum_android_control_scene_mode { + ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED = 0, ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY, ANDROID_CONTROL_SCENE_MODE_ACTION, ANDROID_CONTROL_SCENE_MODE_PORTRAIT, @@ -439,104 +413,218 @@ enum { ANDROID_CONTROL_SCENE_MODE_SPORTS, ANDROID_CONTROL_SCENE_MODE_PARTY, ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT, - ANDROID_CONTROL_SCENE_MODE_BARCODE -}; + ANDROID_CONTROL_SCENE_MODE_BARCODE, +} camera_metadata_enum_android_control_scene_mode_t; -// ANDROID_CONTROL_EFFECT_MODE -enum { - ANDROID_CONTROL_EFFECT_OFF = 0, - ANDROID_CONTROL_EFFECT_MONO, - ANDROID_CONTROL_EFFECT_NEGATIVE, - ANDROID_CONTROL_EFFECT_SOLARIZE, - ANDROID_CONTROL_EFFECT_SEPIA, - ANDROID_CONTROL_EFFECT_POSTERIZE, - ANDROID_CONTROL_EFFECT_WHITEBOARD, - ANDROID_CONTROL_EFFECT_BLACKBOARD, - ANDROID_CONTROL_EFFECT_AQUA -}; - -// ANDROID_CONTROL_AE_MODE -enum { - ANDROID_CONTROL_AE_OFF = 0, - ANDROID_CONTROL_AE_ON, - ANDROID_CONTROL_AE_ON_AUTO_FLASH, - ANDROID_CONTROL_AE_ON_ALWAYS_FLASH, - ANDROID_CONTROL_AE_ON_AUTO_FLASH_REDEYE -}; - -// ANDROID_CONTROL_AE_LOCK -enum { - ANDROID_CONTROL_AE_LOCK_OFF = 0, - ANDROID_CONTROL_AE_LOCK_ON -}; - -// ANDROID_CONTROL_AE_ANTIBANDING_MODE -enum { - ANDROID_CONTROL_AE_ANTIBANDING_OFF = 0, - ANDROID_CONTROL_AE_ANTIBANDING_50HZ, - ANDROID_CONTROL_AE_ANTIBANDING_60HZ, - ANDROID_CONTROL_AE_ANTIBANDING_AUTO -}; +// ANDROID_CONTROL_VIDEO_STABILIZATION_MODE +typedef enum camera_metadata_enum_android_control_video_stabilization_mode { + ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF, + ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON, +} camera_metadata_enum_android_control_video_stabilization_mode_t; // ANDROID_CONTROL_AE_STATE -enum { - ANDROID_CONTROL_AE_STATE_INACTIVE = 0, +typedef enum camera_metadata_enum_android_control_ae_state { + ANDROID_CONTROL_AE_STATE_INACTIVE, ANDROID_CONTROL_AE_STATE_SEARCHING, ANDROID_CONTROL_AE_STATE_CONVERGED, ANDROID_CONTROL_AE_STATE_LOCKED, ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED, - ANDROID_CONTROL_AE_STATE_PRECAPTURE -}; - -// ANDROID_CONTROL_AWB_MODE -enum { - ANDROID_CONTROL_AWB_OFF = 0, - ANDROID_CONTROL_AWB_AUTO, - ANDROID_CONTROL_AWB_INCANDESCENT, - ANDROID_CONTROL_AWB_FLUORESCENT, - ANDROID_CONTROL_AWB_WARM_FLUORESCENT, - ANDROID_CONTROL_AWB_DAYLIGHT, - ANDROID_CONTROL_AWB_CLOUDY_DAYLIGHT, - ANDROID_CONTROL_AWB_TWILIGHT, - ANDROID_CONTROL_AWB_SHADE -}; + ANDROID_CONTROL_AE_STATE_PRECAPTURE, +} camera_metadata_enum_android_control_ae_state_t; -// ANDROID_CONTROL_AWB_LOCK -enum { - ANDROID_CONTROL_AWB_LOCK_OFF = 0, - ANDROID_CONTROL_AWB_LOCK_ON -}; +// ANDROID_CONTROL_AF_STATE +typedef enum camera_metadata_enum_android_control_af_state { + ANDROID_CONTROL_AF_STATE_INACTIVE, + ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN, + ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED, + ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN, + ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED, + ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED, +} camera_metadata_enum_android_control_af_state_t; // ANDROID_CONTROL_AWB_STATE -enum { - ANDROID_CONTROL_AWB_STATE_INACTIVE = 0, +typedef enum camera_metadata_enum_android_control_awb_state { + ANDROID_CONTROL_AWB_STATE_INACTIVE, ANDROID_CONTROL_AWB_STATE_SEARCHING, ANDROID_CONTROL_AWB_STATE_CONVERGED, ANDROID_CONTROL_AWB_STATE_LOCKED, -}; +} camera_metadata_enum_android_control_awb_state_t; -// ANDROID_CONTROL_AF_MODE -enum { - ANDROID_CONTROL_AF_OFF = 0, - ANDROID_CONTROL_AF_AUTO, - ANDROID_CONTROL_AF_MACRO, - ANDROID_CONTROL_AF_CONTINUOUS_VIDEO, - ANDROID_CONTROL_AF_CONTINUOUS_PICTURE, - ANDROID_CONTROL_AF_EDOF -}; -// ANDROID_CONTROL_AF_STATE -enum { - ANDROID_CONTROL_AF_STATE_INACTIVE = 0, - ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN, - ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED, - ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN, - ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED, - ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED -}; - -// ANDROID_CONTROL_VIDEO_STABILIZATION -enum { - ANDROID_CONTROL_VIDEO_STABILIZATION_OFF = 0, - ANDROID_CONTROL_VIDEO_STABILIZATION_ON -}; +// ANDROID_DEMOSAIC_MODE +typedef enum camera_metadata_enum_android_demosaic_mode { + ANDROID_DEMOSAIC_MODE_FAST, + ANDROID_DEMOSAIC_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_demosaic_mode_t; + + +// ANDROID_EDGE_MODE +typedef enum camera_metadata_enum_android_edge_mode { + ANDROID_EDGE_MODE_OFF, + ANDROID_EDGE_MODE_FAST, + ANDROID_EDGE_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_edge_mode_t; + + +// ANDROID_FLASH_MODE +typedef enum camera_metadata_enum_android_flash_mode { + ANDROID_FLASH_MODE_OFF, + ANDROID_FLASH_MODE_SINGLE, + ANDROID_FLASH_MODE_TORCH, +} camera_metadata_enum_android_flash_mode_t; + +// ANDROID_FLASH_STATE +typedef enum camera_metadata_enum_android_flash_state { + ANDROID_FLASH_STATE_UNAVAILABLE, + ANDROID_FLASH_STATE_CHARGING, + ANDROID_FLASH_STATE_READY, + ANDROID_FLASH_STATE_FIRED, +} camera_metadata_enum_android_flash_state_t; + + + +// ANDROID_GEOMETRIC_MODE +typedef enum camera_metadata_enum_android_geometric_mode { + ANDROID_GEOMETRIC_MODE_OFF, + ANDROID_GEOMETRIC_MODE_FAST, + ANDROID_GEOMETRIC_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_geometric_mode_t; + + +// ANDROID_HOT_PIXEL_MODE +typedef enum camera_metadata_enum_android_hot_pixel_mode { + ANDROID_HOT_PIXEL_MODE_OFF, + ANDROID_HOT_PIXEL_MODE_FAST, + ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_hot_pixel_mode_t; + + + + +// ANDROID_LENS_OPTICAL_STABILIZATION_MODE +typedef enum camera_metadata_enum_android_lens_optical_stabilization_mode { + ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF, + ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON, +} camera_metadata_enum_android_lens_optical_stabilization_mode_t; + +// ANDROID_LENS_FACING +typedef enum camera_metadata_enum_android_lens_facing { + ANDROID_LENS_FACING_FRONT, + ANDROID_LENS_FACING_BACK, +} camera_metadata_enum_android_lens_facing_t; + +// ANDROID_LENS_STATE +typedef enum camera_metadata_enum_android_lens_state { + ANDROID_LENS_STATE_STATIONARY, +} camera_metadata_enum_android_lens_state_t; + + + +// ANDROID_NOISE_REDUCTION_MODE +typedef enum camera_metadata_enum_android_noise_reduction_mode { + ANDROID_NOISE_REDUCTION_MODE_OFF, + ANDROID_NOISE_REDUCTION_MODE_FAST, + ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_noise_reduction_mode_t; + + + +// ANDROID_REQUEST_METADATA_MODE +typedef enum camera_metadata_enum_android_request_metadata_mode { + ANDROID_REQUEST_METADATA_MODE_NONE, + ANDROID_REQUEST_METADATA_MODE_FULL, +} camera_metadata_enum_android_request_metadata_mode_t; + +// ANDROID_REQUEST_TYPE +typedef enum camera_metadata_enum_android_request_type { + ANDROID_REQUEST_TYPE_CAPTURE, + ANDROID_REQUEST_TYPE_REPROCESS, +} camera_metadata_enum_android_request_type_t; + + +// ANDROID_SCALER_AVAILABLE_FORMATS +typedef enum camera_metadata_enum_android_scaler_available_formats { + ANDROID_SCALER_AVAILABLE_FORMATS_RAW_SENSOR = 0x20, + ANDROID_SCALER_AVAILABLE_FORMATS_YV12 = 0x32315659, + ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_SP = 0x11, + ANDROID_SCALER_AVAILABLE_FORMATS_JPEG = 0x21, +} camera_metadata_enum_android_scaler_available_formats_t; + + +// ANDROID_SENSOR_REFERENCE_ILLUMINANT1 +typedef enum camera_metadata_enum_android_sensor_reference_illuminant1 { + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55 = 20, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65 = 21, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75 = 22, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50 = 23, + ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24, +} camera_metadata_enum_android_sensor_reference_illuminant1_t; + + +// ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT +typedef enum camera_metadata_enum_android_sensor_info_color_filter_arrangement { + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB, + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG, + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG, + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR, + ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB, +} camera_metadata_enum_android_sensor_info_color_filter_arrangement_t; + + +// ANDROID_SHADING_MODE +typedef enum camera_metadata_enum_android_shading_mode { + ANDROID_SHADING_MODE_OFF, + ANDROID_SHADING_MODE_FAST, + ANDROID_SHADING_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_shading_mode_t; + + +// ANDROID_STATISTICS_FACE_DETECT_MODE +typedef enum camera_metadata_enum_android_statistics_face_detect_mode { + ANDROID_STATISTICS_FACE_DETECT_MODE_OFF, + ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE, + ANDROID_STATISTICS_FACE_DETECT_MODE_FULL, +} camera_metadata_enum_android_statistics_face_detect_mode_t; + +// ANDROID_STATISTICS_HISTOGRAM_MODE +typedef enum camera_metadata_enum_android_statistics_histogram_mode { + ANDROID_STATISTICS_HISTOGRAM_MODE_OFF, + ANDROID_STATISTICS_HISTOGRAM_MODE_ON, +} camera_metadata_enum_android_statistics_histogram_mode_t; + +// ANDROID_STATISTICS_SHARPNESS_MAP_MODE +typedef enum camera_metadata_enum_android_statistics_sharpness_map_mode { + ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF, + ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON, +} camera_metadata_enum_android_statistics_sharpness_map_mode_t; + + + +// ANDROID_TONEMAP_MODE +typedef enum camera_metadata_enum_android_tonemap_mode { + ANDROID_TONEMAP_MODE_CONTRAST_CURVE, + ANDROID_TONEMAP_MODE_FAST, + ANDROID_TONEMAP_MODE_HIGH_QUALITY, +} camera_metadata_enum_android_tonemap_mode_t; + + + +int camera_metadata_enum_snprint(uint32_t tag, + uint32_t value, + char *dst, + size_t size); + diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c index 2b723c9b..b32fd101 100644 --- a/camera/src/camera_metadata_tag_info.c +++ b/camera/src/camera_metadata_tag_info.c @@ -24,549 +24,1754 @@ * sync with camera_metadata_tags.h */ +/** + * ! Do not edit this file directly ! + * + * Generated automatically from camera_metadata_tag_info.mako + */ + const char *camera_metadata_section_names[ANDROID_SECTION_COUNT] = { - [ANDROID_REQUEST] = "android.request", - [ANDROID_LENS] = "android.lens", - [ANDROID_LENS_INFO] = "android.lens.info", - [ANDROID_SENSOR] = "android.sensor", - [ANDROID_SENSOR_INFO] = "android.sensor.info", - [ANDROID_FLASH] = "android.flash", - [ANDROID_FLASH_INFO] = "android.flash.info", - [ANDROID_HOT_PIXEL] = "android.hotPixel", - [ANDROID_HOT_PIXEL_INFO] = "android.hotPixel.info", - [ANDROID_DEMOSAIC] = "android.demosaic", - [ANDROID_DEMOSAIC_INFO] = "android.demosaic.info", - [ANDROID_NOISE] = "android.noiseReduction", - [ANDROID_NOISE_INFO] = "android.noiseReduction.info", - [ANDROID_SHADING] = "android.shadingCorrection", - [ANDROID_SHADING_INFO] = "android.shadingCorrection.info", - [ANDROID_GEOMETRIC] = "android.geometricCorrection", - [ANDROID_GEOMETRIC_INFO] = "android.geometricCorrection.info", - [ANDROID_COLOR] = "android.colorCorrection", - [ANDROID_COLOR_INFO] = "android.colorCorrection.info", - [ANDROID_TONEMAP] = "android.tonemap", - [ANDROID_TONEMAP_INFO] = "android.tonemap.info", - [ANDROID_EDGE] = "android.edge", - [ANDROID_EDGE_INFO] = "android.edge.info", - [ANDROID_SCALER] = "android.scaler", - [ANDROID_SCALER_INFO] = "android.scaler.info", - [ANDROID_JPEG] = "android.jpeg", - [ANDROID_JPEG_INFO] = "android.jpeg.info", - [ANDROID_STATS] = "android.statistics", - [ANDROID_STATS_INFO] = "android.statistics.info", - [ANDROID_CONTROL] = "android.control", - [ANDROID_CONTROL_INFO] = "android.control.info", - [ANDROID_QUIRKS_INFO] = "android.quirks.info" + [ANDROID_COLOR_CORRECTION] = "android.colorCorrection", + [ANDROID_CONTROL] = "android.control", + [ANDROID_DEMOSAIC] = "android.demosaic", + [ANDROID_EDGE] = "android.edge", + [ANDROID_FLASH] = "android.flash", + [ANDROID_FLASH_INFO] = "android.flash.info", + [ANDROID_GEOMETRIC] = "android.geometric", + [ANDROID_HOT_PIXEL] = "android.hotPixel", + [ANDROID_HOT_PIXEL_INFO] = "android.hotPixel.info", + [ANDROID_JPEG] = "android.jpeg", + [ANDROID_LENS] = "android.lens", + [ANDROID_LENS_INFO] = "android.lens.info", + [ANDROID_NOISE_REDUCTION] = "android.noiseReduction", + [ANDROID_QUIRKS] = "android.quirks", + [ANDROID_REQUEST] = "android.request", + [ANDROID_SCALER] = "android.scaler", + [ANDROID_SENSOR] = "android.sensor", + [ANDROID_SENSOR_INFO] = "android.sensor.info", + [ANDROID_SHADING] = "android.shading", + [ANDROID_STATISTICS] = "android.statistics", + [ANDROID_STATISTICS_INFO] = "android.statistics.info", + [ANDROID_TONEMAP] = "android.tonemap", }; unsigned int camera_metadata_section_bounds[ANDROID_SECTION_COUNT][2] = { - [ANDROID_REQUEST] = { ANDROID_REQUEST_START, - ANDROID_REQUEST_END }, - [ANDROID_LENS] = { ANDROID_LENS_START, - ANDROID_LENS_END }, - [ANDROID_LENS_INFO] = { ANDROID_LENS_INFO_START, - ANDROID_LENS_INFO_END }, - [ANDROID_SENSOR] = { ANDROID_SENSOR_START, - ANDROID_SENSOR_END }, - [ANDROID_SENSOR_INFO] = { ANDROID_SENSOR_INFO_START, - ANDROID_SENSOR_INFO_END }, - [ANDROID_FLASH] = { ANDROID_FLASH_START, - ANDROID_FLASH_END }, - [ANDROID_FLASH_INFO] = { ANDROID_FLASH_INFO_START, - ANDROID_FLASH_INFO_END }, - [ANDROID_HOT_PIXEL] = { ANDROID_HOT_PIXEL_START, - ANDROID_HOT_PIXEL_END }, - [ANDROID_HOT_PIXEL_INFO] = { ANDROID_HOT_PIXEL_INFO_START, - ANDROID_HOT_PIXEL_INFO_END }, - [ANDROID_DEMOSAIC] = { ANDROID_DEMOSAIC_START, - ANDROID_DEMOSAIC_END }, - [ANDROID_DEMOSAIC_INFO] = { ANDROID_DEMOSAIC_INFO_START, - ANDROID_DEMOSAIC_INFO_END }, - [ANDROID_NOISE] = { ANDROID_NOISE_START, - ANDROID_NOISE_END }, - [ANDROID_NOISE_INFO] = { ANDROID_NOISE_INFO_START, - ANDROID_NOISE_INFO_END }, - [ANDROID_SHADING] = { ANDROID_SHADING_START, - ANDROID_SHADING_END }, - [ANDROID_SHADING_INFO] = { ANDROID_SHADING_INFO_START, - ANDROID_SHADING_INFO_END }, - [ANDROID_GEOMETRIC] = { ANDROID_GEOMETRIC_START, - ANDROID_GEOMETRIC_END }, - [ANDROID_GEOMETRIC_INFO] = { ANDROID_GEOMETRIC_INFO_START, - ANDROID_GEOMETRIC_INFO_END }, - [ANDROID_COLOR] = { ANDROID_COLOR_START, - ANDROID_COLOR_END }, - [ANDROID_COLOR_INFO] = { ANDROID_COLOR_INFO_START, - ANDROID_COLOR_INFO_END }, - [ANDROID_TONEMAP] = { ANDROID_TONEMAP_START, - ANDROID_TONEMAP_END }, - [ANDROID_TONEMAP_INFO] = { ANDROID_TONEMAP_INFO_START, - ANDROID_TONEMAP_INFO_END }, - [ANDROID_EDGE] = { ANDROID_EDGE_START, - ANDROID_EDGE_END }, - [ANDROID_EDGE_INFO] = { ANDROID_EDGE_INFO_START, - ANDROID_EDGE_INFO_END }, - [ANDROID_SCALER] = { ANDROID_SCALER_START, - ANDROID_SCALER_END }, - [ANDROID_SCALER_INFO] = { ANDROID_SCALER_INFO_START, - ANDROID_SCALER_INFO_END }, - [ANDROID_JPEG] = { ANDROID_JPEG_START, - ANDROID_JPEG_END }, - [ANDROID_JPEG_INFO] = { ANDROID_JPEG_INFO_START, - ANDROID_JPEG_INFO_END }, - [ANDROID_STATS] = { ANDROID_STATS_START, - ANDROID_STATS_END }, - [ANDROID_STATS_INFO] = { ANDROID_STATS_INFO_START, - ANDROID_STATS_INFO_END }, - [ANDROID_CONTROL] = { ANDROID_CONTROL_START, - ANDROID_CONTROL_END }, - [ANDROID_CONTROL_INFO] = { ANDROID_CONTROL_INFO_START, - ANDROID_CONTROL_INFO_END }, - [ANDROID_QUIRKS_INFO] = { ANDROID_QUIRKS_INFO_START, - ANDROID_QUIRKS_INFO_END } -}; - -// Shortcut defines to make succint names for field definitions -#define TIDX(section, tag) \ - [ ANDROID_ ## section ## _ ## tag - ANDROID_ ## section ## _START ] - -#define TIIDX(section, tag) \ - [ ANDROID_ ## section ## _ ## tag - ANDROID_ ## section ## _INFO_START ] - -tag_info_t android_request[ANDROID_REQUEST_END - - ANDROID_REQUEST_START] = { - TIDX(REQUEST, ID) = - { "id", TYPE_INT32 }, - TIDX(REQUEST, TYPE) = - { "type", TYPE_BYTE }, - TIDX(REQUEST, METADATA_MODE) = - { "metadataMode", TYPE_BYTE }, - TIDX(REQUEST, OUTPUT_STREAMS) = - { "outputStreams", TYPE_BYTE }, - TIDX(REQUEST, INPUT_STREAMS) = - { "inputStreams", TYPE_BYTE }, - TIDX(REQUEST, FRAME_COUNT) = - { "frameCount", TYPE_INT32 } + [ANDROID_COLOR_CORRECTION] = { ANDROID_COLOR_CORRECTION_START, + ANDROID_COLOR_CORRECTION_END }, + [ANDROID_CONTROL] = { ANDROID_CONTROL_START, + ANDROID_CONTROL_END }, + [ANDROID_DEMOSAIC] = { ANDROID_DEMOSAIC_START, + ANDROID_DEMOSAIC_END }, + [ANDROID_EDGE] = { ANDROID_EDGE_START, + ANDROID_EDGE_END }, + [ANDROID_FLASH] = { ANDROID_FLASH_START, + ANDROID_FLASH_END }, + [ANDROID_FLASH_INFO] = { ANDROID_FLASH_INFO_START, + ANDROID_FLASH_INFO_END }, + [ANDROID_GEOMETRIC] = { ANDROID_GEOMETRIC_START, + ANDROID_GEOMETRIC_END }, + [ANDROID_HOT_PIXEL] = { ANDROID_HOT_PIXEL_START, + ANDROID_HOT_PIXEL_END }, + [ANDROID_HOT_PIXEL_INFO] = { ANDROID_HOT_PIXEL_INFO_START, + ANDROID_HOT_PIXEL_INFO_END }, + [ANDROID_JPEG] = { ANDROID_JPEG_START, + ANDROID_JPEG_END }, + [ANDROID_LENS] = { ANDROID_LENS_START, + ANDROID_LENS_END }, + [ANDROID_LENS_INFO] = { ANDROID_LENS_INFO_START, + ANDROID_LENS_INFO_END }, + [ANDROID_NOISE_REDUCTION] = { ANDROID_NOISE_REDUCTION_START, + ANDROID_NOISE_REDUCTION_END }, + [ANDROID_QUIRKS] = { ANDROID_QUIRKS_START, + ANDROID_QUIRKS_END }, + [ANDROID_REQUEST] = { ANDROID_REQUEST_START, + ANDROID_REQUEST_END }, + [ANDROID_SCALER] = { ANDROID_SCALER_START, + ANDROID_SCALER_END }, + [ANDROID_SENSOR] = { ANDROID_SENSOR_START, + ANDROID_SENSOR_END }, + [ANDROID_SENSOR_INFO] = { ANDROID_SENSOR_INFO_START, + ANDROID_SENSOR_INFO_END }, + [ANDROID_SHADING] = { ANDROID_SHADING_START, + ANDROID_SHADING_END }, + [ANDROID_STATISTICS] = { ANDROID_STATISTICS_START, + ANDROID_STATISTICS_END }, + [ANDROID_STATISTICS_INFO] = { ANDROID_STATISTICS_INFO_START, + ANDROID_STATISTICS_INFO_END }, + [ANDROID_TONEMAP] = { ANDROID_TONEMAP_START, + ANDROID_TONEMAP_END }, }; -tag_info_t android_lens[ANDROID_LENS_END - - ANDROID_LENS_START] = { - TIDX(LENS, FOCUS_DISTANCE) = - { "focusDistance", TYPE_FLOAT }, - TIDX(LENS, APERTURE) = - { "aperture", TYPE_FLOAT }, - TIDX(LENS, FOCAL_LENGTH) = - { "focalLength", TYPE_FLOAT }, - TIDX(LENS, FILTER_DENSITY) = - { "filterDensity", TYPE_FLOAT }, - TIDX(LENS, OPTICAL_STABILIZATION_MODE) = - { "opticalStabilizationMode", TYPE_BYTE }, - TIDX(LENS, FOCUS_RANGE) = - { "focusRange", TYPE_FLOAT } +static tag_info_t android_color_correction[ANDROID_COLOR_CORRECTION_END - + ANDROID_COLOR_CORRECTION_START] = { + [ ANDROID_COLOR_CORRECTION_MODE - ANDROID_COLOR_CORRECTION_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_COLOR_CORRECTION_TRANSFORM - ANDROID_COLOR_CORRECTION_START ] = + { "transform", TYPE_FLOAT }, }; -tag_info_t android_lens_info[ANDROID_LENS_INFO_END - - ANDROID_LENS_INFO_START] = { - TIIDX(LENS, MINIMUM_FOCUS_DISTANCE) = - { "minimumFocusDistance", TYPE_FLOAT }, - TIIDX(LENS, HYPERFOCAL_DISTANCE) = - { "hyperfocalDistance", TYPE_FLOAT }, - TIIDX(LENS, AVAILABLE_FOCAL_LENGTHS) = - { "availableFocalLengths", TYPE_FLOAT }, - TIIDX(LENS, AVAILABLE_APERTURES) = - { "availableApertures", TYPE_FLOAT }, - TIIDX(LENS, AVAILABLE_FILTER_DENSITY) = - { "availableFilterDensities", TYPE_FLOAT }, - TIIDX(LENS, AVAILABLE_OPTICAL_STABILIZATION) = - { "availableOpticalStabilizationModes", TYPE_BYTE }, - TIIDX(LENS, SHADING_MAP_SIZE) = - { "shadingMapSize", TYPE_INT32 }, - TIIDX(LENS, SHADING_MAP) = - { "shadingMap", TYPE_FLOAT }, - TIIDX(LENS, GEOMETRIC_CORRECTION_MAP_SIZE) = - { "geometricCorrectionMapSize", TYPE_INT32 }, - TIIDX(LENS, GEOMETRIC_CORRECTION_MAP) = - { "geometricCorrectionMap", TYPE_FLOAT }, - TIIDX(LENS, FACING) = - { "facing", TYPE_BYTE }, - TIIDX(LENS, POSITION) = - { "position", TYPE_FLOAT } +static tag_info_t android_control[ANDROID_CONTROL_END - + ANDROID_CONTROL_START] = { + [ ANDROID_CONTROL_AE_ANTIBANDING_MODE - ANDROID_CONTROL_START ] = + { "aeAntibandingMode", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION - ANDROID_CONTROL_START ] = + { "aeExposureCompensation", TYPE_INT32 }, + [ ANDROID_CONTROL_AE_LOCK - ANDROID_CONTROL_START ] = + { "aeLock", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_MODE - ANDROID_CONTROL_START ] = + { "aeMode", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_REGIONS - ANDROID_CONTROL_START ] = + { "aeRegions", TYPE_INT32 }, + [ ANDROID_CONTROL_AE_TARGET_FPS_RANGE - ANDROID_CONTROL_START ] = + { "aeTargetFpsRange", TYPE_INT32 }, + [ ANDROID_CONTROL_AF_MODE - ANDROID_CONTROL_START ] = + { "afMode", TYPE_BYTE }, + [ ANDROID_CONTROL_AF_REGIONS - ANDROID_CONTROL_START ] = + { "afRegions", TYPE_INT32 }, + [ ANDROID_CONTROL_AWB_LOCK - ANDROID_CONTROL_START ] = + { "awbLock", TYPE_BYTE }, + [ ANDROID_CONTROL_AWB_MODE - ANDROID_CONTROL_START ] = + { "awbMode", TYPE_BYTE }, + [ ANDROID_CONTROL_AWB_REGIONS - ANDROID_CONTROL_START ] = + { "awbRegions", TYPE_INT32 }, + [ ANDROID_CONTROL_CAPTURE_INTENT - ANDROID_CONTROL_START ] = + { "captureIntent", TYPE_BYTE }, + [ ANDROID_CONTROL_EFFECT_MODE - ANDROID_CONTROL_START ] = + { "effectMode", TYPE_BYTE }, + [ ANDROID_CONTROL_MODE - ANDROID_CONTROL_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_CONTROL_SCENE_MODE - ANDROID_CONTROL_START ] = + { "sceneMode", TYPE_BYTE }, + [ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE - ANDROID_CONTROL_START ] = + { "videoStabilizationMode", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES - ANDROID_CONTROL_START ] = + { "aeAvailableAntibandingModes", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_AVAILABLE_MODES - ANDROID_CONTROL_START ] = + { "aeAvailableModes", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES - ANDROID_CONTROL_START ] = + { "aeAvailableTargetFpsRanges", TYPE_INT32 }, + [ ANDROID_CONTROL_AE_COMPENSATION_RANGE - ANDROID_CONTROL_START ] = + { "aeCompensationRange", TYPE_INT32 }, + [ ANDROID_CONTROL_AE_COMPENSATION_STEP - ANDROID_CONTROL_START ] = + { "aeCompensationStep", TYPE_RATIONAL + }, + [ ANDROID_CONTROL_AF_AVAILABLE_MODES - ANDROID_CONTROL_START ] = + { "afAvailableModes", TYPE_BYTE }, + [ ANDROID_CONTROL_AVAILABLE_EFFECTS - ANDROID_CONTROL_START ] = + { "availableEffects", TYPE_BYTE }, + [ ANDROID_CONTROL_AVAILABLE_SCENE_MODES - ANDROID_CONTROL_START ] = + { "availableSceneModes", TYPE_BYTE }, + [ ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES - ANDROID_CONTROL_START ] = + { "availableVideoStabilizationModes", + TYPE_BYTE }, + [ ANDROID_CONTROL_AWB_AVAILABLE_MODES - ANDROID_CONTROL_START ] = + { "awbAvailableModes", TYPE_BYTE }, + [ ANDROID_CONTROL_MAX_REGIONS - ANDROID_CONTROL_START ] = + { "maxRegions", TYPE_INT32 }, + [ ANDROID_CONTROL_SCENE_MODE_OVERRIDES - ANDROID_CONTROL_START ] = + { "sceneModeOverrides", TYPE_BYTE }, + [ ANDROID_CONTROL_AE_PRECAPTURE_ID - ANDROID_CONTROL_START ] = + { "aePrecaptureId", TYPE_INT32 }, + [ ANDROID_CONTROL_AE_STATE - ANDROID_CONTROL_START ] = + { "aeState", TYPE_BYTE }, + [ ANDROID_CONTROL_AF_STATE - ANDROID_CONTROL_START ] = + { "afState", TYPE_BYTE }, + [ ANDROID_CONTROL_AF_TRIGGER_ID - ANDROID_CONTROL_START ] = + { "afTriggerId", TYPE_INT32 }, + [ ANDROID_CONTROL_AWB_STATE - ANDROID_CONTROL_START ] = + { "awbState", TYPE_BYTE }, }; -tag_info_t android_sensor[ANDROID_SENSOR_END - - ANDROID_SENSOR_START] = { - TIDX(SENSOR, EXPOSURE_TIME) = - { "exposureTime", TYPE_INT64 }, - TIDX(SENSOR, FRAME_DURATION) = - { "frameDuration", TYPE_INT64 }, - TIDX(SENSOR, SENSITIVITY) = - { "sensitivity", TYPE_INT32 }, - TIDX(SENSOR, TIMESTAMP) = - { "timestamp", TYPE_INT64 } +static tag_info_t android_demosaic[ANDROID_DEMOSAIC_END - + ANDROID_DEMOSAIC_START] = { + [ ANDROID_DEMOSAIC_MODE - ANDROID_DEMOSAIC_START ] = + { "mode", TYPE_BYTE }, }; -tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END - - ANDROID_SENSOR_INFO_START] = { - TIIDX(SENSOR, EXPOSURE_TIME_RANGE) = - { "exposureTimeRange", TYPE_INT64 }, - TIIDX(SENSOR, MAX_FRAME_DURATION) = - { "maxFrameDuration", TYPE_INT64 }, - TIIDX(SENSOR, AVAILABLE_SENSITIVITIES) = - { "availableSensitivities", TYPE_INT32 }, - TIIDX(SENSOR, COLOR_FILTER_ARRANGEMENT) = - { "colorFilterArrangement", TYPE_BYTE }, - TIIDX(SENSOR, PHYSICAL_SIZE) = - { "physicalSize", TYPE_FLOAT }, - TIIDX(SENSOR, PIXEL_ARRAY_SIZE) = - { "pixelArraySize", TYPE_INT32 }, - TIIDX(SENSOR, ACTIVE_ARRAY_SIZE) = - { "activeArraySize", TYPE_INT32 }, - TIIDX(SENSOR, WHITE_LEVEL) = - { "whiteLevel", TYPE_INT32 }, - TIIDX(SENSOR, BLACK_LEVEL_PATTERN) = - { "blackLevelPattern", TYPE_INT32 }, - TIIDX(SENSOR, COLOR_TRANSFORM_1) = - { "colorTransform1", TYPE_RATIONAL }, - TIIDX(SENSOR, COLOR_TRANSFORM_2) = - { "colorTransform2", TYPE_RATIONAL }, - TIIDX(SENSOR, REFERENCE_ILLUMINANT_1) = - { "referenceIlluminant1", TYPE_BYTE }, - TIIDX(SENSOR, REFERENCE_ILLUMINANT_2) = - { "referenceIlluminant2", TYPE_BYTE }, - TIIDX(SENSOR, FORWARD_MATRIX_1) = - { "forwardMatrix1", TYPE_RATIONAL }, - TIIDX(SENSOR, FORWARD_MATRIX_2) = - { "forwardMatrix2", TYPE_RATIONAL }, - TIIDX(SENSOR, CALIBRATION_TRANSFORM_1) = - { "calibrationTransform1", TYPE_RATIONAL }, - TIIDX(SENSOR, CALIBRATION_TRANSFORM_2) = - { "calibrationTransform2", TYPE_RATIONAL }, - TIIDX(SENSOR, BASE_GAIN_FACTOR) = - { "baseGainFactor", TYPE_RATIONAL }, - TIIDX(SENSOR, MAX_ANALOG_SENSITIVITY) = - { "maxAnalogSensitivity", TYPE_INT32 }, - TIIDX(SENSOR, NOISE_MODEL_COEFFICIENTS) = - { "noiseModelCoefficients", TYPE_FLOAT }, - TIIDX(SENSOR, ORIENTATION) = - { "orientation", TYPE_INT32 } +static tag_info_t android_edge[ANDROID_EDGE_END - + ANDROID_EDGE_START] = { + [ ANDROID_EDGE_MODE - ANDROID_EDGE_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_EDGE_STRENGTH - ANDROID_EDGE_START ] = + { "strength", TYPE_BYTE }, }; -tag_info_t android_flash[ANDROID_FLASH_END - +static tag_info_t android_flash[ANDROID_FLASH_END - ANDROID_FLASH_START] = { - TIDX(FLASH, MODE) = - { "mode", TYPE_BYTE }, - TIDX(FLASH, FIRING_POWER) = - { "firingPower", TYPE_BYTE }, - TIDX(FLASH, FIRING_TIME) = - { "firingTime", TYPE_INT64 } + [ ANDROID_FLASH_FIRING_POWER - ANDROID_FLASH_START ] = + { "firingPower", TYPE_BYTE }, + [ ANDROID_FLASH_FIRING_TIME - ANDROID_FLASH_START ] = + { "firingTime", TYPE_INT64 }, + [ ANDROID_FLASH_MODE - ANDROID_FLASH_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_FLASH_COLOR_TEMPERATURE - ANDROID_FLASH_START ] = + { "colorTemperature", TYPE_BYTE }, + [ ANDROID_FLASH_MAX_ENERGY - ANDROID_FLASH_START ] = + { "maxEnergy", TYPE_BYTE }, + [ ANDROID_FLASH_STATE - ANDROID_FLASH_START ] = + { "state", TYPE_BYTE }, }; -tag_info_t android_flash_info[ANDROID_FLASH_INFO_END - +static tag_info_t android_flash_info[ANDROID_FLASH_INFO_END - ANDROID_FLASH_INFO_START] = { - TIIDX(FLASH, AVAILABLE) = - { "available", TYPE_BYTE }, - TIIDX(FLASH, CHARGE_DURATION) = - { "chargeDuration", TYPE_INT64 }, + [ ANDROID_FLASH_INFO_AVAILABLE - ANDROID_FLASH_INFO_START ] = + { "available", TYPE_BYTE }, + [ ANDROID_FLASH_INFO_CHARGE_DURATION - ANDROID_FLASH_INFO_START ] = + { "chargeDuration", TYPE_INT64 }, }; -tag_info_t android_hot_pixel[ANDROID_HOT_PIXEL_END - - ANDROID_HOT_PIXEL_START] = { - TIDX(HOT_PIXEL, MODE) = - { "mode", TYPE_BYTE } +static tag_info_t android_geometric[ANDROID_GEOMETRIC_END - + ANDROID_GEOMETRIC_START] = { + [ ANDROID_GEOMETRIC_MODE - ANDROID_GEOMETRIC_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_GEOMETRIC_STRENGTH - ANDROID_GEOMETRIC_START ] = + { "strength", TYPE_BYTE }, }; -tag_info_t android_hot_pixel_info[ANDROID_HOT_PIXEL_INFO_END - - ANDROID_HOT_PIXEL_INFO_START]; - -tag_info_t android_demosaic[ANDROID_DEMOSAIC_END - - ANDROID_DEMOSAIC_START] = { - TIDX(DEMOSAIC, MODE) = - { "mode", TYPE_BYTE } +static tag_info_t android_hot_pixel[ANDROID_HOT_PIXEL_END - + ANDROID_HOT_PIXEL_START] = { + [ ANDROID_HOT_PIXEL_MODE - ANDROID_HOT_PIXEL_START ] = + { "mode", TYPE_BYTE }, }; -tag_info_t android_demosaic_info[ANDROID_DEMOSAIC_INFO_END - - ANDROID_DEMOSAIC_INFO_START]; - -tag_info_t android_noise[ANDROID_NOISE_END - - ANDROID_NOISE_START] = { - TIDX(NOISE, MODE) = - { "mode", TYPE_BYTE }, - TIDX(NOISE, STRENGTH) = - { "strength", TYPE_BYTE } +static tag_info_t android_hot_pixel_info[ANDROID_HOT_PIXEL_INFO_END - + ANDROID_HOT_PIXEL_INFO_START] = { + [ ANDROID_HOT_PIXEL_INFO_MAP - ANDROID_HOT_PIXEL_INFO_START ] = + { "map", TYPE_INT32 }, }; -tag_info_t android_noise_info[ANDROID_NOISE_INFO_END - - ANDROID_NOISE_INFO_START]; - -tag_info_t android_shading[ANDROID_SHADING_END - - ANDROID_SHADING_START] = { - TIDX(SHADING, MODE) = - { "mode", TYPE_BYTE } +static tag_info_t android_jpeg[ANDROID_JPEG_END - + ANDROID_JPEG_START] = { + [ ANDROID_JPEG_GPS_COORDINATES - ANDROID_JPEG_START ] = + { "gpsCoordinates", TYPE_DOUBLE }, + [ ANDROID_JPEG_GPS_PROCESSING_METHOD - ANDROID_JPEG_START ] = + { "gpsProcessingMethod", TYPE_BYTE }, + [ ANDROID_JPEG_GPS_TIMESTAMP - ANDROID_JPEG_START ] = + { "gpsTimestamp", TYPE_INT64 }, + [ ANDROID_JPEG_ORIENTATION - ANDROID_JPEG_START ] = + { "orientation", TYPE_INT32 }, + [ ANDROID_JPEG_QUALITY - ANDROID_JPEG_START ] = + { "quality", TYPE_BYTE }, + [ ANDROID_JPEG_THUMBNAIL_QUALITY - ANDROID_JPEG_START ] = + { "thumbnailQuality", TYPE_BYTE }, + [ ANDROID_JPEG_THUMBNAIL_SIZE - ANDROID_JPEG_START ] = + { "thumbnailSize", TYPE_INT32 }, + [ ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES - ANDROID_JPEG_START ] = + { "availableThumbnailSizes", TYPE_INT32 }, + [ ANDROID_JPEG_MAX_SIZE - ANDROID_JPEG_START ] = + { "maxSize", TYPE_INT32 }, + [ ANDROID_JPEG_SIZE - ANDROID_JPEG_START ] = + { "size", TYPE_INT32 }, }; -tag_info_t android_shading_info[ANDROID_SHADING_INFO_END - - ANDROID_SHADING_INFO_START]; - -tag_info_t android_geometric[ANDROID_GEOMETRIC_END - - ANDROID_GEOMETRIC_START] = { - TIDX(GEOMETRIC, MODE) = - { "mode", TYPE_BYTE } +static tag_info_t android_lens[ANDROID_LENS_END - + ANDROID_LENS_START] = { + [ ANDROID_LENS_APERTURE - ANDROID_LENS_START ] = + { "aperture", TYPE_FLOAT }, + [ ANDROID_LENS_FILTER_DENSITY - ANDROID_LENS_START ] = + { "filterDensity", TYPE_FLOAT }, + [ ANDROID_LENS_FOCAL_LENGTH - ANDROID_LENS_START ] = + { "focalLength", TYPE_FLOAT }, + [ ANDROID_LENS_FOCUS_DISTANCE - ANDROID_LENS_START ] = + { "focusDistance", TYPE_FLOAT }, + [ ANDROID_LENS_OPTICAL_STABILIZATION_MODE - ANDROID_LENS_START ] = + { "opticalStabilizationMode", TYPE_BYTE }, + [ ANDROID_LENS_FACING - ANDROID_LENS_START ] = + { "facing", TYPE_BYTE }, + [ ANDROID_LENS_OPTICAL_AXIS_ANGLE - ANDROID_LENS_START ] = + { "opticalAxisAngle", TYPE_FLOAT }, + [ ANDROID_LENS_POSITION - ANDROID_LENS_START ] = + { "position", TYPE_FLOAT }, + [ ANDROID_LENS_FOCUS_RANGE - ANDROID_LENS_START ] = + { "focusRange", TYPE_FLOAT }, + [ ANDROID_LENS_STATE - ANDROID_LENS_START ] = + { "state", TYPE_BYTE }, }; -tag_info_t android_geometric_info[ANDROID_GEOMETRIC_INFO_END - - ANDROID_GEOMETRIC_INFO_START]; - -tag_info_t android_color[ANDROID_COLOR_END - - ANDROID_COLOR_START] = { - TIDX(COLOR, MODE) = - { "mode", TYPE_BYTE }, - TIDX(COLOR, TRANSFORM) = - { "transform", TYPE_FLOAT } +static tag_info_t android_lens_info[ANDROID_LENS_INFO_END - + ANDROID_LENS_INFO_START] = { + [ ANDROID_LENS_INFO_AVAILABLE_APERTURES - ANDROID_LENS_INFO_START ] = + { "availableApertures", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES - ANDROID_LENS_INFO_START ] = + { "availableFilterDensities", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS - ANDROID_LENS_INFO_START ] = + { "availableFocalLengths", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION - ANDROID_LENS_INFO_START ] = + { "availableOpticalStabilization", TYPE_BYTE }, + [ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP - ANDROID_LENS_INFO_START ] = + { "geometricCorrectionMap", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE - ANDROID_LENS_INFO_START ] = + { "geometricCorrectionMapSize", TYPE_INT32 }, + [ ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE - ANDROID_LENS_INFO_START ] = + { "hyperfocalDistance", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE - ANDROID_LENS_INFO_START ] = + { "minimumFocusDistance", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_SHADING_MAP - ANDROID_LENS_INFO_START ] = + { "shadingMap", TYPE_FLOAT }, + [ ANDROID_LENS_INFO_SHADING_MAP_SIZE - ANDROID_LENS_INFO_START ] = + { "shadingMapSize", TYPE_INT32 }, }; -tag_info_t android_color_info[ANDROID_COLOR_INFO_END - - ANDROID_COLOR_INFO_START]; - -tag_info_t android_tonemap[ANDROID_TONEMAP_END - - ANDROID_TONEMAP_START] = { - TIDX(TONEMAP, MODE) = - { "mode", TYPE_BYTE }, - TIDX(TONEMAP, CURVE_RED) = - { "curveRed", TYPE_FLOAT }, - TIDX(TONEMAP, CURVE_GREEN) = - { "curveGreen", TYPE_FLOAT }, - TIDX(TONEMAP, CURVE_BLUE) = - { "curveBlue", TYPE_FLOAT } +static tag_info_t android_noise_reduction[ANDROID_NOISE_REDUCTION_END - + ANDROID_NOISE_REDUCTION_START] = { + [ ANDROID_NOISE_REDUCTION_MODE - ANDROID_NOISE_REDUCTION_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_NOISE_REDUCTION_STRENGTH - ANDROID_NOISE_REDUCTION_START ] = + { "strength", TYPE_BYTE }, }; -tag_info_t android_tonemap_info[ANDROID_TONEMAP_INFO_END - - ANDROID_TONEMAP_INFO_START] = { - TIIDX(TONEMAP, MAX_CURVE_POINTS) = - { "maxCurvePoints", TYPE_INT32 } +static tag_info_t android_quirks[ANDROID_QUIRKS_END - + ANDROID_QUIRKS_START] = { + [ ANDROID_QUIRKS_METERING_CROP_REGION - ANDROID_QUIRKS_START ] = + { "meteringCropRegion", TYPE_BYTE }, + [ ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO - ANDROID_QUIRKS_START ] = + { "triggerAfWithAuto", TYPE_BYTE }, + [ ANDROID_QUIRKS_USE_ZSL_FORMAT - ANDROID_QUIRKS_START ] = + { "useZslFormat", TYPE_BYTE }, }; -tag_info_t android_edge[ANDROID_EDGE_END - - ANDROID_EDGE_START] = { - TIDX(EDGE, MODE) = - { "mode", TYPE_BYTE }, - TIDX(EDGE, STRENGTH) = - { "strength", TYPE_BYTE } +static tag_info_t android_request[ANDROID_REQUEST_END - + ANDROID_REQUEST_START] = { + [ ANDROID_REQUEST_FRAME_COUNT - ANDROID_REQUEST_START ] = + { "frameCount", TYPE_INT32 }, + [ ANDROID_REQUEST_ID - ANDROID_REQUEST_START ] = + { "id", TYPE_INT32 }, + [ ANDROID_REQUEST_INPUT_STREAMS - ANDROID_REQUEST_START ] = + { "inputStreams", TYPE_BYTE }, + [ ANDROID_REQUEST_METADATA_MODE - ANDROID_REQUEST_START ] = + { "metadataMode", TYPE_BYTE }, + [ ANDROID_REQUEST_OUTPUT_STREAMS - ANDROID_REQUEST_START ] = + { "outputStreams", TYPE_BYTE }, + [ ANDROID_REQUEST_TYPE - ANDROID_REQUEST_START ] = + { "type", TYPE_BYTE }, + [ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS - ANDROID_REQUEST_START ] = + { "maxNumOutputStreams", TYPE_INT32 }, + [ ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS - ANDROID_REQUEST_START ] = + { "maxNumReprocessStreams", TYPE_INT32 }, }; -tag_info_t android_edge_info[ANDROID_EDGE_INFO_END - - ANDROID_EDGE_INFO_START]; - -tag_info_t android_scaler[ANDROID_SCALER_END - +static tag_info_t android_scaler[ANDROID_SCALER_END - ANDROID_SCALER_START] = { - TIDX(SCALER, CROP_REGION) = - { "cropRegion", TYPE_INT32 } -}; - -tag_info_t android_scaler_info[ANDROID_SCALER_INFO_END - - ANDROID_SCALER_INFO_START] = { - TIIDX(SCALER, AVAILABLE_FORMATS) = - { "availableFormats", TYPE_INT32 }, - TIIDX(SCALER, AVAILABLE_RAW_SIZES) = - { "availableRawSizes", TYPE_INT32 }, - TIIDX(SCALER, AVAILABLE_RAW_MIN_DURATIONS) = - { "availableRawMinDurations", TYPE_INT64 }, - TIIDX(SCALER, AVAILABLE_PROCESSED_SIZES) = - { "availableProcessedSizes", TYPE_INT32 }, - TIIDX(SCALER, AVAILABLE_PROCESSED_MIN_DURATIONS) = - { "availableProcessedMinDurations", TYPE_INT64 }, - TIIDX(SCALER, AVAILABLE_JPEG_SIZES) = - { "availableJpegSizes", TYPE_INT32 }, - TIIDX(SCALER, AVAILABLE_JPEG_MIN_DURATIONS) = - { "availableJpegMinDurations", TYPE_INT64 }, - TIIDX(SCALER, AVAILABLE_MAX_ZOOM) = - { "availableMaxDigitalZoom", TYPE_INT32 } -}; - -tag_info_t android_jpeg[ANDROID_JPEG_END - - ANDROID_JPEG_START] = { - TIDX(JPEG, QUALITY) = - { "quality", TYPE_INT32 }, - TIDX(JPEG, THUMBNAIL_SIZE) = - { "thumbnailSize", TYPE_INT32 }, - TIDX(JPEG, THUMBNAIL_QUALITY) = - { "thumbnailQuality", TYPE_INT32 }, - TIDX(JPEG, GPS_COORDINATES) = - { "gpsCoordinates", TYPE_DOUBLE }, - TIDX(JPEG, GPS_PROCESSING_METHOD) = - { "gpsProcessingMethod", TYPE_BYTE }, - TIDX(JPEG, GPS_TIMESTAMP) = - { "gpsTimestamp", TYPE_INT64 }, - TIDX(JPEG, ORIENTATION) = - { "orientation", TYPE_INT32 }, - TIDX(JPEG, SIZE) = - { "size", TYPE_INT32 } + [ ANDROID_SCALER_CROP_REGION - ANDROID_SCALER_START ] = + { "cropRegion", TYPE_INT32 }, + [ ANDROID_SCALER_AVAILABLE_FORMATS - ANDROID_SCALER_START ] = + { "availableFormats", TYPE_INT32 }, + [ ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS - ANDROID_SCALER_START ] = + { "availableJpegMinDurations", TYPE_INT64 }, + [ ANDROID_SCALER_AVAILABLE_JPEG_SIZES - ANDROID_SCALER_START ] = + { "availableJpegSizes", TYPE_INT32 }, + [ ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM - ANDROID_SCALER_START ] = + { "availableMaxDigitalZoom", TYPE_INT32 }, + [ ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS - ANDROID_SCALER_START ] = + { "availableProcessedMinDurations", + TYPE_INT64 }, + [ ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES - ANDROID_SCALER_START ] = + { "availableProcessedSizes", TYPE_INT32 }, + [ ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS - ANDROID_SCALER_START ] = + { "availableRawMinDurations", TYPE_INT64 }, + [ ANDROID_SCALER_AVAILABLE_RAW_SIZES - ANDROID_SCALER_START ] = + { "availableRawSizes", TYPE_INT32 }, + [ ANDROID_SCALER_MAX_DIGITAL_ZOOM - ANDROID_SCALER_START ] = + { "maxDigitalZoom", TYPE_FLOAT }, }; -tag_info_t android_jpeg_info[ANDROID_JPEG_INFO_END - - ANDROID_JPEG_INFO_START] = { - TIIDX(JPEG, AVAILABLE_THUMBNAIL_SIZES) = - { "availableThumbnailSizes", TYPE_INT32 }, - TIIDX(JPEG, MAX_SIZE) = - { "maxSize", TYPE_INT32 } +static tag_info_t android_sensor[ANDROID_SENSOR_END - + ANDROID_SENSOR_START] = { + [ ANDROID_SENSOR_EXPOSURE_TIME - ANDROID_SENSOR_START ] = + { "exposureTime", TYPE_INT64 }, + [ ANDROID_SENSOR_FRAME_DURATION - ANDROID_SENSOR_START ] = + { "frameDuration", TYPE_INT64 }, + [ ANDROID_SENSOR_SENSITIVITY - ANDROID_SENSOR_START ] = + { "sensitivity", TYPE_INT32 }, + [ ANDROID_SENSOR_BASE_GAIN_FACTOR - ANDROID_SENSOR_START ] = + { "baseGainFactor", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_BLACK_LEVEL_PATTERN - ANDROID_SENSOR_START ] = + { "blackLevelPattern", TYPE_INT32 }, + [ ANDROID_SENSOR_CALIBRATION_TRANSFORM1 - ANDROID_SENSOR_START ] = + { "calibrationTransform1", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_CALIBRATION_TRANSFORM2 - ANDROID_SENSOR_START ] = + { "calibrationTransform2", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_COLOR_TRANSFORM1 - ANDROID_SENSOR_START ] = + { "colorTransform1", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_COLOR_TRANSFORM2 - ANDROID_SENSOR_START ] = + { "colorTransform2", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_FORWARD_MATRIX1 - ANDROID_SENSOR_START ] = + { "forwardMatrix1", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_FORWARD_MATRIX2 - ANDROID_SENSOR_START ] = + { "forwardMatrix2", TYPE_RATIONAL + }, + [ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY - ANDROID_SENSOR_START ] = + { "maxAnalogSensitivity", TYPE_INT32 }, + [ ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS - ANDROID_SENSOR_START ] = + { "noiseModelCoefficients", TYPE_FLOAT }, + [ ANDROID_SENSOR_ORIENTATION - ANDROID_SENSOR_START ] = + { "orientation", TYPE_INT32 }, + [ ANDROID_SENSOR_REFERENCE_ILLUMINANT1 - ANDROID_SENSOR_START ] = + { "referenceIlluminant1", TYPE_BYTE }, + [ ANDROID_SENSOR_REFERENCE_ILLUMINANT2 - ANDROID_SENSOR_START ] = + { "referenceIlluminant2", TYPE_BYTE }, + [ ANDROID_SENSOR_TIMESTAMP - ANDROID_SENSOR_START ] = + { "timestamp", TYPE_INT64 }, }; -tag_info_t android_stats[ANDROID_STATS_END - - ANDROID_STATS_START] = { - TIDX(STATS, FACE_DETECT_MODE) = - { "faceDetectMode", TYPE_BYTE }, - TIDX(STATS, FACE_RECTANGLES) = - { "faceRectangles", TYPE_INT32 }, - TIDX(STATS, FACE_SCORES) = - { "faceScores", TYPE_BYTE }, - TIDX(STATS, FACE_LANDMARKS) = - { "faceLandmarks", TYPE_INT32 }, - TIDX(STATS, FACE_IDS) = - { "faceIds", TYPE_INT32 }, - TIDX(STATS, HISTOGRAM_MODE) = - { "histogramMode", TYPE_BYTE }, - TIDX(STATS, HISTOGRAM) = - { "histogram", TYPE_INT32 }, - TIDX(STATS, SHARPNESS_MAP_MODE) = - { "sharpnessMapMode", TYPE_BYTE }, - TIDX(STATS, SHARPNESS_MAP) = - { "sharpnessMap", TYPE_INT32 } +static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END - + ANDROID_SENSOR_INFO_START] = { + [ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] = + { "activeArraySize", TYPE_INT32 }, + [ ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES - ANDROID_SENSOR_INFO_START ] = + { "availableSensitivities", TYPE_INT32 }, + [ ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT - ANDROID_SENSOR_INFO_START ] = + { "colorFilterArrangement", TYPE_BYTE }, + [ ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE - ANDROID_SENSOR_INFO_START ] = + { "exposureTimeRange", TYPE_INT64 }, + [ ANDROID_SENSOR_INFO_MAX_FRAME_DURATION - ANDROID_SENSOR_INFO_START ] = + { "maxFrameDuration", TYPE_INT64 }, + [ ANDROID_SENSOR_INFO_PHYSICAL_SIZE - ANDROID_SENSOR_INFO_START ] = + { "physicalSize", TYPE_FLOAT }, + [ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] = + { "pixelArraySize", TYPE_INT32 }, + [ ANDROID_SENSOR_INFO_WHITE_LEVEL - ANDROID_SENSOR_INFO_START ] = + { "whiteLevel", TYPE_INT32 }, }; -tag_info_t android_stats_info[ANDROID_STATS_INFO_END - - ANDROID_STATS_INFO_START] = { - TIIDX(STATS, AVAILABLE_FACE_DETECT_MODES) = - { "availableFaceDetectModes", TYPE_BYTE }, - TIIDX(STATS, MAX_FACE_COUNT) = - { "maxFaceCount", TYPE_INT32 }, - TIIDX(STATS, HISTOGRAM_BUCKET_COUNT) = - { "histogramBucketCount", TYPE_INT32 }, - TIIDX(STATS, MAX_HISTOGRAM_COUNT) = - { "maxHistogramCount", TYPE_INT32 }, - TIIDX(STATS, SHARPNESS_MAP_SIZE) = - { "sharpnessMapSize", TYPE_INT32 }, - TIIDX(STATS, MAX_SHARPNESS_MAP_VALUE) = - { "maxSharpnessMapValue", TYPE_INT32 } +static tag_info_t android_shading[ANDROID_SHADING_END - + ANDROID_SHADING_START] = { + [ ANDROID_SHADING_MODE - ANDROID_SHADING_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_SHADING_STRENGTH - ANDROID_SHADING_START ] = + { "strength", TYPE_BYTE }, }; - -tag_info_t android_control[ANDROID_CONTROL_END - - ANDROID_CONTROL_START] = { - TIDX(CONTROL, CAPTURE_INTENT) = - { "captureIntent", TYPE_BYTE }, - TIDX(CONTROL, MODE) = - { "mode", TYPE_BYTE }, - TIDX(CONTROL, EFFECT_MODE) = - { "effectMode", TYPE_BYTE }, - TIDX(CONTROL, SCENE_MODE) = - { "sceneMode", TYPE_BYTE }, - TIDX(CONTROL, VIDEO_STABILIZATION_MODE) = - { "videoStabilizationMode", TYPE_BYTE }, - TIDX(CONTROL, AE_MODE) = - { "aeMode", TYPE_BYTE }, - TIDX(CONTROL, AE_LOCK) = - { "aeLock", TYPE_BYTE }, - TIDX(CONTROL, AE_REGIONS) = - { "aeRegions", TYPE_INT32 }, - TIDX(CONTROL, AE_EXP_COMPENSATION) = - { "aeExposureCompensation", TYPE_INT32 }, - TIDX(CONTROL, AE_TARGET_FPS_RANGE) = - { "aeTargetFpsRange", TYPE_INT32 }, - TIDX(CONTROL, AE_ANTIBANDING_MODE) = - { "aeAntibandingMode", TYPE_BYTE }, - TIDX(CONTROL, AE_STATE) = - { "aeState", TYPE_BYTE }, - TIDX(CONTROL, AE_PRECAPTURE_ID) = - { "aePrecaptureId", TYPE_INT32}, - TIDX(CONTROL, AWB_MODE) = - { "awbMode", TYPE_BYTE }, - TIDX(CONTROL, AWB_LOCK) = - { "awbLock", TYPE_BYTE }, - TIDX(CONTROL, AWB_REGIONS) = - { "awbRegions", TYPE_INT32 }, - TIDX(CONTROL, AWB_STATE) = - { "awbState", TYPE_BYTE }, - TIDX(CONTROL, AF_MODE) = - { "afMode", TYPE_BYTE }, - TIDX(CONTROL, AF_REGIONS) = - { "afRegions", TYPE_INT32 }, - TIDX(CONTROL, AF_STATE) = - { "afState", TYPE_BYTE }, - TIDX(CONTROL, AF_TRIGGER_ID) = - { "afTriggerId", TYPE_INT32 } +static tag_info_t android_statistics[ANDROID_STATISTICS_END - + ANDROID_STATISTICS_START] = { + [ ANDROID_STATISTICS_FACE_DETECT_MODE - ANDROID_STATISTICS_START ] = + { "faceDetectMode", TYPE_BYTE }, + [ ANDROID_STATISTICS_HISTOGRAM_MODE - ANDROID_STATISTICS_START ] = + { "histogramMode", TYPE_BYTE }, + [ ANDROID_STATISTICS_SHARPNESS_MAP_MODE - ANDROID_STATISTICS_START ] = + { "sharpnessMapMode", TYPE_BYTE }, + [ ANDROID_STATISTICS_FACE_IDS - ANDROID_STATISTICS_START ] = + { "faceIds", TYPE_INT32 }, + [ ANDROID_STATISTICS_FACE_LANDMARKS - ANDROID_STATISTICS_START ] = + { "faceLandmarks", TYPE_INT32 }, + [ ANDROID_STATISTICS_FACE_RECTANGLES - ANDROID_STATISTICS_START ] = + { "faceRectangles", TYPE_INT32 }, + [ ANDROID_STATISTICS_FACE_SCORES - ANDROID_STATISTICS_START ] = + { "faceScores", TYPE_BYTE }, + [ ANDROID_STATISTICS_HISTOGRAM - ANDROID_STATISTICS_START ] = + { "histogram", TYPE_INT32 }, + [ ANDROID_STATISTICS_SHARPNESS_MAP - ANDROID_STATISTICS_START ] = + { "sharpnessMap", TYPE_INT32 }, }; -tag_info_t android_control_info[ANDROID_CONTROL_INFO_END - - ANDROID_CONTROL_INFO_START] = { - TIIDX(CONTROL, AVAILABLE_SCENE_MODES) = - { "availableSceneModes", TYPE_BYTE }, - TIIDX(CONTROL, AVAILABLE_EFFECTS) = - { "availableEffects", TYPE_BYTE }, - TIIDX(CONTROL, MAX_REGIONS) = - { "maxRegions", TYPE_INT32 }, - TIIDX(CONTROL, AE_AVAILABLE_MODES) = - { "aeAvailableModes", TYPE_BYTE }, - TIIDX(CONTROL, AE_EXP_COMPENSATION_STEP) = - { "aeCompensationStep", TYPE_RATIONAL }, - TIIDX(CONTROL, AE_EXP_COMPENSATION_RANGE) = - { "aeCompensationRange", TYPE_INT32 }, - TIIDX(CONTROL, AE_AVAILABLE_TARGET_FPS_RANGES) = - { "aeAvailableTargetFpsRanges", TYPE_INT32 }, - TIIDX(CONTROL, AE_AVAILABLE_ANTIBANDING_MODES) = - { "aeAvailableAntibandingModes", TYPE_BYTE }, - TIIDX(CONTROL, AWB_AVAILABLE_MODES) = - { "awbAvailableModes", TYPE_BYTE }, - TIIDX(CONTROL, AF_AVAILABLE_MODES) = - { "afAvailableModes", TYPE_BYTE }, - TIIDX(CONTROL, AVAILABLE_VIDEO_STABILIZATION_MODES) = - { "availableVideoStabilizationModes", TYPE_BYTE }, - TIIDX(CONTROL, SCENE_MODE_OVERRIDES) = - { "sceneModeOverrides", TYPE_BYTE } +static tag_info_t android_statistics_info[ANDROID_STATISTICS_INFO_END - + ANDROID_STATISTICS_INFO_START] = { + [ ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES - ANDROID_STATISTICS_INFO_START ] = + { "availableFaceDetectModes", TYPE_BYTE }, + [ ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT - ANDROID_STATISTICS_INFO_START ] = + { "histogramBucketCount", TYPE_INT32 }, + [ ANDROID_STATISTICS_INFO_MAX_FACE_COUNT - ANDROID_STATISTICS_INFO_START ] = + { "maxFaceCount", TYPE_INT32 }, + [ ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT - ANDROID_STATISTICS_INFO_START ] = + { "maxHistogramCount", TYPE_INT32 }, + [ ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE - ANDROID_STATISTICS_INFO_START ] = + { "maxSharpnessMapValue", TYPE_INT32 }, + [ ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE - ANDROID_STATISTICS_INFO_START ] = + { "sharpnessMapSize", TYPE_INT32 }, }; -tag_info_t android_quirks_info[ANDROID_QUIRKS_INFO_END - - ANDROID_QUIRKS_INFO_START] = { - TIIDX(QUIRKS, TRIGGER_AF_WITH_AUTO) = - { "triggerAfWithAuto", TYPE_BYTE }, - TIIDX(QUIRKS, USE_ZSL_FORMAT) = - { "useZslFormat", TYPE_BYTE }, - TIIDX(QUIRKS, METERING_CROP_REGION) = - { "meteringCropRegion", TYPE_BYTE }, +static tag_info_t android_tonemap[ANDROID_TONEMAP_END - + ANDROID_TONEMAP_START] = { + [ ANDROID_TONEMAP_CURVE_BLUE - ANDROID_TONEMAP_START ] = + { "curveBlue", TYPE_BYTE }, + [ ANDROID_TONEMAP_CURVE_GREEN - ANDROID_TONEMAP_START ] = + { "curveGreen", TYPE_BYTE }, + [ ANDROID_TONEMAP_CURVE_RED - ANDROID_TONEMAP_START ] = + { "curveRed", TYPE_FLOAT }, + [ ANDROID_TONEMAP_MODE - ANDROID_TONEMAP_START ] = + { "mode", TYPE_BYTE }, + [ ANDROID_TONEMAP_MAX_CURVE_POINTS - ANDROID_TONEMAP_START ] = + { "maxCurvePoints", TYPE_INT32 }, }; -#undef TIDX -#undef TIIDX tag_info_t *tag_info[ANDROID_SECTION_COUNT] = { - android_request, - android_lens, - android_lens_info, - android_sensor, - android_sensor_info, + android_color_correction, + android_control, + android_demosaic, + android_edge, android_flash, android_flash_info, + android_geometric, android_hot_pixel, android_hot_pixel_info, - android_demosaic, - android_demosaic_info, - android_noise, - android_noise_info, + android_jpeg, + android_lens, + android_lens_info, + android_noise_reduction, + android_quirks, + android_request, + android_scaler, + android_sensor, + android_sensor_info, android_shading, - android_shading_info, - android_geometric, - android_geometric_info, - android_color, - android_color_info, + android_statistics, + android_statistics_info, android_tonemap, - android_tonemap_info, - android_edge, - android_edge_info, - android_scaler, - android_scaler_info, - android_jpeg, - android_jpeg_info, - android_stats, - android_stats_info, - android_control, - android_control_info, - android_quirks_info }; + +int camera_metadata_enum_snprint(uint32_t tag, + uint32_t value, + char *dst, + size_t size) { + const char *msg = "error: not an enum"; + int ret = -1; + + switch(tag) { + case ANDROID_COLOR_CORRECTION_MODE: { + switch (value) { + case ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX: + msg = "TRANSFORM_MATRIX"; + ret = 0; + break; + case ANDROID_COLOR_CORRECTION_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_COLOR_CORRECTION_TRANSFORM: { + break; + } + + case ANDROID_CONTROL_AE_ANTIBANDING_MODE: { + switch (value) { + case ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ: + msg = "50HZ"; + ret = 0; + break; + case ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ: + msg = "60HZ"; + ret = 0; + break; + case ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO: + msg = "AUTO"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION: { + break; + } + case ANDROID_CONTROL_AE_LOCK: { + switch (value) { + case ANDROID_CONTROL_AE_LOCK_ON: + msg = "ON"; + ret = 0; + break; + case ANDROID_CONTROL_AE_LOCK_OFF: + msg = "OFF"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AE_MODE: { + switch (value) { + case ANDROID_CONTROL_AE_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_AE_MODE_ON: + msg = "ON"; + ret = 0; + break; + case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH: + msg = "ON_AUTO_FLASH"; + ret = 0; + break; + case ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH: + msg = "ON_ALWAYS_FLASH"; + ret = 0; + break; + case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE: + msg = "ON_AUTO_FLASH_REDEYE"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AE_REGIONS: { + break; + } + case ANDROID_CONTROL_AE_TARGET_FPS_RANGE: { + break; + } + case ANDROID_CONTROL_AF_MODE: { + switch (value) { + case ANDROID_CONTROL_AF_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_AF_MODE_AUTO: + msg = "AUTO"; + ret = 0; + break; + case ANDROID_CONTROL_AF_MODE_MACRO: + msg = "MACRO"; + ret = 0; + break; + case ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO: + msg = "CONTINUOUS_VIDEO"; + ret = 0; + break; + case ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE: + msg = "CONTINUOUS_PICTURE"; + ret = 0; + break; + case ANDROID_CONTROL_AF_MODE_EDOF: + msg = "EDOF"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AF_REGIONS: { + break; + } + case ANDROID_CONTROL_AWB_LOCK: { + switch (value) { + case ANDROID_CONTROL_AWB_LOCK_ON: + msg = "ON"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_LOCK_OFF: + msg = "OFF"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AWB_MODE: { + switch (value) { + case ANDROID_CONTROL_AWB_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_AUTO: + msg = "AUTO"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_INCANDESCENT: + msg = "INCANDESCENT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_FLUORESCENT: + msg = "FLUORESCENT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT: + msg = "WARM_FLUORESCENT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_DAYLIGHT: + msg = "DAYLIGHT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT: + msg = "CLOUDY_DAYLIGHT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_TWILIGHT: + msg = "TWILIGHT"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_MODE_SHADE: + msg = "SHADE"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AWB_REGIONS: { + break; + } + case ANDROID_CONTROL_CAPTURE_INTENT: { + switch (value) { + case ANDROID_CONTROL_CAPTURE_INTENT_CUSTOM: + msg = "CUSTOM"; + ret = 0; + break; + case ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW: + msg = "PREVIEW"; + ret = 0; + break; + case ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE: + msg = "STILL_CAPTURE"; + ret = 0; + break; + case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_RECORD: + msg = "VIDEO_RECORD"; + ret = 0; + break; + case ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT: + msg = "VIDEO_SNAPSHOT"; + ret = 0; + break; + case ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG: + msg = "ZERO_SHUTTER_LAG"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_EFFECT_MODE: { + switch (value) { + case ANDROID_CONTROL_EFFECT_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_MONO: + msg = "MONO"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_NEGATIVE: + msg = "NEGATIVE"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_SOLARIZE: + msg = "SOLARIZE"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_SEPIA: + msg = "SEPIA"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_POSTERIZE: + msg = "POSTERIZE"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD: + msg = "WHITEBOARD"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD: + msg = "BLACKBOARD"; + ret = 0; + break; + case ANDROID_CONTROL_EFFECT_MODE_AQUA: + msg = "AQUA"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_MODE: { + switch (value) { + case ANDROID_CONTROL_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_MODE_AUTO: + msg = "AUTO"; + ret = 0; + break; + case ANDROID_CONTROL_MODE_USE_SCENE_MODE: + msg = "USE_SCENE_MODE"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_SCENE_MODE: { + switch (value) { + case ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED: + msg = "UNSUPPORTED"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_FACE_PRIORITY: + msg = "FACE_PRIORITY"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_ACTION: + msg = "ACTION"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_PORTRAIT: + msg = "PORTRAIT"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_LANDSCAPE: + msg = "LANDSCAPE"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_NIGHT: + msg = "NIGHT"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_NIGHT_PORTRAIT: + msg = "NIGHT_PORTRAIT"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_THEATRE: + msg = "THEATRE"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_BEACH: + msg = "BEACH"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_SNOW: + msg = "SNOW"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_SUNSET: + msg = "SUNSET"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_STEADYPHOTO: + msg = "STEADYPHOTO"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_FIREWORKS: + msg = "FIREWORKS"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_SPORTS: + msg = "SPORTS"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_PARTY: + msg = "PARTY"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT: + msg = "CANDLELIGHT"; + ret = 0; + break; + case ANDROID_CONTROL_SCENE_MODE_BARCODE: + msg = "BARCODE"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE: { + switch (value) { + case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON: + msg = "ON"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES: { + break; + } + case ANDROID_CONTROL_AE_AVAILABLE_MODES: { + break; + } + case ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES: { + break; + } + case ANDROID_CONTROL_AE_COMPENSATION_RANGE: { + break; + } + case ANDROID_CONTROL_AE_COMPENSATION_STEP: { + break; + } + case ANDROID_CONTROL_AF_AVAILABLE_MODES: { + break; + } + case ANDROID_CONTROL_AVAILABLE_EFFECTS: { + break; + } + case ANDROID_CONTROL_AVAILABLE_SCENE_MODES: { + break; + } + case ANDROID_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES: { + break; + } + case ANDROID_CONTROL_AWB_AVAILABLE_MODES: { + break; + } + case ANDROID_CONTROL_MAX_REGIONS: { + break; + } + case ANDROID_CONTROL_SCENE_MODE_OVERRIDES: { + break; + } + case ANDROID_CONTROL_AE_PRECAPTURE_ID: { + break; + } + case ANDROID_CONTROL_AE_STATE: { + switch (value) { + case ANDROID_CONTROL_AE_STATE_INACTIVE: + msg = "INACTIVE"; + ret = 0; + break; + case ANDROID_CONTROL_AE_STATE_SEARCHING: + msg = "SEARCHING"; + ret = 0; + break; + case ANDROID_CONTROL_AE_STATE_CONVERGED: + msg = "CONVERGED"; + ret = 0; + break; + case ANDROID_CONTROL_AE_STATE_LOCKED: + msg = "LOCKED"; + ret = 0; + break; + case ANDROID_CONTROL_AE_STATE_FLASH_REQUIRED: + msg = "FLASH_REQUIRED"; + ret = 0; + break; + case ANDROID_CONTROL_AE_STATE_PRECAPTURE: + msg = "PRECAPTURE"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AF_STATE: { + switch (value) { + case ANDROID_CONTROL_AF_STATE_INACTIVE: + msg = "INACTIVE"; + ret = 0; + break; + case ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN: + msg = "PASSIVE_SCAN"; + ret = 0; + break; + case ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED: + msg = "PASSIVE_FOCUSED"; + ret = 0; + break; + case ANDROID_CONTROL_AF_STATE_ACTIVE_SCAN: + msg = "ACTIVE_SCAN"; + ret = 0; + break; + case ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED: + msg = "FOCUSED_LOCKED"; + ret = 0; + break; + case ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED: + msg = "NOT_FOCUSED_LOCKED"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_CONTROL_AF_TRIGGER_ID: { + break; + } + case ANDROID_CONTROL_AWB_STATE: { + switch (value) { + case ANDROID_CONTROL_AWB_STATE_INACTIVE: + msg = "INACTIVE"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_STATE_SEARCHING: + msg = "SEARCHING"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_STATE_CONVERGED: + msg = "CONVERGED"; + ret = 0; + break; + case ANDROID_CONTROL_AWB_STATE_LOCKED: + msg = "LOCKED"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + + case ANDROID_DEMOSAIC_MODE: { + switch (value) { + case ANDROID_DEMOSAIC_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_DEMOSAIC_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + + case ANDROID_EDGE_MODE: { + switch (value) { + case ANDROID_EDGE_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_EDGE_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_EDGE_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_EDGE_STRENGTH: { + break; + } + + case ANDROID_FLASH_FIRING_POWER: { + break; + } + case ANDROID_FLASH_FIRING_TIME: { + break; + } + case ANDROID_FLASH_MODE: { + switch (value) { + case ANDROID_FLASH_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_FLASH_MODE_SINGLE: + msg = "SINGLE"; + ret = 0; + break; + case ANDROID_FLASH_MODE_TORCH: + msg = "TORCH"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_FLASH_COLOR_TEMPERATURE: { + break; + } + case ANDROID_FLASH_MAX_ENERGY: { + break; + } + case ANDROID_FLASH_STATE: { + switch (value) { + case ANDROID_FLASH_STATE_UNAVAILABLE: + msg = "UNAVAILABLE"; + ret = 0; + break; + case ANDROID_FLASH_STATE_CHARGING: + msg = "CHARGING"; + ret = 0; + break; + case ANDROID_FLASH_STATE_READY: + msg = "READY"; + ret = 0; + break; + case ANDROID_FLASH_STATE_FIRED: + msg = "FIRED"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + + case ANDROID_FLASH_INFO_AVAILABLE: { + break; + } + case ANDROID_FLASH_INFO_CHARGE_DURATION: { + break; + } + + case ANDROID_GEOMETRIC_MODE: { + switch (value) { + case ANDROID_GEOMETRIC_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_GEOMETRIC_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_GEOMETRIC_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_GEOMETRIC_STRENGTH: { + break; + } + + case ANDROID_HOT_PIXEL_MODE: { + switch (value) { + case ANDROID_HOT_PIXEL_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_HOT_PIXEL_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_HOT_PIXEL_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + + case ANDROID_HOT_PIXEL_INFO_MAP: { + break; + } + + case ANDROID_JPEG_GPS_COORDINATES: { + break; + } + case ANDROID_JPEG_GPS_PROCESSING_METHOD: { + break; + } + case ANDROID_JPEG_GPS_TIMESTAMP: { + break; + } + case ANDROID_JPEG_ORIENTATION: { + break; + } + case ANDROID_JPEG_QUALITY: { + break; + } + case ANDROID_JPEG_THUMBNAIL_QUALITY: { + break; + } + case ANDROID_JPEG_THUMBNAIL_SIZE: { + break; + } + case ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES: { + break; + } + case ANDROID_JPEG_MAX_SIZE: { + break; + } + case ANDROID_JPEG_SIZE: { + break; + } + + case ANDROID_LENS_APERTURE: { + break; + } + case ANDROID_LENS_FILTER_DENSITY: { + break; + } + case ANDROID_LENS_FOCAL_LENGTH: { + break; + } + case ANDROID_LENS_FOCUS_DISTANCE: { + break; + } + case ANDROID_LENS_OPTICAL_STABILIZATION_MODE: { + switch (value) { + case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_LENS_OPTICAL_STABILIZATION_MODE_ON: + msg = "ON"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_LENS_FACING: { + switch (value) { + case ANDROID_LENS_FACING_FRONT: + msg = "FRONT"; + ret = 0; + break; + case ANDROID_LENS_FACING_BACK: + msg = "BACK"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_LENS_OPTICAL_AXIS_ANGLE: { + break; + } + case ANDROID_LENS_POSITION: { + break; + } + case ANDROID_LENS_FOCUS_RANGE: { + break; + } + case ANDROID_LENS_STATE: { + switch (value) { + case ANDROID_LENS_STATE_STATIONARY: + msg = "STATIONARY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + + case ANDROID_LENS_INFO_AVAILABLE_APERTURES: { + break; + } + case ANDROID_LENS_INFO_AVAILABLE_FILTER_DENSITIES: { + break; + } + case ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS: { + break; + } + case ANDROID_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION: { + break; + } + case ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP: { + break; + } + case ANDROID_LENS_INFO_GEOMETRIC_CORRECTION_MAP_SIZE: { + break; + } + case ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE: { + break; + } + case ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE: { + break; + } + case ANDROID_LENS_INFO_SHADING_MAP: { + break; + } + case ANDROID_LENS_INFO_SHADING_MAP_SIZE: { + break; + } + + case ANDROID_NOISE_REDUCTION_MODE: { + switch (value) { + case ANDROID_NOISE_REDUCTION_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_NOISE_REDUCTION_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_NOISE_REDUCTION_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_NOISE_REDUCTION_STRENGTH: { + break; + } + + case ANDROID_QUIRKS_METERING_CROP_REGION: { + break; + } + case ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO: { + break; + } + case ANDROID_QUIRKS_USE_ZSL_FORMAT: { + break; + } + + case ANDROID_REQUEST_FRAME_COUNT: { + break; + } + case ANDROID_REQUEST_ID: { + break; + } + case ANDROID_REQUEST_INPUT_STREAMS: { + break; + } + case ANDROID_REQUEST_METADATA_MODE: { + switch (value) { + case ANDROID_REQUEST_METADATA_MODE_NONE: + msg = "NONE"; + ret = 0; + break; + case ANDROID_REQUEST_METADATA_MODE_FULL: + msg = "FULL"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_REQUEST_OUTPUT_STREAMS: { + break; + } + case ANDROID_REQUEST_TYPE: { + switch (value) { + case ANDROID_REQUEST_TYPE_CAPTURE: + msg = "CAPTURE"; + ret = 0; + break; + case ANDROID_REQUEST_TYPE_REPROCESS: + msg = "REPROCESS"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS: { + break; + } + case ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS: { + break; + } + + case ANDROID_SCALER_CROP_REGION: { + break; + } + case ANDROID_SCALER_AVAILABLE_FORMATS: { + switch (value) { + case ANDROID_SCALER_AVAILABLE_FORMATS_RAW_SENSOR: + msg = "RAW_SENSOR"; + ret = 0; + break; + case ANDROID_SCALER_AVAILABLE_FORMATS_YV12: + msg = "YV12"; + ret = 0; + break; + case ANDROID_SCALER_AVAILABLE_FORMATS_YCbCr_420_SP: + msg = "YCbCr_420_SP"; + ret = 0; + break; + case ANDROID_SCALER_AVAILABLE_FORMATS_JPEG: + msg = "JPEG"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS: { + break; + } + case ANDROID_SCALER_AVAILABLE_JPEG_SIZES: { + break; + } + case ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM: { + break; + } + case ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS: { + break; + } + case ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES: { + break; + } + case ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS: { + break; + } + case ANDROID_SCALER_AVAILABLE_RAW_SIZES: { + break; + } + case ANDROID_SCALER_MAX_DIGITAL_ZOOM: { + break; + } + + case ANDROID_SENSOR_EXPOSURE_TIME: { + break; + } + case ANDROID_SENSOR_FRAME_DURATION: { + break; + } + case ANDROID_SENSOR_SENSITIVITY: { + break; + } + case ANDROID_SENSOR_BASE_GAIN_FACTOR: { + break; + } + case ANDROID_SENSOR_BLACK_LEVEL_PATTERN: { + break; + } + case ANDROID_SENSOR_CALIBRATION_TRANSFORM1: { + break; + } + case ANDROID_SENSOR_CALIBRATION_TRANSFORM2: { + break; + } + case ANDROID_SENSOR_COLOR_TRANSFORM1: { + break; + } + case ANDROID_SENSOR_COLOR_TRANSFORM2: { + break; + } + case ANDROID_SENSOR_FORWARD_MATRIX1: { + break; + } + case ANDROID_SENSOR_FORWARD_MATRIX2: { + break; + } + case ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY: { + break; + } + case ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS: { + break; + } + case ANDROID_SENSOR_ORIENTATION: { + break; + } + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1: { + switch (value) { + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT: + msg = "DAYLIGHT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT: + msg = "FLUORESCENT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN: + msg = "TUNGSTEN"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH: + msg = "FLASH"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER: + msg = "FINE_WEATHER"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER: + msg = "CLOUDY_WEATHER"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE: + msg = "SHADE"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT: + msg = "DAYLIGHT_FLUORESCENT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT: + msg = "DAY_WHITE_FLUORESCENT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT: + msg = "COOL_WHITE_FLUORESCENT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT: + msg = "WHITE_FLUORESCENT"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A: + msg = "STANDARD_A"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B: + msg = "STANDARD_B"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C: + msg = "STANDARD_C"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55: + msg = "D55"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65: + msg = "D65"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75: + msg = "D75"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50: + msg = "D50"; + ret = 0; + break; + case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN: + msg = "ISO_STUDIO_TUNGSTEN"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_SENSOR_REFERENCE_ILLUMINANT2: { + break; + } + case ANDROID_SENSOR_TIMESTAMP: { + break; + } + + case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: { + break; + } + case ANDROID_SENSOR_INFO_AVAILABLE_SENSITIVITIES: { + break; + } + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT: { + switch (value) { + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB: + msg = "RGGB"; + ret = 0; + break; + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG: + msg = "GRBG"; + ret = 0; + break; + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG: + msg = "GBRG"; + ret = 0; + break; + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR: + msg = "BGGR"; + ret = 0; + break; + case ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB: + msg = "RGB"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE: { + break; + } + case ANDROID_SENSOR_INFO_MAX_FRAME_DURATION: { + break; + } + case ANDROID_SENSOR_INFO_PHYSICAL_SIZE: { + break; + } + case ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE: { + break; + } + case ANDROID_SENSOR_INFO_WHITE_LEVEL: { + break; + } + + case ANDROID_SHADING_MODE: { + switch (value) { + case ANDROID_SHADING_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_SHADING_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_SHADING_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_SHADING_STRENGTH: { + break; + } + + case ANDROID_STATISTICS_FACE_DETECT_MODE: { + switch (value) { + case ANDROID_STATISTICS_FACE_DETECT_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE: + msg = "SIMPLE"; + ret = 0; + break; + case ANDROID_STATISTICS_FACE_DETECT_MODE_FULL: + msg = "FULL"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_STATISTICS_HISTOGRAM_MODE: { + switch (value) { + case ANDROID_STATISTICS_HISTOGRAM_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_STATISTICS_HISTOGRAM_MODE_ON: + msg = "ON"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_STATISTICS_SHARPNESS_MAP_MODE: { + switch (value) { + case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF: + msg = "OFF"; + ret = 0; + break; + case ANDROID_STATISTICS_SHARPNESS_MAP_MODE_ON: + msg = "ON"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_STATISTICS_FACE_IDS: { + break; + } + case ANDROID_STATISTICS_FACE_LANDMARKS: { + break; + } + case ANDROID_STATISTICS_FACE_RECTANGLES: { + break; + } + case ANDROID_STATISTICS_FACE_SCORES: { + break; + } + case ANDROID_STATISTICS_HISTOGRAM: { + break; + } + case ANDROID_STATISTICS_SHARPNESS_MAP: { + break; + } + + case ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES: { + break; + } + case ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT: { + break; + } + case ANDROID_STATISTICS_INFO_MAX_FACE_COUNT: { + break; + } + case ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT: { + break; + } + case ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE: { + break; + } + case ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE: { + break; + } + + case ANDROID_TONEMAP_CURVE_BLUE: { + break; + } + case ANDROID_TONEMAP_CURVE_GREEN: { + break; + } + case ANDROID_TONEMAP_CURVE_RED: { + break; + } + case ANDROID_TONEMAP_MODE: { + switch (value) { + case ANDROID_TONEMAP_MODE_CONTRAST_CURVE: + msg = "CONTRAST_CURVE"; + ret = 0; + break; + case ANDROID_TONEMAP_MODE_FAST: + msg = "FAST"; + ret = 0; + break; + case ANDROID_TONEMAP_MODE_HIGH_QUALITY: + msg = "HIGH_QUALITY"; + ret = 0; + break; + default: + msg = "error: enum value out of range"; + } + break; + } + case ANDROID_TONEMAP_MAX_CURVE_POINTS: { + break; + } + + } + + strncpy(dst, msg, size - 1); + dst[size - 1] = '\0'; + + return ret; +} + + diff --git a/camera/tests/camera_metadata_tests.cpp b/camera/tests/camera_metadata_tests.cpp index 47faf426..47e9d8aa 100644 --- a/camera/tests/camera_metadata_tests.cpp +++ b/camera/tests/camera_metadata_tests.cpp @@ -20,6 +20,8 @@ #include +#include +#include #include "gtest/gtest.h" #include "system/camera_metadata.h" @@ -226,11 +228,11 @@ TEST(camera_metadata, add_get_normal) { 0.0f, 0.1f, 0.7f }; result = add_camera_metadata_entry(m, - ANDROID_COLOR_TRANSFORM, + ANDROID_COLOR_CORRECTION_TRANSFORM, colorTransform, 9); EXPECT_EQ(OK, result); data_used += calculate_camera_metadata_entry_data_size( - get_camera_metadata_tag_type(ANDROID_COLOR_TRANSFORM), 9); + get_camera_metadata_tag_type(ANDROID_COLOR_CORRECTION_TRANSFORM), 9); entries_used++; // Check added entries @@ -267,7 +269,7 @@ TEST(camera_metadata, add_get_normal) { 3, &entry); EXPECT_EQ(OK, result); EXPECT_EQ((size_t)3, entry.index); - EXPECT_EQ(ANDROID_COLOR_TRANSFORM, entry.tag); + EXPECT_EQ(ANDROID_COLOR_CORRECTION_TRANSFORM, entry.tag); EXPECT_EQ(TYPE_FLOAT, entry.type); EXPECT_EQ((size_t)9, entry.count); for (unsigned int i=0; i < entry.count; i++) { @@ -881,7 +883,7 @@ TEST(camera_metadata, sort_metadata) { 0.0f, 0.1f, 0.7f }; result = add_camera_metadata_entry(m, - ANDROID_COLOR_TRANSFORM, + ANDROID_COLOR_CORRECTION_TRANSFORM, colorTransform, 9); EXPECT_EQ(OK, result); @@ -916,7 +918,7 @@ TEST(camera_metadata, sort_metadata) { EXPECT_EQ(focus_distance, *entry.data.f); result = find_camera_metadata_entry(m, - ANDROID_NOISE_STRENGTH, + ANDROID_NOISE_REDUCTION_STRENGTH, &entry); EXPECT_EQ(NOT_FOUND, result); EXPECT_EQ((size_t)1, entry.index); @@ -940,22 +942,35 @@ TEST(camera_metadata, sort_metadata) { } // Test sorted find + size_t lensFocusIndex = -1; + { + std::vector tags; + tags.push_back(ANDROID_COLOR_CORRECTION_TRANSFORM); + tags.push_back(ANDROID_LENS_FOCUS_DISTANCE); + tags.push_back(ANDROID_SENSOR_EXPOSURE_TIME); + tags.push_back(ANDROID_SENSOR_SENSITIVITY); + std::sort(tags.begin(), tags.end()); + + lensFocusIndex = + std::find(tags.begin(), tags.end(), ANDROID_LENS_FOCUS_DISTANCE) + - tags.begin(); + } result = find_camera_metadata_entry(m, ANDROID_LENS_FOCUS_DISTANCE, &entry); EXPECT_EQ(OK, result); - EXPECT_EQ((size_t)0, entry.index); + EXPECT_EQ(lensFocusIndex, entry.index); EXPECT_EQ(ANDROID_LENS_FOCUS_DISTANCE, entry.tag); EXPECT_EQ(TYPE_FLOAT, entry.type); EXPECT_EQ((size_t)1, (size_t)entry.count); EXPECT_EQ(focus_distance, *entry.data.f); result = find_camera_metadata_entry(m, - ANDROID_NOISE_STRENGTH, + ANDROID_NOISE_REDUCTION_STRENGTH, &entry); EXPECT_EQ(NOT_FOUND, result); - EXPECT_EQ((size_t)0, entry.index); + EXPECT_EQ(lensFocusIndex, entry.index); EXPECT_EQ(ANDROID_LENS_FOCUS_DISTANCE, entry.tag); EXPECT_EQ(TYPE_FLOAT, entry.type); EXPECT_EQ((size_t)1, entry.count);