- sps->vui.video_format = 5; // Unspecified.
- sps->vui.video_full_range_flag =
- avctx->color_range == AVCOL_RANGE_JPEG;
-
- if (avctx->color_primaries != AVCOL_PRI_UNSPECIFIED ||
- avctx->color_trc != AVCOL_TRC_UNSPECIFIED ||
- avctx->colorspace != AVCOL_SPC_UNSPECIFIED) {
- sps->vui.colour_description_present_flag = 1;
- sps->vui.colour_primaries = avctx->color_primaries;
- sps->vui.transfer_characteristics = avctx->color_trc;
- sps->vui.matrix_coefficients = avctx->colorspace;
- }
- } else {
- sps->vui.video_format = 5;
- sps->vui.video_full_range_flag = 0;
- sps->vui.colour_primaries = avctx->color_primaries;
- sps->vui.transfer_characteristics = avctx->color_trc;
- sps->vui.matrix_coefficients = avctx->colorspace;
- }