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

Commit 57eb313e authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Camera: Intialize useGrid and chooseHeic variables" into rvc-dev am: 6d435719

Change-Id: If1d2931cdb664a10b934a07c4fe3054c6c370307
parents 9f8cc0da 6d435719
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -91,6 +91,8 @@ bool HeicEncoderInfoManager::isSizeSupported(int32_t width, int32_t height, bool
            // The "measured-frame-rate-WIDTHxHEIGHT-range" key is optional.
            // Hardcode to some default value (3.33ms * tile count) based on resolution.
            *stall = 3333333LL * width * height / (kGridWidth * kGridHeight);
            *useHeic = chooseHeic;
            *useGrid = enableGrid;
            return true;
        }

@@ -275,9 +277,13 @@ bool HeicEncoderInfoManager::getHevcCodecDetails(
            ALOGE("%s: Failed to get codec info for %s", __FUNCTION__, mime);
            break;
        }
        ALOGV("%s: [%s] codec found", __FUNCTION__,
                info->getCodecName());

        // Filter out software ones as they may be too slow
        if (!(info->getAttributes() & MediaCodecInfo::kFlagIsHardwareAccelerated)) {
            ALOGV("%s: [%s] Filter out software ones as they may be too slow", __FUNCTION__,
                    info->getCodecName());
            continue;
        }

+2 −1
Original line number Diff line number Diff line
@@ -1008,7 +1008,8 @@ status_t CameraProviderManager::ProviderInfo::DeviceInfo3::fillHeicStreamCombina
        if (sizeAvail) continue;

        int64_t stall = 0;
        bool useHeic, useGrid;
        bool useHeic = false;
        bool useGrid = false;
        if (camera3::HeicCompositeStream::isSizeSupportedByHeifEncoder(
                halStreamConfigs.data.i32[i+1], halStreamConfigs.data.i32[i+2],
                &useHeic, &useGrid, &stall)) {