FFmpeg
Loading...
Searching...
No Matches
vf_chromashift.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Paul B Mahol
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
21#include "libavutil/imgutils.h"
22#include "libavutil/opt.h"
23#include "libavutil/pixdesc.h"
24
25#include "avfilter.h"
26#include "filters.h"
27#include "video.h"
28
29typedef struct ChromaShiftContext {
30 const AVClass *class;
31 int cbh, cbv;
32 int crh, crv;
33 int rh, rv;
34 int gh, gv;
35 int bh, bv;
36 int ah, av;
37 int edge;
38
40 int depth;
41 int height[4];
42 int width[4];
43 int linesize[4];
44
46
48 int (*filter_slice[2])(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
50
51#define DEFINE_SMEAR(depth, type, div) \
52static int smear_slice ## depth(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \
53{ \
54 ChromaShiftContext *s = ctx->priv; \
55 AVFrame *in = s->in; \
56 AVFrame *out = arg; \
57 const int sulinesize = in->linesize[1] / div; \
58 const int svlinesize = in->linesize[2] / div; \
59 const int ulinesize = out->linesize[1] / div; \
60 const int vlinesize = out->linesize[2] / div; \
61 const int cbh = s->cbh; \
62 const int cbv = s->cbv; \
63 const int crh = s->crh; \
64 const int crv = s->crv; \
65 const int h = s->height[1]; \
66 const int w = s->width[1]; \
67 const int slice_start = ff_slice_pos(h, jobnr, nb_jobs); \
68 const int slice_end = ff_slice_pos(h, jobnr + 1, nb_jobs); \
69 const type *su = (const type *)in->data[1]; \
70 const type *sv = (const type *)in->data[2]; \
71 type *du = (type *)out->data[1] + slice_start * ulinesize; \
72 type *dv = (type *)out->data[2] + slice_start * vlinesize; \
73 \
74 for (int y = slice_start; y < slice_end; y++) { \
75 const int duy = av_clip(y - cbv, 0, h-1) * sulinesize; \
76 const int dvy = av_clip(y - crv, 0, h-1) * svlinesize; \
77 \
78 for (int x = 0; x < w; x++) { \
79 du[x] = su[av_clip(x - cbh, 0, w - 1) + duy]; \
80 dv[x] = sv[av_clip(x - crh, 0, w - 1) + dvy]; \
81 } \
82 \
83 du += ulinesize; \
84 dv += vlinesize; \
85 } \
86 \
87 return 0; \
88}
89
90DEFINE_SMEAR(8, uint8_t, 1)
91DEFINE_SMEAR(16, uint16_t, 2)
92
93#define DEFINE_WRAP(depth, type, div) \
94static int wrap_slice ## depth(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \
95{ \
96 ChromaShiftContext *s = ctx->priv; \
97 AVFrame *in = s->in; \
98 AVFrame *out = arg; \
99 const int sulinesize = in->linesize[1] / div; \
100 const int svlinesize = in->linesize[2] / div; \
101 const int ulinesize = out->linesize[1] / div; \
102 const int vlinesize = out->linesize[2] / div; \
103 const int cbh = s->cbh; \
104 const int cbv = s->cbv; \
105 const int crh = s->crh; \
106 const int crv = s->crv; \
107 const int h = s->height[1]; \
108 const int w = s->width[1]; \
109 const int slice_start = ff_slice_pos(h, jobnr, nb_jobs); \
110 const int slice_end = ff_slice_pos(h, jobnr + 1, nb_jobs); \
111 const type *su = (const type *)in->data[1]; \
112 const type *sv = (const type *)in->data[2]; \
113 type *du = (type *)out->data[1] + slice_start * ulinesize; \
114 type *dv = (type *)out->data[2] + slice_start * vlinesize; \
115 \
116 for (int y = slice_start; y < slice_end; y++) { \
117 int uy = (y - cbv) % h; \
118 int vy = (y - crv) % h; \
119 \
120 if (uy < 0) \
121 uy += h; \
122 if (vy < 0) \
123 vy += h; \
124 \
125 for (int x = 0; x < w; x++) { \
126 int ux = (x - cbh) % w; \
127 int vx = (x - crh) % w; \
128 \
129 if (ux < 0) \
130 ux += w; \
131 if (vx < 0) \
132 vx += w; \
133 \
134 du[x] = su[ux + uy * sulinesize]; \
135 dv[x] = sv[vx + vy * svlinesize]; \
136 } \
137 \
138 du += ulinesize; \
139 dv += vlinesize; \
140 } \
141 \
142 return 0; \
143}
144
145DEFINE_WRAP(8, uint8_t, 1)
146DEFINE_WRAP(16, uint16_t, 2)
147
148#define DEFINE_RGBASMEAR(depth, type, div) \
149static int rgbasmear_slice ## depth(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \
150{ \
151 ChromaShiftContext *s = ctx->priv; \
152 AVFrame *in = s->in; \
153 AVFrame *out = arg; \
154 const int srlinesize = in->linesize[2] / div; \
155 const int sglinesize = in->linesize[0] / div; \
156 const int sblinesize = in->linesize[1] / div; \
157 const int salinesize = in->linesize[3] / div; \
158 const int rlinesize = out->linesize[2] / div; \
159 const int glinesize = out->linesize[0] / div; \
160 const int blinesize = out->linesize[1] / div; \
161 const int alinesize = out->linesize[3] / div; \
162 const int rh = s->rh; \
163 const int rv = s->rv; \
164 const int gh = s->gh; \
165 const int gv = s->gv; \
166 const int bh = s->bh; \
167 const int bv = s->bv; \
168 const int ah = s->ah; \
169 const int av = s->av; \
170 const int h = s->height[1]; \
171 const int w = s->width[1]; \
172 const int slice_start = ff_slice_pos(h, jobnr, nb_jobs); \
173 const int slice_end = ff_slice_pos(h, jobnr + 1, nb_jobs); \
174 const type *sr = (const type *)in->data[2]; \
175 const type *sg = (const type *)in->data[0]; \
176 const type *sb = (const type *)in->data[1]; \
177 const type *sa = (const type *)in->data[3]; \
178 type *dr = (type *)out->data[2] + slice_start * rlinesize; \
179 type *dg = (type *)out->data[0] + slice_start * glinesize; \
180 type *db = (type *)out->data[1] + slice_start * blinesize; \
181 type *da = (type *)out->data[3] + slice_start * alinesize; \
182 \
183 for (int y = slice_start; y < slice_end; y++) { \
184 const int ry = av_clip(y - rv, 0, h-1) * srlinesize; \
185 const int gy = av_clip(y - gv, 0, h-1) * sglinesize; \
186 const int by = av_clip(y - bv, 0, h-1) * sblinesize; \
187 int ay; \
188 \
189 for (int x = 0; x < w; x++) { \
190 dr[x] = sr[av_clip(x - rh, 0, w - 1) + ry]; \
191 dg[x] = sg[av_clip(x - gh, 0, w - 1) + gy]; \
192 db[x] = sb[av_clip(x - bh, 0, w - 1) + by]; \
193 } \
194 \
195 dr += rlinesize; \
196 dg += glinesize; \
197 db += blinesize; \
198 \
199 if (s->nb_planes < 4) \
200 continue; \
201 ay = av_clip(y - av, 0, h-1) * salinesize; \
202 for (int x = 0; x < w; x++) { \
203 da[x] = sa[av_clip(x - ah, 0, w - 1) + ay]; \
204 } \
205 \
206 da += alinesize; \
207 } \
208 \
209 return 0; \
210}
211
212DEFINE_RGBASMEAR(8, uint8_t, 1)
213DEFINE_RGBASMEAR(16, uint16_t, 2)
214
215#define DEFINE_RGBAWRAP(depth, type, div) \
216static int rgbawrap_slice ## depth(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \
217{ \
218 ChromaShiftContext *s = ctx->priv; \
219 AVFrame *in = s->in; \
220 AVFrame *out = arg; \
221 const int srlinesize = in->linesize[2] / div; \
222 const int sglinesize = in->linesize[0] / div; \
223 const int sblinesize = in->linesize[1] / div; \
224 const int salinesize = in->linesize[3] / div; \
225 const int rlinesize = out->linesize[2] / div; \
226 const int glinesize = out->linesize[0] / div; \
227 const int blinesize = out->linesize[1] / div; \
228 const int alinesize = out->linesize[3] / div; \
229 const int rh = s->rh; \
230 const int rv = s->rv; \
231 const int gh = s->gh; \
232 const int gv = s->gv; \
233 const int bh = s->bh; \
234 const int bv = s->bv; \
235 const int ah = s->ah; \
236 const int av = s->av; \
237 const int h = s->height[1]; \
238 const int w = s->width[1]; \
239 const int slice_start = ff_slice_pos(h, jobnr, nb_jobs); \
240 const int slice_end = ff_slice_pos(h, jobnr + 1, nb_jobs); \
241 const type *sr = (const type *)in->data[2]; \
242 const type *sg = (const type *)in->data[0]; \
243 const type *sb = (const type *)in->data[1]; \
244 const type *sa = (const type *)in->data[3]; \
245 type *dr = (type *)out->data[2] + slice_start * rlinesize; \
246 type *dg = (type *)out->data[0] + slice_start * glinesize; \
247 type *db = (type *)out->data[1] + slice_start * blinesize; \
248 type *da = (type *)out->data[3] + slice_start * alinesize; \
249 \
250 for (int y = slice_start; y < slice_end; y++) { \
251 int ry = (y - rv) % h; \
252 int gy = (y - gv) % h; \
253 int by = (y - bv) % h; \
254 \
255 if (ry < 0) \
256 ry += h; \
257 if (gy < 0) \
258 gy += h; \
259 if (by < 0) \
260 by += h; \
261 \
262 for (int x = 0; x < w; x++) { \
263 int rx = (x - rh) % w; \
264 int gx = (x - gh) % w; \
265 int bx = (x - bh) % w; \
266 \
267 if (rx < 0) \
268 rx += w; \
269 if (gx < 0) \
270 gx += w; \
271 if (bx < 0) \
272 bx += w; \
273 dr[x] = sr[rx + ry * srlinesize]; \
274 dg[x] = sg[gx + gy * sglinesize]; \
275 db[x] = sb[bx + by * sblinesize]; \
276 } \
277 \
278 dr += rlinesize; \
279 dg += glinesize; \
280 db += blinesize; \
281 \
282 if (s->nb_planes < 4) \
283 continue; \
284 for (int x = 0; x < w; x++) { \
285 int ax = (x - ah) % w; \
286 int ay = (x - av) % h; \
287 \
288 if (ax < 0) \
289 ax += w; \
290 if (ay < 0) \
291 ay += h; \
292 da[x] = sa[ax + ay * salinesize]; \
293 } \
294 \
295 da += alinesize; \
296 } \
297 \
298 return 0; \
299}
300
301DEFINE_RGBAWRAP(8, uint8_t, 1)
302DEFINE_RGBAWRAP(16, uint16_t, 2)
303
304static int filter_frame(AVFilterLink *inlink, AVFrame *in)
305{
306 AVFilterContext *ctx = inlink->dst;
307 AVFilterLink *outlink = ctx->outputs[0];
308 ChromaShiftContext *s = ctx->priv;
309 AVFrame *out;
310
311 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
312 if (!out) {
313 av_frame_free(&in);
314 return AVERROR(ENOMEM);
315 }
317
318 s->in = in;
319 if (!s->is_rgbashift) {
320 av_image_copy_plane(out->data[0],
321 out->linesize[0],
322 in->data[0], in->linesize[0],
323 s->linesize[0], s->height[0]);
324 }
325 ff_filter_execute(ctx, s->filter_slice[s->edge], out, NULL,
326 FFMIN3(s->height[1],
327 s->height[2],
329 s->in = NULL;
330 av_frame_free(&in);
331 return ff_filter_frame(outlink, out);
332}
333
334static int config_input(AVFilterLink *inlink)
335{
336 AVFilterContext *ctx = inlink->dst;
337 ChromaShiftContext *s = ctx->priv;
339
340 s->is_rgbashift = !strcmp(ctx->filter->name, "rgbashift");
341 s->depth = desc->comp[0].depth;
342 s->nb_planes = desc->nb_components;
343 if (s->is_rgbashift) {
344 s->filter_slice[1] = s->depth > 8 ? rgbawrap_slice16 : rgbawrap_slice8;
345 s->filter_slice[0] = s->depth > 8 ? rgbasmear_slice16 : rgbasmear_slice8;
346 } else {
347 s->filter_slice[1] = s->depth > 8 ? wrap_slice16 : wrap_slice8;
348 s->filter_slice[0] = s->depth > 8 ? smear_slice16 : smear_slice8;
349 }
350 s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
351 s->height[0] = s->height[3] = inlink->h;
352 s->width[1] = s->width[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
353 s->width[0] = s->width[3] = inlink->w;
354
355 return av_image_fill_linesizes(s->linesize, inlink->format, inlink->w);
356}
357
358#define OFFSET(x) offsetof(ChromaShiftContext, x)
359#define VFR AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
360
362 { "cbh", "shift chroma-blue horizontally", OFFSET(cbh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
363 { "cbv", "shift chroma-blue vertically", OFFSET(cbv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
364 { "crh", "shift chroma-red horizontally", OFFSET(crh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
365 { "crv", "shift chroma-red vertically", OFFSET(crv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
366 { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, .unit = "edge" },
367 { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, .unit = "edge" },
368 { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, .unit = "edge" },
369 { NULL },
370};
371
372static const AVFilterPad inputs[] = {
373 {
374 .name = "default",
375 .type = AVMEDIA_TYPE_VIDEO,
376 .filter_frame = filter_frame,
377 .config_props = config_input,
378 },
379};
380
395
397
399 .p.name = "chromashift",
400 .p.description = NULL_IF_CONFIG_SMALL("Shift chroma."),
401 .p.priv_class = &chromashift_class,
403 .priv_size = sizeof(ChromaShiftContext),
407 .process_command = ff_filter_process_command,
408};
409
417
418static const AVOption rgbashift_options[] = {
419 { "rh", "shift red horizontally", OFFSET(rh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
420 { "rv", "shift red vertically", OFFSET(rv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
421 { "gh", "shift green horizontally", OFFSET(gh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
422 { "gv", "shift green vertically", OFFSET(gv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
423 { "bh", "shift blue horizontally", OFFSET(bh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
424 { "bv", "shift blue vertically", OFFSET(bv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
425 { "ah", "shift alpha horizontally", OFFSET(ah), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
426 { "av", "shift alpha vertically", OFFSET(av), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
427 { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, .unit = "edge" },
428 { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, .unit = "edge" },
429 { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, .unit = "edge" },
430 { NULL },
431};
432
434
436 .p.name = "rgbashift",
437 .p.description = NULL_IF_CONFIG_SMALL("Shift RGBA."),
438 .p.priv_class = &rgbashift_class,
440 .priv_size = sizeof(ChromaShiftContext),
444 .process_command = ff_filter_process_command,
445};
static const AVFilterPad inputs[]
Definition af_aap.c:299
static int config_input(AVFilterLink *inlink)
const FFFilter ff_vf_chromashift
const FFFilter ff_vf_rgbashift
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition avfilter.c:1068
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition avfilter.c:906
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition avfilter.c:1696
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition avfilter.c:846
Main libavfilter public API header.
#define s(width, name)
Definition cbs_vp9.c:198
#define AV_CEIL_RSHIFT(a, b)
Definition common.h:60
#define NULL
Definition coverity.c:32
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
#define VFR
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition avfilter.h:196
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:166
#define AVERROR(e)
Definition error.h:45
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:64
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition frame.c:599
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
Definition imgutils.c:374
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
Definition imgutils.c:89
misc image utilities
static enum AVPixelFormat rgb_pix_fmts[]
static enum AVPixelFormat yuv_pix_fmts[]
const char * arg
Definition jacosubdec.c:65
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_PIXFMTS_ARRAY(array)
Definition filters.h:244
#define AVFILTER_DEFINE_CLASS(fname)
Definition filters.h:478
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
const char * desc
Definition libsvtav1.c:83
#define FFMIN3(a, b, c)
Definition macros.h:50
AVOptions.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3460
#define AV_PIX_FMT_GBRAP12
Definition pixfmt.h:569
#define AV_PIX_FMT_YUV420P16
Definition pixfmt.h:556
#define AV_PIX_FMT_YUV444P12
Definition pixfmt.h:552
#define AV_PIX_FMT_YUV444P9
Definition pixfmt.h:544
#define AV_PIX_FMT_YUV420P10
Definition pixfmt.h:545
#define AV_PIX_FMT_YUV440P12
Definition pixfmt.h:551
#define AV_PIX_FMT_GBRAP16
Definition pixfmt.h:571
#define AV_PIX_FMT_GBRP9
Definition pixfmt.h:563
#define AV_PIX_FMT_YUV422P9
Definition pixfmt.h:543
#define AV_PIX_FMT_YUVA444P10
Definition pixfmt.h:598
#define AV_PIX_FMT_YUVA420P16
Definition pixfmt.h:601
#define AV_PIX_FMT_YUV420P12
Definition pixfmt.h:549
#define AV_PIX_FMT_YUVA420P10
Definition pixfmt.h:596
#define AV_PIX_FMT_YUV422P12
Definition pixfmt.h:550
#define AV_PIX_FMT_GBRP10
Definition pixfmt.h:564
#define AV_PIX_FMT_YUV422P10
Definition pixfmt.h:546
#define AV_PIX_FMT_GBRP12
Definition pixfmt.h:565
#define AV_PIX_FMT_YUV420P9
Definition pixfmt.h:542
#define AV_PIX_FMT_YUVA422P10
Definition pixfmt.h:597
#define AV_PIX_FMT_YUV420P14
Definition pixfmt.h:553
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition pixfmt.h:73
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition pixfmt.h:106
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition pixfmt.h:77
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition pixfmt.h:108
@ AV_PIX_FMT_YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
Definition pixfmt.h:107
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition pixfmt.h:79
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition pixfmt.h:80
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition pixfmt.h:78
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition pixfmt.h:174
@ AV_PIX_FMT_YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition pixfmt.h:283
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition pixfmt.h:212
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition pixfmt.h:86
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition pixfmt.h:173
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition pixfmt.h:165
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition pixfmt.h:87
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition pixfmt.h:85
#define AV_PIX_FMT_YUVA422P12
Definition pixfmt.h:599
#define AV_PIX_FMT_YUV422P14
Definition pixfmt.h:554
#define AV_PIX_FMT_YUV422P16
Definition pixfmt.h:557
#define AV_PIX_FMT_YUV440P10
Definition pixfmt.h:547
#define AV_PIX_FMT_GBRAP10
Definition pixfmt.h:568
#define AV_PIX_FMT_YUVA444P16
Definition pixfmt.h:603
#define AV_PIX_FMT_YUVA422P16
Definition pixfmt.h:602
#define AV_PIX_FMT_GBRP16
Definition pixfmt.h:567
#define AV_PIX_FMT_YUV444P14
Definition pixfmt.h:555
#define AV_PIX_FMT_GBRP14
Definition pixfmt.h:566
#define AV_PIX_FMT_YUVA444P12
Definition pixfmt.h:600
#define AV_PIX_FMT_YUV444P16
Definition pixfmt.h:558
#define AV_PIX_FMT_YUV444P10
Definition pixfmt.h:548
Describe the class of an AVClass context structure.
Definition log.h:76
An instance of a filter.
Definition avfilter.h:273
A filter pad used for either input or output.
Definition filters.h:40
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
AVOption.
Definition opt.h:428
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
int(* filter_slice[2])(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static FILE * out
Definition movenc.c:55
static AVFormatContext * ctx
Definition movenc.c:49
#define DEFINE_RGBASMEAR(depth, type, div)
static const AVOption rgbashift_options[]
#define DEFINE_RGBAWRAP(depth, type, div)
static int config_input(AVFilterLink *inlink)
#define DEFINE_WRAP(depth, type, div)
static const AVOption chromashift_options[]
#define OFFSET(x)
#define DEFINE_SMEAR(depth, type, div)
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition video.c:37
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition video.c:89