Loading media/libmediahelper/AudioValidator.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ status_t AudioValidator::validateEffectDescriptor( const effect_descriptor_t& desc, std::string_view bugNumber) { status_t status = NO_ERROR; if (checkStringOverflow(desc.name) | /* always */ checkStringOverflow(desc.implementor)) { if (checkStringOverflow(desc.name) || checkStringOverflow(desc.implementor)) { status = BAD_VALUE; } return safetyNetLog(status, bugNumber); Loading media/libstagefright/MPEG4Writer.cpp +23 −22 Original line number Diff line number Diff line Loading @@ -4446,11 +4446,15 @@ void MPEG4Writer::Track::writeColrBox() { memset(&aspects, 0, sizeof(aspects)); // Color metadata may have changed. sp<MetaData> meta = mSource->getFormat(); // TRICKY: using | instead of || because we want to execute all findInt32-s if (meta->findInt32(kKeyColorPrimaries, (int32_t*)&aspects.mPrimaries) | meta->findInt32(kKeyTransferFunction, (int32_t*)&aspects.mTransfer) | meta->findInt32(kKeyColorMatrix, (int32_t*)&aspects.mMatrixCoeffs) | meta->findInt32(kKeyColorRange, (int32_t*)&aspects.mRange)) { bool findPrimaries = meta->findInt32(kKeyColorPrimaries, (int32_t*)&aspects.mPrimaries); bool findTransfer = meta->findInt32(kKeyTransferFunction, (int32_t*)&aspects.mTransfer); bool findMatrix = meta->findInt32(kKeyColorMatrix, (int32_t*)&aspects.mMatrixCoeffs); bool findRange = meta->findInt32(kKeyColorRange, (int32_t*)&aspects.mRange); if (!findPrimaries && !findTransfer && !findMatrix && !findRange) { ALOGV("no color information"); return; } int32_t primaries, transfer, coeffs; bool fullRange; ALOGV("primaries=%s transfer=%s matrix=%s range=%s", Loading @@ -4467,9 +4471,6 @@ void MPEG4Writer::Track::writeColrBox() { mOwner->writeInt16(coeffs); mOwner->writeInt8(int8_t(fullRange ? 0x80 : 0x0)); mOwner->endBox(); // colr } else { ALOGV("no color information"); } } void MPEG4Writer::Track::writeAudioFourCCBox() { Loading media/libstagefright/foundation/ColorUtils.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -590,9 +590,10 @@ android_dataspace ColorUtils::getDataSpaceForColorAspects(ColorAspects &aspects, uint32_t gfxRange = range; uint32_t gfxStandard = standard; uint32_t gfxTransfer = transfer; // TRICKY: use & to ensure all three mappings are completed if (!(sGfxRanges.map(range, &gfxRange) & sGfxStandards.map(standard, &gfxStandard) & sGfxTransfers.map(transfer, &gfxTransfer))) { bool mappedRange = sGfxRanges.map(range, &gfxRange); bool mappedStandard = sGfxStandards.map(standard, &gfxStandard); bool mappedTransfer = sGfxTransfers.map(transfer, &gfxTransfer); if (! (mappedRange && mappedStandard && mappedTransfer)) { ALOGW("could not safely map platform color aspects (R:%u(%s) S:%u(%s) T:%u(%s) to " "graphics dataspace (R:%u S:%u T:%u)", range, asString(range), standard, asString(standard), transfer, asString(transfer), Loading Loading @@ -626,9 +627,10 @@ void ColorUtils::getColorConfigFromDataSpace( CU::ColorRange cuRange = CU::kColorRangeUnspecified; CU::ColorStandard cuStandard = CU::kColorStandardUnspecified; CU::ColorTransfer cuTransfer = CU::kColorTransferUnspecified; // TRICKY: use & to ensure all three mappings are completed if (!(sGfxRanges.map(gfxRange, &cuRange) & sGfxStandards.map(gfxStandard, &cuStandard) & sGfxTransfers.map(gfxTransfer, &cuTransfer))) { bool mappedRange = sGfxRanges.map(gfxRange, &cuRange); bool mappedStandard = sGfxStandards.map(gfxStandard, &cuStandard); bool mappedTransfer = sGfxTransfers.map(gfxTransfer, &cuTransfer); if (! (mappedRange && mappedStandard && mappedTransfer)) { ALOGW("could not safely map graphics dataspace (R:%u S:%u T:%u) to " "platform color aspects (R:%u(%s) S:%u(%s) T:%u(%s)", gfxRange, gfxStandard, gfxTransfer, Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1689,7 +1689,7 @@ binder::Status CameraDeviceClient::switchToOffline( bool isCompositeStream = false; for (const auto& gbp : mConfiguredOutputs[streamId].getGraphicBufferProducers()) { sp<Surface> s = new Surface(gbp, false /*controlledByApp*/); isCompositeStream = camera3::DepthCompositeStream::isDepthCompositeStream(s) | isCompositeStream = camera3::DepthCompositeStream::isDepthCompositeStream(s) || camera3::HeicCompositeStream::isHeicCompositeStream(s); if (isCompositeStream) { auto compositeIdx = mCompositeStreamMap.indexOfKey(IInterface::asBinder(gbp)); Loading services/camera/libcameraservice/device3/Camera3OutputStream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ status_t Camera3OutputStream::configureConsumerQueueLocked() { mHandoutTotalBufferCount = 0; mFrameCount = 0; mLastTimestamp = 0; mUseMonoTimestamp = (isConsumedByHWComposer() | isVideoStream()); mUseMonoTimestamp = (isConsumedByHWComposer() || isVideoStream()); res = native_window_set_buffer_count(mConsumer.get(), mTotalBufferCount); Loading Loading
media/libmediahelper/AudioValidator.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ status_t AudioValidator::validateEffectDescriptor( const effect_descriptor_t& desc, std::string_view bugNumber) { status_t status = NO_ERROR; if (checkStringOverflow(desc.name) | /* always */ checkStringOverflow(desc.implementor)) { if (checkStringOverflow(desc.name) || checkStringOverflow(desc.implementor)) { status = BAD_VALUE; } return safetyNetLog(status, bugNumber); Loading
media/libstagefright/MPEG4Writer.cpp +23 −22 Original line number Diff line number Diff line Loading @@ -4446,11 +4446,15 @@ void MPEG4Writer::Track::writeColrBox() { memset(&aspects, 0, sizeof(aspects)); // Color metadata may have changed. sp<MetaData> meta = mSource->getFormat(); // TRICKY: using | instead of || because we want to execute all findInt32-s if (meta->findInt32(kKeyColorPrimaries, (int32_t*)&aspects.mPrimaries) | meta->findInt32(kKeyTransferFunction, (int32_t*)&aspects.mTransfer) | meta->findInt32(kKeyColorMatrix, (int32_t*)&aspects.mMatrixCoeffs) | meta->findInt32(kKeyColorRange, (int32_t*)&aspects.mRange)) { bool findPrimaries = meta->findInt32(kKeyColorPrimaries, (int32_t*)&aspects.mPrimaries); bool findTransfer = meta->findInt32(kKeyTransferFunction, (int32_t*)&aspects.mTransfer); bool findMatrix = meta->findInt32(kKeyColorMatrix, (int32_t*)&aspects.mMatrixCoeffs); bool findRange = meta->findInt32(kKeyColorRange, (int32_t*)&aspects.mRange); if (!findPrimaries && !findTransfer && !findMatrix && !findRange) { ALOGV("no color information"); return; } int32_t primaries, transfer, coeffs; bool fullRange; ALOGV("primaries=%s transfer=%s matrix=%s range=%s", Loading @@ -4467,9 +4471,6 @@ void MPEG4Writer::Track::writeColrBox() { mOwner->writeInt16(coeffs); mOwner->writeInt8(int8_t(fullRange ? 0x80 : 0x0)); mOwner->endBox(); // colr } else { ALOGV("no color information"); } } void MPEG4Writer::Track::writeAudioFourCCBox() { Loading
media/libstagefright/foundation/ColorUtils.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -590,9 +590,10 @@ android_dataspace ColorUtils::getDataSpaceForColorAspects(ColorAspects &aspects, uint32_t gfxRange = range; uint32_t gfxStandard = standard; uint32_t gfxTransfer = transfer; // TRICKY: use & to ensure all three mappings are completed if (!(sGfxRanges.map(range, &gfxRange) & sGfxStandards.map(standard, &gfxStandard) & sGfxTransfers.map(transfer, &gfxTransfer))) { bool mappedRange = sGfxRanges.map(range, &gfxRange); bool mappedStandard = sGfxStandards.map(standard, &gfxStandard); bool mappedTransfer = sGfxTransfers.map(transfer, &gfxTransfer); if (! (mappedRange && mappedStandard && mappedTransfer)) { ALOGW("could not safely map platform color aspects (R:%u(%s) S:%u(%s) T:%u(%s) to " "graphics dataspace (R:%u S:%u T:%u)", range, asString(range), standard, asString(standard), transfer, asString(transfer), Loading Loading @@ -626,9 +627,10 @@ void ColorUtils::getColorConfigFromDataSpace( CU::ColorRange cuRange = CU::kColorRangeUnspecified; CU::ColorStandard cuStandard = CU::kColorStandardUnspecified; CU::ColorTransfer cuTransfer = CU::kColorTransferUnspecified; // TRICKY: use & to ensure all three mappings are completed if (!(sGfxRanges.map(gfxRange, &cuRange) & sGfxStandards.map(gfxStandard, &cuStandard) & sGfxTransfers.map(gfxTransfer, &cuTransfer))) { bool mappedRange = sGfxRanges.map(gfxRange, &cuRange); bool mappedStandard = sGfxStandards.map(gfxStandard, &cuStandard); bool mappedTransfer = sGfxTransfers.map(gfxTransfer, &cuTransfer); if (! (mappedRange && mappedStandard && mappedTransfer)) { ALOGW("could not safely map graphics dataspace (R:%u S:%u T:%u) to " "platform color aspects (R:%u(%s) S:%u(%s) T:%u(%s)", gfxRange, gfxStandard, gfxTransfer, Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1689,7 +1689,7 @@ binder::Status CameraDeviceClient::switchToOffline( bool isCompositeStream = false; for (const auto& gbp : mConfiguredOutputs[streamId].getGraphicBufferProducers()) { sp<Surface> s = new Surface(gbp, false /*controlledByApp*/); isCompositeStream = camera3::DepthCompositeStream::isDepthCompositeStream(s) | isCompositeStream = camera3::DepthCompositeStream::isDepthCompositeStream(s) || camera3::HeicCompositeStream::isHeicCompositeStream(s); if (isCompositeStream) { auto compositeIdx = mCompositeStreamMap.indexOfKey(IInterface::asBinder(gbp)); Loading
services/camera/libcameraservice/device3/Camera3OutputStream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ status_t Camera3OutputStream::configureConsumerQueueLocked() { mHandoutTotalBufferCount = 0; mFrameCount = 0; mLastTimestamp = 0; mUseMonoTimestamp = (isConsumedByHWComposer() | isVideoStream()); mUseMonoTimestamp = (isConsumedByHWComposer() || isVideoStream()); res = native_window_set_buffer_count(mConsumer.get(), mTotalBufferCount); Loading