Documentation ¶
Overview ¶
Package swscale 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 ¶
- Constants
- 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 avutil.PixelFormat) int
- func SwsIssupportedinput(p avutil.PixelFormat) int
- func SwsIssupportedoutput(p avutil.PixelFormat) int
- func SwsScale(ctxt *Context, src [8]*uint8, str [8]int32, y, h int, d [8]*uint8, ds [8]int32) 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 Vector
Constants ¶
const ( SWS_FAST_BILINEAR = 1 SWS_BILINEAR = 2 SWS_BICUBIC = 4 SWS_X = 8 SWS_POINT = 0x10 SWS_AREA = 0x20 SWS_BICUBLIN = 0x40 SWS_GAUSS = 0x80 SWS_SINC = 0x100 SWS_LANCZOS = 0x200 SWS_SPLINE = 0x400 )
Variables ¶
This section is empty.
Functions ¶
func SwsConvertpalette8topacked24 ¶
Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.
func SwsConvertpalette8topacked32 ¶
Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
func SwsFreefilter ¶
func SwsFreefilter(f *Filter)
func SwsGetcoefficients ¶
Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails().
func SwsGetcolorspacedetails ¶
func SwsInitContext ¶
Initialize the swscaler context sws_context.
func SwsIssupportedendiannessconversion ¶
func SwsIssupportedendiannessconversion(p avutil.PixelFormat) int
func SwsIssupportedinput ¶
func SwsIssupportedinput(p avutil.PixelFormat) int
Return a positive value if pix_fmt is a supported input format, 0 otherwise.
func SwsIssupportedoutput ¶
func SwsIssupportedoutput(p avutil.PixelFormat) int
Return a positive value if pix_fmt is a supported output format, 0 otherwise.
func SwsScale ¶
//Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst.
func SwsSetcolorspacedetails ¶
func SwscaleConfiguration ¶
func SwscaleConfiguration() string
Return the libswscale build-time configuration.
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 avutil.PixelFormat, dw, dh int, df avutil.PixelFormat, f int, sfl, dfl *Filter, p *float64) *Context
Check if context can be reused, otherwise reallocate a new one.
func SwsGetcontext ¶
func SwsGetcontext(sw, sh int, sf avutil.PixelFormat, dw, dh int, df avutil.PixelFormat, f int, sfl, dfl *Filter, p *int) *Context
Allocate and return an Context.
type Vector ¶
type Vector C.struct_SwsVector
func SwsAllocvec ¶
Allocate and return an uninitialized vector with length coefficients.
func SwsGetgaussianvec ¶
Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.
func (*Vector) SwsFreevec ¶
func (a *Vector) SwsFreevec()
func (*Vector) SwsNormalizevec ¶
Scale all the coefficients of a so that their sum equals height.
func (*Vector) SwsScalevec ¶
Scale all the coefficients of a by the scalar value.