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

Commit c6cf2db3 authored by Vignesh Venkatasubramanian's avatar Vignesh Venkatasubramanian Committed by Android (Google) Code Review
Browse files

Merge "vpx: Allow odd width/height decoding"

parents b9c40341 3f714d73
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -68,8 +68,8 @@ public:
                DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE)
                .withDefault(new C2StreamPictureSizeInfo::output(0u, 320, 240))
                .withFields({
                    C2F(mSize, width).inRange(2, 2048, 2),
                    C2F(mSize, height).inRange(2, 2048, 2),
                    C2F(mSize, width).inRange(2, 2048),
                    C2F(mSize, height).inRange(2, 2048),
                })
                .withSetter(SizeSetter)
                .build());
@@ -718,7 +718,12 @@ status_t C2SoftVpxDec::outputBuffer(
    }

    C2MemoryUsage usage = { C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE };
    c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16), mHeight, format, usage, &block);
    // We always create a graphic block that is width aligned to 16 and height
    // aligned to 2. We set the correct "crop" value of the image in the call to
    // createGraphicBuffer() by setting the correct image dimensions.
    c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16),
                                              align(mHeight, 2), format, usage,
                                              &block);
    if (err != C2_OK) {
        ALOGE("fetchGraphicBlock for Output failed with status %d", err);
        work->result = err;