diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-11 10:17:45 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-11 10:17:45 +0000 |
commit | 094a302f4c736ac046a987db53eb3ea20223c045 (patch) | |
tree | 3961d60bf72b262c1f3c6966f2e61617ccd6d313 | |
parent | 65b3023576c2c0ecb60982f7bb19087d9f02c779 (diff) | |
parent | 6ea2419c173d657fb8cc658ad92454e994bdf68b (diff) |
Snap for 10466710 from 6ea2419c173d657fb8cc658ad92454e994bdf68b to t-keystone-qcom-release
Change-Id: Icf5f21638fe716043fe0ff601bd4706cab1bc736
-rw-r--r-- | services/camera/libcameraservice/api2/HeicCompositeStream.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/api2/HeicCompositeStream.cpp b/services/camera/libcameraservice/api2/HeicCompositeStream.cpp index 4f4576660c..7a5c6632cd 100644 --- a/services/camera/libcameraservice/api2/HeicCompositeStream.cpp +++ b/services/camera/libcameraservice/api2/HeicCompositeStream.cpp @@ -1275,7 +1275,7 @@ status_t HeicCompositeStream::initializeCodec(uint32_t width, uint32_t height, bool useGrid = false; AString hevcName; - bool isHWEnc = false; + bool isHWEncWithoutGrid = false; bool isSizeSupported = isSizeSupportedByHeifEncoder(width, height, &mUseHeic, &useGrid, nullptr, &hevcName); if (!isSizeSupported) { @@ -1374,13 +1374,15 @@ status_t HeicCompositeStream::initializeCodec(uint32_t width, uint32_t height, // This only serves as a hint to encoder when encoding is not real-time. outputFormat->setInt32(KEY_OPERATING_RATE, useGrid ? kGridOpRate : kNoGridOpRate); + // BLOCK_MODEL is enabled only for HW encoder with surface input. Surface mode is used only + // when grid is not used. mCodec->getName(&hevcName); - isHWEnc = hevcName.startsWith("c2.qti"); + isHWEncWithoutGrid = hevcName.startsWith("c2.qti.heic.encoder") && !useGrid; res = mCodec->configure(outputFormat, nullptr /*nativeWindow*/, nullptr /*crypto*/, CONFIGURE_FLAG_ENCODE | - (isHWEnc ? CONFIGURE_FLAG_USE_BLOCK_MODEL : 0)); + (isHWEncWithoutGrid ? CONFIGURE_FLAG_USE_BLOCK_MODEL : 0)); if (res != OK) { ALOGE("%s: Failed to configure codec: %s (%d)", __FUNCTION__, strerror(-res), res); |