From fbacd5de31de964f7cd562304ab1c9b4a0d76015 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 28 Feb 2015 00:59:09 +0100 Subject: csputils: add missing gamma support We have MP_CSP_TRC defined, but it wasn't being used by practically anything. This commit adds missing conversion logic, adds it to mp_image, and moves the auto-guessing logic to where it should be, in mp_image_params_guess_csp (and out of vo_opengl). Note that this also fixes a minor bug: csp_prim was not being copied between mp_image structs if the format was not YUV in both cases, but this is wrong - the primaries are always relevant. --- video/mp_image.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/mp_image.h') diff --git a/video/mp_image.h b/video/mp_image.h index 5263249987..3017ef46eb 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -48,6 +48,7 @@ struct mp_image_params { enum mp_csp colorspace; enum mp_csp_levels colorlevels; enum mp_csp_prim primaries; + enum mp_csp_trc gamma; enum mp_chroma_location chroma_location; // The image should be converted to these levels. Unlike colorlevels, it // does not describe the current state of the image. (Somewhat similar to -- cgit v1.2.3