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

Commit 6d435719 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 831ed185 fca6714f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line 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.
            // The "measured-frame-rate-WIDTHxHEIGHT-range" key is optional.
            // Hardcode to some default value (3.33ms * tile count) based on resolution.
            // Hardcode to some default value (3.33ms * tile count) based on resolution.
            *stall = 3333333LL * width * height / (kGridWidth * kGridHeight);
            *stall = 3333333LL * width * height / (kGridWidth * kGridHeight);
            *useHeic = chooseHeic;
            *useGrid = enableGrid;
            return true;
            return true;
        }
        }


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


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


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


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