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

Commit 2bd074e9 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 am: e0085e75 am: fa4672af am: 1bb34ad7 am: 8e5c4c19

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



Change-Id: I50f11655a58eadf882d6f92ac09a3ed28da3e311
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 7dff4960 8e5c4c19
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -949,7 +949,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;