public class swscale extends swscale
Constructor and Description |
---|
swscale() |
Modifier and Type | Method and Description |
---|---|
static String |
LIBSWSCALE_IDENT() |
static int |
LIBSWSCALE_VERSION_INT() |
static SwsContext |
sws_alloc_context()
Allocate an empty SwsContext.
|
static SwsVector |
sws_allocVec(int length)
Allocate and return an uninitialized vector with length coefficients.
|
static void |
sws_convertPalette8ToPacked24(byte[] src,
byte[] dst,
int num_pixels,
byte[] palette) |
static void |
sws_convertPalette8ToPacked24(ByteBuffer src,
ByteBuffer dst,
int num_pixels,
ByteBuffer palette) |
static void |
sws_convertPalette8ToPacked24(BytePointer src,
BytePointer dst,
int num_pixels,
BytePointer palette)
Convert an 8-bit paletted frame into a frame with a color depth of 24 bits.
|
static void |
sws_convertPalette8ToPacked32(byte[] src,
byte[] dst,
int num_pixels,
byte[] palette) |
static void |
sws_convertPalette8ToPacked32(ByteBuffer src,
ByteBuffer dst,
int num_pixels,
ByteBuffer palette) |
static void |
sws_convertPalette8ToPacked32(BytePointer src,
BytePointer dst,
int num_pixels,
BytePointer palette)
Convert an 8-bit paletted frame into a frame with a color depth of 32 bits.
|
static void |
sws_frame_end(SwsContext c)
Finish the scaling process for a pair of source/destination frames previously
submitted with sws_frame_start().
|
static int |
sws_frame_start(SwsContext c,
AVFrame dst,
AVFrame src)
Initialize the scaling process for a given pair of source/destination frames.
|
static void |
sws_freeContext(SwsContext swsContext)
Free the swscaler context swsContext.
|
static void |
sws_freeFilter(SwsFilter filter) |
static void |
sws_freeVec(SwsVector a) |
static AVClass |
sws_get_class()
Get the AVClass for swsContext.
|
static SwsContext |
sws_getCachedContext(SwsContext context,
int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
double[] param) |
static SwsContext |
sws_getCachedContext(SwsContext context,
int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
DoubleBuffer param) |
static SwsContext |
sws_getCachedContext(SwsContext context,
int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
DoublePointer param)
Check if context can be reused, otherwise reallocate a new one.
|
static IntPointer |
sws_getCoefficients(int colorspace)
Return a pointer to yuv<->rgb coefficients for the given colorspace
suitable for sws_setColorspaceDetails().
|
static int |
sws_getColorspaceDetails(SwsContext c,
int[] inv_table,
int[] srcRange,
int[] table,
int[] dstRange,
int[] brightness,
int[] contrast,
int[] saturation) |
static int |
sws_getColorspaceDetails(SwsContext c,
IntBuffer inv_table,
IntBuffer srcRange,
IntBuffer table,
IntBuffer dstRange,
IntBuffer brightness,
IntBuffer contrast,
IntBuffer saturation) |
static int |
sws_getColorspaceDetails(SwsContext c,
IntPointer inv_table,
IntPointer srcRange,
IntPointer table,
IntPointer dstRange,
IntPointer brightness,
IntPointer contrast,
IntPointer saturation) |
static int |
sws_getColorspaceDetails(SwsContext c,
PointerPointer inv_table,
IntPointer srcRange,
PointerPointer table,
IntPointer dstRange,
IntPointer brightness,
IntPointer contrast,
IntPointer saturation) |
static SwsContext |
sws_getContext(int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
double[] param) |
static SwsContext |
sws_getContext(int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
DoubleBuffer param) |
static SwsContext |
sws_getContext(int srcW,
int srcH,
int srcFormat,
int dstW,
int dstH,
int dstFormat,
int flags,
SwsFilter srcFilter,
SwsFilter dstFilter,
DoublePointer param)
Allocate and return an SwsContext.
|
static SwsFilter |
sws_getDefaultFilter(float lumaGBlur,
float chromaGBlur,
float lumaSharpen,
float chromaSharpen,
float chromaHShift,
float chromaVShift,
int verbose) |
static 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.
|
static int |
sws_init_context(SwsContext sws_context,
SwsFilter srcFilter,
SwsFilter dstFilter)
Initialize the swscaler context sws_context.
|
static int |
sws_isSupportedEndiannessConversion(int pix_fmt) |
static int |
sws_isSupportedInput(int pix_fmt)
Return a positive value if pix_fmt is a supported input format, 0
otherwise.
|
static int |
sws_isSupportedOutput(int pix_fmt)
Return a positive value if pix_fmt is a supported output format, 0
otherwise.
|
static void |
sws_normalizeVec(SwsVector a,
double height)
Scale all the coefficients of a so that their sum equals height.
|
static int |
sws_receive_slice_alignment(SwsContext c)
Get the alignment required for slices
|
static int |
sws_receive_slice(SwsContext c,
int slice_start,
int slice_height)
Request a horizontal slice of the output data to be written into the frame
previously provided to sws_frame_start().
|
static int |
sws_scale_frame(SwsContext c,
AVFrame dst,
AVFrame src)
Scale source data from src and write the output to dst.
|
static int |
sws_scale(SwsContext c,
byte[] srcSlice,
int[] srcStride,
int srcSliceY,
int srcSliceH,
byte[] dst,
int[] dstStride) |
static int |
sws_scale(SwsContext c,
ByteBuffer srcSlice,
IntBuffer srcStride,
int srcSliceY,
int srcSliceH,
ByteBuffer dst,
IntBuffer dstStride) |
static int |
sws_scale(SwsContext c,
BytePointer srcSlice,
IntPointer srcStride,
int srcSliceY,
int srcSliceH,
BytePointer dst,
IntPointer dstStride) |
static int |
sws_scale(SwsContext c,
PointerPointer srcSlice,
IntPointer srcStride,
int srcSliceY,
int srcSliceH,
PointerPointer dst,
IntPointer dstStride)
Scale the image slice in srcSlice and put the resulting scaled
slice in the image in dst.
|
static void |
sws_scaleVec(SwsVector a,
double scalar)
Scale all the coefficients of a by the scalar value.
|
static int |
sws_send_slice(SwsContext c,
int slice_start,
int slice_height)
Indicate that a horizontal slice of input data is available in the source
frame previously provided to sws_frame_start().
|
static int |
sws_setColorspaceDetails(SwsContext c,
int[] inv_table,
int srcRange,
int[] table,
int dstRange,
int brightness,
int contrast,
int saturation) |
static int |
sws_setColorspaceDetails(SwsContext c,
IntBuffer inv_table,
int srcRange,
IntBuffer table,
int dstRange,
int brightness,
int contrast,
int saturation) |
static int |
sws_setColorspaceDetails(SwsContext c,
IntPointer inv_table,
int srcRange,
IntPointer table,
int dstRange,
int brightness,
int contrast,
int saturation) |
static BytePointer |
swscale_configuration()
Return the libswscale build-time configuration.
|
static BytePointer |
swscale_license()
Return the libswscale license.
|
static int |
swscale_version()
\defgroup libsws libswscale
Color conversion and scaling library.
|
public static final int SWS_FAST_BILINEAR
public static final int SWS_BILINEAR
public static final int SWS_BICUBIC
public static final int SWS_X
public static final int SWS_POINT
public static final int SWS_AREA
public static final int SWS_BICUBLIN
public static final int SWS_GAUSS
public static final int SWS_SINC
public static final int SWS_LANCZOS
public static final int SWS_SPLINE
public static final int SWS_SRC_V_CHR_DROP_MASK
public static final int SWS_SRC_V_CHR_DROP_SHIFT
public static final int SWS_PARAM_DEFAULT
public static final int SWS_PRINT_INFO
public static final int SWS_FULL_CHR_H_INT
public static final int SWS_FULL_CHR_H_INP
public static final int SWS_DIRECT_BGR
public static final int SWS_ACCURATE_RND
public static final int SWS_BITEXACT
public static final int SWS_ERROR_DIFFUSION
public static final double SWS_MAX_REDUCE_CUTOFF
public static final int SWS_CS_ITU709
public static final int SWS_CS_FCC
public static final int SWS_CS_ITU601
public static final int SWS_CS_ITU624
public static final int SWS_CS_SMPTE170M
public static final int SWS_CS_SMPTE240M
public static final int SWS_CS_DEFAULT
public static final int SWS_CS_BT2020
public static final int LIBSWSCALE_VERSION_MAJOR
public static final int LIBSWSCALE_VERSION_MINOR
public static final int LIBSWSCALE_VERSION_MICRO
public static final int LIBSWSCALE_VERSION_INT
public static final int LIBSWSCALE_BUILD
public static final String LIBSWSCALE_IDENT
@NoException @Cast(value="unsigned") public static int swscale_version()
@NoException @Cast(value="const char*") public static BytePointer swscale_configuration()
@NoException @Cast(value="const char*") public static BytePointer swscale_license()
@NoException @Const public static IntPointer sws_getCoefficients(int colorspace)
colorspace
- One of the SWS_CS_* macros. If invalid,
SWS_CS_DEFAULT is used.@NoException public static int sws_isSupportedInput(@Cast(value="AVPixelFormat") int pix_fmt)
@NoException public static int sws_isSupportedOutput(@Cast(value="AVPixelFormat") int pix_fmt)
@NoException public static int sws_isSupportedEndiannessConversion(@Cast(value="AVPixelFormat") int pix_fmt)
pix_fmt
- [in] the pixel format@NoException public static SwsContext sws_alloc_context()
@NoException public static int sws_init_context(SwsContext sws_context, SwsFilter srcFilter, SwsFilter dstFilter)
@NoException public static void sws_freeContext(SwsContext swsContext)
@NoException public static SwsContext sws_getContext(int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const DoublePointer param)
srcW
- the width of the source imagesrcH
- the height of the source imagesrcFormat
- the source image formatdstW
- the width of the destination imagedstH
- the height of the destination imagedstFormat
- the destination image formatflags
- specify which algorithm and options to use for rescalingparam
- extra parameters to tune the used scaler
For SWS_BICUBIC param[0] and [1] tune the shape of the basis
function, param[0] tunes f(1) and param[1] f´(1)
For SWS_GAUSS param[0] tunes the exponent and thus cutoff
frequency
For SWS_LANCZOS param[0] tunes the width of the window function@NoException public static SwsContext sws_getContext(int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const DoubleBuffer param)
@NoException public static SwsContext sws_getContext(int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const double[] param)
@NoException public static int sws_scale(SwsContext c, @Cast(value="const uint8_t*const*") PointerPointer srcSlice, @Const IntPointer srcStride, int srcSliceY, int srcSliceH, @Cast(value="uint8_t*const*") PointerPointer dst, @Const IntPointer dstStride)
c
- the scaling context previously created with
sws_getContext()srcSlice
- the array containing the pointers to the planes of
the source slicesrcStride
- the array containing the strides for each plane of
the source imagesrcSliceY
- the position in the source image of the slice to
process, that is the number (counted starting from
zero) in the image of the first row of the slicesrcSliceH
- the height of the source slice, that is the number
of rows in the slicedst
- the array containing the pointers to the planes of
the destination imagedstStride
- the array containing the strides for each plane of
the destination image@NoException public static int sws_scale(SwsContext c, @Cast(value="const uint8_t*const*") @ByPtrPtr BytePointer srcSlice, @Const IntPointer srcStride, int srcSliceY, int srcSliceH, @Cast(value="uint8_t*const*") @ByPtrPtr BytePointer dst, @Const IntPointer dstStride)
@NoException public static int sws_scale(SwsContext c, @Cast(value="const uint8_t*const*") @ByPtrPtr ByteBuffer srcSlice, @Const IntBuffer srcStride, int srcSliceY, int srcSliceH, @Cast(value="uint8_t*const*") @ByPtrPtr ByteBuffer dst, @Const IntBuffer dstStride)
@NoException public static int sws_scale(SwsContext c, @Cast(value="const uint8_t*const*") @ByPtrPtr byte[] srcSlice, @Const int[] srcStride, int srcSliceY, int srcSliceH, @Cast(value="uint8_t*const*") @ByPtrPtr byte[] dst, @Const int[] dstStride)
@NoException public static int sws_scale_frame(SwsContext c, AVFrame dst, @Const AVFrame src)
c
- The scaling contextdst
- The destination frame. See documentation for sws_frame_start() for
more details.src
- The source frame.@NoException public static int sws_frame_start(SwsContext c, AVFrame dst, @Const AVFrame src)
c
- The scaling contextdst
- The destination frame.
The data buffers may either be already allocated by the caller or
left clear, in which case they will be allocated by the scaler.
The latter may have performance advantages - e.g. in certain cases
some output planes may be references to input planes, rather than
copies.
Output data will be written into this frame in successful
sws_receive_slice() calls.src
- The source frame. The data buffers must be allocated, but the
frame data does not have to be ready at this point. Data
availability is then signalled by sws_send_slice().sws_frame_end()
@NoException public static void sws_frame_end(SwsContext c)
c
- The scaling context@NoException public static int sws_send_slice(SwsContext c, @Cast(value="unsigned int") int slice_start, @Cast(value="unsigned int") int slice_height)
c
- The scaling contextslice_start
- first row of the sliceslice_height
- number of rows in the slice@NoException public static int sws_receive_slice(SwsContext c, @Cast(value="unsigned int") int slice_start, @Cast(value="unsigned int") int slice_height)
c
- The scaling contextslice_start
- first row of the slice; must be a multiple of
sws_receive_slice_alignment()slice_height
- number of rows in the slice; must be a multiple of
sws_receive_slice_alignment(), except for the last slice
(i.e. when slice_start+slice_height is equal to output
frame height)@NoException @Cast(value="unsigned int") public static int sws_receive_slice_alignment(@Const SwsContext c)
c
- The scaling context@NoException public static int sws_setColorspaceDetails(SwsContext c, @Const IntPointer inv_table, int srcRange, @Const IntPointer table, int dstRange, int brightness, int contrast, int saturation)
c
- the scaling contextdstRange
- flag indicating the while-black range of the output (1=jpeg / 0=mpeg)srcRange
- flag indicating the while-black range of the input (1=jpeg / 0=mpeg)table
- the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x]inv_table
- the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x]brightness
- 16.16 fixed point brightness correctioncontrast
- 16.16 fixed point contrast correctionsaturation
- 16.16 fixed point saturation correctionLIBSWSCALE_VERSION_MAJOR < 7
, returns -1 if not supported.@NoException public static int sws_setColorspaceDetails(SwsContext c, @Const IntBuffer inv_table, int srcRange, @Const IntBuffer table, int dstRange, int brightness, int contrast, int saturation)
@NoException public static int sws_setColorspaceDetails(SwsContext c, @Const int[] inv_table, int srcRange, @Const int[] table, int dstRange, int brightness, int contrast, int saturation)
@NoException public static int sws_getColorspaceDetails(SwsContext c, @Cast(value="int**") PointerPointer inv_table, IntPointer srcRange, @Cast(value="int**") PointerPointer table, IntPointer dstRange, IntPointer brightness, IntPointer contrast, IntPointer saturation)
LIBSWSCALE_VERSION_MAJOR < 7
, returns -1 if not supported.@NoException public static int sws_getColorspaceDetails(SwsContext c, @ByPtrPtr IntPointer inv_table, IntPointer srcRange, @ByPtrPtr IntPointer table, IntPointer dstRange, IntPointer brightness, IntPointer contrast, IntPointer saturation)
@NoException public static int sws_getColorspaceDetails(SwsContext c, @ByPtrPtr IntBuffer inv_table, IntBuffer srcRange, @ByPtrPtr IntBuffer table, IntBuffer dstRange, IntBuffer brightness, IntBuffer contrast, IntBuffer saturation)
@NoException public static int sws_getColorspaceDetails(SwsContext c, @ByPtrPtr int[] inv_table, int[] srcRange, @ByPtrPtr int[] table, int[] dstRange, int[] brightness, int[] contrast, int[] saturation)
@NoException public static SwsVector sws_allocVec(int length)
@NoException public static SwsVector sws_getGaussianVec(double variance, double quality)
@NoException public static void sws_scaleVec(SwsVector a, double scalar)
@NoException public static void sws_normalizeVec(SwsVector a, double height)
@NoException public static void sws_freeVec(SwsVector a)
@NoException public static SwsFilter sws_getDefaultFilter(float lumaGBlur, float chromaGBlur, float lumaSharpen, float chromaSharpen, float chromaHShift, float chromaVShift, int verbose)
@NoException public static void sws_freeFilter(SwsFilter filter)
@NoException public static SwsContext sws_getCachedContext(SwsContext context, int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const DoublePointer param)
@NoException public static SwsContext sws_getCachedContext(SwsContext context, int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const DoubleBuffer param)
@NoException public static SwsContext sws_getCachedContext(SwsContext context, int srcW, int srcH, @Cast(value="AVPixelFormat") int srcFormat, int dstW, int dstH, @Cast(value="AVPixelFormat") int dstFormat, int flags, SwsFilter srcFilter, SwsFilter dstFilter, @Const double[] param)
@NoException public static void sws_convertPalette8ToPacked32(@Cast(value="const uint8_t*") BytePointer src, @Cast(value="uint8_t*") BytePointer dst, int num_pixels, @Cast(value="const uint8_t*") BytePointer palette)
src
- source frame bufferdst
- destination frame buffernum_pixels
- number of pixels to convertpalette
- array with [256] entries, which must match color arrangement (RGB or BGR) of src@NoException public static void sws_convertPalette8ToPacked32(@Cast(value="const uint8_t*") ByteBuffer src, @Cast(value="uint8_t*") ByteBuffer dst, int num_pixels, @Cast(value="const uint8_t*") ByteBuffer palette)
@NoException public static void sws_convertPalette8ToPacked32(@Cast(value="const uint8_t*") byte[] src, @Cast(value="uint8_t*") byte[] dst, int num_pixels, @Cast(value="const uint8_t*") byte[] palette)
@NoException public static void sws_convertPalette8ToPacked24(@Cast(value="const uint8_t*") BytePointer src, @Cast(value="uint8_t*") BytePointer dst, int num_pixels, @Cast(value="const uint8_t*") BytePointer palette)
src
- source frame bufferdst
- destination frame buffernum_pixels
- number of pixels to convertpalette
- array with [256] entries, which must match color arrangement (RGB or BGR) of src@NoException public static void sws_convertPalette8ToPacked24(@Cast(value="const uint8_t*") ByteBuffer src, @Cast(value="uint8_t*") ByteBuffer dst, int num_pixels, @Cast(value="const uint8_t*") ByteBuffer palette)
@NoException public static void sws_convertPalette8ToPacked24(@Cast(value="const uint8_t*") byte[] src, @Cast(value="uint8_t*") byte[] dst, int num_pixels, @Cast(value="const uint8_t*") byte[] palette)
@NoException @Const public static AVClass sws_get_class()
av_opt_find().
@MemberGetter public static int LIBSWSCALE_VERSION_INT()
@MemberGetter public static String LIBSWSCALE_IDENT()
Copyright © 2024. All rights reserved.