Documentation
¶
Overview ¶
Package libswscale performs highly optimized image scaling and colorspace and pixel format conversion operations. Rescaling: is the process of changing the video size. Several rescaling options and algorithms are available. Pixel format conversion: is the process of converting the image format and colorspace of the image.
Index ¶
- func SwsConvertpalette8topacked24(s, d *uint8, px int, p *uint8)
- func SwsConvertpalette8topacked32(s, d *uint8, px int, p *uint8)
- func SwsFreecontext(ctxt *Context)
- func SwsFreefilter(f *Filter)
- func SwsGetcoefficients(c int) *int
- func SwsGetcolorspacedetails(ctxt *Context, it, sr, t, dr, b, c, s *int) int
- func SwsInitContext(ctxt *Context, sf, df *Filter) int
- func SwsIssupportedendiannessconversion(p PixelFormat) int
- func SwsIssupportedinput(p PixelFormat) int
- func SwsIssupportedoutput(p PixelFormat) int
- func SwsScale(ctxt *Context, src *uint8, str int, y, h int, d *uint8, ds int) int
- func SwsScale2(ctxt *Context, srcData [8]*uint8, srcStride [8]int32, y, h int, ...) int
- func SwsSetcolorspacedetails(ctxt *Context, it *int, sr int, t *int, dr, b, c, s int) int
- func SwscaleConfiguration() string
- func SwscaleLicense() string
- func SwscaleVersion() uint
- type Class
- type Context
- type Filter
- type PixelFormat
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwsConvertpalette8topacked24 ¶
SwsConvertpalette8topacked24 Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.
func SwsConvertpalette8topacked32 ¶
SwsConvertpalette8topacked32 Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
func SwsFreecontext ¶
func SwsFreecontext(ctxt *Context)
SwsFreecontext Free the swscaler context swsContext.
func SwsGetcoefficients ¶
SwsGetcoefficients Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails().
func SwsGetcolorspacedetails ¶
SwsGetcolorspacedetails Return -1 if not supported
func SwsInitContext ¶
SwsInitContext Initialize the swscaler context sws_context.
func SwsIssupportedendiannessconversion ¶
func SwsIssupportedendiannessconversion(p PixelFormat) int
SwsIssupportedendiannessconversion Return a positive value if an endianness conversion for pix_fmt is supported, 0 otherwise.
func SwsIssupportedinput ¶
func SwsIssupportedinput(p PixelFormat) int
SwsIssupportedinput Return a positive value if pix_fmt is a supported input format, 0 otherwise.
func SwsIssupportedoutput ¶
func SwsIssupportedoutput(p PixelFormat) int
SwsIssupportedoutput Return a positive value if pix_fmt is a supported output format, 0 otherwise.
func SwsScale ¶
SwsScale Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst.
func SwsScale2 ¶
func SwsScale2(ctxt *Context, srcData [8]*uint8, srcStride [8]int32, y, h int, dstData [8]*uint8, dstStride [8]int32) int
SwsScale2 refer SwsScale
func SwsSetcolorspacedetails ¶
SwsSetcolorspacedetails Return -1 if not supported
func SwscaleConfiguration ¶
func SwscaleConfiguration() string
SwscaleConfiguration Return the libswscale build-time configuration.
func SwscaleVersion ¶
func SwscaleVersion() uint
SwscaleVersion Return the LIBSWSCALE_VERSION_INT constant.
Types ¶
type Class ¶
type Class C.struct_AVClass
type Context ¶
type Context C.struct_SwsContext
func SwsGetcachedcontext ¶
func SwsGetcachedcontext(ctxt *Context, sw, sh int, sf PixelFormat, dw, dh int, df PixelFormat, f int, sfl, dfl *Filter, p *float64) *Context
SwsGetcachedcontext Check if context can be reused, otherwise reallocate a new one.
func SwsGetcontext ¶
func SwsGetcontext(sw, sh int, sf PixelFormat, dw, dh int, df PixelFormat, f int, sfl, dfl *Filter, p *int) *Context
SwsGetcontext Allocate and return an Context.
type Filter ¶
type Filter C.struct_SwsFilter
func SwsGetdefaultfilter ¶
SwsGetdefaultfilter Return default fileter
type PixelFormat ¶
type PixelFormat C.enum_AVPixelFormat
type Vector ¶
type Vector C.struct_SwsVector
func SwsAllocvec ¶
SwsAllocvec Allocate and return an uninitialized vector with length coefficients.
func SwsGetgaussianvec ¶
SwsGetgaussianvec Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.
func (*Vector) SwsNormalizevec ¶
SwsNormalizevec Scale all the coefficients of a so that their sum equals height.
func (*Vector) SwsScalevec ¶
SwsScalevec Scale all the coefficients of a by the scalar value.