Camera: Intialize useGrid and chooseHeic variables

--Handle early return case in Heic Encoder Manager

Bug: 150894246
CRs-Fixed: 2636054
Change-Id: I7f437241a1f33cc4cb4384369828e12b331b09c9
gugelfrei
Susmitha Gummalla 4 years ago committed by Shuzhen Wang
parent 796804387e
commit fca6714fd6

@ -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;
} }

@ -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)) {

Loading…
Cancel
Save