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 ¶
- 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
- func (a *Vector) SwsAddvec(b *Vector)
- func (a *Vector) SwsClonevec() *Vector
- func (a *Vector) SwsConvvec(b *Vector)
- func (a *Vector) SwsFreevec()
- func (a *Vector) SwsNormalizevec(h float64)
- func (a *Vector) SwsPrintvec2(lctx *Class, l int)
- func (a *Vector) SwsScalevec(s float64)
- func (a *Vector) SwsShiftvec(s int)
- func (a *Vector) SwsSubvec(b *Vector)
Constants ¶
This section is empty.
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 PixelFormat) int
func SwsIssupportedinput ¶
func SwsIssupportedinput(p PixelFormat) int
Return a positive value if pix_fmt is a supported input format, 0 otherwise.
func SwsIssupportedoutput ¶
func SwsIssupportedoutput(p 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 PixelFormat, dw, dh int, df 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 PixelFormat, dw, dh int, df PixelFormat, f int, sfl, dfl *Filter, p *int) *Context
Allocate and return an Context.
type PixelFormat ¶
type PixelFormat C.enum_AVPixelFormat
type Vector ¶
type Vector C.struct_SwsVector
func SwsAllocvec ¶
Allocate and return an uninitialized vector with length coefficients.
func SwsGetconstvec ¶
Allocate and return a vector with length coefficients, all with the same value c.
func SwsGetgaussianvec ¶
Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.
func SwsGetidentityvec ¶
func SwsGetidentityvec() *Vector
Allocate and return a vector with just one coefficient, with value 1.0.
func (*Vector) SwsClonevec ¶
Allocate and return a clone of the vector a, that is a vector with the same coefficients as a.
func (*Vector) SwsConvvec ¶
func (*Vector) SwsFreevec ¶
func (a *Vector) SwsFreevec()
func (*Vector) SwsNormalizevec ¶
Scale all the coefficients of a so that their sum equals height.
func (*Vector) SwsPrintvec2 ¶
Print with av_log() a textual representation of the vector a if log_level <= av_log_level.
func (*Vector) SwsScalevec ¶
Scale all the coefficients of a by the scalar value.