FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vf_fillborders.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 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/colorspace.h"
22 #include "libavutil/common.h"
23 #include "libavutil/opt.h"
24 #include "libavutil/pixdesc.h"
25 #include "avfilter.h"
26 #include "drawutils.h"
27 #include "formats.h"
28 #include "internal.h"
29 #include "video.h"
30 
31 enum { Y, U, V, A };
32 enum { R, G, B };
33 
35 
36 typedef struct Borders {
37  int left, right, top, bottom;
38 } Borders;
39 
40 typedef struct FillBordersContext {
41  const AVClass *class;
42  int left, right, top, bottom;
43  int mode;
44 
45  int nb_planes;
46  int depth;
48  int planewidth[4];
49  int planeheight[4];
53 
56 
58 {
59  static const enum AVPixelFormat pix_fmts[] = {
78  };
79  AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
80  if (!fmts_list)
81  return AVERROR(ENOMEM);
82  return ff_set_common_formats(ctx, fmts_list);
83 }
84 
86 {
87  int p, y;
88 
89  for (p = 0; p < s->nb_planes; p++) {
90  uint8_t *ptr = frame->data[p];
91  int linesize = frame->linesize[p];
92 
93  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
94  memset(ptr + y * linesize,
95  *(ptr + y * linesize + s->borders[p].left),
96  s->borders[p].left);
97  memset(ptr + y * linesize + s->planewidth[p] - s->borders[p].right,
98  *(ptr + y * linesize + s->planewidth[p] - s->borders[p].right - 1),
99  s->borders[p].right);
100  }
101 
102  for (y = 0; y < s->borders[p].top; y++) {
103  memcpy(ptr + y * linesize,
104  ptr + s->borders[p].top * linesize, s->planewidth[p]);
105  }
106 
107  for (y = s->planeheight[p] - s->borders[p].bottom; y < s->planeheight[p]; y++) {
108  memcpy(ptr + y * linesize,
109  ptr + (s->planeheight[p] - s->borders[p].bottom - 1) * linesize,
110  s->planewidth[p]);
111  }
112  }
113 }
114 
116 {
117  int p, y, x;
118 
119  for (p = 0; p < s->nb_planes; p++) {
120  uint16_t *ptr = (uint16_t *)frame->data[p];
121  int linesize = frame->linesize[p] / 2;
122 
123  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
124  for (x = 0; x < s->borders[p].left; x++) {
125  ptr[y * linesize + x] = *(ptr + y * linesize + s->borders[p].left);
126  }
127 
128  for (x = 0; x < s->borders[p].right; x++) {
129  ptr[y * linesize + s->planewidth[p] - s->borders[p].right + x] =
130  *(ptr + y * linesize + s->planewidth[p] - s->borders[p].right - 1);
131  }
132  }
133 
134  for (y = 0; y < s->borders[p].top; y++) {
135  memcpy(ptr + y * linesize,
136  ptr + s->borders[p].top * linesize, s->planewidth[p] * 2);
137  }
138 
139  for (y = s->planeheight[p] - s->borders[p].bottom; y < s->planeheight[p]; y++) {
140  memcpy(ptr + y * linesize,
141  ptr + (s->planeheight[p] - s->borders[p].bottom - 1) * linesize,
142  s->planewidth[p] * 2);
143  }
144  }
145 }
146 
148 {
149  int p, y, x;
150 
151  for (p = 0; p < s->nb_planes; p++) {
152  uint8_t *ptr = frame->data[p];
153  int linesize = frame->linesize[p];
154 
155  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
156  for (x = 0; x < s->borders[p].left; x++) {
157  ptr[y * linesize + x] = ptr[y * linesize + s->borders[p].left * 2 - 1 - x];
158  }
159 
160  for (x = 0; x < s->borders[p].right; x++) {
161  ptr[y * linesize + s->planewidth[p] - s->borders[p].right + x] =
162  ptr[y * linesize + s->planewidth[p] - s->borders[p].right - 1 - x];
163  }
164  }
165 
166  for (y = 0; y < s->borders[p].top; y++) {
167  memcpy(ptr + y * linesize,
168  ptr + (s->borders[p].top * 2 - 1 - y) * linesize,
169  s->planewidth[p]);
170  }
171 
172  for (y = 0; y < s->borders[p].bottom; y++) {
173  memcpy(ptr + (s->planeheight[p] - s->borders[p].bottom + y) * linesize,
174  ptr + (s->planeheight[p] - s->borders[p].bottom - 1 - y) * linesize,
175  s->planewidth[p]);
176  }
177  }
178 }
179 
181 {
182  int p, y, x;
183 
184  for (p = 0; p < s->nb_planes; p++) {
185  uint16_t *ptr = (uint16_t *)frame->data[p];
186  int linesize = frame->linesize[p] / 2;
187 
188  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
189  for (x = 0; x < s->borders[p].left; x++) {
190  ptr[y * linesize + x] = ptr[y * linesize + s->borders[p].left * 2 - 1 - x];
191  }
192 
193  for (x = 0; x < s->borders[p].right; x++) {
194  ptr[y * linesize + s->planewidth[p] - s->borders[p].right + x] =
195  ptr[y * linesize + s->planewidth[p] - s->borders[p].right - 1 - x];
196  }
197  }
198 
199  for (y = 0; y < s->borders[p].top; y++) {
200  memcpy(ptr + y * linesize,
201  ptr + (s->borders[p].top * 2 - 1 - y) * linesize,
202  s->planewidth[p] * 2);
203  }
204 
205  for (y = 0; y < s->borders[p].bottom; y++) {
206  memcpy(ptr + (s->planeheight[p] - s->borders[p].bottom + y) * linesize,
207  ptr + (s->planeheight[p] - s->borders[p].bottom - 1 - y) * linesize,
208  s->planewidth[p] * 2);
209  }
210  }
211 }
212 
214 {
215  int p, y;
216 
217  for (p = 0; p < s->nb_planes; p++) {
218  uint8_t *ptr = frame->data[p];
219  uint8_t fill = s->fill[p];
220  int linesize = frame->linesize[p];
221 
222  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
223  memset(ptr + y * linesize, fill, s->borders[p].left);
224  memset(ptr + y * linesize + s->planewidth[p] - s->borders[p].right, fill,
225  s->borders[p].right);
226  }
227 
228  for (y = 0; y < s->borders[p].top; y++) {
229  memset(ptr + y * linesize, fill, s->planewidth[p]);
230  }
231 
232  for (y = s->planeheight[p] - s->borders[p].bottom; y < s->planeheight[p]; y++) {
233  memset(ptr + y * linesize, fill, s->planewidth[p]);
234  }
235  }
236 }
237 
239 {
240  int p, y, x;
241 
242  for (p = 0; p < s->nb_planes; p++) {
243  uint16_t *ptr = (uint16_t *)frame->data[p];
244  uint16_t fill = s->fill[p] << (s->depth - 8);
245  int linesize = frame->linesize[p] / 2;
246 
247  for (y = s->borders[p].top; y < s->planeheight[p] - s->borders[p].bottom; y++) {
248  for (x = 0; x < s->borders[p].left; x++) {
249  ptr[y * linesize + x] = fill;
250  }
251 
252  for (x = 0; x < s->borders[p].right; x++) {
253  ptr[y * linesize + s->planewidth[p] - s->borders[p].right + x] = fill;
254  }
255  }
256 
257  for (y = 0; y < s->borders[p].top; y++) {
258  for (x = 0; x < s->planewidth[p]; x++) {
259  ptr[y * linesize + x] = fill;
260  }
261  }
262 
263  for (y = s->planeheight[p] - s->borders[p].bottom; y < s->planeheight[p]; y++) {
264  for (x = 0; x < s->planewidth[p]; x++) {
265  ptr[y * linesize + x] = fill;
266  }
267  }
268  }
269 }
270 
271 static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
272 {
273  FillBordersContext *s = inlink->dst->priv;
274 
275  s->fillborders(s, frame);
276 
277  return ff_filter_frame(inlink->dst->outputs[0], frame);
278 }
279 
280 static int config_input(AVFilterLink *inlink)
281 {
282  AVFilterContext *ctx = inlink->dst;
283  FillBordersContext *s = ctx->priv;
285 
286  s->nb_planes = desc->nb_components;
287  s->depth = desc->comp[0].depth;
288 
289  s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
290  s->planeheight[0] = s->planeheight[3] = inlink->h;
291  s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
292  s->planewidth[0] = s->planewidth[3] = inlink->w;
293 
294  s->borders[0].left = s->borders[3].left = s->left;
295  s->borders[0].right = s->borders[3].right = s->right;
296  s->borders[0].top = s->borders[3].top = s->top;
297  s->borders[0].bottom = s->borders[3].bottom = s->bottom;
298 
299  s->borders[1].left = s->left >> desc->log2_chroma_w;
300  s->borders[1].right = s->right >> desc->log2_chroma_w;
301  s->borders[1].top = s->top >> desc->log2_chroma_h;
302  s->borders[1].bottom = s->bottom >> desc->log2_chroma_h;
303 
304  s->borders[2].left = s->left >> desc->log2_chroma_w;
305  s->borders[2].right = s->right >> desc->log2_chroma_w;
306  s->borders[2].top = s->top >> desc->log2_chroma_h;
307  s->borders[2].bottom = s->bottom >> desc->log2_chroma_h;
308 
309  if (inlink->w < s->left + s->right ||
310  inlink->w <= s->left ||
311  inlink->w <= s->right ||
312  inlink->h < s->top + s->bottom ||
313  inlink->h <= s->top ||
314  inlink->h <= s->bottom ||
315  inlink->w < s->left * 2 ||
316  inlink->w < s->right * 2 ||
317  inlink->h < s->top * 2 ||
318  inlink->h < s->bottom * 2) {
319  av_log(ctx, AV_LOG_ERROR, "Borders are bigger than input frame size.\n");
320  return AVERROR(EINVAL);
321  }
322 
323  switch (s->mode) {
324  case FM_SMEAR: s->fillborders = s->depth <= 8 ? smear_borders8 : smear_borders16; break;
325  case FM_MIRROR: s->fillborders = s->depth <= 8 ? mirror_borders8 : mirror_borders16; break;
326  case FM_FIXED: s->fillborders = s->depth <= 8 ? fixed_borders8 : fixed_borders16; break;
327  }
328 
330  s->yuv_color[U] = RGB_TO_U_CCIR(s->rgba_color[R], s->rgba_color[G], s->rgba_color[B], 0);
331  s->yuv_color[V] = RGB_TO_V_CCIR(s->rgba_color[R], s->rgba_color[G], s->rgba_color[B], 0);
332  s->yuv_color[A] = s->rgba_color[A];
333 
334  if (desc->flags & AV_PIX_FMT_FLAG_RGB) {
335  uint8_t rgba_map[4];
336  int i;
337 
338  ff_fill_rgba_map(rgba_map, inlink->format);
339  for (i = 0; i < 4; i++)
340  s->fill[rgba_map[i]] = s->rgba_color[i];
341  } else {
342  memcpy(s->fill, s->yuv_color, sizeof(s->yuv_color));
343  }
344 
345  return 0;
346 }
347 
348 #define OFFSET(x) offsetof(FillBordersContext, x)
349 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
350 
351 static const AVOption fillborders_options[] = {
352  { "left", "set the left fill border", OFFSET(left), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
353  { "right", "set the right fill border", OFFSET(right), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
354  { "top", "set the top fill border", OFFSET(top), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
355  { "bottom", "set the bottom fill border", OFFSET(bottom), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
356  { "mode", "set the fill borders mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=FM_SMEAR}, 0, FM_NB_MODES-1, FLAGS, "mode" },
357  { "smear", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_SMEAR}, 0, 0, FLAGS, "mode" },
358  { "mirror", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_MIRROR}, 0, 0, FLAGS, "mode" },
359  { "fixed", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_FIXED}, 0, 0, FLAGS, "mode" },
360  { "color", "set the color for the fixed mode", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS },
361  { NULL }
362 };
363 
365 
366 static const AVFilterPad fillborders_inputs[] = {
367  {
368  .name = "default",
369  .type = AVMEDIA_TYPE_VIDEO,
370  .config_props = config_input,
371  .filter_frame = filter_frame,
372  .needs_writable = 1,
373  },
374  { NULL }
375 };
376 
378  {
379  .name = "default",
380  .type = AVMEDIA_TYPE_VIDEO,
381  },
382  { NULL }
383 };
384 
386  .name = "fillborders",
387  .description = NULL_IF_CONFIG_SMALL("Fill borders of the input video."),
388  .priv_size = sizeof(FillBordersContext),
389  .priv_class = &fillborders_class,
391  .inputs = fillborders_inputs,
392  .outputs = fillborders_outputs,
394 };
AVFILTER_DEFINE_CLASS(fillborders)
#define NULL
Definition: coverity.c:32
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:407
const char * s
Definition: avisynth_c.h:768
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:401
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2363
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
static const AVOption fillborders_options[]
AVOption.
Definition: opt.h:246
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:403
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:378
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:388
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:404
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:67
Main libavfilter public API header.
const char * desc
Definition: nvenc.c:65
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:164
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:384
Various defines for YUV<->RGB conversion.
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:349
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:372
static void fixed_borders16(FillBordersContext *s, AVFrame *frame)
static const AVFilterPad fillborders_inputs[]
static void mirror_borders8(FillBordersContext *s, AVFrame *frame)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:92
AVFilterFormats * ff_make_format_list(const int *fmts)
Create a list of supported formats.
Definition: formats.c:283
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:350
#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:125
const char * name
Pad name.
Definition: internal.h:60
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:351
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1080
static void mirror_borders16(FillBordersContext *s, AVFrame *frame)
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:97
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Definition: pixdesc.h:117
uint8_t
AVOptions.
#define FLAGS
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:400
#define AV_PIX_FMT_GBRP9
Definition: pixfmt.h:383
static void smear_borders16(FillBordersContext *s, AVFrame *frame)
static AVFrame * frame
static void fixed_borders8(FillBordersContext *s, AVFrame *frame)
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
Definition: pixfmt.h:96
static int flags
Definition: log.c:55
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:75
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:381
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:373
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:406
#define av_log(a,...)
A filter pad used for either input or output.
Definition: internal.h:54
#define OFFSET(x)
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:172
uint8_t rgba_color[4]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
Definition: formats.c:568
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:101
#define AVERROR(e)
Definition: error.h:43
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
Definition: pixdesc.h:148
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
void * priv
private data for use by the filter
Definition: avfilter.h:353
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:408
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:389
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:371
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:390
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:66
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
Definition: pixdesc.h:106
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:366
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition: pixdesc.h:83
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:387
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:352
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:74
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static void smear_borders8(FillBordersContext *s, AVFrame *frame)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
static int config_input(AVFilterLink *inlink)
AVFormatContext * ctx
Definition: movenc.c:48
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:405
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:367
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:386
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
Definition: drawutils.c:35
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:379
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:376
misc drawing utilities
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Definition: frame.h:249
uint8_t yuv_color[4]
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:173
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:81
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:368
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:68
static int query_formats(AVFilterContext *ctx)
Describe the class of an AVClass context structure.
Definition: log.h:67
Filter definition.
Definition: avfilter.h:144
static const AVFilterPad fillborders_outputs[]
void(* fillborders)(struct FillBordersContext *s, AVFrame *frame)
const char * name
Filter name.
Definition: avfilter.h:148
#define AV_PIX_FMT_YUV440P12
Definition: pixfmt.h:374
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:365
AVFilterLink ** outputs
array of pointers to output links
Definition: avfilter.h:350
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:266
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:377
#define RGB_TO_U_CCIR(r1, g1, b1, shift)
Definition: colorspace.h:102
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:385
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:369
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:375
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:232
#define RGB_TO_V_CCIR(r1, g1, b1, shift)
Definition: colorspace.h:106
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:62
Y , 8bpp.
Definition: pixfmt.h:70
common internal and external API header
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:211
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:402
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:76
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:69
#define RGB_TO_Y_CCIR(r, g, b)
Definition: colorspace.h:98
FillMode
AVFilter ff_vf_fillborders
A list of supported formats for one end of a filter link.
Definition: formats.h:64
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition: pixfmt.h:254
An instance of a filter.
Definition: avfilter.h:338
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:95
internal API functions
int depth
Number of bits in the component.
Definition: pixdesc.h:58
AVPixelFormat
Pixel format.
Definition: pixfmt.h:60
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:380
for(j=16;j >0;--j)
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:58