swscale

package
v0.0.0-...-3ef2c16 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Use of this source code is governed by a MIT license that can be found in the LICENSE file. by Giorgis (habtom@giorgis.io)

libswscale library 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 Sws_addVec

func Sws_addVec(a, b *C.struct_SwsVector)

void sws_addVec (SwsVector *a, SwsVector *b)

func Sws_allocVec

func Sws_allocVec(l int) *C.struct_SwsVector

SwsVector * sws_allocVec (int length) Allocate and return an uninitialized vector with length coefficients.

func Sws_cloneVec

func Sws_cloneVec(a *C.struct_SwsVector) *C.struct_SwsVector

SwsVector * sws_cloneVec (SwsVector *a) Allocate and return a clone of the vector a, that is a vector with the same coefficients as a.

func Sws_convVec

func Sws_convVec(a, b *C.struct_SwsVector)

void sws_convVec (SwsVector *a, SwsVector *b)

func Sws_convertPalette8ToPacked24

func Sws_convertPalette8ToPacked24(s, d *C.uint8_t, px int, p *C.uint8_t)

void sws_convertPalette8ToPacked24 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette) Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.

func Sws_convertPalette8ToPacked32

func Sws_convertPalette8ToPacked32(s, d *C.uint8_t, px int, p *C.uint8_t)

void sws_convertPalette8ToPacked32 (const uint8_t *src, uint8_t *dst, int num_pixels, const uint8_t *palette) Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.

func Sws_freeContext

func Sws_freeContext(ctxt *SwsContext)

void sws_freeContext (struct SwsContext *swsContext) Free the swscaler context swsContext.

func Sws_freeFilter

func Sws_freeFilter(f *C.struct_SwsFilter)

void sws_freeFilter (SwsFilter *filter)

func Sws_freeVec

func Sws_freeVec(a *C.struct_SwsVector)

void sws_freeVec (SwsVector *a)

func Sws_getCachedContext

func Sws_getCachedContext(ctxt *C.struct_SwsContext, sw, sh int, sf C.enum_AVPixelFormat, dw, dh int, df C.enum_AVPixelFormat, f int, sfl, dfl *C.struct_SwsFilter, p *C.double) *C.struct_SwsContext

struct SwsContext * sws_getCachedContext (struct SwsContext *context, int srcW, int srcH, enum AVPixelFormat srcFormat, int dstW, int dstH, enum AVPixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param) Check if context can be reused, otherwise reallocate a new one.

func Sws_getCoefficients

func Sws_getCoefficients(c int) *C.int

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

func Sws_getColorspaceDetails

func Sws_getColorspaceDetails(ctxt *C.struct_SwsContext, it, sr, t, dr, b, c, s *int) int

int sws_getColorspaceDetails (struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation)

func Sws_getConstVec

func Sws_getConstVec(c float64, l int) *C.struct_SwsVector

SwsVector * sws_getConstVec (double c, int length) Allocate and return a vector with length coefficients, all with the same value c.

func Sws_getDefaultFilter

func Sws_getDefaultFilter(lb, cb, ls, cs, chs, cvs float32, v int) *C.struct_SwsFilter

SwsFilter * sws_getDefaultFilter (float lumaGBlur, float chromaGBlur, float lumaSharpen, float chromaSharpen, float chromaHShift, float chromaVShift, int verbose)

func Sws_getGaussianVec

func Sws_getGaussianVec(v, q float64) *C.struct_SwsVector

SwsVector * sws_getGaussianVec (double variance, double quality) Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality.

func Sws_getIdentityVec

func Sws_getIdentityVec() *C.struct_SwsVector

SwsVector * sws_getIdentityVec (void) Allocate and return a vector with just one coefficient, with value 1.0.

func Sws_get_class

func Sws_get_class() *C.struct_AVClass

const AVClass * sws_get_class (void) Get the AVClass for swsContext.

func Sws_init_context

func Sws_init_context(ctxt *SwsContext, sf, df *SwsFilter) int

int sws_init_context (struct SwsContext *sws_context, SwsFilter *srcFilter, SwsFilter *dstFilter) Initialize the swscaler context sws_context.

func Sws_isSupportedEndiannessConversion

func Sws_isSupportedEndiannessConversion(p AVPixelFormat) int

int sws_isSupportedEndiannessConversion (enum AVPixelFormat pix_fmt)

func Sws_isSupportedInput

func Sws_isSupportedInput(p AVPixelFormat) int

int sws_isSupportedInput (enum AVPixelFormat pix_fmt) Return a positive value if pix_fmt is a supported input format, 0 otherwise.

func Sws_isSupportedOutput

func Sws_isSupportedOutput(p AVPixelFormat) int

int sws_isSupportedOutput (enum AVPixelFormat pix_fmt) Return a positive value if pix_fmt is a supported output format, 0 otherwise.

func Sws_normalizeVec

func Sws_normalizeVec(a *C.struct_SwsVector, h float64)

void sws_normalizeVec (SwsVector *a, double height) Scale all the coefficients of a so that their sum equals height.

func Sws_printVec2

func Sws_printVec2(a *C.struct_SwsVector, lctx *C.struct_AVClass, l int)

void sws_printVec2 (SwsVector *a, AVClass *log_ctx, int log_level) Print with av_log() a textual representation of the vector a if log_level <= av_log_level.

func Sws_scale

func Sws_scale(ctxt *SwsContext, src *uint8, str int, y, h int, d *uint8, ds int) int

//int sws_scale (struct SwsContext *c, const uint8_t *const srcSlice[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]) //Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst.

func Sws_scaleVec

func Sws_scaleVec(a *SwsVector, s float64)

void sws_scaleVec (SwsVector *a, double scalar) Scale all the coefficients of a by the scalar value.

func Sws_setColorspaceDetails

func Sws_setColorspaceDetails(ctxt *C.struct_SwsContext, it *int, sr int, t *int, dr, b, c, s int) int

int sws_setColorspaceDetails (struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation)

func Sws_shiftVec

func Sws_shiftVec(a *C.struct_SwsVector, s int)

void sws_shiftVec (SwsVector *a, int shift)

func Sws_subVec

func Sws_subVec(a, b *C.struct_SwsVector)

void sws_subVec (SwsVector *a, SwsVector *b)

func Swscale_configuration

func Swscale_configuration() string

const char * swscale_configuration (void) Return the libswscale build-time configuration.

func Swscale_license

func Swscale_license() string

const char * swscale_license (void) Return the libswscale license.

func Swscale_version

func Swscale_version() uint

unsigned swscale_version (void) Return the LIBSWSCALE_VERSION_INT constant.

Types

type AVClass

type AVClass C.struct_AVClass

type AVPixelFormat

type AVPixelFormat C.enum_AVPixelFormat

type SwsContext

type SwsContext C.struct_SwsContext

func Sws_alloc_context

func Sws_alloc_context() *SwsContext

struct SwsContext * sws_alloc_context (void) Allocate an empty SwsContext.

func Sws_getContext

func Sws_getContext(sw, sh int, sf AVPixelFormat, dw, dh int, df AVPixelFormat, f int, sfl, dfl *SwsFilter, p *int) *SwsContext

struct SwsContext * sws_getContext (int srcW, int srcH, enum AVPixelFormat srcFormat, int dstW, int dstH, enum AVPixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param) Allocate and return an SwsContext.

type SwsFilter

type SwsFilter C.struct_SwsFilter

type SwsVector

type SwsVector C.struct_SwsVector

Jump to

Keyboard shortcuts

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