Skip to content

Commit

Permalink
cosmetics: fix warnings during compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ram-mohan authored and DichenZhang1 committed May 13, 2024
1 parent be0ec88 commit 3dccd61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion lib/src/gainmapmetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ status_t gain_map_metadata::gainmapMetadataFractionToFloat(const gain_map_metada
return ERROR_JPEGR_BAD_PTR;
}

bool success = true;
CHECK_NOT_ZERO(from->baseHdrHeadroomD);
CHECK_NOT_ZERO(from->alternateHdrHeadroomD);
for (int i = 0; i < 3; ++i) {
Expand Down
14 changes: 7 additions & 7 deletions lib/src/jpegr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,13 @@ status_t JpegR::decodeJPEGR(jr_compressed_ptr jpegr_image_ptr, jr_uncompressed_p
if (metadata != nullptr || output_format != ULTRAHDR_OUTPUT_SDR) {
uint8_t* iso_ptr = static_cast<uint8_t*>(jpeg_dec_obj_gm.getIsoMetadataPtr());
if (iso_ptr != nullptr) {
int iso_size = jpeg_dec_obj_gm.getIsoMetadataSize();
size_t iso_size = jpeg_dec_obj_gm.getIsoMetadataSize();
if (iso_size < kIsoNameSpace.size() + 1) {
return ERROR_JPEGR_METADATA_ERROR;
}
gain_map_metadata decodedMetadata;
std::vector<uint8_t> iso_vec;
for (int i = kIsoNameSpace.size() + 1; i < iso_size; i++) {
for (size_t i = kIsoNameSpace.size() + 1; i < iso_size; i++) {
iso_vec.push_back(iso_ptr[i]);
}

Expand Down Expand Up @@ -894,12 +894,12 @@ status_t JpegR::generateGainMap(jr_uncompressed_ptr yuv420_image_ptr,
jr_uncompressed_ptr p010_image_ptr,
ultrahdr_transfer_function hdr_tf, ultrahdr_metadata_ptr metadata,
jr_uncompressed_ptr dest, bool sdr_is_601) {
// if (kUseMultiChannelGainMap) {
// static_assert(kWriteIso21496_1Metadata && !kWriteXmpMetadata,
// "Multi-channel gain map now is only supported for ISO 21496-1 metadata");
// }
/*if (kUseMultiChannelGainMap) {
static_assert(kWriteIso21496_1Metadata && !kWriteXmpMetadata,
"Multi-channel gain map now is only supported for ISO 21496-1 metadata");
}*/

const size_t gainMapChannelCount = kUseMultiChannelGainMap ? 3 : 1;
int gainMapChannelCount = kUseMultiChannelGainMap ? 3 : 1;

if (yuv420_image_ptr == nullptr || p010_image_ptr == nullptr || metadata == nullptr ||
dest == nullptr || yuv420_image_ptr->data == nullptr ||
Expand Down

0 comments on commit 3dccd61

Please sign in to comment.