FFmpeg
vscale.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Pedro Arthur <bygrandao@gmail.com>
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 #include "swscale_internal.h"
21 
22 typedef struct VScalerContext
23 {
24  uint16_t *filter[2];
27  int isMMX;
28  union {
35  } pfn;
38 
39 
40 static int lum_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
41 {
42  VScalerContext *inst = desc->instance;
43  int dstW = desc->dst->width;
44 
45  int first = FFMAX(1-inst->filter_size, inst->filter_pos[sliceY]);
46  int sp = first - desc->src->plane[0].sliceY;
47  int dp = sliceY - desc->dst->plane[0].sliceY;
48  uint8_t **src = desc->src->plane[0].line + sp;
49  uint8_t **dst = desc->dst->plane[0].line + dp;
50  uint16_t *filter = inst->filter[0] + (inst->isMMX ? 0 : sliceY * inst->filter_size);
51 
52  if (inst->filter_size == 1)
53  inst->pfn.yuv2planar1((const int16_t*)src[0], dst[0], dstW, c->lumDither8, 0);
54  else
55  inst->pfn.yuv2planarX(filter, inst->filter_size, (const int16_t**)src, dst[0], dstW, c->lumDither8, 0);
56 
57  if (desc->alpha) {
58  int sp = first - desc->src->plane[3].sliceY;
59  int dp = sliceY - desc->dst->plane[3].sliceY;
60  uint8_t **src = desc->src->plane[3].line + sp;
61  uint8_t **dst = desc->dst->plane[3].line + dp;
62  uint16_t *filter = inst->filter[1] + (inst->isMMX ? 0 : sliceY * inst->filter_size);
63 
64  if (inst->filter_size == 1)
65  inst->pfn.yuv2planar1((const int16_t*)src[0], dst[0], dstW, c->lumDither8, 0);
66  else
67  inst->pfn.yuv2planarX(filter, inst->filter_size, (const int16_t**)src, dst[0], dstW, c->lumDither8, 0);
68  }
69 
70  return 1;
71 }
72 
73 static int chr_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
74 {
75  const int chrSkipMask = (1 << desc->dst->v_chr_sub_sample) - 1;
76  if (sliceY & chrSkipMask)
77  return 0;
78  else {
79  VScalerContext *inst = desc->instance;
80  int dstW = AV_CEIL_RSHIFT(desc->dst->width, desc->dst->h_chr_sub_sample);
81  int chrSliceY = sliceY >> desc->dst->v_chr_sub_sample;
82 
83  int first = FFMAX(1-inst->filter_size, inst->filter_pos[chrSliceY]);
84  int sp1 = first - desc->src->plane[1].sliceY;
85  int sp2 = first - desc->src->plane[2].sliceY;
86  int dp1 = chrSliceY - desc->dst->plane[1].sliceY;
87  int dp2 = chrSliceY - desc->dst->plane[2].sliceY;
88  uint8_t **src1 = desc->src->plane[1].line + sp1;
89  uint8_t **src2 = desc->src->plane[2].line + sp2;
90  uint8_t **dst1 = desc->dst->plane[1].line + dp1;
91  uint8_t **dst2 = desc->dst->plane[2].line + dp2;
92  uint16_t *filter = inst->filter[0] + (inst->isMMX ? 0 : chrSliceY * inst->filter_size);
93 
94  if (c->yuv2nv12cX) {
95  inst->pfn.yuv2interleavedX(c->dstFormat, c->chrDither8, filter, inst->filter_size, (const int16_t**)src1, (const int16_t**)src2, dst1[0], dstW);
96  } else if (inst->filter_size == 1) {
97  inst->pfn.yuv2planar1((const int16_t*)src1[0], dst1[0], dstW, c->chrDither8, 0);
98  inst->pfn.yuv2planar1((const int16_t*)src2[0], dst2[0], dstW, c->chrDither8, 3);
99  } else {
100  inst->pfn.yuv2planarX(filter, inst->filter_size, (const int16_t**)src1, dst1[0], dstW, c->chrDither8, 0);
101  inst->pfn.yuv2planarX(filter, inst->filter_size, (const int16_t**)src2, dst2[0], dstW, c->chrDither8, inst->isMMX ? (c->uv_offx2 >> 1) : 3);
102  }
103  }
104 
105  return 1;
106 }
107 
108 static int packed_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
109 {
110  VScalerContext *inst = desc->instance;
111  int dstW = desc->dst->width;
112  int chrSliceY = sliceY >> desc->dst->v_chr_sub_sample;
113 
114  int lum_fsize = inst[0].filter_size;
115  int chr_fsize = inst[1].filter_size;
116  uint16_t *lum_filter = inst[0].filter[0];
117  uint16_t *chr_filter = inst[1].filter[0];
118 
119  int firstLum = FFMAX(1-lum_fsize, inst[0].filter_pos[ sliceY]);
120  int firstChr = FFMAX(1-chr_fsize, inst[1].filter_pos[chrSliceY]);
121 
122  int sp0 = firstLum - desc->src->plane[0].sliceY;
123  int sp1 = firstChr - desc->src->plane[1].sliceY;
124  int sp2 = firstChr - desc->src->plane[2].sliceY;
125  int sp3 = firstLum - desc->src->plane[3].sliceY;
126  int dp = sliceY - desc->dst->plane[0].sliceY;
127  uint8_t **src0 = desc->src->plane[0].line + sp0;
128  uint8_t **src1 = desc->src->plane[1].line + sp1;
129  uint8_t **src2 = desc->src->plane[2].line + sp2;
130  uint8_t **src3 = desc->alpha ? desc->src->plane[3].line + sp3 : NULL;
131  uint8_t **dst = desc->dst->plane[0].line + dp;
132 
133 
134  if (c->yuv2packed1 && lum_fsize == 1 && chr_fsize == 1) { // unscaled RGB
135  inst->pfn.yuv2packed1(c, (const int16_t*)*src0, (const int16_t**)src1, (const int16_t**)src2,
136  (const int16_t*)(desc->alpha ? *src3 : NULL), *dst, dstW, 0, sliceY);
137  } else if (c->yuv2packed1 && lum_fsize == 1 && chr_fsize == 2 &&
138  chr_filter[2 * chrSliceY + 1] + chr_filter[2 * chrSliceY] == 4096 &&
139  chr_filter[2 * chrSliceY + 1] <= 4096U) { // unscaled RGB
140  int chrAlpha = chr_filter[2 * chrSliceY + 1];
141  inst->pfn.yuv2packed1(c, (const int16_t*)*src0, (const int16_t**)src1, (const int16_t**)src2,
142  (const int16_t*)(desc->alpha ? *src3 : NULL), *dst, dstW, chrAlpha, sliceY);
143  } else if (c->yuv2packed2 && lum_fsize == 2 && chr_fsize == 2 &&
144  lum_filter[2 * sliceY + 1] + lum_filter[2 * sliceY] == 4096 &&
145  lum_filter[2 * sliceY + 1] <= 4096U &&
146  chr_filter[2 * chrSliceY + 1] + chr_filter[2 * chrSliceY] == 4096 &&
147  chr_filter[2 * chrSliceY + 1] <= 4096U
148  ) { // bilinear upscale RGB
149  int lumAlpha = lum_filter[2 * sliceY + 1];
150  int chrAlpha = chr_filter[2 * chrSliceY + 1];
151  c->lumMmxFilter[2] =
152  c->lumMmxFilter[3] = lum_filter[2 * sliceY] * 0x10001;
153  c->chrMmxFilter[2] =
154  c->chrMmxFilter[3] = chr_filter[2 * chrSliceY] * 0x10001;
155  inst->pfn.yuv2packed2(c, (const int16_t**)src0, (const int16_t**)src1, (const int16_t**)src2, (const int16_t**)src3,
156  *dst, dstW, lumAlpha, chrAlpha, sliceY);
157  } else { // general RGB
158  if ((c->yuv2packed1 && lum_fsize == 1 && chr_fsize == 2) ||
159  (c->yuv2packed2 && lum_fsize == 2 && chr_fsize == 2)) {
160  if (!c->warned_unuseable_bilinear)
161  av_log(c, AV_LOG_INFO, "Optimized 2 tap filter code cannot be used\n");
162  c->warned_unuseable_bilinear = 1;
163  }
164 
165  inst->yuv2packedX(c, lum_filter + sliceY * lum_fsize,
166  (const int16_t**)src0, lum_fsize, chr_filter + chrSliceY * chr_fsize,
167  (const int16_t**)src1, (const int16_t**)src2, chr_fsize, (const int16_t**)src3, *dst, dstW, sliceY);
168  }
169  return 1;
170 }
171 
172 static int any_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
173 {
174  VScalerContext *inst = desc->instance;
175  int dstW = desc->dst->width;
176  int chrSliceY = sliceY >> desc->dst->v_chr_sub_sample;
177 
178  int lum_fsize = inst[0].filter_size;
179  int chr_fsize = inst[1].filter_size;
180  uint16_t *lum_filter = inst[0].filter[0];
181  uint16_t *chr_filter = inst[1].filter[0];
182 
183  int firstLum = FFMAX(1-lum_fsize, inst[0].filter_pos[ sliceY]);
184  int firstChr = FFMAX(1-chr_fsize, inst[1].filter_pos[chrSliceY]);
185 
186  int sp0 = firstLum - desc->src->plane[0].sliceY;
187  int sp1 = firstChr - desc->src->plane[1].sliceY;
188  int sp2 = firstChr - desc->src->plane[2].sliceY;
189  int sp3 = firstLum - desc->src->plane[3].sliceY;
190  int dp0 = sliceY - desc->dst->plane[0].sliceY;
191  int dp1 = chrSliceY - desc->dst->plane[1].sliceY;
192  int dp2 = chrSliceY - desc->dst->plane[2].sliceY;
193  int dp3 = sliceY - desc->dst->plane[3].sliceY;
194 
195  uint8_t **src0 = desc->src->plane[0].line + sp0;
196  uint8_t **src1 = desc->src->plane[1].line + sp1;
197  uint8_t **src2 = desc->src->plane[2].line + sp2;
198  uint8_t **src3 = desc->alpha ? desc->src->plane[3].line + sp3 : NULL;
199  uint8_t *dst[4] = { desc->dst->plane[0].line[dp0],
200  desc->dst->plane[1].line[dp1],
201  desc->dst->plane[2].line[dp2],
202  desc->alpha ? desc->dst->plane[3].line[dp3] : NULL };
203 
204  av_assert1(!c->yuv2packed1 && !c->yuv2packed2);
205  inst->pfn.yuv2anyX(c, lum_filter + sliceY * lum_fsize,
206  (const int16_t**)src0, lum_fsize, chr_filter + sliceY * chr_fsize,
207  (const int16_t**)src1, (const int16_t**)src2, chr_fsize, (const int16_t**)src3, dst, dstW, sliceY);
208 
209  return 1;
210 
211 }
212 
214 {
215  VScalerContext *lumCtx = NULL;
216  VScalerContext *chrCtx = NULL;
217 
218  if (isPlanarYUV(c->dstFormat) || (isGray(c->dstFormat) && !isALPHA(c->dstFormat))) {
219  lumCtx = av_mallocz(sizeof(VScalerContext));
220  if (!lumCtx)
221  return AVERROR(ENOMEM);
222 
223 
224  desc[0].process = lum_planar_vscale;
225  desc[0].instance = lumCtx;
226  desc[0].src = src;
227  desc[0].dst = dst;
228  desc[0].alpha = c->needAlpha;
229 
230  if (!isGray(c->dstFormat)) {
231  chrCtx = av_mallocz(sizeof(VScalerContext));
232  if (!chrCtx)
233  return AVERROR(ENOMEM);
234  desc[1].process = chr_planar_vscale;
235  desc[1].instance = chrCtx;
236  desc[1].src = src;
237  desc[1].dst = dst;
238  }
239  } else {
240  lumCtx = av_calloc(2, sizeof(*lumCtx));
241  if (!lumCtx)
242  return AVERROR(ENOMEM);
243  chrCtx = &lumCtx[1];
244 
245  desc[0].process = c->yuv2packedX ? packed_vscale : any_vscale;
246  desc[0].instance = lumCtx;
247  desc[0].src = src;
248  desc[0].dst = dst;
249  desc[0].alpha = c->needAlpha;
250  }
251 
252  ff_init_vscale_pfn(c, c->yuv2plane1, c->yuv2planeX, c->yuv2nv12cX,
253  c->yuv2packed1, c->yuv2packed2, c->yuv2packedX, c->yuv2anyX, c->use_mmx_vfilter);
254  return 0;
255 }
256 
258  yuv2planar1_fn yuv2plane1,
260  yuv2interleavedX_fn yuv2nv12cX,
261  yuv2packed1_fn yuv2packed1,
262  yuv2packed2_fn yuv2packed2,
263  yuv2packedX_fn yuv2packedX,
264  yuv2anyX_fn yuv2anyX, int use_mmx)
265 {
266  VScalerContext *lumCtx = NULL;
267  VScalerContext *chrCtx = NULL;
268  int idx = c->numDesc - (c->is_internal_gamma ? 2 : 1); //FIXME avoid hardcoding indexes
269 
270  if (isPlanarYUV(c->dstFormat) || (isGray(c->dstFormat) && !isALPHA(c->dstFormat))) {
271  if (!isGray(c->dstFormat)) {
272  chrCtx = c->desc[idx].instance;
273 
274  chrCtx->filter[0] = use_mmx ? (int16_t*)c->chrMmxFilter : c->vChrFilter;
275  chrCtx->filter_size = c->vChrFilterSize;
276  chrCtx->filter_pos = c->vChrFilterPos;
277  chrCtx->isMMX = use_mmx;
278 
279  --idx;
280  if (yuv2nv12cX) chrCtx->pfn.yuv2interleavedX = yuv2nv12cX;
281  else if (c->vChrFilterSize == 1) chrCtx->pfn.yuv2planar1 = yuv2plane1;
282  else chrCtx->pfn.yuv2planarX = yuv2planeX;
283  }
284 
285  lumCtx = c->desc[idx].instance;
286 
287  lumCtx->filter[0] = use_mmx ? (int16_t*)c->lumMmxFilter : c->vLumFilter;
288  lumCtx->filter[1] = use_mmx ? (int16_t*)c->alpMmxFilter : c->vLumFilter;
289  lumCtx->filter_size = c->vLumFilterSize;
290  lumCtx->filter_pos = c->vLumFilterPos;
291  lumCtx->isMMX = use_mmx;
292 
293  if (c->vLumFilterSize == 1) lumCtx->pfn.yuv2planar1 = yuv2plane1;
294  else lumCtx->pfn.yuv2planarX = yuv2planeX;
295 
296  } else {
297  lumCtx = c->desc[idx].instance;
298  chrCtx = &lumCtx[1];
299 
300  lumCtx->filter[0] = c->vLumFilter;
301  lumCtx->filter_size = c->vLumFilterSize;
302  lumCtx->filter_pos = c->vLumFilterPos;
303 
304  chrCtx->filter[0] = c->vChrFilter;
305  chrCtx->filter_size = c->vChrFilterSize;
306  chrCtx->filter_pos = c->vChrFilterPos;
307 
308  lumCtx->isMMX = use_mmx;
309  chrCtx->isMMX = use_mmx;
310 
311  if (yuv2packedX) {
312  if (c->yuv2packed1 && c->vLumFilterSize == 1 && c->vChrFilterSize <= 2)
313  lumCtx->pfn.yuv2packed1 = yuv2packed1;
314  else if (c->yuv2packed2 && c->vLumFilterSize == 2 && c->vChrFilterSize == 2)
315  lumCtx->pfn.yuv2packed2 = yuv2packed2;
316  lumCtx->yuv2packedX = yuv2packedX;
317  } else
318  lumCtx->pfn.yuv2anyX = yuv2anyX;
319  }
320 }
321 
322 
yuv2packed2_fn
void(* yuv2packed2_fn)(struct SwsContext *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...
Definition: swscale_internal.h:220
yuv2planar1_fn
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 (...
Definition: swscale_internal.h:114
yuv2packed1_fn
void(* yuv2packed1_fn)(struct SwsContext *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...
Definition: swscale_internal.h:187
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
VScalerContext::filter_pos
int32_t * filter_pos
Definition: vscale.c:25
src1
const pixel * src1
Definition: h264pred_template.c:421
SwsFilterDescriptor
Struct which holds all necessary data for processing a slice.
Definition: swscale_internal.h:1083
yuv2planeX
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)
Definition: swscale_ppc_template.c:84
VScalerContext::yuv2planar1
yuv2planar1_fn yuv2planar1
Definition: vscale.c:29
isGray
#define isGray(x)
Definition: swscale.c:40
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
VScalerContext::pfn
union VScalerContext::@324 pfn
ff_init_vscale_pfn
void ff_init_vscale_pfn(SwsContext *c, yuv2planar1_fn yuv2plane1, yuv2planarX_fn yuv2planeX, yuv2interleavedX_fn yuv2nv12cX, yuv2packed1_fn yuv2packed1, yuv2packed2_fn yuv2packed2, yuv2packedX_fn yuv2packedX, yuv2anyX_fn yuv2anyX, int use_mmx)
setup vertical scaler functions
Definition: vscale.c:257
yuv2anyX_fn
void(* yuv2anyX_fn)(struct SwsContext *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...
Definition: swscale_internal.h:286
chr_planar_vscale
static int chr_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
Definition: vscale.c:73
U
#define U(x)
Definition: vp56_arith.h:37
VScalerContext::yuv2anyX
yuv2anyX_fn yuv2anyX
Definition: vscale.c:34
VScalerContext::isMMX
int isMMX
Definition: vscale.c:27
first
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But first
Definition: rate_distortion.txt:12
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:50
VScalerContext::yuv2planarX
yuv2planarX_fn yuv2planarX
Definition: vscale.c:30
lum_planar_vscale
static int lum_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
Definition: vscale.c:40
if
if(ret)
Definition: filter_design.txt:179
NULL
#define NULL
Definition: coverity.c:32
any_vscale
static int any_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
Definition: vscale.c:172
VScalerContext::filter_size
int filter_size
Definition: vscale.c:26
c
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
Definition: undefined.txt:32
packed_vscale
static int packed_vscale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
Definition: vscale.c:108
sp
#define sp
Definition: regdef.h:63
VScalerContext::yuv2packedX
yuv2packedX_fn yuv2packedX
Definition: vscale.c:36
VScalerContext::yuv2packed2
yuv2packed2_fn yuv2packed2
Definition: vscale.c:33
isALPHA
#define isALPHA(x)
Definition: swscale.c:51
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
src2
const pixel * src2
Definition: h264pred_template.c:422
av_assert1
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
Definition: avassert.h:53
swscale_internal.h
yuv2interleavedX_fn
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 ...
Definition: swscale_internal.h:150
av_mallocz
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Definition: mem.c:264
SwsSlice
Struct which defines a slice of an image to be scaled or an output for a scaled slice.
Definition: swscale_internal.h:1068
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:272
ff_init_vscale
int ff_init_vscale(SwsContext *c, SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst)
initializes vertical scaling descriptors
Definition: vscale.c:213
yuv2planarX_fn
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...
Definition: swscale_internal.h:130
VScalerContext::filter
uint16_t * filter[2]
Definition: vscale.c:24
yuv2packedX_fn
void(* yuv2packedX_fn)(struct SwsContext *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...
Definition: swscale_internal.h:252
src0
const pixel *const src0
Definition: h264pred_template.c:420
isPlanarYUV
static av_always_inline int isPlanarYUV(enum AVPixelFormat pix_fmt)
Definition: vf_dnn_processing.c:155
desc
const char * desc
Definition: libsvtav1.c:83
VScalerContext::yuv2interleavedX
yuv2interleavedX_fn yuv2interleavedX
Definition: vscale.c:31
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
int32_t
int32_t
Definition: audioconvert.c:56
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
SwsContext
Definition: swscale_internal.h:298
VScalerContext::yuv2packed1
yuv2packed1_fn yuv2packed1
Definition: vscale.c:32
VScalerContext
Definition: vscale.c:22