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

Commit b3aba043 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4807121 from fe1322b9 to pi-release

Change-Id: I462d54e4718c0c3f1637d8d9b2fe0dc8e7c9be36
parents 84b3a515 fe1322b9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7050,6 +7050,10 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
    /**
     * <p>The camera device is a logical camera backed by two or more physical cameras that are
     * also exposed to the application.</p>
     * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
     * camera in the system. For an application that switches between front and back cameras,
     * the recommendation is to switch between the first rear camera and the first front
     * camera in the list of supported camera devices.</p>
     * <p>This capability requires the camera device to support the following:</p>
     * <ul>
     * <li>This camera device must list the following static metadata entries in <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html">CameraCharacteristics</a>:<ul>
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ static status_t configureSignals() {
                strerror(errno));
        return err;
    }
    signal(SIGPIPE, SIG_IGN);
    return NO_ERROR;
}

+8 −23
Original line number Diff line number Diff line
@@ -302,29 +302,14 @@ status_t OpcodeListBuilder::addWarpRectilinearForMetadata(const float* kCoeffs,
    normalizedOCX = CLAMP(normalizedOCX, 0, 1);
    normalizedOCY = CLAMP(normalizedOCY, 0, 1);

    // Conversion factors from Camera2 K factors to DNG spec. K factors:
    //
    //      Note: these are necessary because our unit system assumes a
    //      normalized max radius of sqrt(2), whereas the DNG spec's
    //      WarpRectilinear opcode assumes a normalized max radius of 1.
    //      Thus, each K coefficient must include the domain scaling
    //      factor (the DNG domain is scaled by sqrt(2) to emulate the
    //      domain used by the Camera2 specification).

    const double c_0 = sqrt(2);
    const double c_1 = 2 * sqrt(2);
    const double c_2 = 4 * sqrt(2);
    const double c_3 = 8 * sqrt(2);
    const double c_4 = 2;
    const double c_5 = 2;

    const double coeffs[] = { c_0 * kCoeffs[0],
                              c_1 * kCoeffs[1],
                              c_2 * kCoeffs[2],
                              c_3 * kCoeffs[3],
                              c_4 * kCoeffs[4],
                              c_5 * kCoeffs[5] };

    double coeffs[6] = {
        kCoeffs[0],
        kCoeffs[1],
        kCoeffs[2],
        kCoeffs[3],
        kCoeffs[4],
        kCoeffs[5]
    };

    return addWarpRectilinear(/*numPlanes*/1,
                              /*opticalCenterX*/normalizedOCX,
+1 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ cc_library {
    ],

    shared_libs: [
        "android.hidl.token@1.0-utils",
        "liblog",
        "libcutils",
        "libutils",
+12 −7
Original line number Diff line number Diff line
@@ -567,7 +567,7 @@ ACodec::ACodec()
      mMetadataBuffersToSubmit(0),
      mNumUndequeuedBuffers(0),
      mRepeatFrameDelayUs(-1ll),
      mMaxPtsGapUs(-1ll),
      mMaxPtsGapUs(0ll),
      mMaxFps(-1),
      mFps(-1.0),
      mCaptureFps(-1.0),
@@ -1823,16 +1823,21 @@ status_t ACodec::configureCodec(

        // only allow 32-bit value, since we pass it as U32 to OMX.
        if (!msg->findInt64("max-pts-gap-to-encoder", &mMaxPtsGapUs)) {
            mMaxPtsGapUs = -1ll;
        } else if (mMaxPtsGapUs > INT32_MAX || mMaxPtsGapUs < 0) {
            mMaxPtsGapUs = 0ll;
        } else if (mMaxPtsGapUs > INT32_MAX || mMaxPtsGapUs < INT32_MIN) {
            ALOGW("Unsupported value for max pts gap %lld", (long long) mMaxPtsGapUs);
            mMaxPtsGapUs = -1ll;
            mMaxPtsGapUs = 0ll;
        }

        if (!msg->findFloat("max-fps-to-encoder", &mMaxFps)) {
            mMaxFps = -1;
        }

        // notify GraphicBufferSource to allow backward frames
        if (mMaxPtsGapUs < 0ll) {
            mMaxFps = -1;
        }

        if (!msg->findDouble("time-lapse-fps", &mCaptureFps)) {
            mCaptureFps = -1.0;
        }
@@ -6686,7 +6691,7 @@ status_t ACodec::LoadedState::setupInputSurface() {
        }
    }

    if (mCodec->mMaxPtsGapUs > 0ll) {
    if (mCodec->mMaxPtsGapUs != 0ll) {
        OMX_PARAM_U32TYPE maxPtsGapParams;
        InitOMXParams(&maxPtsGapParams);
        maxPtsGapParams.nPortIndex = kPortIndexInput;
@@ -6703,7 +6708,7 @@ status_t ACodec::LoadedState::setupInputSurface() {
        }
    }

    if (mCodec->mMaxFps > 0) {
    if (mCodec->mMaxFps > 0 || mCodec->mMaxPtsGapUs < 0) {
        err = statusFromBinderStatus(
                mCodec->mGraphicBufferSource->setMaxFps(mCodec->mMaxFps));

Loading