@@ -147,7 +147,7 @@ void DngDecoder::dropUnsuportedChunks(std::vector<const TiffIFD*>* data) {
147147 }
148148}
149149
150- void DngDecoder::parseCFA (const TiffIFD* raw, RawImage::frame_ptr_t frame) {
150+ void DngDecoder::parseCFA (const TiffIFD* raw, const RawImage::frame_ptr_t & frame) {
151151
152152 // Check if layout is OK, if present
153153 if (raw->hasEntry (TiffTag::CFALAYOUT) &&
@@ -214,7 +214,7 @@ void DngDecoder::parseCFA(const TiffIFD* raw, RawImage::frame_ptr_t frame) {
214214
215215DngTilingDescription
216216DngDecoder::getTilingDescription (const TiffIFD* raw,
217- RawImage::frame_ptr_t frame) {
217+ const RawImage::frame_ptr_t & frame) {
218218 if (raw->hasEntry (TiffTag::TILEOFFSETS)) {
219219 const uint32_t tilew = raw->getEntry (TiffTag::TILEWIDTH)->getU32 ();
220220 const uint32_t tileh = raw->getEntry (TiffTag::TILELENGTH)->getU32 ();
@@ -274,7 +274,7 @@ DngDecoder::getTilingDescription(const TiffIFD* raw,
274274
275275void DngDecoder::decodeData (const TiffIFD* raw, uint32_t sample_format,
276276 int compression, int bps,
277- RawImage::frame_ptr_t frame) {
277+ const RawImage::frame_ptr_t & frame) {
278278 if (compression == 8 && sample_format != 3 ) {
279279 ThrowRDE (" Only float format is supported for "
280280 " deflate-compressed data." );
@@ -429,7 +429,7 @@ void DngDecoder::decodeRawInternal() {
429429}
430430
431431void DngDecoder::handleMetadata (const TiffIFD* raw, int compression, int bps,
432- RawImage::frame_ptr_t frame) {
432+ const RawImage::frame_ptr_t & frame) {
433433 // Crop
434434 if (raw->hasEntry (TiffTag::ACTIVEAREA)) {
435435 const TiffEntry* active_area = raw->getEntry (TiffTag::ACTIVEAREA);
@@ -675,7 +675,7 @@ void DngDecoder::checkSupportInternal(const CameraMetaData* meta) {
675675
676676/* Decodes DNG masked areas into blackareas in the image */
677677bool DngDecoder::decodeMaskedAreas (const TiffIFD* raw,
678- RawImage::frame_ptr_t frame) {
678+ const RawImage::frame_ptr_t & frame) {
679679 const TiffEntry* masked = raw->getEntry (TiffTag::MASKEDAREAS);
680680
681681 if (masked->type != TiffDataType::SHORT && masked->type != TiffDataType::LONG)
@@ -718,7 +718,7 @@ bool DngDecoder::decodeMaskedAreas(const TiffIFD* raw,
718718}
719719
720720bool DngDecoder::decodeBlackLevels (const TiffIFD* raw,
721- RawImage::frame_ptr_t frame) {
721+ const RawImage::frame_ptr_t & frame) {
722722 iPoint2D blackdim (1 , 1 );
723723 if (raw->hasEntry (TiffTag::BLACKLEVELREPEATDIM)) {
724724 const TiffEntry* bleveldim = raw->getEntry (TiffTag::BLACKLEVELREPEATDIM);
@@ -815,7 +815,7 @@ bool DngDecoder::decodeBlackLevels(const TiffIFD* raw,
815815 return true ;
816816}
817817
818- void DngDecoder::setBlack (const TiffIFD* raw, RawImage::frame_ptr_t frame) {
818+ void DngDecoder::setBlack (const TiffIFD* raw, const RawImage::frame_ptr_t & frame) {
819819
820820 if (raw->hasEntry (TiffTag::MASKEDAREAS) && decodeMaskedAreas (raw, frame))
821821 return ;
0 commit comments