Commit 37f59669fb for aom
commit 37f59669fb1711e6534381685e9b1d1ff1486d52
Author: James Zern <jzern@google.com>
Date: Mon May 18 19:25:32 2026 -0700
aom_image_t: document decoder-only members
`cp`, `tc`, `mc`, `csp`, `range` and `monochrome` are only set by the
decoder. The encoder does not use the members meaningfully. Instead, the
first five are set by codec controls; `monochrome` is an encoder
configuration option.
Change-Id: I8bec8464bb65e1a3a60ed64cb47201f671b2c05a
diff --git a/aom/aom_image.h b/aom/aom_image.h
index 67af54a791..879e3c518d 100644
--- a/aom/aom_image.h
+++ b/aom/aom_image.h
@@ -209,13 +209,55 @@ typedef struct aom_metadata {
/**\brief Image Descriptor */
typedef struct aom_image {
- aom_img_fmt_t fmt; /**< Image Format */
- aom_color_primaries_t cp; /**< CICP Color Primaries */
- aom_transfer_characteristics_t tc; /**< CICP Transfer Characteristics */
- aom_matrix_coefficients_t mc; /**< CICP Matrix Coefficients */
- int monochrome; /**< Whether image is monochrome */
- aom_chroma_sample_position_t csp; /**< chroma sample position */
- aom_color_range_t range; /**< Color Range */
+ aom_img_fmt_t fmt; /**< Image Format */
+ /*!\brief CICP Color Primaries
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the value used by the
+ * encoder, use the \ref AV1E_SET_COLOR_PRIMARIES codec control.
+ * \endif
+ */
+ aom_color_primaries_t cp;
+ /*!\brief CICP Transfer Characteristics
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the value used by the
+ * encoder, use the \ref AV1E_SET_TRANSFER_CHARACTERISTICS codec control.
+ * \endif
+ */
+ aom_transfer_characteristics_t tc;
+ /*!\brief CICP Matrix Coefficients
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the value used by the
+ * encoder, use the \ref AV1E_SET_MATRIX_COEFFICIENTS codec control.
+ * \endif
+ */
+ aom_matrix_coefficients_t mc;
+ /*!\brief Whether image is monochrome
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the encoder behavior, set
+ * aom_codec_enc_cfg_t::monochrome.
+ * \endif
+ */
+ int monochrome;
+ /*!\brief Chroma sample position
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the value used by the
+ * encoder, use the \ref AV1E_SET_CHROMA_SAMPLE_POSITION codec control.
+ * \endif
+ */
+ aom_chroma_sample_position_t csp;
+ /*!\brief Color Range
+ *
+ * \if av1_encoder
+ * \attention Only set by the decoder. To control the value used by the
+ * encoder, use the \ref AV1E_SET_COLOR_RANGE codec control.
+ * \endif
+ */
+ aom_color_range_t range;
/* Image storage dimensions */
unsigned int w; /**< Stored image width */