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

Commit 1cadc75d authored by David Stevens's avatar David Stevens
Browse files

codec2: Fix linear gralloc blobs

This fixes a rebase issue between f72774bf and 2a24a309.

Bug: 153120636
Test: Manually run ARC c2 e2e test app
Change-Id: I68987ff27f43380e7ad149c2776830219c42dba9
parent 52266779
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -520,6 +520,22 @@ c2_status_t C2AllocationGralloc::map(
            break;
        }

        case static_cast<uint32_t>(PixelFormat4::BLOB): {
            void *pointer = nullptr;
            // TODO: fence
            status_t err = GraphicBufferMapper::get().lock(
                                const_cast<native_handle_t*>(mBuffer), grallocUsage,
                                { (int32_t)rect.left, (int32_t)rect.top,
                                  (int32_t)rect.width, (int32_t)rect.height },
                                &pointer);
            if (err) {
                ALOGE("failed transaction: lock(BLOB)");
                return C2_CORRUPTED;
            }
            *addr = (uint8_t *)pointer;
            break;
        }

        case static_cast<uint32_t>(PixelFormat4::YCBCR_420_888):
            // fall-through
        case static_cast<uint32_t>(PixelFormat4::YV12):