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

Commit e411b401 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Codec2InfoBuilder: list FormatSurface for c2.android.* decoders" am:...

Merge "Codec2InfoBuilder: list FormatSurface for c2.android.* decoders" am: 2866355a am: 366a187d am: e3e4f94e

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2043058



Change-Id: If414c41e3dc5617a0a40b50cfa0d639e14bda572
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 24df9d26 e3e4f94e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -281,6 +281,11 @@ void addSupportedColorFormats(
            }
        };

        // The color format is ordered by preference. The intention here is to advertise:
        //   c2.android.* codecs: YUV420s, Surface, <the rest>
        //   all other codecs:    Surface, YUV420s, <the rest>
        // TODO: get this preference via Codec2 API

        // vendor video codecs prefer opaque format
        if (trait.name.find("android") == std::string::npos) {
            addDefaultColorFormat(COLOR_FormatSurface);
@@ -290,9 +295,8 @@ void addSupportedColorFormats(
        addDefaultColorFormat(COLOR_FormatYUV420SemiPlanar);
        addDefaultColorFormat(COLOR_FormatYUV420PackedPlanar);
        addDefaultColorFormat(COLOR_FormatYUV420PackedSemiPlanar);
        // framework video encoders must support surface format, though it is unclear
        // that they will be able to map it if it is opaque
        if (encoder && trait.name.find("android") != std::string::npos) {
        // Android video codecs prefer CPU-readable formats
        if (trait.name.find("android") != std::string::npos) {
            addDefaultColorFormat(COLOR_FormatSurface);
        }
        for (int32_t colorFormat : supportedColorFormats) {