Go to the documentation of this file.
33 if (
c->dstBpc <= 14) {
42 switch (
c->srcFormat) {
58 if (
c->dstBpc <= 14) {
67 switch (
c->srcFormat) {
79 #endif // #if HAVE_LASX
88 #endif // #if HAVE_LASX
97 switch (
c->dstFormat) {
99 return yuv420_rgb24_lasx;
101 return yuv420_bgr24_lasx;
103 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
106 return yuv420_rgba32_lasx;
108 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
111 return yuv420_argb32_lasx;
113 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
116 return yuv420_bgra32_lasx;
118 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
121 return yuv420_abgr32_lasx;
125 #endif // #if HAVE_LASX
128 switch (
c->dstFormat) {
134 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
139 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
144 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
149 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
void ff_yuv2planeX_8_lasx(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
int yuv420_bgr24_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
void planar_rgb_to_uv_lsx(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opq)
int yuv420_rgb24_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
av_cold void ff_sws_init_output_lasx(SwsContext *c)
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
static atomic_int cpu_flags
void planar_rgb_to_y_lsx(uint8_t *_dst, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opq)
int(* SwsFunc)(struct SwsContext *context, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
av_cold SwsFunc ff_yuv2rgb_init_loongarch(SwsContext *c)
void ff_hscale_8_to_15_lsx(SwsContext *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
av_cold void ff_sws_init_swscale_loongarch(SwsContext *c)
int yuv420_abgr32_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
void ff_hscale_8_to_19_lsx(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
void(* interleaveBytes)(const uint8_t *src1, const uint8_t *src2, uint8_t *dst, int width, int height, int src1Stride, int src2Stride, int dstStride)
void ff_hscale_16_to_15_lsx(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
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
int yuv420_bgra32_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
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)
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
void ff_yuv2planeX_8_lsx(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
void ff_hscale_8_to_15_lasx(SwsContext *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_lasx(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
int yuv420_argb32_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
void ff_hscale_16_to_15_lasx(SwsContext *c, int16_t *dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
av_cold void rgb2rgb_init_loongarch(void)
int yuv420_rgba32_lsx(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t *dst[], int dstStride[])
void ff_hscale_8_to_19_lasx(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize)
av_cold void ff_sws_init_output_lsx(SwsContext *c)
void ff_hscale_16_to_19_lsx(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)