swscale

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 3 Imported by: 1

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

View Source
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

func SwsConvertpalette8topacked24(s, d *uint8, px int, p *uint8)

Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.

func SwsConvertpalette8topacked32

func SwsConvertpalette8topacked32(s, d *uint8, px int, p *uint8)

Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.

func SwsFreecontext

func SwsFreecontext(ctxt *Context)

Free the swscaler context swsContext.

func SwsFreefilter

func SwsFreefilter(f *Filter)

func SwsGetcoefficients

func SwsGetcoefficients(c int) *int

Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails().

func SwsGetcolorspacedetails

func SwsGetcolorspacedetails(ctxt *Context, it, sr, t, dr, b, c, s *int) int

func SwsInitContext

func SwsInitContext(ctxt *Context, sf, df *Filter) int

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

func SwsScale(ctxt *Context, src [8]*uint8, str [8]int32, y, h int, d [8]*uint8, ds [8]int32) int

//Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst.

func SwsSetcolorspacedetails

func SwsSetcolorspacedetails(ctxt *Context, it *int, sr int, t *int, dr, b, c, s int) int

func SwscaleConfiguration

func SwscaleConfiguration() string

Return the libswscale build-time configuration.

func SwscaleLicense

func SwscaleLicense() string

Return the libswscale license.

func SwscaleVersion

func SwscaleVersion() uint

Return the LIBSWSCALE_VERSION_INT constant.

Types

type Class

type Class C.struct_AVClass

func SwsGetClass

func SwsGetClass() *Class

Get the Class for swsContext.

type Context

type Context C.struct_SwsContext

func SwsAllocContext

func SwsAllocContext() *Context

Allocate an empty Context.

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 Filter

type Filter C.struct_SwsFilter

func SwsGetdefaultfilter

func SwsGetdefaultfilter(lb, cb, ls, cs, chs, cvs float32, v int) *Filter

type Vector

type Vector C.struct_SwsVector

func SwsAllocvec

func SwsAllocvec(l int) *Vector

Allocate and return an uninitialized vector with length coefficients.

func SwsGetgaussianvec

func SwsGetgaussianvec(v, q float64) *Vector

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

func (a *Vector) SwsNormalizevec(h float64)

Scale all the coefficients of a so that their sum equals height.

func (*Vector) SwsScalevec

func (a *Vector) SwsScalevec(s float64)

Scale all the coefficients of a by the scalar value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL