mirror of
https://github.com/mpv-player/mpv
synced 2025-01-29 19:22:48 +00:00
vd_lavc: respect lavc's color_trc field
We now actually use the TRC tagging information lavc provides us with, instead of always manually guessing.
This commit is contained in:
parent
653b0dd529
commit
e141caa97d
@ -203,6 +203,8 @@ enum mp_csp_levels avcol_range_to_mp_csp_levels(int avrange);
|
||||
|
||||
enum mp_csp_prim avcol_pri_to_mp_csp_prim(int avpri);
|
||||
|
||||
enum mp_csp_trc avcol_trc_to_mp_csp_trc(int avtrc);
|
||||
|
||||
int mp_csp_to_avcol_spc(enum mp_csp colorspace);
|
||||
|
||||
int mp_csp_levels_to_avcol_range(enum mp_csp_levels range);
|
||||
|
@ -477,6 +477,7 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame,
|
||||
.colorspace = avcol_spc_to_mp_csp(ctx->avctx->colorspace),
|
||||
.colorlevels = avcol_range_to_mp_csp_levels(ctx->avctx->color_range),
|
||||
.primaries = avcol_pri_to_mp_csp_prim(ctx->avctx->color_primaries),
|
||||
.gamma = avcol_trc_to_mp_csp_trc(ctx->avctx->color_trc),
|
||||
.chroma_location =
|
||||
avchroma_location_to_mp(ctx->avctx->chroma_sample_location),
|
||||
.rotate = vd->header->video->rotate,
|
||||
|
Loading…
Reference in New Issue
Block a user