Go to the documentation of this file.
22 #ifndef SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H
23 #define SWSCALE_LOONGARCH_SWSCALE_LOONGARCH_H
30 const uint8_t *
src,
const int16_t *
filter,
31 const int32_t *filterPos,
int filterSize);
34 const uint8_t *
src,
const int16_t *
filter,
35 const int32_t *filterPos,
int filterSize);
39 const int32_t *filterPos,
int filterSize);
43 const int32_t *filterPos,
int filterSize,
int sh);
47 const int32_t *filterPos,
int filterSize);
51 const int32_t *filterPos,
int filterSize,
int sh);
65 const int16_t **
src, uint8_t *dest,
int dstW,
71 void yuy2ToUV_lsx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
72 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
74 void yvy2ToUV_lsx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
75 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
77 void uyvyToUV_lsx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
78 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
80 void nv12ToUV_lsx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
81 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
83 void nv21ToUV_lsx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
84 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
87 const uint8_t *unused2,
int width, uint32_t *unused,
void *opq);
90 const uint8_t *unused2,
int width, uint32_t *unused,
void *opq);
104 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
107 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
110 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
113 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
116 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
119 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
123 const uint8_t *
src,
const int16_t *
filter,
124 const int32_t *filterPos,
int filterSize);
127 const uint8_t *
src,
const int16_t *
filter,
128 const int32_t *filterPos,
int filterSize);
132 const int32_t *filterPos,
int filterSize);
136 const int32_t *filterPos,
int filterSize);
138 void lumRangeFromJpeg_lasx(int16_t *
dst,
int width);
139 void chrRangeFromJpeg_lasx(int16_t *dstU, int16_t *dstV,
int width);
140 void lumRangeToJpeg_lasx(int16_t *
dst,
int width);
141 void chrRangeToJpeg_lasx(int16_t *dstU, int16_t *dstV,
int width);
149 int yuv420_rgb24_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
150 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
152 int yuv420_bgr24_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
153 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
155 int yuv420_rgba32_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
156 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
158 int yuv420_bgra32_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
159 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
161 int yuv420_argb32_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
162 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
164 int yuv420_abgr32_lasx(
SwsInternal *
c,
const uint8_t *
const src[],
const int srcStride[],
165 int srcSliceY,
int srcSliceH, uint8_t *
const dst[],
const int dstStride[]);
169 int src1Stride,
int src2Stride,
int dstStride);
172 const int16_t **
src, uint8_t *dest,
int dstW,
175 void yuv2plane1_8_lasx(
const int16_t *
src, uint8_t *dest,
int dstW,
178 void yuy2ToUV_lasx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
179 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
181 void yvy2ToUV_lasx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
182 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
184 void uyvyToUV_lasx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
185 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
187 void nv12ToUV_lasx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
188 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
190 void nv21ToUV_lasx(uint8_t *dstU, uint8_t *dstV,
const uint8_t *unused0,
const uint8_t *
src1,
191 const uint8_t *
src2,
int width, uint32_t *unused,
void *opq);
193 void abgrToA_lasx(uint8_t *
_dst,
const uint8_t *
src,
const uint8_t *unused1,
194 const uint8_t *unused2,
int width, uint32_t *unused,
void *opq);
196 void rgbaToA_lasx(uint8_t *
_dst,
const uint8_t *
src,
const uint8_t *unused1,
197 const uint8_t *unused2,
int width, uint32_t *unused,
void *opq);
209 #endif // #if HAVE_LASX
void(* yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
Write one line of horizontally scaled data to planar output without any additional vertical scaling (...
void planar_rgb_to_uv_lsx(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opq)
void nv12ToUV_lsx(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused, void *opq)
void ff_hscale_8_to_19_lasx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_hscale_16_to_15_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void chrRangeFromJpeg_lsx(int16_t *dstU, int16_t *dstV, int width)
static void FUNC() yuv2planeX(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
static const char rgb2yuv[]
int yuv420_argb32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
void(* filter)(uint8_t *src, int stride, int qscale)
uint8_t ptrdiff_t const uint8_t * _src
void planar_rgb_to_y_lsx(uint8_t *_dst, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opq)
void ff_hscale_16_to_15_sub_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize, int sh)
void ff_hscale_8_to_19_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_hscale_8_to_15_lasx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void(* yuv2packed2_fn)(SwsInternal *c, const int16_t *lumSrc[2], const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc[2], uint8_t *dest, int dstW, int yalpha, int uvalpha, int y)
Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing bilinear scalin...
void lumRangeToJpeg_lsx(int16_t *dst, int width)
void uyvyToUV_lsx(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused, void *opq)
int yuv420_bgr24_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
void ff_hscale_16_to_15_lasx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_hscale_16_to_19_sub_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize, int sh)
int yuv420_rgba32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
void yuv2plane1_8_lsx(const int16_t *src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
void chrRangeToJpeg_lsx(int16_t *dstU, int16_t *dstV, int width)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
void yvy2ToUV_lsx(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused, void *opq)
void(* yuv2packedX_fn)(SwsInternal *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t *dest, int dstW, int y)
Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output by doing multi-point ver...
av_cold void ff_sws_init_input_lsx(SwsInternal *c)
void lumRangeFromJpeg_lsx(int16_t *dst, int width)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void ff_interleave_bytes_lasx(const uint8_t *src1, const uint8_t *src2, uint8_t *dest, int width, int height, int src1Stride, int src2Stride, int dstStride)
void yuv2planeX_8_lsx(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
void(* yuv2anyX_fn)(SwsInternal *c, const int16_t *lumFilter, const int16_t **lumSrc, int lumFilterSize, const int16_t *chrFilter, const int16_t **chrUSrc, const int16_t **chrVSrc, int chrFilterSize, const int16_t **alpSrc, uint8_t **dest, int dstW, int y)
Write one line of horizontally scaled Y/U/V/A to YUV/RGB output by doing multi-point vertical scaling...
int yuv420_bgra32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
av_cold void ff_sws_init_output_lasx(SwsInternal *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX, yuv2anyX_fn *yuv2anyX)
void(* yuv2interleavedX_fn)(enum AVPixelFormat dstFormat, const uint8_t *chrDither, const int16_t *chrFilter, int chrFilterSize, const int16_t **chrUSrc, const int16_t **chrVSrc, uint8_t *dest, int dstW)
Write one line of horizontally scaled chroma to interleaved output with multi-point vertical scaling ...
int yuv420_rgb24_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
void(* yuv2packed1_fn)(SwsInternal *c, const int16_t *lumSrc, const int16_t *chrUSrc[2], const int16_t *chrVSrc[2], const int16_t *alpSrc, uint8_t *dest, int dstW, int uvalpha, int y)
Write one line of horizontally scaled Y/U/V/A to packed-pixel YUV/RGB output without any additional v...
void ff_hscale_16_to_19_lasx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void(* yuv2planarX_fn)(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
Write one line of horizontally scaled data to planar output with multi-point vertical scaling between...
void rgbaToA_lsx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused, void *opq)
void ff_hscale_8_to_15_lsx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
int yuv420_abgr32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
av_cold void ff_sws_init_output_lsx(SwsInternal *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, yuv2packed1_fn *yuv2packed1, yuv2packed2_fn *yuv2packed2, yuv2packedX_fn *yuv2packedX, yuv2anyX_fn *yuv2anyX)
void abgrToA_lsx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused, void *opq)
void ff_hscale_16_to_19_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void nv21ToUV_lsx(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused, void *opq)
void yuy2ToUV_lsx(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, const uint8_t *src1, const uint8_t *src2, int width, uint32_t *unused, void *opq)
void yuv2planeX_8_lasx(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
static const uint8_t dither[8][8]