1
mirror of https://github.com/mpv-player/mpv synced 2024-10-02 16:25:33 +02: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:
Niklas Haas 2015-02-28 01:42:04 +01:00
parent 653b0dd529
commit e141caa97d
No known key found for this signature in database
GPG Key ID: 3BA77D4BFDB10BCE
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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,