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

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

Merge "APV Encoder: properly initialize frame holders and fix initializations"...

Merge "APV Encoder: properly initialize frame holders and fix initializations" into main am: 78a4ab5e

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3341385



Change-Id: If09b1506c43ff1d710731433670a69902752ae09
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b301abd7 78a4ab5e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -493,10 +493,13 @@ C2SoftApvDec::C2SoftApvDec(const char* name, c2_node_id_t id,
      mOutBufferFlush(nullptr),
      mIvColorformat(IV_YUV_420P),
      mOutputDelay(kDefaultOutputDelay),
      mHeaderDecoded(false),
      mOutIndex(0u),
      mHalPixelFormat(HAL_PIXEL_FORMAT_YV12),
      mWidth(320),
      mHeight(240),
      mHeaderDecoded(false),
      mOutIndex(0u) {
      mSignalledOutputEos(false),
      mSignalledError(false) {
    oapvdHandle = NULL;
    oapvmHandle = NULL;
    outputCsp = OUTPUT_CSP_NATIVE;
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ typedef struct {

namespace android {

struct C2SoftApvDec : public SimpleC2Component {
struct C2SoftApvDec final : public SimpleC2Component {
    class IntfImpl;

    C2SoftApvDec(const char* name, c2_node_id_t id, const std::shared_ptr<IntfImpl>& intfImpl);
+3 −0
Original line number Diff line number Diff line
@@ -505,6 +505,8 @@ c2_status_t C2SoftApvEnc::reset() {
    mReceivedFrames = 0;
    mReceivedFirstFrame = false;
    mColorFormat = OAPV_CF_PLANAR2;
    memset(&mInputFrames, 0, sizeof(mInputFrames));
    memset(&mReconFrames, 0, sizeof(mReconFrames));
    return C2_OK;
}

@@ -512,6 +514,7 @@ c2_status_t C2SoftApvEnc::releaseEncoder() {
    for (int32_t i = 0; i < MAX_NUM_FRMS; i++) {
        if (mInputFrames.frm[i].imgb != nullptr) {
            imgb_release(mInputFrames.frm[i].imgb);
            mInputFrames.frm[i].imgb = nullptr;
        }
    }

+2 −2
Original line number Diff line number Diff line
@@ -31,11 +31,11 @@ namespace android {
#define APV_QP_MIN 1
#define APV_QP_MAX 51

struct C2SoftApvEnc : public SimpleC2Component {
struct C2SoftApvEnc final : public SimpleC2Component {
    class IntfImpl;

    C2SoftApvEnc(const char* name, c2_node_id_t id, const std::shared_ptr<IntfImpl>& intfImpl);
    ~C2SoftApvEnc();
    virtual ~C2SoftApvEnc();

    // From SimpleC2Component
    c2_status_t onInit() override;