swscale

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT Imports: 2 Imported by: 16

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

This section is empty.

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

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

//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

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 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 Filter

type Filter C.struct_SwsFilter

func SwsGetdefaultfilter

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

type PixelFormat

type PixelFormat C.enum_AVPixelFormat

type Vector

type Vector C.struct_SwsVector

func SwsAllocvec

func SwsAllocvec(l int) *Vector

Allocate and return an uninitialized vector with length coefficients.

func SwsGetconstvec

func SwsGetconstvec(c float64, l int) *Vector

Allocate and return a vector with length coefficients, all with the same value c.

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 SwsGetidentityvec

func SwsGetidentityvec() *Vector

Allocate and return a vector with just one coefficient, with value 1.0.

func (*Vector) SwsAddvec

func (a *Vector) SwsAddvec(b *Vector)

func (*Vector) SwsClonevec

func (a *Vector) SwsClonevec() *Vector

Allocate and return a clone of the vector a, that is a vector with the same coefficients as a.

func (*Vector) SwsConvvec

func (a *Vector) SwsConvvec(b *Vector)

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) SwsPrintvec2

func (a *Vector) SwsPrintvec2(lctx *Class, l int)

Print with av_log() a textual representation of the vector a if log_level <= av_log_level.

func (*Vector) SwsScalevec

func (a *Vector) SwsScalevec(s float64)

Scale all the coefficients of a by the scalar value.

func (*Vector) SwsShiftvec

func (a *Vector) SwsShiftvec(s int)

func (*Vector) SwsSubvec

func (a *Vector) SwsSubvec(b *Vector)

Jump to

Keyboard shortcuts

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