| 290 | } |
| 291 | |
| 292 | iPoint2D Cr2Decoder::getSubSampling() const { |
| 293 | TiffEntry* CCS = mRootIFD->getEntryRecursive(CANON_CAMERA_SETTINGS); |
| 294 | if (!CCS) |
| 295 | ThrowRDE("CanonCameraSettings entry not found."); |
| 296 | |
| 297 | if (CCS->type != TIFF_SHORT) |
| 298 | ThrowRDE("Unexpected CanonCameraSettings entry type encountered "); |
| 299 | |
| 300 | if (CCS->count < 47) |
| 301 | return {1, 1}; |
| 302 | |
| 303 | switch (uint16_t qual = CCS->getU16(46)) { |
| 304 | case 0: |
| 305 | return {1, 1}; |
| 306 | case 1: |
| 307 | return {2, 2}; |
| 308 | case 2: |
| 309 | return {2, 1}; |
| 310 | default: |
| 311 | ThrowRDE("Unexpected SRAWQuality value found: %u", qual); |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | int Cr2Decoder::getHue() { |
| 316 | if (hints.has("old_sraw_hue")) |
nothing calls this directly
no test coverage detected