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

Commit a06c75db authored by Fyodor Kyslov's avatar Fyodor Kyslov Committed by Automerger Merge Worker
Browse files

Merge "Correct crop size for av1 software encoder" into udc-dev am: 84f6e4a4

parents 3186e350 84f6e4a4
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;