|
RawSpeed
fast raw decoding library
|
Classes | |
| struct | options |
| class | RstestHashMismatch |
| struct | Timer |
Typedefs | |
| using | file_ptr = std::unique_ptr<FILE, decltype(fclose)> |
Functions | |
| md5::MD5Hasher::state_type | imgDataHash (const RawImage &raw) |
| void | __attribute__ ((format(printf, 2, 3))) APPEND(ostringstream *oss |
| va_start (args, format) | |
| vsnprintf (line.data(), sizeof(line), format, args) | |
| va_end (args) | |
| *oss<< line.data();}std::string img_hash(const RawImage &r, bool noSamples) { ostringstream oss;if(noSamples) APPEND(&oss, "camera support status is unknown due to lack of samples\n");APPEND(&oss, "make: %s\n", r->metadata.make.c_str());APPEND(&oss, "model: %s\n", r->metadata.model.c_str());APPEND(&oss, "mode: %s\n", r->metadata.mode.c_str());APPEND(&oss, "canonical_make: %s\n", r->metadata.canonical_make.c_str());APPEND(&oss, "canonical_model: %s\n", r->metadata.canonical_model.c_str());APPEND(&oss, "canonical_alias: %s\n", r->metadata.canonical_alias.c_str());APPEND(&oss, "canonical_id: %s\n", r->metadata.canonical_id.c_str());APPEND(&oss, "isoSpeed: %d\n", r->metadata.isoSpeed);APPEND(&oss, "blackLevel: %d\n", r->blackLevel);APPEND(&oss, "whitePoint: ");if(!r->whitePoint) APPEND(&oss, "unknown");else APPEND(&oss, "%d", *r->whitePoint);APPEND(&oss, "\n");APPEND(&oss, "blackLevelSeparate: ");if(!r->blackLevelSeparate) { APPEND(&oss, "none");} else { APPEND(&oss, "(%i x %i)", r->blackLevelSeparate->width(), r->blackLevelSeparate->height());if(auto blackLevelSeparate1D=r->blackLevelSeparate->getAsArray1DRef();blackLevelSeparate1D &&blackLevelSeparate1D->size() !=0) { for(auto l :*blackLevelSeparate1D) APPEND(&oss, " %d", l);} } APPEND(&oss, "\n");APPEND(&oss, "wbCoeffs:");if(!r->metadata.wbCoeffs) APPEND(&oss, " (none)");else { for(const auto &e :*r->metadata.wbCoeffs) APPEND(&oss, " %f", implicit_cast< double >(e));} APPEND(&oss, "\n");APPEND(&oss, "colorMatrix:");if(r->metadata.colorMatrix.empty()) APPEND(&oss, " (none)");else { for(const NotARational< int > &e :r->metadata.colorMatrix) APPEND(&oss, " %i/%i", e.num, e.den);} APPEND(&oss, "\n");APPEND(&oss, "isCFA: %d\n", r->isCFA);APPEND(&oss, "cfa: %s\n", r->cfa.asString().c_str());APPEND(&oss, "filters: 0x%x\n", r->cfa.getDcrawFilter());APPEND(&oss, "bpp: %u\n", r->getBpp());APPEND(&oss, "cpp: %u\n", r->getCpp());APPEND(&oss, "dataType: %u\n", static_cast< unsigned >(r->getDataType()));const iPoint2D dimUncropped=r-> | getUncroppedDim () |
| for (auto ba :r->blackAreas) APPEND(&oss | |
| for (uint32_t p :r->mBadPixelPositions) APPEND(&oss | |
| APPEND & | oss (hash_of_line_hashes).c_str() |
| for (const auto errors=r->getErrors();const std::string &e :errors) APPEND(&oss | |
| WARNING e | c_str ()) |
| return oss | str () |
| void | writePPM (const RawImage &raw, const std::string &fn) |
| void | writePFM (const RawImage &raw, const std::string &fn) |
| void | writeImage (const RawImage &raw, const std::string &fn) |
| int64_t | process (const std::string &filename, const CameraMetaData *metadata, const options &o) |
| int | results (const map< std::string, std::string, std::less<> > &failedTests, const options &o) |
| int | usage (const char *progname) |
Variables | |
| void const char * | format |
| void const char va_list | args |
| APPEND & | oss |
| const iPoint2D | cropTL = r->getCropOffset() |
| d | __pad0__ |
| d ba | isVertical |
| d ba ba | offset |
| d ba ba ba | size |
| u | |
| p | |
| rawspeed::md5::MD5Hasher::state_type | hash_of_line_hashes = imgDataHash(r) |
| WARNING | __pad1__ |
| auto | fclose = [](std::FILE* fp) { std::fclose(fp); } |
| using rawspeed::rstest::anonymous_namespace{rstest.cpp}::file_ptr = std::unique_ptr<FILE, decltype(fclose)> |
Definition at line 267 of file rstest.cpp.
| void rawspeed::rstest::anonymous_namespace{rstest.cpp}::__attribute__ | ( | (format(printf, 2, 3)) | ) |
| WARNING e rawspeed::rstest::anonymous_namespace{rstest.cpp}::c_str | ( | ) |
| rawspeed::rstest::anonymous_namespace{rstest.cpp}::for | ( | auto ba :r-> | blackAreas | ) | & |
| rawspeed::rstest::anonymous_namespace{rstest.cpp}::for | ( | const auto | errors = r->getErrors(); const std::string& e : errors | ) | & |
References p.
| *oss<< line.data();}std::string img_hash(const RawImage &r, bool noSamples) { ostringstream oss;if(noSamples) APPEND(&oss, "camera support status is unknown due to lack of samples\n");APPEND(&oss, "make: %s\n", r->metadata.make.c_str());APPEND(&oss, "model: %s\n", r->metadata.model.c_str());APPEND(&oss, "mode: %s\n", r->metadata.mode.c_str());APPEND(&oss, "canonical_make: %s\n", r->metadata.canonical_make.c_str());APPEND(&oss, "canonical_model: %s\n", r->metadata.canonical_model.c_str());APPEND(&oss, "canonical_alias: %s\n", r->metadata.canonical_alias.c_str());APPEND(&oss, "canonical_id: %s\n", r->metadata.canonical_id.c_str());APPEND(&oss, "isoSpeed: %d\n", r->metadata.isoSpeed);APPEND(&oss, "blackLevel: %d\n", r->blackLevel);APPEND(&oss, "whitePoint: ");if(!r->whitePoint) APPEND(&oss, "unknown");else APPEND(&oss, "%d", *r->whitePoint);APPEND(&oss, "\n");APPEND(&oss, "blackLevelSeparate: ");if(!r->blackLevelSeparate) { APPEND(&oss, "none");} else { APPEND(&oss, "(%i x %i)", r->blackLevelSeparate->width(), r->blackLevelSeparate->height());if(auto blackLevelSeparate1D=r->blackLevelSeparate->getAsArray1DRef();blackLevelSeparate1D &&blackLevelSeparate1D->size() !=0) { for(auto l :*blackLevelSeparate1D) APPEND(&oss, " %d", l);} } APPEND(&oss, "\n");APPEND(&oss, "wbCoeffs:");if(!r->metadata.wbCoeffs) APPEND(&oss, " (none)");else { for(const auto &e :*r->metadata.wbCoeffs) APPEND(&oss, " %f", implicit_cast< double >(e));} APPEND(&oss, "\n");APPEND(&oss, "colorMatrix:");if(r->metadata.colorMatrix.empty()) APPEND(&oss, " (none)");else { for(const NotARational< int > &e :r->metadata.colorMatrix) APPEND(&oss, " %i/%i", e.num, e.den);} APPEND(&oss, "\n");APPEND(&oss, "isCFA: %d\n", r->isCFA);APPEND(&oss, "cfa: %s\n", r->cfa.asString().c_str());APPEND(&oss, "filters: 0x%x\n", r->cfa.getDcrawFilter());APPEND(&oss, "bpp: %u\n", r->getBpp());APPEND(&oss, "cpp: %u\n", r->getCpp());APPEND(&oss, "dataType: %u\n", static_cast< unsigned >(r->getDataType()));const iPoint2D dimUncropped=r-> rawspeed::rstest::anonymous_namespace{rstest.cpp}::getUncroppedDim | ( | ) |
| md5::MD5Hasher::state_type rawspeed::rstest::anonymous_namespace{rstest.cpp}::imgDataHash | ( | const RawImage & | raw | ) |
Definition at line 128 of file rstest.cpp.
References rawspeed::RawImageData::getByteDataAsUncroppedArray2DRef(), rawspeed::Array2DRef< T >::height(), imgDataHash(), and rawspeed::Array2DRef< T >::width().
Referenced by imgDataHash().
| APPEND & rawspeed::rstest::anonymous_namespace{rstest.cpp}::oss | ( | hash_of_line_hashes | ) |
References c_str(), hash_of_line_hashes, rawspeed::md5::hash_to_string(), and oss.
| int64_t rawspeed::rstest::anonymous_namespace{rstest.cpp}::process | ( | const std::string & | filename, |
| const CameraMetaData * | metadata, | ||
| const options & | o ) |
Definition at line 367 of file rstest.cpp.
References rawspeed::buf, rawspeed::rstest::anonymous_namespace{rstest.cpp}::options::create, rawspeed::rstest::anonymous_namespace{rstest.cpp}::options::dump, rawspeed::rstest::anonymous_namespace{rstest.cpp}::options::force, rawspeed::MMapReader::getAsBuffer(), rawspeed::RawParser::getDecoder(), metadata, process(), and writeImage().
Referenced by process().
| int rawspeed::rstest::anonymous_namespace{rstest.cpp}::results | ( | const map< std::string, std::string, std::less<> > & | failedTests, |
| const options & | o ) |
Definition at line 467 of file rstest.cpp.
References rawspeed::rstest::anonymous_namespace{rstest.cpp}::options::create, and results().
Referenced by results().
| int rawspeed::rstest::anonymous_namespace{rstest.cpp}::usage | ( | const char * | progname | ) |
Definition at line 512 of file rstest.cpp.
References usage().
Referenced by usage().
| void rawspeed::rstest::anonymous_namespace{rstest.cpp}::writeImage | ( | const RawImage & | raw, |
| const std::string & | fn ) |
Definition at line 355 of file rstest.cpp.
References rawspeed::F32, rawspeed::RawImageData::getDataType(), rawspeed::UINT16, writeImage(), writePFM(), and writePPM().
Referenced by process(), and writeImage().
| void rawspeed::rstest::anonymous_namespace{rstest.cpp}::writePFM | ( | const RawImage & | raw, |
| const std::string & | fn ) |
Definition at line 297 of file rstest.cpp.
References assert(), c_str(), fclose, format, rawspeed::RawImageData::getCpp(), rawspeed::RawImageData::getF32DataAsUncroppedArray2DRef(), rawspeed::getU32LE(), rawspeed::RawImageData::getUncroppedDim(), rawspeed::implicit_cast(), rawspeed::isAligned(), rawspeed::roundUp(), ThrowFIE, writePFM(), rawspeed::iPoint2D::x, x, rawspeed::iPoint2D::y, and y.
Referenced by writeImage(), and writePFM().
| void rawspeed::rstest::anonymous_namespace{rstest.cpp}::writePPM | ( | const RawImage & | raw, |
| const std::string & | fn ) |
Definition at line 269 of file rstest.cpp.
References c_str(), fclose, format, rawspeed::RawImageData::getCpp(), rawspeed::getU16BE(), rawspeed::RawImageData::getU16DataAsUncroppedArray2DRef(), rawspeed::RawImageData::getUncroppedDim(), ThrowFIE, writePPM(), rawspeed::iPoint2D::x, x, rawspeed::iPoint2D::y, and y.
Referenced by writeImage(), and writePPM().
| d rawspeed::rstest::anonymous_namespace{rstest.cpp}::__pad0__ |
Definition at line 241 of file rstest.cpp.
| WARNING rawspeed::rstest::anonymous_namespace{rstest.cpp}::__pad1__ |
Definition at line 261 of file rstest.cpp.
| void const char va_list rawspeed::rstest::anonymous_namespace{rstest.cpp}::args |
Definition at line 156 of file rstest.cpp.
Referenced by va_end(), va_start(), and vsnprintf().
| const iPoint2D rawspeed::rstest::anonymous_namespace{rstest.cpp}::cropTL = r->getCropOffset() |
Definition at line 230 of file rstest.cpp.
| auto rawspeed::rstest::anonymous_namespace{rstest.cpp}::fclose = [](std::FILE* fp) { std::fclose(fp); } |
Definition at line 266 of file rstest.cpp.
Referenced by writePFM(), and writePPM().
| void const char* rawspeed::rstest::anonymous_namespace{rstest.cpp}::format |
Definition at line 153 of file rstest.cpp.
Referenced by __attribute__(), va_start(), vsnprintf(), writePFM(), and writePPM().
| rawspeed::md5::MD5Hasher::state_type rawspeed::rstest::anonymous_namespace{rstest.cpp}::hash_of_line_hashes = imgDataHash(r) |
Definition at line 256 of file rstest.cpp.
Referenced by oss().
| d ba rawspeed::rstest::anonymous_namespace{rstest.cpp}::isVertical |
Definition at line 241 of file rstest.cpp.
| d ba ba rawspeed::rstest::anonymous_namespace{rstest.cpp}::offset |
Definition at line 241 of file rstest.cpp.
| APPEND & rawspeed::rstest::anonymous_namespace{rstest.cpp}::oss |
Definition at line 228 of file rstest.cpp.
Referenced by __attribute__(), oss(), str(), and va_end().
| rawspeed::rstest::anonymous_namespace{rstest.cpp}::p |
Definition at line 251 of file rstest.cpp.
Referenced by for().
| d ba ba ba rawspeed::rstest::anonymous_namespace{rstest.cpp}::size |
Definition at line 241 of file rstest.cpp.
| rawspeed::rstest::anonymous_namespace{rstest.cpp}::u |
Definition at line 251 of file rstest.cpp.