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

Commit 277dbf68 authored by Wonsik Kim's avatar Wonsik Kim Committed by Automerger Merge Worker
Browse files

Merge "CCodec: pre-S bytebuffer mode encoders to use YV12 format" into tm-dev am: d8bef59f

parents 901145c5 d8bef59f
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -1074,6 +1074,17 @@ void CCodec::configure(const sp<AMessage> &msg) {
                }
                }
            } else {
            } else {
                if ((config->mDomain & Config::IS_ENCODER) || !surface) {
                if ((config->mDomain & Config::IS_ENCODER) || !surface) {
                    if (vendorSdkVersion < __ANDROID_API_S__ &&
                            (format == COLOR_FormatYUV420Flexible ||
                             format == COLOR_FormatYUV420Planar ||
                             format == COLOR_FormatYUV420PackedPlanar ||
                             format == COLOR_FormatYUV420SemiPlanar ||
                             format == COLOR_FormatYUV420PackedSemiPlanar)) {
                        // pre-S framework used to map these color formats into YV12.
                        // Codecs from older vendor partition may be relying on
                        // this assumption.
                        format = HAL_PIXEL_FORMAT_YV12;
                    }
                    switch (format) {
                    switch (format) {
                        case COLOR_FormatYUV420Flexible:
                        case COLOR_FormatYUV420Flexible:
                            format = COLOR_FormatYUV420Planar;
                            format = COLOR_FormatYUV420Planar;