summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-06-10 14:01:25 +0200
committerwm4 <wm4@nowhere>2017-06-18 20:48:23 +0200
commitc335e84230916d7d7a38288031516e8b2ec1c36b (patch)
tree009b92a90285b7fae212d82caec588dd6ef709d8 /video/decode
parent642e963c86040350ac8f06b9731e6126f4d55316 (diff)
downloadmpv-c335e84230916d7d7a38288031516e8b2ec1c36b.tar.bz2
mpv-c335e84230916d7d7a38288031516e8b2ec1c36b.tar.xz
video: refactor HDR implementation
List of changes: 1. Kill nom_peak, since it's a pointless non-field that stores nothing of value and is _always_ derived from ref_white anyway. 2. Kill ref_white/--target-brightness, because the only case it really existed for (PQ) actually doesn't need to be this general: According to ITU-R BT.2100, PQ *always* assumes a reference monitor with a white point of 100 cd/m². 3. Improve documentation and comments surrounding this stuff. 4. Clean up some of the code in general. Move stuff where it belongs.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 209ad8c0c5..aae6937476 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -742,7 +742,7 @@ static void update_image_params(struct dec_video *vd, AVFrame *frame,
}
#endif
- params->color.sig_peak = ctx->cached_hdr_peak;
+ params->color.sig_peak = ctx->cached_hdr_peak / MP_REF_WHITE;
params->rotate = vd->codec->rotate;
params->stereo_in = vd->codec->stereo_mode;
}