summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-02-28 00:59:09 +0100
committerNiklas Haas <git@nand.wakku.to>2015-02-28 01:07:35 +0100
commitfbacd5de31de964f7cd562304ab1c9b4a0d76015 (patch)
treecce495e7699f98ae64103b87459008b7d8503e0d /video/mp_image.h
parent076b3d13855870df9eb599b7a26e708f9b8d1ace (diff)
downloadmpv-fbacd5de31de964f7cd562304ab1c9b4a0d76015.tar.bz2
mpv-fbacd5de31de964f7cd562304ab1c9b4a0d76015.tar.xz
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.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h1
1 files changed, 1 insertions, 0 deletions
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