OSDN Git Service

camera_metadata: Update availableStreamConfigurations for JPEG sizes
authorZhijun He <zhijunhe@google.com>
Mon, 2 Jun 2014 23:46:03 +0000 (16:46 -0700)
committerZhijun He <zhijunhe@google.com>
Wed, 4 Jun 2014 20:41:46 +0000 (13:41 -0700)
Also Fix some doc issue in availableCapabilities

Bug: 12035686
Change-Id: Ie517a587f4a9e6cd9731fcca042e24adf832d9e3

camera/docs/docs.html
camera/docs/metadata_properties.xml

index 013eb1f..de33816 100644 (file)
@@ -12411,6 +12411,7 @@ as a table instead?</p>
 <a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a> <code>==</code> FULL devices:</p>
 <ul>
 <li>MANUAL_<wbr/>SENSOR</li>
+<li>MANUAL_<wbr/>POST_<wbr/>PROCESSING</li>
 </ul>
 <p>Other capabilities may be available on either FULL or LIMITED
 devices,<wbr/> but the app.<wbr/> should query this field to be sure.<wbr/></p>
@@ -13865,8 +13866,6 @@ camera device supports
             <td class="entry_details" colspan="5">
               <p>The configurations are listed as <code>(format,<wbr/> width,<wbr/> height,<wbr/> input?)</code>
 tuples.<wbr/></p>
-<p>All camera devices will support sensor maximum resolution (defined by
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>) for the JPEG format.<wbr/></p>
 <p>For a given use case,<wbr/> the actual maximum supported resolution
 may be lower than what is listed here,<wbr/> depending on the destination
 Surface for the image data.<wbr/> For example,<wbr/> for recording video,<wbr/>
@@ -13955,8 +13954,22 @@ mandatory stream configurations on a per-capability basis.<wbr/></p>
 of sensor maximum resolution for JPEG formats (regardless of hardware
 level).<wbr/></p>
 <p>(The following is a rewording of the above required table):</p>
-<p>The HAL must include sensor maximum resolution (defined by
-<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>).<wbr/></p>
+<p>For JPEG format,<wbr/> the sizes may be restricted by below conditions:</p>
+<ul>
+<li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
+(e.<wbr/>g.<wbr/> 4:3,<wbr/> 16:9,<wbr/> 3:2 etc.<wbr/>).<wbr/> If the sensor maximum resolution
+(defined by <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>) has an aspect ratio other than these,<wbr/>
+it does not have to be included in the supported JPEG sizes.<wbr/></li>
+<li>Some hardware JPEG encoders may have pixel boundary alignment requirements,<wbr/> such as
+the dimensions being a multiple of 16.<wbr/></li>
+</ul>
+<p>Therefore,<wbr/> the maximum JPEG size may be smaller than sensor maximum resolution.<wbr/>
+However,<wbr/> the largest JPEG size must be as close as possible to the sensor maximum
+resolution given above constraints.<wbr/> It is required that after aspect ratio adjustments,<wbr/>
+additional size reduction due to other issues must be less than 3% in area.<wbr/> For example,<wbr/>
+if the sensor maximum resolution is 3280x2464,<wbr/> if the maximum JPEG size has aspect
+ratio 4:3,<wbr/> the JPEG encoder alignment requirement is 16,<wbr/> the maximum JPEG size will be
+3264x2448.<wbr/></p>
 <p>For FULL capability devices (<code><a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a> == FULL</code>),<wbr/>
 the HAL must include all YUV_<wbr/>420_<wbr/>888 sizes that have JPEG sizes listed
 here as output streams.<wbr/></p>
index 2cba30f..f4553a2 100644 (file)
@@ -3269,6 +3269,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           android.info.supportedHardwareLevel `==` FULL devices:
 
           * MANUAL_SENSOR
+          * MANUAL_POST_PROCESSING
 
           Other capabilities may be available on either FULL or LIMITED
           devices, but the app. should query this field to be sure.
@@ -3792,9 +3793,6 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           The configurations are listed as `(format, width, height, input?)`
           tuples.
 
-          All camera devices will support sensor maximum resolution (defined by
-          android.sensor.info.activeArraySize) for the JPEG format.
-
           For a given use case, the actual maximum supported resolution
           may be lower than what is listed here, depending on the destination
           Surface for the image data. For example, for recording video,
@@ -3834,8 +3832,22 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
 
           (The following is a rewording of the above required table):
 
-          The HAL must include sensor maximum resolution (defined by
-          android.sensor.info.activeArraySize).
+          For JPEG format, the sizes may be restricted by below conditions:
+
+          * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
+          (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
+          (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these,
+          it does not have to be included in the supported JPEG sizes.
+          * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
+          the dimensions being a multiple of 16.
+
+          Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
+          However, the largest JPEG size must be as close as possible to the sensor maximum
+          resolution given above constraints. It is required that after aspect ratio adjustments,
+          additional size reduction due to other issues must be less than 3% in area. For example,
+          if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
+          ratio 4:3, the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
+          3264x2448.
 
           For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
           the HAL must include all YUV_420_888 sizes that have JPEG sizes listed