Loading services/camera/libcameraservice/api2/JpegRCompositeStream.cpp +11 −11 Original line number Original line Diff line number Diff line Loading @@ -285,13 +285,13 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i } } size_t actualJpegRSize = 0; size_t actualJpegRSize = 0; recoverymap::jpegr_uncompressed_struct p010; jpegrecoverymap::jpegr_uncompressed_struct p010; recoverymap::jpegr_compressed_struct jpegR; jpegrecoverymap::jpegr_compressed_struct jpegR; recoverymap::JpegR jpegREncoder; jpegrecoverymap::JpegR jpegREncoder; p010.height = inputFrame.p010Buffer.height; p010.height = inputFrame.p010Buffer.height; p010.width = inputFrame.p010Buffer.width; p010.width = inputFrame.p010Buffer.width; p010.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT2100; p010.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT2100; size_t yChannelSizeInByte = p010.width * p010.height * 2; size_t yChannelSizeInByte = p010.width * p010.height * 2; size_t uvChannelSizeInByte = p010.width * p010.height; size_t uvChannelSizeInByte = p010.width * p010.height; p010.data = new uint8_t[yChannelSizeInByte + uvChannelSizeInByte]; p010.data = new uint8_t[yChannelSizeInByte + uvChannelSizeInByte]; Loading @@ -304,18 +304,18 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i jpegR.data = dstBuffer; jpegR.data = dstBuffer; jpegR.maxLength = maxJpegRBufferSize; jpegR.maxLength = maxJpegRBufferSize; recoverymap::jpegr_transfer_function transferFunction; jpegrecoverymap::jpegr_transfer_function transferFunction; switch (mP010DynamicRange) { switch (mP010DynamicRange) { case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS: transferFunction = recoverymap::jpegr_transfer_function::JPEGR_TF_PQ; transferFunction = jpegrecoverymap::jpegr_transfer_function::JPEGR_TF_PQ; break; break; default: default: transferFunction = recoverymap::jpegr_transfer_function::JPEGR_TF_HLG; transferFunction = jpegrecoverymap::jpegr_transfer_function::JPEGR_TF_HLG; } } if (mSupportInternalJpeg) { if (mSupportInternalJpeg) { recoverymap::jpegr_compressed_struct jpeg; jpegrecoverymap::jpegr_compressed_struct jpeg; jpeg.data = inputFrame.jpegBuffer.data; jpeg.data = inputFrame.jpegBuffer.data; jpeg.length = android::camera2::JpegProcessor::findJpegSize(inputFrame.jpegBuffer.data, jpeg.length = android::camera2::JpegProcessor::findJpegSize(inputFrame.jpegBuffer.data, Loading @@ -327,9 +327,9 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i } } if (mOutputColorSpace == ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3) { if (mOutputColorSpace == ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3) { jpeg.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_P3; jpeg.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_P3; } else { } else { jpeg.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT709; jpeg.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT709; } } res = jpegREncoder.encodeJPEGR(&p010, &jpeg, transferFunction, &jpegR); res = jpegREncoder.encodeJPEGR(&p010, &jpeg, transferFunction, &jpegR); Loading @@ -347,7 +347,7 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i ALOGE("%s: Unable to generate App1 buffer", __FUNCTION__); ALOGE("%s: Unable to generate App1 buffer", __FUNCTION__); } } recoverymap::jpegr_exif_struct exif; jpegrecoverymap::jpegr_exif_struct exif; exif.data = reinterpret_cast<void*>(const_cast<uint8_t*>(exifBuffer)); exif.data = reinterpret_cast<void*>(const_cast<uint8_t*>(exifBuffer)); exif.length = exifBufferSize; exif.length = exifBufferSize; Loading Loading
services/camera/libcameraservice/api2/JpegRCompositeStream.cpp +11 −11 Original line number Original line Diff line number Diff line Loading @@ -285,13 +285,13 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i } } size_t actualJpegRSize = 0; size_t actualJpegRSize = 0; recoverymap::jpegr_uncompressed_struct p010; jpegrecoverymap::jpegr_uncompressed_struct p010; recoverymap::jpegr_compressed_struct jpegR; jpegrecoverymap::jpegr_compressed_struct jpegR; recoverymap::JpegR jpegREncoder; jpegrecoverymap::JpegR jpegREncoder; p010.height = inputFrame.p010Buffer.height; p010.height = inputFrame.p010Buffer.height; p010.width = inputFrame.p010Buffer.width; p010.width = inputFrame.p010Buffer.width; p010.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT2100; p010.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT2100; size_t yChannelSizeInByte = p010.width * p010.height * 2; size_t yChannelSizeInByte = p010.width * p010.height * 2; size_t uvChannelSizeInByte = p010.width * p010.height; size_t uvChannelSizeInByte = p010.width * p010.height; p010.data = new uint8_t[yChannelSizeInByte + uvChannelSizeInByte]; p010.data = new uint8_t[yChannelSizeInByte + uvChannelSizeInByte]; Loading @@ -304,18 +304,18 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i jpegR.data = dstBuffer; jpegR.data = dstBuffer; jpegR.maxLength = maxJpegRBufferSize; jpegR.maxLength = maxJpegRBufferSize; recoverymap::jpegr_transfer_function transferFunction; jpegrecoverymap::jpegr_transfer_function transferFunction; switch (mP010DynamicRange) { switch (mP010DynamicRange) { case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS: case ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS: transferFunction = recoverymap::jpegr_transfer_function::JPEGR_TF_PQ; transferFunction = jpegrecoverymap::jpegr_transfer_function::JPEGR_TF_PQ; break; break; default: default: transferFunction = recoverymap::jpegr_transfer_function::JPEGR_TF_HLG; transferFunction = jpegrecoverymap::jpegr_transfer_function::JPEGR_TF_HLG; } } if (mSupportInternalJpeg) { if (mSupportInternalJpeg) { recoverymap::jpegr_compressed_struct jpeg; jpegrecoverymap::jpegr_compressed_struct jpeg; jpeg.data = inputFrame.jpegBuffer.data; jpeg.data = inputFrame.jpegBuffer.data; jpeg.length = android::camera2::JpegProcessor::findJpegSize(inputFrame.jpegBuffer.data, jpeg.length = android::camera2::JpegProcessor::findJpegSize(inputFrame.jpegBuffer.data, Loading @@ -327,9 +327,9 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i } } if (mOutputColorSpace == ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3) { if (mOutputColorSpace == ANDROID_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3) { jpeg.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_P3; jpeg.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_P3; } else { } else { jpeg.colorGamut = recoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT709; jpeg.colorGamut = jpegrecoverymap::jpegr_color_gamut::JPEGR_COLORGAMUT_BT709; } } res = jpegREncoder.encodeJPEGR(&p010, &jpeg, transferFunction, &jpegR); res = jpegREncoder.encodeJPEGR(&p010, &jpeg, transferFunction, &jpegR); Loading @@ -347,7 +347,7 @@ status_t JpegRCompositeStream::processInputFrame(nsecs_t ts, const InputFrame &i ALOGE("%s: Unable to generate App1 buffer", __FUNCTION__); ALOGE("%s: Unable to generate App1 buffer", __FUNCTION__); } } recoverymap::jpegr_exif_struct exif; jpegrecoverymap::jpegr_exif_struct exif; exif.data = reinterpret_cast<void*>(const_cast<uint8_t*>(exifBuffer)); exif.data = reinterpret_cast<void*>(const_cast<uint8_t*>(exifBuffer)); exif.length = exifBufferSize; exif.length = exifBufferSize; Loading