+typedef struct x264_image_properties_t
+{
+ /* All arrays of data here are ordered as follows:
+ * each array contains one offset per macroblock, in raster scan order. In interlaced
+ * mode, top-field MBs and bottom-field MBs are interleaved at the row level.
+ * Macroblocks are 16x16 blocks of pixels (with respect to the luma plane). For the
+ * purposes of calculating the number of macroblocks, width and height are rounded up to
+ * the nearest 16. If in interlaced mode, height is rounded up to the nearest 32 instead. */
+
+ /* In: an array of quantizer offsets to be applied to this image during encoding.
+ * These are added on top of the decisions made by x264.
+ * Offsets can be fractional; they are added before QPs are rounded to integer.
+ * Adaptive quantization must be enabled to use this feature. Behavior if quant
+ * offsets differ between encoding passes is undefined. */
+ float *quant_offsets;
+ /* In: optional callback to free quant_offsets when used.
+ * Useful if one wants to use a different quant_offset array for each frame. */
+ void (*quant_offsets_free)( void* );
+
+ /* In: optional array of flags for each macroblock.
+ * Allows specifying additional information for the encoder such as which macroblocks
+ * remain unchanged. Usable flags are listed below.
+ * x264_param_t.analyse.b_mb_info must be set to use this, since x264 needs to track
+ * extra data internally to make full use of this information.
+ *
+ * Out: if b_mb_info_update is set, x264 will update this array as a result of encoding.
+ *
+ * For "MBINFO_CONSTANT", it will remove this flag on any macroblock whose decoded
+ * pixels have changed. This can be useful for e.g. noting which areas of the
+ * frame need to actually be blitted. Note: this intentionally ignores the effects
+ * of deblocking for the current frame, which should be fine unless one needs exact
+ * pixel-perfect accuracy.
+ *
+ * Results for MBINFO_CONSTANT are currently only set for P-frames, and are not
+ * guaranteed to enumerate all blocks which haven't changed. (There may be false
+ * negatives, but no false positives.)
+ */
+ uint8_t *mb_info;
+ /* In: optional callback to free mb_info when used. */
+ void (*mb_info_free)( void* );
+
+ /* The macroblock is constant and remains unchanged from the previous frame. */
+ #define X264_MBINFO_CONSTANT (1<<0)
+ /* More flags may be added in the future. */
+
+ /* Out: SSIM of the the frame luma (if x264_param_t.b_ssim is set) */
+ double f_ssim;
+ /* Out: Average PSNR of the frame (if x264_param_t.b_psnr is set) */
+ double f_psnr_avg;
+ /* Out: PSNR of Y, U, and V (if x264_param_t.b_psnr is set) */
+ double f_psnr[3];
+
+ /* Out: Average effective CRF of the encoded frame */
+ double f_crf_avg;
+} x264_image_properties_t;
+
+typedef struct x264_picture_t