summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorBin Jin <bjin1990@gmail.com>2014-08-22 02:29:39 +0200
committerwm4 <wm4@nowhere>2014-08-22 14:22:06 +0200
commit1e12afa80a49188594892b3a24a08dee217f767c (patch)
tree112fe0a6faacd427daf6771d25da45b4bb05e9a2 /video
parent96c2021cb1c4a83f16b1f7dafd4e175034a71fcb (diff)
downloadmpv-1e12afa80a49188594892b3a24a08dee217f767c.tar.bz2
mpv-1e12afa80a49188594892b3a24a08dee217f767c.tar.xz
vf_vapoursynth: add more VS frame properties
Add the missing frame properties in 48587e88.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_vapoursynth.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c
index c9666438df..b5f2a53830 100644
--- a/video/filter/vf_vapoursynth.c
+++ b/video/filter/vf_vapoursynth.c
@@ -132,6 +132,10 @@ static void copy_mp_to_vs_frame_props(struct vf_priv_s *p, VSMap *map,
// The docs explicitly say it uses libavcodec values.
p->vsapi->propSetInt(map, "_ColorSpace",
mp_csp_to_avcol_spc(params->colorspace), 0);
+ if (params->chroma_location) {
+ p->vsapi->propSetInt(map, "_ChromaLocation",
+ params->chroma_location == MP_CHROMA_CENTER, 0);
+ }
char pict_type = 0;
switch (img->pict_type) {
case 1: pict_type = 'I'; break;
@@ -140,6 +144,10 @@ static void copy_mp_to_vs_frame_props(struct vf_priv_s *p, VSMap *map,
}
if (pict_type)
p->vsapi->propSetData(map, "_PictType", &pict_type, 1, 0);
+ p->vsapi->propSetInt(map, "_FieldBased",
+ !!(img->fields & MP_IMGFIELD_INTERLACED), 0);
+ p->vsapi->propSetInt(map, "_Field",
+ !!(img->fields & MP_IMGFIELD_TOP_FIRST), 0);
}
static struct mp_image map_vs_frame(struct vf_priv_s *p, const VSFrameRef *ref,