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

Commit 84f6e4a4 authored by Fyodor Kyslov's avatar Fyodor Kyslov Committed by Android (Google) Code Review
Browse files

Merge "Correct crop size for av1 software encoder" into udc-dev

parents 37f5d129 0ed520ba
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -636,11 +636,11 @@ void C2SoftAomEnc::process(const std::unique_ptr<C2Work>& work,
        return;
    }

    std::shared_ptr<const C2GraphicView> rView;
    std::shared_ptr<C2GraphicView> rView;
    std::shared_ptr<C2Buffer> inputBuffer;
    if (!work->input.buffers.empty()) {
        inputBuffer = work->input.buffers[0];
        rView = std::make_shared<const C2GraphicView>(
        rView = std::make_shared<C2GraphicView>(
                inputBuffer->data().graphicBlocks().front().map().get());
        if (rView->error() != C2_OK) {
            ALOGE("graphic view map err = %d", rView->error());
@@ -678,6 +678,10 @@ void C2SoftAomEnc::process(const std::unique_ptr<C2Work>& work,
        return;
    }

    //(b/279387842)
    //workaround for incorrect crop size in view when using surface mode
    rView->setCrop_be(C2Rect(mSize->width, mSize->height));

    if (!mHeadersReceived) {
        Av1Config av1_config;
        constexpr uint32_t header_length = 2048;