Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6158f388 authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Automerger Merge Worker
Browse files

Merge "Limit preview stabilization mandatory stream sizes to 1440p (instead of...

Merge "Limit preview stabilization mandatory stream sizes to 1440p (instead of RECORD)." into tm-dev am: f0094b8d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18704183



Change-Id: I78969f2bc9bd54f86acea8fcf62d04eba87be09a
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d919f9d4 f0094b8d
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -892,9 +892,9 @@ public abstract class CameraDevice implements AutoCloseable {
     * <tr><th colspan="7">Preview stabilization guaranteed stream configurations</th></tr>
     * <tr><th colspan="7">Preview stabilization guaranteed stream configurations</th></tr>
     * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th rowspan="2">Sample use case(s)</th> </tr>
     * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th rowspan="2">Sample use case(s)</th> </tr>
     * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
     * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code RECORD}</td><td colspan="4" id="rb"></td> <td>Stabilized preview, GPU video processing, or no-preview stabilized video recording.</td> </tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code s1440p}</td><td colspan="4" id="rb"></td> <td>Stabilized preview, GPU video processing, or no-preview stabilized video recording.</td> </tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG / YUV}</td><td id="rb">{@code MAXIMUM }</td><td>Standard still imaging with stabilized preview.</td> </tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code s1440p}</td> <td>{@code JPEG / YUV}</td><td id="rb">{@code MAXIMUM }</td><td>Standard still imaging with stabilized preview.</td> </tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV / YUV}</td><td id="rb">{@code RECORD }</td><td>High-resolution recording with stabilized preview and recording stream.</td> </tr>
     * <tr> <td>{@code PRIV / YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV / YUV}</td><td id="rb">{@code s1440p }</td><td>High-resolution recording with stabilized preview and recording stream.</td> </tr>
     * </table><br>
     * </table><br>
     * <p>
     * <p>
     * For the maximum size column, PREVIEW refers to the best size match to the device's screen
     * For the maximum size column, PREVIEW refers to the best size match to the device's screen
+11 −11
Original line number Original line Diff line number Diff line
@@ -1265,43 +1265,43 @@ public final class MandatoryStreamCombination {
    private static StreamCombinationTemplate sPreviewStabilizedStreamCombinations[] = {
    private static StreamCombinationTemplate sPreviewStabilizedStreamCombinations[] = {
        // 1 stream combinations
        // 1 stream combinations
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD)},
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)},
                "Stabilized preview, GPU video processing, or no-preview stabilized recording"),
                "Stabilized preview, GPU video processing, or no-preview stabilized recording"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD)},
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)},
                "Stabilized preview, GPU video processing, or no-preview stabilized recording"),
                "Stabilized preview, GPU video processing, or no-preview stabilized recording"),
        //2 stream combinations
        //2 stream combinations
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)},
                "Standard JPEG still imaging with stabilized preview"),
                "Standard JPEG still imaging with stabilized preview"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)},
                "Standard YUV still imaging with stabilized preview"),
                "Standard YUV still imaging with stabilized preview"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)},
                "Standard YUV still imaging with stabilized in-app image processing stream"),
                "Standard YUV still imaging with stabilized in-app image processing stream"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)},
                "Standard JPEG still imaging with stabilized in-app image processing stream"),
                "Standard JPEG still imaging with stabilized in-app image processing stream"),


        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                "High-resolution video recording with preview both streams stabilized"),
                "High-resolution video recording with preview both streams stabilized"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                "High-resolution video recording with preview both streams stabilized"),
                "High-resolution video recording with preview both streams stabilized"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)},
                "High-resolution video recording with preview both streams stabilized"),
                "High-resolution video recording with preview both streams stabilized"),
        new StreamCombinationTemplate(new StreamTemplate [] {
        new StreamCombinationTemplate(new StreamTemplate [] {
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD),
                new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p),
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)},
                "High-resolution video recording with preview both streams stabilized"),
                "High-resolution video recording with preview both streams stabilized"),
    };
    };
@@ -1430,7 +1430,7 @@ public final class MandatoryStreamCombination {
            StreamCombinationTemplate []chosenStreamCombinations =
            StreamCombinationTemplate []chosenStreamCombinations =
                    sPreviewStabilizedStreamCombinations;
                    sPreviewStabilizedStreamCombinations;


            if (mIsPreviewStabilizationSupported) {
            if (!mIsPreviewStabilizationSupported) {
                Log.v(TAG, "Device does not support preview stabilization");
                Log.v(TAG, "Device does not support preview stabilization");
                 return null;
                 return null;
             }
             }