summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-21 14:56:07 +0200
committerwm4 <wm4@nowhere>2017-08-21 14:56:07 +0200
commit028faacff56d7f90f6b119b0b0ac686fd614825f (patch)
tree33d77aa61946f3bebfdb28fa8670065fdb79aed8 /video/decode
parent82d9419f62c90cecc13c492e3b68feebe0229daa (diff)
downloadmpv-028faacff56d7f90f6b119b0b0ac686fd614825f.tar.bz2
mpv-028faacff56d7f90f6b119b0b0ac686fd614825f.tar.xz
video: add metadata handling for spherical video
This adds handling of spherical video metadata: retrieving it from demux_lavf and demux_mkv, passing it through filters, and adjusting it with vf_format. This does not include support for rendering this type of video. We don't expect we need/want to support the other projection types like cube maps, so we don't include that for now. They can be added later as needed. Also raise the maximum sizes of stringified image params, since they can get really long.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/dec_video.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 8211d1f3b2..04e428246b 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -244,6 +244,10 @@ static void fix_image_params(struct dec_video *d_video,
p.color.sig_peak = 0.0;
}
+ p.spherical = c->spherical;
+ if (p.spherical.type == MP_SPHERICAL_AUTO)
+ p.spherical.type = MP_SPHERICAL_NONE;
+
// Guess missing colorspace fields from metadata. This guarantees all
// fields are at least set to legal values afterwards.
mp_image_params_guess_csp(&p);