FFmpeg
Loading...
Searching...
No Matches
swscale.c
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#include "config.h"
21#include "libswscale/swscale.h"
24#include "asm-offsets.h"
25
26#define SIZEOF_MEMBER(type, member) \
27 sizeof(((type*)0)->member)
28
29static_assert(offsetof(SwsLuts, in) == SL_IN, "struct layout mismatch");
30static_assert(offsetof(SwsLuts, out) == SL_OUT, "struct layout mismatch");
31
32static_assert(offsetof(SwsColorXform, gamma) == SCX_GAMMA,
33 "struct layout mismatch");
34static_assert(offsetof(SwsColorXform, mat) == SCX_MAT,
35 "struct layout mismatch");
36
37static_assert(offsetof(SwsColorXform, mat) +
38 2 * SIZEOF_MEMBER(SwsColorXform, mat[0]) +
39 2 * SIZEOF_MEMBER(SwsColorXform, mat[0][0]) == SCX_MAT_22,
40 "struct layout mismatch");
41
43 int dst_stride, const uint8_t *src,
44 int src_stride, int w, int h);
45
46static void xyz12Torgb48le_neon(const SwsInternal *c, uint8_t *dst,
47 int dst_stride, const uint8_t *src,
48 int src_stride, int w, int h)
49{
50 ff_xyz12Torgb48le_neon_asm(&c->xyz2rgb, dst, dst_stride, src, src_stride,
51 w, h);
52}
53
54void ff_hscale16to15_4_neon_asm(int shift, int16_t *_dst, int dstW,
55 const uint8_t *_src, const int16_t *filter,
56 const int32_t *filterPos, int filterSize);
57void ff_hscale16to15_X8_neon_asm(int shift, int16_t *_dst, int dstW,
58 const uint8_t *_src, const int16_t *filter,
59 const int32_t *filterPos, int filterSize);
60void ff_hscale16to15_X4_neon_asm(int shift, int16_t *_dst, int dstW,
61 const uint8_t *_src, const int16_t *filter,
62 const int32_t *filterPos, int filterSize);
63void ff_hscale16to19_4_neon_asm(int shift, int16_t *_dst, int dstW,
64 const uint8_t *_src, const int16_t *filter,
65 const int32_t *filterPos, int filterSize);
66void ff_hscale16to19_X8_neon_asm(int shift, int16_t *_dst, int dstW,
67 const uint8_t *_src, const int16_t *filter,
68 const int32_t *filterPos, int filterSize);
69void ff_hscale16to19_X4_neon_asm(int shift, int16_t *_dst, int dstW,
70 const uint8_t *_src, const int16_t *filter,
71 const int32_t *filterPos, int filterSize);
72
73static void ff_hscale16to15_4_neon(SwsInternal *c, int16_t *_dst, int dstW,
74 const uint8_t *_src, const int16_t *filter,
75 const int32_t *filterPos, int filterSize)
76{
77 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
78 int sh = desc->comp[0].depth - 1;
79
80 if (sh<15) {
81 sh = isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8 ? 13 : (desc->comp[0].depth - 1);
82 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
83 sh = 16 - 1;
84 }
85 ff_hscale16to15_4_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
86
87}
88
89static void ff_hscale16to15_X8_neon(SwsInternal *c, int16_t *_dst, int dstW,
90 const uint8_t *_src, const int16_t *filter,
91 const int32_t *filterPos, int filterSize)
92{
93 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
94 int sh = desc->comp[0].depth - 1;
95
96 if (sh<15) {
97 sh = isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8 ? 13 : (desc->comp[0].depth - 1);
98 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
99 sh = 16 - 1;
100 }
101 ff_hscale16to15_X8_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
102
103}
104
105static void ff_hscale16to15_X4_neon(SwsInternal *c, int16_t *_dst, int dstW,
106 const uint8_t *_src, const int16_t *filter,
107 const int32_t *filterPos, int filterSize)
108{
109 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
110 int sh = desc->comp[0].depth - 1;
111
112 if (sh<15) {
113 sh = isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8 ? 13 : (desc->comp[0].depth - 1);
114 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
115 sh = 16 - 1;
116 }
117 ff_hscale16to15_X4_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
118}
119
120static void ff_hscale16to19_4_neon(SwsInternal *c, int16_t *_dst, int dstW,
121 const uint8_t *_src, const int16_t *filter,
122 const int32_t *filterPos, int filterSize)
123{
124 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
125 int bits = desc->comp[0].depth - 1;
126 int sh = bits - 4;
127
128 if ((isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16) {
129 sh = 9;
130 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
131 sh = 16 - 1 - 4;
132 }
133
134 ff_hscale16to19_4_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
135
136}
137
138static void ff_hscale16to19_X8_neon(SwsInternal *c, int16_t *_dst, int dstW,
139 const uint8_t *_src, const int16_t *filter,
140 const int32_t *filterPos, int filterSize)
141{
142 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
143 int bits = desc->comp[0].depth - 1;
144 int sh = bits - 4;
145
146 if ((isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16) {
147 sh = 9;
148 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
149 sh = 16 - 1 - 4;
150 }
151
152 ff_hscale16to19_X8_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
153
154}
155
156static void ff_hscale16to19_X4_neon(SwsInternal *c, int16_t *_dst, int dstW,
157 const uint8_t *_src, const int16_t *filter,
158 const int32_t *filterPos, int filterSize)
159{
160 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(c->opts.src_format);
161 int bits = desc->comp[0].depth - 1;
162 int sh = bits - 4;
163
164 if ((isAnyRGB(c->opts.src_format) || c->opts.src_format==AV_PIX_FMT_PAL8) && desc->comp[0].depth<16) {
165 sh = 9;
166 } else if (desc->flags & AV_PIX_FMT_FLAG_FLOAT) { /* float input are process like uint 16bpc */
167 sh = 16 - 1 - 4;
168 }
169
170 ff_hscale16to19_X4_neon_asm(sh, _dst, dstW, _src, filter, filterPos, filterSize);
171
172}
173
174#define SCALE_FUNC(filter_n, from_bpc, to_bpc, opt) \
175void ff_hscale ## from_bpc ## to ## to_bpc ## _ ## filter_n ## _ ## opt( \
176 SwsInternal *c, int16_t *data, \
177 int dstW, const uint8_t *src, \
178 const int16_t *filter, \
179 const int32_t *filterPos, int filterSize)
180#define SCALE_FUNCS(filter_n, opt) \
181 SCALE_FUNC(filter_n, 8, 15, opt); \
182 SCALE_FUNC(filter_n, 8, 19, opt);
183#define ALL_SCALE_FUNCS(opt) \
184 SCALE_FUNCS(4, opt); \
185 SCALE_FUNCS(X8, opt); \
186 SCALE_FUNCS(X4, opt)
187
189
190void ff_yuv2planeX_10_neon(const int16_t *filter, int filterSize,
191 const int16_t **src, uint16_t *dest, int dstW,
192 int big_endian, int output_bits);
193
194#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t) \
195static void yuv2planeX_ ## bits ## BE_LE ## _neon(const int16_t *filter, int filterSize, \
196 const int16_t **src, uint8_t *dest, int dstW, \
197 const uint8_t *dither, int offset) \
198{ \
199 ff_yuv2planeX_## template_size ## _neon(filter, \
200 filterSize, (const typeX_t **) src, \
201 (uint16_t *) dest, dstW, is_be, bits); \
202}
203
204yuv2NBPS( 9, BE, 1, 10, int16_t)
205yuv2NBPS( 9, LE, 0, 10, int16_t)
206yuv2NBPS(10, BE, 1, 10, int16_t)
207yuv2NBPS(10, LE, 0, 10, int16_t)
208yuv2NBPS(12, BE, 1, 10, int16_t)
209yuv2NBPS(12, LE, 0, 10, int16_t)
210yuv2NBPS(14, BE, 1, 10, int16_t)
211yuv2NBPS(14, LE, 0, 10, int16_t)
212
213void ff_yuv2planeX_8_neon(const int16_t *filter, int filterSize,
214 const int16_t **src, uint8_t *dest, int dstW,
215 const uint8_t *dither, int offset);
216void ff_yuv2plane1_8_neon(
217 const int16_t *src,
218 uint8_t *dest,
219 int dstW,
220 const uint8_t *dither,
221 int offset);
222
223void ff_yuv2nv12cX_neon_asm(int isSwapped, const uint8_t *chrDither,
224 const int16_t *chrFilter, int chrFilterSize,
225 const int16_t **chrUSrc, const int16_t **chrVSrc,
226 uint8_t *dest, int chrDstW);
227
228static void ff_yuv2nv12cX_neon(enum AVPixelFormat dstFormat, const uint8_t *chrDither,
229 const int16_t *chrFilter, int chrFilterSize,
230 const int16_t **chrUSrc, const int16_t **chrVSrc,
231 uint8_t *dest, int chrDstW)
232{
233 if (!isSwappedChroma(dstFormat)) {
234 ff_yuv2nv12cX_neon_asm(1, chrDither, chrFilter, chrFilterSize,
235 chrUSrc, chrVSrc, dest, chrDstW);
236 } else {
237 ff_yuv2nv12cX_neon_asm(0, chrDither, chrFilter, chrFilterSize,
238 chrUSrc, chrVSrc, dest, chrDstW);
239 }
240}
241
242#define ASSIGN_SCALE_FUNC2(hscalefn, filtersize, opt) do { \
243 if (c->srcBpc == 8) { \
244 if(c->dstBpc <= 14) { \
245 hscalefn = \
246 ff_hscale8to15_ ## filtersize ## _ ## opt; \
247 } else \
248 hscalefn = \
249 ff_hscale8to19_ ## filtersize ## _ ## opt; \
250 } else { \
251 if (c->dstBpc <= 14) \
252 hscalefn = \
253 ff_hscale16to15_ ## filtersize ## _ ## opt; \
254 else \
255 hscalefn = \
256 ff_hscale16to19_ ## filtersize ## _ ## opt; \
257 } \
258} while (0)
259
260#define ASSIGN_SCALE_FUNC(hscalefn, filtersize, opt) do { \
261 if (filtersize == 4) \
262 ASSIGN_SCALE_FUNC2(hscalefn, 4, opt); \
263 else if (filtersize % 8 == 0) \
264 ASSIGN_SCALE_FUNC2(hscalefn, X8, opt); \
265 else if (filtersize % 4 == 0 && filtersize % 8 != 0) \
266 ASSIGN_SCALE_FUNC2(hscalefn, X4, opt); \
267} while (0)
268
269#define ASSIGN_VSCALE_FUNC(vscalefn, opt) \
270 switch (c->dstBpc) { \
271 case 8: vscalefn = ff_yuv2plane1_8_ ## opt; break; \
272 default: break; \
273 }
274
275#define NEON_INPUT(name) \
276void ff_##name##ToY_neon(uint8_t *dst, const uint8_t *src, const uint8_t *, \
277 const uint8_t *, int w, uint32_t *coeffs, void *); \
278void ff_##name##ToUV_neon(uint8_t *, uint8_t *, const uint8_t *, \
279 const uint8_t *, const uint8_t *, int w, \
280 uint32_t *coeffs, void *); \
281void ff_##name##ToUV_half_neon(uint8_t *, uint8_t *, const uint8_t *, \
282 const uint8_t *, const uint8_t *, int w, \
283 uint32_t *coeffs, void *)
284#define NEON_INPUT_DOTPROD(name) \
285void ff_##name##ToY_neon_dotprod(uint8_t *dst, const uint8_t *src, const uint8_t *, \
286 const uint8_t *, int w, uint32_t *coeffs, void *);
287
296
298 uint32_t coeff, int64_t offset);
299void ff_chrRangeFromJpeg8_neon(int16_t *dstU, int16_t *dstV, int width,
300 uint32_t coeff, int64_t offset);
302 uint32_t coeff, int64_t offset);
303void ff_chrRangeToJpeg8_neon(int16_t *dstU, int16_t *dstV, int width,
304 uint32_t coeff, int64_t offset);
306 uint32_t coeff, int64_t offset);
307void ff_chrRangeFromJpeg16_neon(int16_t *dstU, int16_t *dstV, int width,
308 uint32_t coeff, int64_t offset);
310 uint32_t coeff, int64_t offset);
311void ff_chrRangeToJpeg16_neon(int16_t *dstU, int16_t *dstV, int width,
312 uint32_t coeff, int64_t offset);
313
315{
317
318 if (have_neon(cpu_flags)) {
319 if (c->dstBpc <= 14) {
320 if (c->opts.src_range) {
321 c->lumConvertRange = ff_lumRangeFromJpeg8_neon;
322 c->chrConvertRange = ff_chrRangeFromJpeg8_neon;
323 } else {
324 c->lumConvertRange = ff_lumRangeToJpeg8_neon;
325 c->chrConvertRange = ff_chrRangeToJpeg8_neon;
326 }
327 } else {
328 if (c->opts.src_range) {
329 c->lumConvertRange = ff_lumRangeFromJpeg16_neon;
330 c->chrConvertRange = ff_chrRangeFromJpeg16_neon;
331 } else {
332 c->lumConvertRange = ff_lumRangeToJpeg16_neon;
333 c->chrConvertRange = ff_chrRangeToJpeg16_neon;
334 }
335 }
336 }
337}
338
340{
342
343 if (have_neon(cpu_flags)) {
344 if (!isBE(c->opts.src_format)) {
345 c->xyz12Torgb48 = xyz12Torgb48le_neon;
346 }
347 }
348}
349
351{
353 enum AVPixelFormat dstFormat = c->opts.dst_format;
354 const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat);
355
356 if (have_neon(cpu_flags)) {
357 ASSIGN_SCALE_FUNC(c->hyScale, c->hLumFilterSize, neon);
358 ASSIGN_SCALE_FUNC(c->hcScale, c->hChrFilterSize, neon);
359 ASSIGN_VSCALE_FUNC(c->yuv2plane1, neon);
360 if (c->dstBpc == 8) {
361 c->yuv2planeX = ff_yuv2planeX_8_neon;
362 if (isSemiPlanarYUV(dstFormat) && !isDataInHighBits(dstFormat))
363 c->yuv2nv12cX = ff_yuv2nv12cX_neon;
364 }
365
366 if (isNBPS(dstFormat) && !isSemiPlanarYUV(dstFormat) && !isDataInHighBits(dstFormat)) {
367 if (desc->comp[0].depth == 9) {
368 c->yuv2planeX = isBE(dstFormat) ? yuv2planeX_9BE_neon : yuv2planeX_9LE_neon;
369 } else if (desc->comp[0].depth == 10) {
370 c->yuv2planeX = isBE(dstFormat) ? yuv2planeX_10BE_neon : yuv2planeX_10LE_neon;
371 } else if (desc->comp[0].depth == 12) {
372 c->yuv2planeX = isBE(dstFormat) ? yuv2planeX_12BE_neon : yuv2planeX_12LE_neon;
373 } else if (desc->comp[0].depth == 14) {
374 c->yuv2planeX = isBE(dstFormat) ? yuv2planeX_14BE_neon : yuv2planeX_14LE_neon;
375 } else
376 av_assert0(0);
377 }
378 switch (c->opts.src_format) {
379 case AV_PIX_FMT_ABGR:
380 c->lumToYV12 = ff_abgr32ToY_neon;
381 if (c->chrSrcHSubSample)
382 c->chrToYV12 = ff_abgr32ToUV_half_neon;
383 else
384 c->chrToYV12 = ff_abgr32ToUV_neon;
385 break;
386
387 case AV_PIX_FMT_ARGB:
388 c->lumToYV12 = ff_argb32ToY_neon;
389 if (c->chrSrcHSubSample)
390 c->chrToYV12 = ff_argb32ToUV_half_neon;
391 else
392 c->chrToYV12 = ff_argb32ToUV_neon;
393 break;
394 case AV_PIX_FMT_BGR24:
395 c->lumToYV12 = ff_bgr24ToY_neon;
396 if (c->chrSrcHSubSample)
397 c->chrToYV12 = ff_bgr24ToUV_half_neon;
398 else
399 c->chrToYV12 = ff_bgr24ToUV_neon;
400 break;
401 case AV_PIX_FMT_BGRA:
402 c->lumToYV12 = ff_bgra32ToY_neon;
403#if HAVE_DOTPROD
404 if (have_dotprod(cpu_flags)) {
405 c->lumToYV12 = ff_bgra32ToY_neon_dotprod;
406 }
407#endif
408 if (c->chrSrcHSubSample)
409 c->chrToYV12 = ff_bgra32ToUV_half_neon;
410 else
411 c->chrToYV12 = ff_bgra32ToUV_neon;
412 break;
413 case AV_PIX_FMT_RGB24:
414 c->lumToYV12 = ff_rgb24ToY_neon;
415 if (c->chrSrcHSubSample)
416 c->chrToYV12 = ff_rgb24ToUV_half_neon;
417 else
418 c->chrToYV12 = ff_rgb24ToUV_neon;
419 break;
420 case AV_PIX_FMT_RGBA:
421 c->lumToYV12 = ff_rgba32ToY_neon;
422#if HAVE_DOTPROD
423 if (have_dotprod(cpu_flags)) {
424 c->lumToYV12 = ff_rgba32ToY_neon_dotprod;
425 }
426#endif
427 if (c->chrSrcHSubSample)
428 c->chrToYV12 = ff_rgba32ToUV_half_neon;
429 else
430 c->chrToYV12 = ff_rgba32ToUV_neon;
431 break;
432 default:
433 break;
434 }
435 }
436}
uint8_t * _dst
Definition dsp.h:56
uint8_t ptrdiff_t const uint8_t * _src
Definition dsp.h:56
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
#define ASSIGN_VSCALE_FUNC(vscalefn, opt)
Definition swscale.c:269
void ff_lumRangeToJpeg8_neon(int16_t *dst, int width, uint32_t coeff, int64_t offset)
static void ff_hscale16to19_X8_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:138
#define ASSIGN_SCALE_FUNC(hscalefn, filtersize, opt)
Definition swscale.c:260
av_cold void ff_sws_init_xyzdsp_aarch64(SwsInternal *c)
Definition swscale.c:339
void ff_hscale16to15_X8_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
static void ff_hscale16to15_X4_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:105
void ff_chrRangeFromJpeg16_neon(int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
#define ALL_SCALE_FUNCS(opt)
Definition swscale.c:183
static void xyz12Torgb48le_neon(const SwsInternal *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
Definition swscale.c:46
av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c)
Definition swscale.c:350
static void ff_hscale16to15_X8_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:89
void ff_hscale16to19_X8_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_lumRangeToJpeg16_neon(int16_t *dst, int width, uint32_t coeff, int64_t offset)
void ff_hscale16to15_X4_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_chrRangeFromJpeg8_neon(int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
static void ff_hscale16to15_4_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:73
static void ff_hscale16to19_X4_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:156
#define SIZEOF_MEMBER(type, member)
Definition swscale.c:26
#define yuv2NBPS(bits, BE_LE, is_be, template_size, typeX_t)
Definition swscale.c:194
static void ff_hscale16to19_4_neon(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
Definition swscale.c:120
void ff_lumRangeFromJpeg16_neon(int16_t *dst, int width, uint32_t coeff, int64_t offset)
#define NEON_INPUT_DOTPROD(name)
Definition swscale.c:284
void ff_hscale16to19_4_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_yuv2planeX_10_neon(const int16_t *filter, int filterSize, const int16_t **src, uint16_t *dest, int dstW, int big_endian, int output_bits)
void ff_xyz12Torgb48le_neon_asm(const SwsColorXform *c, uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int w, int h)
void ff_hscale16to15_4_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_chrRangeToJpeg8_neon(int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
void ff_lumRangeFromJpeg8_neon(int16_t *dst, int width, uint32_t coeff, int64_t offset)
#define NEON_INPUT(name)
Definition swscale.c:275
void ff_chrRangeToJpeg16_neon(int16_t *dstU, int16_t *dstV, int width, uint32_t coeff, int64_t offset)
av_cold void ff_sws_init_range_convert_aarch64(SwsInternal *c)
Definition swscale.c:314
void ff_hscale16to19_X4_neon_asm(int shift, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize)
void ff_yuv2planeX_8_neon(const int16_t *filter, int filterSize, const int16_t **src, uint8_t *dest, int dstW, const uint8_t *dither, int offset)
int32_t
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition avassert.h:42
long long int64_t
Definition coverity.c:34
static const uint8_t bits[8]
Definition fastaudio.c:100
unsigned offset
Definition libaomenc.c:763
static int shift(int a, int b)
Definition bonk.c:261
#define have_dotprod(flags)
Definition cpu.h:31
#define have_neon(flags)
Definition cpu.h:26
Macro definitions for various function/variable attributes.
#define av_cold
Definition attributes.h:117
static atomic_int cpu_flags
Definition cpu.c:56
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Definition cpu.c:109
const char * desc
Definition libsvtav1.c:83
#define SCX_GAMMA
Definition asm-offsets.h:29
#define SCX_MAT
Definition asm-offsets.h:30
#define SCX_MAT_22
Definition asm-offsets.h:34
#define SL_IN
Definition asm-offsets.h:25
#define SL_OUT
Definition asm-offsets.h:26
uint8_t w
Definition llvidencdsp.c:39
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3460
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
Definition pixdesc.h:158
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition pixfmt.h:75
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition pixfmt.h:99
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition pixfmt.h:102
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition pixfmt.h:101
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition pixfmt.h:100
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
Definition pixfmt.h:84
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition pixfmt.h:76
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
external API header
static av_always_inline int isSwappedChroma(enum AVPixelFormat pix_fmt)
static av_always_inline int isDataInHighBits(enum AVPixelFormat pix_fmt)
static av_always_inline int isAnyRGB(enum AVPixelFormat pix_fmt)
static av_always_inline int isSemiPlanarYUV(enum AVPixelFormat pix_fmt)
static av_always_inline int isBE(enum AVPixelFormat pix_fmt)
static av_always_inline int isNBPS(enum AVPixelFormat pix_fmt)
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29
#define src
Definition vp8dsp.c:248
static FILE * out
Definition movenc.c:55
#define width
Definition dsp.h:89
static const uint16_t dither[8][8]
Definition vf_gradfun.c:46
static const double coeff[2][5]
static double c[64]