mirror of https://github.com/mpv-player/mpv
vf_vapoursynth: keep pixel aspect ratio
Make the filter apply the pixel aspect ratio of the input to the output. This is more useful than forcing 1:1 PAR when playing anamorphic video such as DVDs. VapourSynth itself actually allows passing through the aspect ratio, but it's in a not very useful form for us: it's per video-frame instead of constant (i.e in VSVideoInfo). As long as we don't have a way to allow a filter to spontaneously change output parameters, we can't use this. (And I don't really feel like making this possible.)
This commit is contained in:
parent
4e973c059a
commit
9e47bd11cc
|
@ -423,10 +423,10 @@ static int config(struct vf_instance *vf, int width, int height,
|
|||
destroy_vs(vf);
|
||||
return 0;
|
||||
}
|
||||
width = vi->width;
|
||||
height = vi->height;
|
||||
|
||||
return vf_next_config(vf, width, height, width, height, flags, fmt);
|
||||
vf_rescale_dsize(&d_width, &d_height, width, height, vi->width, vi->height);
|
||||
|
||||
return vf_next_config(vf, vi->width, vi->height, d_width, d_height, flags, fmt);
|
||||
}
|
||||
|
||||
static int query_format(struct vf_instance *vf, unsigned int fmt)
|
||||
|
|
Loading…
Reference in New Issue