Skip to content

Commit

Permalink
Cleanup C to C++ conversion conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny-bit authored May 24, 2021
1 parent 40d1ede commit bb2ad0e
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 116 deletions.
7 changes: 4 additions & 3 deletions src/librawspeed/decoders/Cr3Decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,11 @@ void Cr3Decoder::decodeMetaDataInternal(const CameraMetaData* meta) {
const auto camId = canonBox->CMT1()->mRootIFD0->getID();

uint32_t iso = 0;
if (canonBox->CMT2()->mRootIFD0->hasEntryRecursive(ISOSPEEDRATINGS))
if (canonBox->CMT2()->mRootIFD0->hasEntryRecursive(ISOSPEEDRATINGS)) {
iso = canonBox->CMT2()
->mRootIFD0->getEntryRecursive(ISOSPEEDRATINGS)
->getU32();
}
if(65535 == iso) {
// ISOSPEEDRATINGS is a SHORT EXIF value. For larger values, we have to look
// at RECOMMENDED_EXPOSURE_INDEX (maybe Canon specific).
Expand All @@ -632,14 +633,14 @@ void Cr3Decoder::decodeMetaDataInternal(const CameraMetaData* meta) {

// CTMD
auto& CTMD_stsd = track3Mdia->minf->stbl->stsd;
assert(CTMD_stsd->dscs.size() > 0);
assert(!CTMD_stsd->dscs.empty());

// Get Sample and rebuild a CTMD
IsoMCanonTimedMetadataBox ctmd =
IsoMCanonTimedMetadataBox(CTMD_stsd->dscs[0]);

// CTMD MDAT
assert(track3Mdia->minf->stbl->chunks.size() > 0);
assert(!track3Mdia->minf->stbl->chunks.empty());
auto ctmd_chunk = track3Mdia->minf->stbl->chunks[0];

Buffer ctmd_chunk_buf = ctmd_chunk->getSubView(0);
Expand Down
Loading

0 comments on commit bb2ad0e

Please sign in to comment.