Go to the documentation of this file.
32 if (
c->dstBpc <= 14) {
44 if (
c->dstBpc <= 14) {
46 c->lumConvertRange = lumRangeFromJpeg_lasx;
47 c->chrConvertRange = chrRangeFromJpeg_lasx;
49 c->lumConvertRange = lumRangeToJpeg_lasx;
50 c->chrConvertRange = chrRangeToJpeg_lasx;
54 #endif // #if HAVE_LASX
62 &
c->yuv2nv12cX, &
c->yuv2packed1,
63 &
c->yuv2packed2, &
c->yuv2packedX, &
c->yuv2anyX);
66 if (
c->dstBpc <= 14) {
79 &
c->yuv2nv12cX, &
c->yuv2packed1,
80 &
c->yuv2packed2, &
c->yuv2packedX, &
c->yuv2anyX);
83 if (
c->dstBpc <= 14) {
93 #endif // #if HAVE_LASX
102 #endif // #if HAVE_LASX
111 switch (
c->dstFormat) {
113 return yuv420_rgb24_lasx;
115 return yuv420_bgr24_lasx;
117 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
120 return yuv420_rgba32_lasx;
122 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
125 return yuv420_argb32_lasx;
127 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
130 return yuv420_bgra32_lasx;
132 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
135 return yuv420_abgr32_lasx;
139 #endif // #if HAVE_LASX
142 switch (
c->dstFormat) {
148 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
153 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
158 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
163 if (CONFIG_SWSCALE_ALPHA &&
isALPHA(
c->srcFormat)) {
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)
av_cold void ff_sws_init_range_convert_loongarch(SwsInternal *c)
void chrRangeFromJpeg_lsx(int16_t *dstU, int16_t *dstV, int width)
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[])
@ 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 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 lumRangeToJpeg_lsx(int16_t *dst, int width)
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)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
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[])
@ 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)
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 chrRangeToJpeg_lsx(int16_t *dstU, int16_t *dstV, int width)
@ 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
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
av_cold void ff_sws_init_swscale_loongarch(SwsInternal *c)
void lumRangeFromJpeg_lsx(int16_t *dst, int width)
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_cold SwsFunc ff_yuv2rgb_init_loongarch(SwsInternal *c)
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
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)
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 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 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[])
int(* SwsFunc)(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[])
av_cold void rgb2rgb_init_loongarch(void)
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)
static av_always_inline int isALPHA(enum AVPixelFormat pix_fmt)