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 ¶
- func SwsConvertpalette8topacked24(src, dst *uint8, numPixels int, palette *uint8)
- func SwsConvertpalette8topacked32(src, dst *uint8, numPixels int, palette *uint8)
- func SwsFreecontext(ctx *SwsContext)
- func SwsFreefilter(filter *SwsFilter)
- func SwsGetcoefficients(colorspace int) *int
- func SwsGetcolorspacedetails(ctx *SwsContext, ...) int
- func SwsInitContext(ctx *SwsContext, srcFilter, dstFilter *SwsFilter) int
- func SwsIssupportedendiannessconversion(pixFmt AvPixelFormat) int
- func SwsIssupportedinput(pixFmt AvPixelFormat) int
- func SwsIssupportedoutput(pixFmt AvPixelFormat) int
- func SwsScale(ctx *SwsContext, srcSlice *uint8, srcStride int, srcSliceY, srcSliceH int, ...) int
- func SwsScale2(ctx *SwsContext, srcSlice **uint8, srcStride *int32, srcSliceY, srcSliceH int, ...) int
- func SwsSetcolorspacedetails(ctx *SwsContext, invTable *int, srcRange int, table *int, ...) int
- func SwscaleConfiguration() string
- func SwscaleLicense() string
- func SwscaleVersion() uint
- type AvClass
- type AvPixelFormat
- type SwsContext
- type SwsFilter
- type SwsVector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwsConvertpalette8topacked24 ¶
SwsConvertpalette8topacked24 Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.
func SwsConvertpalette8topacked32 ¶
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 SwsGetcoefficients ¶
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 SwscaleVersion ¶
func SwscaleVersion() uint
SwscaleVersion Return the LIBSWSCALE_VERSION_INT constant.
Types ¶
type AvClass ¶ added in v1.1.2
type AvClass C.struct_AVClass
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 ¶
SwsAllocvec Allocate and return an uninitialized vector with length coefficients.
func SwsGetgaussianvec ¶
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
SwsNormalizevec Scale all the coefficients of a so that their sum equals height.
func (*SwsVector) SwsScalevec ¶ added in v1.1.2
SwsScalevec Scale all the coefficients of a by the scalar value.