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

Commit 2023c68f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8139379 from 89342cbd to sc-qpr3-release

Change-Id: I51bcbb29aad17fa68be87efc3ebcbebfc6414fcd
parents 859e2c37 89342cbd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -894,6 +894,9 @@ void CCodecConfig::initializeStandardParams() {
    add(ConfigMapper(KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT, C2_PARAMKEY_MAX_CHANNEL_COUNT, "value")
        .limitTo(D::AUDIO & (D::CONFIG | D::PARAM | D::READ)));

    add(ConfigMapper(KEY_MAX_OUTPUT_CHANNEL_COUNT, C2_PARAMKEY_MAX_CHANNEL_COUNT, "value")
        .limitTo(D::AUDIO & (D::CONFIG | D::PARAM | D::READ)));

    add(ConfigMapper(KEY_AAC_SBR_MODE, C2_PARAMKEY_AAC_SBR_MODE, "value")
        .limitTo(D::AUDIO & D::ENCODER & (D::CONFIG | D::PARAM | D::READ))
        .withMapper([](C2Value v) -> C2Value {
+22 −15
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ public:

        c2_status_t err = mapInternal(mapSize, mapOffset, alignmentBytes, prot, flags, &(map.addr), addr);
        if (map.addr) {
            std::lock_guard<std::mutex> guard(mMutexMappings);
            mMappings.push_back(map);
        }
        return err;
@@ -217,6 +218,8 @@ public:
            ALOGD("tried to unmap unmapped buffer");
            return C2_NOT_FOUND;
        }
        { // Scope for the lock_guard of mMutexMappings.
            std::lock_guard<std::mutex> guard(mMutexMappings);
            for (auto it = mMappings.begin(); it != mMappings.end(); ++it) {
                if (addr != (uint8_t *)it->addr + it->alignmentBytes ||
                        size + it->alignmentBytes != it->size) {
@@ -231,9 +234,11 @@ public:
                    *fence = C2Fence(); // not using fences
                }
                (void)mMappings.erase(it);
            ALOGV("successfully unmapped: addr=%p size=%zu fd=%d", addr, size, mHandle.bufferFd());
                ALOGV("successfully unmapped: addr=%p size=%zu fd=%d", addr, size,
                          mHandle.bufferFd());
                return C2_OK;
            }
        }
        ALOGD("unmap failed to find specified map");
        return C2_BAD_VALUE;
    }
@@ -241,6 +246,7 @@ public:
    virtual ~Impl() {
        if (!mMappings.empty()) {
            ALOGD("Dangling mappings!");
            std::lock_guard<std::mutex> guard(mMutexMappings);
            for (const Mapping &map : mMappings) {
                (void)munmap(map.addr, map.size);
            }
@@ -320,6 +326,7 @@ protected:
        size_t size;
    };
    std::list<Mapping> mMappings;
    std::mutex mMutexMappings;
};

class C2AllocationIon::ImplV2 : public C2AllocationIon::Impl {
+4 −1
Original line number Diff line number Diff line
@@ -2195,8 +2195,11 @@ status_t ACodec::configureCodec(
            }

            if (!msg->findInt32("aac-max-output-channel_count", &maxOutputChannelCount)) {
                // check non AAC-specific key
                if (!msg->findInt32("max-output-channel-count", &maxOutputChannelCount)) {
                    maxOutputChannelCount = -1;
                }
            }
            if (!msg->findInt32("aac-pcm-limiter-enable", &pcmLimiterEnable)) {
                // value is unknown
                pcmLimiterEnable = -1;
+1 −0
Original line number Diff line number Diff line
@@ -789,6 +789,7 @@ constexpr char KEY_MAX_BIT_RATE[] = "max-bitrate";
constexpr char KEY_MAX_FPS_TO_ENCODER[] = "max-fps-to-encoder";
constexpr char KEY_MAX_HEIGHT[] = "max-height";
constexpr char KEY_MAX_INPUT_SIZE[] = "max-input-size";
constexpr char KEY_MAX_OUTPUT_CHANNEL_COUNT[] = "max-output-channel-count";
constexpr char KEY_MAX_PTS_GAP_TO_ENCODER[] = "max-pts-gap-to-encoder";
constexpr char KEY_MAX_WIDTH[] = "max-width";
constexpr char KEY_MIME[] = "mime";