FFmpeg
vf_codecview.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
3  * Copyright (c) 2014 Clément Bœsch <u pkh me>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Codec debug viewer filter.
25  *
26  * All the MV drawing code from Michael Niedermayer is extracted from
27  * libavcodec/mpegvideo.c.
28  *
29  * TODO: segmentation
30  */
31 
32 #include "libavutil/imgutils.h"
34 #include "libavutil/opt.h"
36 #include "avfilter.h"
37 #include "qp_table.h"
38 #include "internal.h"
39 
40 #define MV_P_FOR (1<<0)
41 #define MV_B_FOR (1<<1)
42 #define MV_B_BACK (1<<2)
43 #define MV_TYPE_FOR (1<<0)
44 #define MV_TYPE_BACK (1<<1)
45 #define FRAME_TYPE_I (1<<0)
46 #define FRAME_TYPE_P (1<<1)
47 #define FRAME_TYPE_B (1<<2)
48 
49 typedef struct CodecViewContext {
50  const AVClass *class;
51  unsigned mv;
52  unsigned frame_type;
53  unsigned mv_type;
54  int hsub, vsub;
55  int qp;
56  int block;
58 
59 #define OFFSET(x) offsetof(CodecViewContext, x)
60 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
61 #define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, 0, 0, FLAGS, unit }
62 
63 static const AVOption codecview_options[] = {
64  { "mv", "set motion vectors to visualize", OFFSET(mv), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv" },
65  CONST("pf", "forward predicted MVs of P-frames", MV_P_FOR, "mv"),
66  CONST("bf", "forward predicted MVs of B-frames", MV_B_FOR, "mv"),
67  CONST("bb", "backward predicted MVs of B-frames", MV_B_BACK, "mv"),
68  { "qp", NULL, OFFSET(qp), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, .flags = FLAGS },
69  { "mv_type", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
70  { "mvt", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
71  CONST("fp", "forward predicted MVs", MV_TYPE_FOR, "mv_type"),
72  CONST("bp", "backward predicted MVs", MV_TYPE_BACK, "mv_type"),
73  { "frame_type", "set frame types to visualize motion vectors of", OFFSET(frame_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "frame_type" },
74  { "ft", "set frame types to visualize motion vectors of", OFFSET(frame_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "frame_type" },
75  CONST("if", "I-frames", FRAME_TYPE_I, "frame_type"),
76  CONST("pf", "P-frames", FRAME_TYPE_P, "frame_type"),
77  CONST("bf", "B-frames", FRAME_TYPE_B, "frame_type"),
78  { "block", "set block partitioning structure to visualize", OFFSET(block), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
79  { NULL }
80 };
81 
82 AVFILTER_DEFINE_CLASS(codecview);
83 
84 static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
85 {
86  if(*sx > *ex)
87  return clip_line(ex, ey, sx, sy, maxx);
88 
89  if (*sx < 0) {
90  if (*ex < 0)
91  return 1;
92  *sy = *ey + (*sy - *ey) * (int64_t)*ex / (*ex - *sx);
93  *sx = 0;
94  }
95 
96  if (*ex > maxx) {
97  if (*sx > maxx)
98  return 1;
99  *ey = *sy + (*ey - *sy) * (int64_t)(maxx - *sx) / (*ex - *sx);
100  *ex = maxx;
101  }
102  return 0;
103 }
104 
105 /**
106  * Draw a line from (ex, ey) -> (sx, sy).
107  * @param w width of the image
108  * @param h height of the image
109  * @param stride stride/linesize of the image
110  * @param color color of the arrow
111  */
112 static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey,
113  int w, int h, int stride, int color)
114 {
115  int x, y, fr, f;
116 
117  if (clip_line(&sx, &sy, &ex, &ey, w - 1))
118  return;
119  if (clip_line(&sy, &sx, &ey, &ex, h - 1))
120  return;
121 
122  sx = av_clip(sx, 0, w - 1);
123  sy = av_clip(sy, 0, h - 1);
124  ex = av_clip(ex, 0, w - 1);
125  ey = av_clip(ey, 0, h - 1);
126 
127  buf[sy * stride + sx] += color;
128 
129  if (FFABS(ex - sx) > FFABS(ey - sy)) {
130  if (sx > ex) {
131  FFSWAP(int, sx, ex);
132  FFSWAP(int, sy, ey);
133  }
134  buf += sx + sy * stride;
135  ex -= sx;
136  f = ((ey - sy) * (1 << 16)) / ex;
137  for (x = 0; x <= ex; x++) {
138  y = (x * f) >> 16;
139  fr = (x * f) & 0xFFFF;
140  buf[ y * stride + x] += (color * (0x10000 - fr)) >> 16;
141  if(fr) buf[(y + 1) * stride + x] += (color * fr ) >> 16;
142  }
143  } else {
144  if (sy > ey) {
145  FFSWAP(int, sx, ex);
146  FFSWAP(int, sy, ey);
147  }
148  buf += sx + sy * stride;
149  ey -= sy;
150  if (ey)
151  f = ((ex - sx) * (1 << 16)) / ey;
152  else
153  f = 0;
154  for(y= 0; y <= ey; y++){
155  x = (y*f) >> 16;
156  fr = (y*f) & 0xFFFF;
157  buf[y * stride + x ] += (color * (0x10000 - fr)) >> 16;
158  if(fr) buf[y * stride + x + 1] += (color * fr ) >> 16;
159  }
160  }
161 }
162 
163 /**
164  * Draw an arrow from (ex, ey) -> (sx, sy).
165  * @param w width of the image
166  * @param h height of the image
167  * @param stride stride/linesize of the image
168  * @param color color of the arrow
169  */
170 static void draw_arrow(uint8_t *buf, int sx, int sy, int ex,
171  int ey, int w, int h, int stride, int color, int tail, int direction)
172 {
173  int dx,dy;
174 
175  if (direction) {
176  FFSWAP(int, sx, ex);
177  FFSWAP(int, sy, ey);
178  }
179 
180  sx = av_clip(sx, -100, w + 100);
181  sy = av_clip(sy, -100, h + 100);
182  ex = av_clip(ex, -100, w + 100);
183  ey = av_clip(ey, -100, h + 100);
184 
185  dx = ex - sx;
186  dy = ey - sy;
187 
188  if (dx * dx + dy * dy > 3 * 3) {
189  int rx = dx + dy;
190  int ry = -dx + dy;
191  int length = sqrt((rx * rx + ry * ry) << 8);
192 
193  // FIXME subpixel accuracy
194  rx = ROUNDED_DIV(rx * (3 << 4), length);
195  ry = ROUNDED_DIV(ry * (3 << 4), length);
196 
197  if (tail) {
198  rx = -rx;
199  ry = -ry;
200  }
201 
202  draw_line(buf, sx, sy, sx + rx, sy + ry, w, h, stride, color);
203  draw_line(buf, sx, sy, sx - ry, sy + rx, w, h, stride, color);
204  }
205  draw_line(buf, sx, sy, ex, ey, w, h, stride, color);
206 }
207 
208 static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, int stride, int color)
209 {
210  for (int x = sx; x < sx + w; x++)
211  buf[x] = color;
212 
213  for (int y = sy; y < sy + h; y++) {
214  buf[sx] = color;
215  buf[sx + w - 1] = color;
216  buf += stride;
217  }
218 
219  for (int x = sx; x < sx + w; x++)
220  buf[x] = color;
221 }
222 
224 {
225  AVFilterContext *ctx = inlink->dst;
226  CodecViewContext *s = ctx->priv;
227  AVFilterLink *outlink = ctx->outputs[0];
228 
229  if (s->qp) {
230  int qstride, qp_type, ret;
231  int8_t *qp_table;
232 
233  ret = ff_qp_table_extract(frame, &qp_table, &qstride, NULL, &qp_type);
234  if (ret < 0) {
236  return ret;
237  }
238 
239  if (qp_table) {
240  int x, y;
241  const int w = AV_CEIL_RSHIFT(frame->width, s->hsub);
242  const int h = AV_CEIL_RSHIFT(frame->height, s->vsub);
243  uint8_t *pu = frame->data[1];
244  uint8_t *pv = frame->data[2];
245  const int lzu = frame->linesize[1];
246  const int lzv = frame->linesize[2];
247 
248  for (y = 0; y < h; y++) {
249  for (x = 0; x < w; x++) {
250  const int qp = ff_norm_qscale(qp_table[(y >> 3) * qstride + (x >> 3)], qp_type) * 128/31;
251  pu[x] = pv[x] = qp;
252  }
253  pu += lzu;
254  pv += lzv;
255  }
256  }
257  av_freep(&qp_table);
258  }
259 
260  if (s->block) {
262  if (sd) {
264  const int stride = frame->linesize[0];
265 
266  if (par->nb_blocks) {
267  for (int block_idx = 0; block_idx < par->nb_blocks; block_idx++) {
269  uint8_t *buf = frame->data[0] + b->src_y * stride;
270 
271  draw_block_rectangle(buf, b->src_x, b->src_y, b->w, b->h, stride, 100);
272  }
273  }
274  }
275  }
276 
277  if (s->mv || s->mv_type) {
279  if (sd) {
280  int i;
281  const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
282  const int is_iframe = (s->frame_type & FRAME_TYPE_I) && frame->pict_type == AV_PICTURE_TYPE_I;
283  const int is_pframe = (s->frame_type & FRAME_TYPE_P) && frame->pict_type == AV_PICTURE_TYPE_P;
284  const int is_bframe = (s->frame_type & FRAME_TYPE_B) && frame->pict_type == AV_PICTURE_TYPE_B;
285 
286  for (i = 0; i < sd->size / sizeof(*mvs); i++) {
287  const AVMotionVector *mv = &mvs[i];
288  const int direction = mv->source > 0;
289 
290  if (s->mv_type) {
291  const int is_fp = direction == 0 && (s->mv_type & MV_TYPE_FOR);
292  const int is_bp = direction == 1 && (s->mv_type & MV_TYPE_BACK);
293 
294  if ((!s->frame_type && (is_fp || is_bp)) ||
295  is_iframe && is_fp || is_iframe && is_bp ||
296  is_pframe && is_fp ||
297  is_bframe && is_fp || is_bframe && is_bp)
298  draw_arrow(frame->data[0], mv->dst_x, mv->dst_y, mv->src_x, mv->src_y,
299  frame->width, frame->height, frame->linesize[0],
300  100, 0, direction);
301  } else if (s->mv)
302  if ((direction == 0 && (s->mv & MV_P_FOR) && frame->pict_type == AV_PICTURE_TYPE_P) ||
303  (direction == 0 && (s->mv & MV_B_FOR) && frame->pict_type == AV_PICTURE_TYPE_B) ||
304  (direction == 1 && (s->mv & MV_B_BACK) && frame->pict_type == AV_PICTURE_TYPE_B))
305  draw_arrow(frame->data[0], mv->dst_x, mv->dst_y, mv->src_x, mv->src_y,
306  frame->width, frame->height, frame->linesize[0],
307  100, 0, direction);
308  }
309  }
310  }
311 
312  return ff_filter_frame(outlink, frame);
313 }
314 
316 {
317  AVFilterContext *ctx = inlink->dst;
318  CodecViewContext *s = ctx->priv;
320 
321  s->hsub = desc->log2_chroma_w;
322  s->vsub = desc->log2_chroma_h;
323  return 0;
324 }
325 
326 static const AVFilterPad codecview_inputs[] = {
327  {
328  .name = "default",
329  .type = AVMEDIA_TYPE_VIDEO,
331  .filter_frame = filter_frame,
332  .config_props = config_input,
333  },
334 };
335 
336 static const AVFilterPad codecview_outputs[] = {
337  {
338  .name = "default",
339  .type = AVMEDIA_TYPE_VIDEO,
340  },
341 };
342 
344  .name = "codecview",
345  .description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."),
346  .priv_size = sizeof(CodecViewContext),
349  // TODO: we can probably add way more pixel formats without any other
350  // changes; anything with 8-bit luma in first plane should be working
352  .priv_class = &codecview_class,
354 };
MV_B_FOR
#define MV_B_FOR
Definition: vf_codecview.c:41
av_clip
#define av_clip
Definition: common.h:96
qp_table.h
opt.h
draw_line
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color)
Draw a line from (ex, ey) -> (sx, sy).
Definition: vf_codecview.c:112
color
Definition: vf_paletteuse.c:600
av_frame_get_side_data
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
Definition: frame.c:617
draw_arrow
static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color, int tail, int direction)
Draw an arrow from (ex, ey) -> (sx, sy).
Definition: vf_codecview.c:170
AVMotionVector
Definition: motion_vector.h:24
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1018
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2660
mv
static const int8_t mv[256][2]
Definition: 4xm.c:79
inlink
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
Definition: filter_design.txt:212
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:109
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:317
w
uint8_t w
Definition: llviddspenc.c:38
AVOption
AVOption.
Definition: opt.h:247
b
#define b
Definition: input.c:40
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:169
MV_P_FOR
#define MV_P_FOR
Definition: vf_codecview.c:40
CONST
#define CONST(name, help, val, unit)
Definition: vf_codecview.c:61
OFFSET
#define OFFSET(x)
Definition: vf_codecview.c:59
CodecViewContext::hsub
int hsub
Definition: vf_codecview.c:54
clip_line
static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
Definition: vf_codecview.c:84
ff_norm_qscale
static int ff_norm_qscale(int qscale, int type)
Normalize the qscale factor FIXME the H264 qscale is a log based scale, mpeg1/2 is not,...
Definition: qp_table.h:39
AVVideoEncParams
Video encoding parameters for a given frame.
Definition: video_enc_params.h:73
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:50
AVFrameSideData::size
size_t size
Definition: frame.h:226
CodecViewContext::mv_type
unsigned mv_type
Definition: vf_codecview.c:53
motion_vector.h
s
#define s(width, name)
Definition: cbs_vp9.c:257
AV_CEIL_RSHIFT
#define AV_CEIL_RSHIFT(a, b)
Definition: common.h:51
ctx
AVFormatContext * ctx
Definition: movenc.c:48
ff_vf_codecview
const AVFilter ff_vf_codecview
Definition: vf_codecview.c:343
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
f
#define f(width, name)
Definition: cbs_vp9.c:255
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
FFABS
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Definition: common.h:65
if
if(ret)
Definition: filter_design.txt:179
codecview_inputs
static const AVFilterPad codecview_inputs[]
Definition: vf_codecview.c:326
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
ROUNDED_DIV
#define ROUNDED_DIV(a, b)
Definition: common.h:49
AV_PICTURE_TYPE_I
@ AV_PICTURE_TYPE_I
Intra.
Definition: avutil.h:274
draw_block_rectangle
static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, int stride, int color)
Definition: vf_codecview.c:208
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
codecview_options
static const AVOption codecview_options[]
Definition: vf_codecview.c:63
MV_B_BACK
#define MV_B_BACK
Definition: vf_codecview.c:42
color
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
Definition: log.c:92
AVFrameSideData::data
uint8_t * data
Definition: frame.h:225
CodecViewContext
Definition: vf_codecview.c:49
AVVideoEncParams::nb_blocks
unsigned int nb_blocks
Number of blocks in the array.
Definition: video_enc_params.h:81
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(codecview)
FRAME_TYPE_I
#define FRAME_TYPE_I
Definition: vf_codecview.c:45
codecview_outputs
static const AVFilterPad codecview_outputs[]
Definition: vf_codecview.c:336
internal.h
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:146
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:181
CodecViewContext::vsub
int vsub
Definition: vf_codecview.c:54
CodecViewContext::block
int block
Definition: vf_codecview.c:56
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
frame_type
frame_type
Definition: jpeg2000_parser.c:31
FRAME_TYPE_B
#define FRAME_TYPE_B
Definition: vf_codecview.c:47
AVVideoBlockParams
Data structure for storing block-level encoding information.
Definition: video_enc_params.h:120
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:56
stride
#define stride
Definition: h264pred_template.c:537
pv
#define pv
Definition: regdef.h:60
AVFilter
Filter definition.
Definition: avfilter.h:165
ret
ret
Definition: filter_design.txt:187
FFSWAP
#define FFSWAP(type, a, b)
Definition: macros.h:52
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:264
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_codecview.c:223
AV_PICTURE_TYPE_B
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
Definition: avutil.h:276
AV_FRAME_DATA_VIDEO_ENC_PARAMS
@ AV_FRAME_DATA_VIDEO_ENC_PARAMS
Encoding parameters for a video frame, as described by AVVideoEncParams.
Definition: frame.h:169
avfilter.h
FLAGS
#define FLAGS
Definition: vf_codecview.c:60
AVFilterContext
An instance of a filter.
Definition: avfilter.h:402
desc
const char * desc
Definition: libsvtav1.c:79
AV_PICTURE_TYPE_P
@ AV_PICTURE_TYPE_P
Predicted.
Definition: avutil.h:275
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
MV_TYPE_FOR
#define MV_TYPE_FOR
Definition: vf_codecview.c:43
ff_qp_table_extract
int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table_h, int *qscale_type)
Extract a libpostproc-compatible QP table - an 8-bit QP value per 16x16 macroblock,...
Definition: qp_table.c:30
MV_TYPE_BACK
#define MV_TYPE_BACK
Definition: vf_codecview.c:44
AVFrameSideData
Structure to hold side data for an AVFrame.
Definition: frame.h:223
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
CodecViewContext::qp
int qp
Definition: vf_codecview.c:55
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
CodecViewContext::mv
unsigned mv
Definition: vf_codecview.c:51
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:223
imgutils.h
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
AV_FRAME_DATA_MOTION_VECTORS
@ AV_FRAME_DATA_MOTION_VECTORS
Motion vectors exported by some codecs (on demand through the export_mvs flag set in the libavcodec A...
Definition: frame.h:96
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_codecview.c:315
av_video_enc_params_block
static av_always_inline AVVideoBlockParams * av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
Definition: video_enc_params.h:143
h
h
Definition: vp9dsp_template.c:2038
CodecViewContext::frame_type
unsigned frame_type
Definition: vf_codecview.c:52
FRAME_TYPE_P
#define FRAME_TYPE_P
Definition: vf_codecview.c:46
video_enc_params.h
AVFILTERPAD_FLAG_NEEDS_WRITABLE
#define AVFILTERPAD_FLAG_NEEDS_WRITABLE
The filter expects writable frames from its input link, duplicating data buffers if needed.
Definition: internal.h:69