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

Commit 8d6467bf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "FrameDecoder: fix 180 rotation for HDR thumbnails" into tm-qpr-dev am:...

Merge "FrameDecoder: fix 180 rotation for HDR thumbnails" into tm-qpr-dev am: 0de21710 am: 68ffa50c

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



Change-Id: Ib0f6aea3d427bebc2163616000bf1bff430a2005
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9a3fb4bf 68ffa50c
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -86,11 +86,14 @@ sp<IMemory> allocVideoFrame(const sp<MetaData>& trackMeta,
        displayHeight = height;
    }

    if (allocRotated && (rotationAngle == 90 || rotationAngle == 270)) {
        int32_t tmp;
        tmp = width; width = height; height = tmp;
        tmp = displayWidth; displayWidth = displayHeight; displayHeight = tmp;
        tmp = tileWidth; tileWidth = tileHeight; tileHeight = tmp;
    if (allocRotated) {
        if (rotationAngle == 90 || rotationAngle == 270) {
            // swap width and height for 90 & 270 degrees rotation
            std::swap(width, height);
            std::swap(displayWidth, displayHeight);
            std::swap(tileWidth, tileHeight);
        }
        // Rotation is already applied.
        rotationAngle = 0;
    }