Log in

View Full Version : Convenience wrapper for fmtconv


jackoneill
18th May 2014, 00:37
Edit: Superseded by the built-in resizers since VapourSynth R29.

https://gist.github.com/dubhater/c250a0dfefbfb113e925

I wrote this wrapper for https://github.com/vapoursynth/vapoursynth/issues/9.

DLLs: http://uloz.to/xGV1YHcE/fmtcwrap-7z

Please test and report any problems, missing features, etc.


This is a wrapper for fmtconv which attempts to perform colorspace
conversion and/or resizing and/or bit depth conversion, all in one call.

fmtcwrap.Scale(clip clip[, int width, int height, int format, string kernel,
string cplace, string cplaces, string cplaced, int fulls,
int fulld, string mat="601", string mats, string matd,
float[] sx, float[] sy, float[] sw, float[] sh])


width
The output width. The default is the input clip's width.

height
The output height. The default is the input clip's height.

format
The output format as a preset format (e.g. vs.RGB24) or the value
returned by register_format(). The default is the input clip's format.

For information about the remaining parameters, consult fmtconv's
documentation.

This being an external plugin, it can't convert to or from compat formats.

To compile:
gcc -o libfmtcwrap.so -std=c99 -fPIC -shared -O2 -Wall -Wextra \
-Wno-unused-parameter $(pkg-config --cflags vapoursynth) fmtcwrap.c