@@ -152,9 +152,11 @@ APPEND(ostringstream* oss, const char* format, ...) {
152152 *oss << line.data ();
153153}
154154
155- std::string img_hash (const RawImage& r) {
155+ std::string img_hash (const RawImage& r, bool noSamples ) {
156156 ostringstream oss;
157157
158+ if (noSamples)
159+ APPEND (&oss, " camera support status is unknown due to lack of samples\n " );
158160 APPEND (&oss, " make: %s\n " , r->metadata .make .c_str ());
159161 APPEND (&oss, " model: %s\n " , r->metadata .model .c_str ());
160162 APPEND (&oss, " mode: %s\n " , r->metadata .mode .c_str ());
@@ -363,6 +365,7 @@ size_t process(const std::string& filename, const CameraMetaData* metadata,
363365
364366 decoder->failOnUnknown = false ;
365367 decoder->checkSupport (metadata);
368+ bool noSamples = decoder->noSamples ;
366369
367370 decoder->decodeRaw ();
368371 decoder->decodeMetaData (metadata);
@@ -382,12 +385,12 @@ size_t process(const std::string& filename, const CameraMetaData* metadata,
382385 if (o.create ) {
383386 // write the hash. if force is set, then we are potentially overwriting here
384387 ofstream f (hashfile);
385- f << img_hash (raw);
388+ f << img_hash (raw, noSamples );
386389 if (o.dump )
387390 writeImage (raw, filename);
388391 } else {
389392 // do generate the hash string regardless.
390- std::string h = img_hash (raw);
393+ std::string h = img_hash (raw, noSamples );
391394
392395 // normally, here we would compare the old hash with the new one
393396 // but if the force is set, and the hash does not exist, do nothing.
0 commit comments