Skip to content

Commit

Permalink
zimg: set correct primaries for XYZ
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 authored and Traneptora committed Mar 2, 2023
1 parent 2101e77 commit 7ceadbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion video/zimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@ static bool setup_format(zimg_image_format *zfmt, struct mp_zimg_repack *r,

zfmt->matrix_coefficients = mp_to_z_matrix(fmt.color.space);
zfmt->transfer_characteristics = mp_to_z_trc(fmt.color.gamma);
zfmt->color_primaries = mp_to_z_prim(fmt.color.primaries);
// For MP_CSP_XYZ only valid primaries are defined in ST 428-1
zfmt->color_primaries = fmt.color.space == MP_CSP_XYZ
? ZIMG_PRIMARIES_ST428
: mp_to_z_prim(fmt.color.primaries);
zfmt->chroma_location = mp_to_z_chroma(fmt.chroma_location);

if (ctx && ctx->opts.fast) {
Expand Down

0 comments on commit 7ceadbb

Please sign in to comment.