Loading media/codec2/components/avc/C2SoftAvcEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1768,17 +1768,20 @@ void C2SoftAvcEnc::process( // } // } // } std::shared_ptr<const C2GraphicView> view; std::shared_ptr<C2GraphicView> view; std::shared_ptr<C2Buffer> inputBuffer; if (!work->input.buffers.empty()) { inputBuffer = work->input.buffers[0]; view = std::make_shared<const C2GraphicView>( view = std::make_shared<C2GraphicView>( inputBuffer->data().graphicBlocks().front().map().get()); if (view->error() != C2_OK) { ALOGE("graphic view map err = %d", view->error()); work->workletsProcessed = 1u; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode view->setCrop_be(C2Rect(mSize->width, mSize->height)); } do { Loading media/codec2/components/hevc/C2SoftHevcEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1109,14 +1109,14 @@ void C2SoftHevcEnc::process(const std::unique_ptr<C2Work>& work, } } std::shared_ptr<const C2GraphicView> view; std::shared_ptr<C2GraphicView> view; std::shared_ptr<C2Buffer> inputBuffer = nullptr; bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); if (eos) mSignalledEos = true; if (!work->input.buffers.empty()) { inputBuffer = work->input.buffers[0]; view = std::make_shared<const C2GraphicView>( view = std::make_shared<C2GraphicView>( inputBuffer->data().graphicBlocks().front().map().get()); if (view->error() != C2_OK) { ALOGE("graphic view map err = %d", view->error()); Loading @@ -1125,6 +1125,9 @@ void C2SoftHevcEnc::process(const std::unique_ptr<C2Work>& work, work->workletsProcessed = 1u; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode view->setCrop_be(C2Rect(mSize->width, mSize->height)); } IHEVCE_PLUGIN_STATUS_T err = IHEVCE_EOK; Loading media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -464,18 +464,21 @@ void C2SoftMpeg4Enc::process( } } std::shared_ptr<const C2GraphicView> rView; std::shared_ptr<C2GraphicView> rView; std::shared_ptr<C2Buffer> inputBuffer; bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); 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()); work->result = rView->error(); return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode rView->setCrop_be(C2Rect(mSize->width, mSize->height)); } else { fillEmptyWork(work); if (eos) { Loading media/codec2/components/vpx/C2SoftVpxEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -683,17 +683,20 @@ void C2SoftVpxEnc::process( 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()); work->result = C2_CORRUPTED; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode rView->setCrop_be(C2Rect(mSize->width, mSize->height)); } else { ALOGV("Empty input Buffer"); uint32_t flags = 0; Loading Loading
media/codec2/components/avc/C2SoftAvcEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1768,17 +1768,20 @@ void C2SoftAvcEnc::process( // } // } // } std::shared_ptr<const C2GraphicView> view; std::shared_ptr<C2GraphicView> view; std::shared_ptr<C2Buffer> inputBuffer; if (!work->input.buffers.empty()) { inputBuffer = work->input.buffers[0]; view = std::make_shared<const C2GraphicView>( view = std::make_shared<C2GraphicView>( inputBuffer->data().graphicBlocks().front().map().get()); if (view->error() != C2_OK) { ALOGE("graphic view map err = %d", view->error()); work->workletsProcessed = 1u; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode view->setCrop_be(C2Rect(mSize->width, mSize->height)); } do { Loading
media/codec2/components/hevc/C2SoftHevcEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1109,14 +1109,14 @@ void C2SoftHevcEnc::process(const std::unique_ptr<C2Work>& work, } } std::shared_ptr<const C2GraphicView> view; std::shared_ptr<C2GraphicView> view; std::shared_ptr<C2Buffer> inputBuffer = nullptr; bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); if (eos) mSignalledEos = true; if (!work->input.buffers.empty()) { inputBuffer = work->input.buffers[0]; view = std::make_shared<const C2GraphicView>( view = std::make_shared<C2GraphicView>( inputBuffer->data().graphicBlocks().front().map().get()); if (view->error() != C2_OK) { ALOGE("graphic view map err = %d", view->error()); Loading @@ -1125,6 +1125,9 @@ void C2SoftHevcEnc::process(const std::unique_ptr<C2Work>& work, work->workletsProcessed = 1u; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode view->setCrop_be(C2Rect(mSize->width, mSize->height)); } IHEVCE_PLUGIN_STATUS_T err = IHEVCE_EOK; Loading
media/codec2/components/mpeg4_h263/C2SoftMpeg4Enc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -464,18 +464,21 @@ void C2SoftMpeg4Enc::process( } } std::shared_ptr<const C2GraphicView> rView; std::shared_ptr<C2GraphicView> rView; std::shared_ptr<C2Buffer> inputBuffer; bool eos = ((work->input.flags & C2FrameData::FLAG_END_OF_STREAM) != 0); 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()); work->result = rView->error(); return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode rView->setCrop_be(C2Rect(mSize->width, mSize->height)); } else { fillEmptyWork(work); if (eos) { Loading
media/codec2/components/vpx/C2SoftVpxEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -683,17 +683,20 @@ void C2SoftVpxEnc::process( 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()); work->result = C2_CORRUPTED; return; } //(b/232396154) //workaround for incorrect crop size in view when using surface mode rView->setCrop_be(C2Rect(mSize->width, mSize->height)); } else { ALOGV("Empty input Buffer"); uint32_t flags = 0; Loading