Same as 'avifEncoderWriteColorProperties' but for properties related to High Dynamic Range only.
| 700 | |
| 701 | // Same as 'avifEncoderWriteColorProperties' but for properties related to High Dynamic Range only. |
| 702 | static avifResult avifEncoderWriteHDRProperties(avifRWStream * dedupStream, |
| 703 | avifRWStream * outputStream, |
| 704 | const avifImage * imageMetadata, |
| 705 | avifItemPropertyAssociationArray * associations, |
| 706 | avifItemPropertyDedup * dedup) |
| 707 | { |
| 708 | // Write Content Light Level Information, if present |
| 709 | if (imageMetadata->clli.maxCLL || imageMetadata->clli.maxPALL) { |
| 710 | if (dedup) { |
| 711 | avifItemPropertyDedupStart(dedup); |
| 712 | } |
| 713 | avifBoxMarker clli; |
| 714 | AVIF_CHECKRES(avifRWStreamWriteBox(dedupStream, "clli", AVIF_BOX_SIZE_TBD, &clli)); |
| 715 | AVIF_CHECKRES(avifEncoderWriteContentLightLevelInformation(dedupStream, &imageMetadata->clli)); |
| 716 | AVIF_CHECKRES(avifRWStreamFinishBox(dedupStream, clli)); |
| 717 | if (dedup) { |
| 718 | AVIF_CHECKRES(avifItemPropertyDedupFinish(dedup, outputStream, associations, /*essential=*/AVIF_FALSE)); |
| 719 | } |
| 720 | } |
| 721 | |
| 722 | // TODO(maryla): add other HDR boxes: mdcv, cclv, etc. (in avifEncoderWriteMiniHDRProperties() too) |
| 723 | |
| 724 | return AVIF_RESULT_OK; |
| 725 | } |
| 726 | |
| 727 | #if defined(AVIF_ENABLE_EXPERIMENTAL_MINI) |
| 728 | static avifResult avifEncoderWriteMiniHDRProperties(avifRWStream * outputStream, const avifImage * imageMetadata) |
no test coverage detected