Swscale.MakeScalers that read images of type I.t and return images of type O.t.
val create :
?threads:int ->
flag list ->
int ->
int ->
pixel_format ->
int ->
int ->
pixel_format ->
tcreate ?threads flags in_width in_height in_format out_width out_height out_format creates a scaler, with the positional arguments of Swscale.create: the flags, the input width, height and pixel format, then the output width, height and pixel format.
convert scaler image converts one whole image and returns the result as a new value.
image is checked against the input side of the scaler before anything is read. A frame has the width, height and pixel format of the scaler. Planes hold at least the buffers the pixel format needs, the palette of a paletted format included; each has a line size wide enough for the width and a length that covers the height. Buffers after the ones the format needs are ignored.
A result made of planes has one plane per plane of the output format, each with the smallest line size the format allows for the width and exactly the length the plane needs: a subsampled chroma plane is shorter. These sizes are the same on every call. A frame returned has the output width, height and pixel format, aligned buffers, and neither timestamp nor any other property.
Bigarrays and frames given as input are read in place, as they are. Strings are copied into buffers with the padding libswscale may read past the end of a plane, and the result is copied into new strings. The bigarrays returned carry that padding beyond their length.
The call releases the OCaml runtime lock and excludes every other operation on the scaler: a concurrent one raises Error (`Failure "Object in use!") at once. After a failure the scaler stays usable.