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

Commit e0085e75 authored by Songyue Han's avatar Songyue Han Committed by Automerger Merge Worker
Browse files

Merge "Fix convertYUV420Planar16ToY410 overflow issue for unsupported...

Merge "Fix convertYUV420Planar16ToY410 overflow issue for unsupported cropwidth." into rvc-dev am: d0499320

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



Change-Id: I22b77795ba90a5dde6d60fc3ff6c8a26723faa56
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents adeb4ec2 d0499320
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -648,7 +648,8 @@ status_t ColorConverter::convertYUV420Planar16ToY410(

        uint32_t u01, v01, y01, y23, y45, y67, uv0, uv1;
        size_t x = 0;
        for (; x < src.cropWidth() - 3; x += 4) {
        // x % 4 is always 0 so x + 3 will never overflow.
        for (; x + 3 < src.cropWidth(); x += 4) {
            u01 = *((uint32_t*)ptr_u); ptr_u += 2;
            v01 = *((uint32_t*)ptr_v); ptr_v += 2;