libswscale

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 2 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwsConvertpalette8topacked24

func SwsConvertpalette8topacked24(src, dst *uint8, numPixels int, palette *uint8)

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

func SwsConvertpalette8topacked32

func SwsConvertpalette8topacked32(src, dst *uint8, numPixels int, palette *uint8)

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

func SwsFreecontext

func SwsFreecontext(ctx *SwsContext)

SwsFreecontext Free the swscaler context swsContext.

func SwsFreefilter

func SwsFreefilter(filter *SwsFilter)

SwsFreefilter free struct

func SwsGetcoefficients

func SwsGetcoefficients(colorspace int) *int

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

func SwsGetcolorspacedetails

func SwsGetcolorspacedetails(ctx *SwsContext, invTable, srcRange, table, dstRange, brightness, contrast, saturation *int) int

SwsGetcolorspacedetails Return -1 if not supported

func SwsInitContext

func SwsInitContext(ctx *SwsContext, srcFilter, dstFilter *SwsFilter) int

SwsInitContext Initialize the swscaler context sws_context.

func SwsIssupportedendiannessconversion

func SwsIssupportedendiannessconversion(pixFmt AvPixelFormat) int

SwsIssupportedendiannessconversion Return a positive value if an endianness conversion for pix_fmt is supported, 0 otherwise.

func SwsIssupportedinput

func SwsIssupportedinput(pixFmt AvPixelFormat) int

SwsIssupportedinput Return a positive value if pix_fmt is a supported input format, 0 otherwise.

func SwsIssupportedoutput

func SwsIssupportedoutput(pixFmt AvPixelFormat) int

SwsIssupportedoutput Return a positive value if pix_fmt is a supported output format, 0 otherwise.

func SwsScale

func SwsScale(ctx *SwsContext, srcSlice *uint8, srcStride int, srcSliceY, srcSliceH int, dst *uint8, dstStride int) int

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

func SwsScale2

func SwsScale2(ctx *SwsContext, srcSlice **uint8, srcStride *int32, srcSliceY, srcSliceH int, dst **uint8, dstStride *int32) int

SwsScale2 refer SwsScale

func SwsSetcolorspacedetails

func SwsSetcolorspacedetails(ctx *SwsContext, invTable *int, srcRange int, table *int, dstRange, brightness, contrast, saturation int) int

SwsSetcolorspacedetails Return -1 if not supported

func SwscaleConfiguration

func SwscaleConfiguration() string

SwscaleConfiguration Return the libswscale build-time configuration.

func SwscaleLicense

func SwscaleLicense() string

SwscaleLicense Return the libswscale license.

func SwscaleVersion

func SwscaleVersion() uint

SwscaleVersion Return the LIBSWSCALE_VERSION_INT constant.

Types

type AvClass added in v1.1.2

type AvClass C.struct_AVClass

func SwsGetClass

func SwsGetClass() *AvClass

SwsGetClass Get the Class for swsContext.

type AvPixelFormat added in v1.1.2

type AvPixelFormat C.enum_AVPixelFormat

type SwsContext added in v1.1.2

type SwsContext C.struct_SwsContext

func SwsAllocContext

func SwsAllocContext() *SwsContext

SwsAllocContext Allocate an empty Context.

func SwsGetcachedcontext

func SwsGetcachedcontext(ctx *SwsContext, srcW, srcH int, srcFormat AvPixelFormat, dstW, dstH int, dstFormat AvPixelFormat,
	flags int, srcFilter, dstFilter *SwsFilter, param *float64) *SwsContext

SwsGetcachedcontext Check if context can be reused, otherwise reallocate a new one.

func SwsGetcontext

func SwsGetcontext(srcW, srcH int, srcFormat AvPixelFormat, dstW, dstH int, dstFormat AvPixelFormat,
	flags int, srcFilter, dstFilter *SwsFilter, param *int) *SwsContext

SwsGetcontext Allocate and return an Context.

type SwsFilter added in v1.1.2

type SwsFilter C.struct_SwsFilter

func SwsGetdefaultfilter

func SwsGetdefaultfilter(lumaGBlur, chromaGBlur, lumaSharpen, chromaSharpen, chromaHShift, chromaVShift float32, verbose int) *SwsFilter

SwsGetdefaultfilter Return default fileter

type SwsVector added in v1.1.2

type SwsVector C.struct_SwsVector

func SwsAllocvec

func SwsAllocvec(length int) *SwsVector

SwsAllocvec Allocate and return an uninitialized vector with length coefficients.

func SwsGetgaussianvec

func SwsGetgaussianvec(variance, quality float64) *SwsVector

SwsGetgaussianvec Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.

func (*SwsVector) SwsFreevec added in v1.1.2

func (vec *SwsVector) SwsFreevec()

SwsFreevec Free struct

func (*SwsVector) SwsNormalizevec added in v1.1.2

func (vec *SwsVector) SwsNormalizevec(height float64)

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

func (*SwsVector) SwsScalevec added in v1.1.2

func (vec *SwsVector) SwsScalevec(scalar float64)

SwsScalevec 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