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 #include "video.h"
40 
41 #define MV_P_FOR (1<<0)
42 #define MV_B_FOR (1<<1)
43 #define MV_B_BACK (1<<2)
44 #define MV_TYPE_FOR (1<<0)
45 #define MV_TYPE_BACK (1<<1)
46 #define FRAME_TYPE_I (1<<0)
47 #define FRAME_TYPE_P (1<<1)
48 #define FRAME_TYPE_B (1<<2)
49 
50 typedef struct CodecViewContext {
51  const AVClass *class;
52  unsigned mv;
53  unsigned frame_type;
54  unsigned mv_type;
55  int hsub, vsub;
56  int qp;
57  int block;
59 
60 #define OFFSET(x) offsetof(CodecViewContext, x)
61 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
62 #define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, 0, 0, FLAGS, unit }
63 
64 static const AVOption codecview_options[] = {
65  { "mv", "set motion vectors to visualize", OFFSET(mv), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv" },
66  CONST("pf", "forward predicted MVs of P-frames", MV_P_FOR, "mv"),
67  CONST("bf", "forward predicted MVs of B-frames", MV_B_FOR, "mv"),
68  CONST("bb", "backward predicted MVs of B-frames", MV_B_BACK, "mv"),
69  { "qp", NULL, OFFSET(qp), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, .flags = FLAGS },
70  { "mv_type", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
71  { "mvt", "set motion vectors type", OFFSET(mv_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "mv_type" },
72  CONST("fp", "forward predicted MVs", MV_TYPE_FOR, "mv_type"),
73  CONST("bp", "backward predicted MVs", MV_TYPE_BACK, "mv_type"),
74  { "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" },
75  { "ft", "set frame types to visualize motion vectors of", OFFSET(frame_type), AV_OPT_TYPE_FLAGS, {.i64=0}, 0, INT_MAX, FLAGS, "frame_type" },
76  CONST("if", "I-frames", FRAME_TYPE_I, "frame_type"),
77  CONST("pf", "P-frames", FRAME_TYPE_P, "frame_type"),
78  CONST("bf", "B-frames", FRAME_TYPE_B, "frame_type"),
79  { "block", "set block partitioning structure to visualize", OFFSET(block), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
80  { NULL }
81 };
82 
83 AVFILTER_DEFINE_CLASS(codecview);
84 
85 static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
86 {
87  if(*sx > *ex)
88  return clip_line(ex, ey, sx, sy, maxx);
89 
90  if (*sx < 0) {
91  if (*ex < 0)
92  return 1;
93  *sy = *ey + (*sy - *ey) * (int64_t)*ex / (*ex - *sx);
94  *sx = 0;
95  }
96 
97  if (*ex > maxx) {
98  if (*sx > maxx)
99  return 1;
100  *ey = *sy + (*ey - *sy) * (int64_t)(maxx - *sx) / (*ex - *sx);
101  *ex = maxx;
102  }
103  return 0;
104 }
105 
106 /**
107  * Draw a line from (ex, ey) -> (sx, sy).
108  * @param w width of the image
109  * @param h height of the image
110  * @param stride stride/linesize of the image
111  * @param color color of the arrow
112  */
113 static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey,
114  int w, int h, ptrdiff_t stride, int color)
115 {
116  int x, y, fr, f;
117 
118  if (clip_line(&sx, &sy, &ex, &ey, w - 1))
119  return;
120  if (clip_line(&sy, &sx, &ey, &ex, h - 1))
121  return;
122 
123  sx = av_clip(sx, 0, w - 1);
124  sy = av_clip(sy, 0, h - 1);
125  ex = av_clip(ex, 0, w - 1);
126  ey = av_clip(ey, 0, h - 1);
127 
128  buf[sy * stride + sx] += color;
129 
130  if (FFABS(ex - sx) > FFABS(ey - sy)) {
131  if (sx > ex) {
132  FFSWAP(int, sx, ex);
133  FFSWAP(int, sy, ey);
134  }
135  buf += sx + sy * stride;
136  ex -= sx;
137  f = ((ey - sy) * (1 << 16)) / ex;
138  for (x = 0; x <= ex; x++) {
139  y = (x * f) >> 16;
140  fr = (x * f) & 0xFFFF;
141  buf[ y * stride + x] += (color * (0x10000 - fr)) >> 16;
142  if(fr) buf[(y + 1) * stride + x] += (color * fr ) >> 16;
143  }
144  } else {
145  if (sy > ey) {
146  FFSWAP(int, sx, ex);
147  FFSWAP(int, sy, ey);
148  }
149  buf += sx + sy * stride;
150  ey -= sy;
151  if (ey)
152  f = ((ex - sx) * (1 << 16)) / ey;
153  else
154  f = 0;
155  for(y= 0; y <= ey; y++){
156  x = (y*f) >> 16;
157  fr = (y*f) & 0xFFFF;
158  buf[y * stride + x ] += (color * (0x10000 - fr)) >> 16;
159  if(fr) buf[y * stride + x + 1] += (color * fr ) >> 16;
160  }
161  }
162 }
163 
164 /**
165  * Draw an arrow from (ex, ey) -> (sx, sy).
166  * @param w width of the image
167  * @param h height of the image
168  * @param stride stride/linesize of the image
169  * @param color color of the arrow
170  */
171 static void draw_arrow(uint8_t *buf, int sx, int sy, int ex,
172  int ey, int w, int h, ptrdiff_t stride, int color, int tail, int direction)
173 {
174  int dx,dy;
175 
176  if (direction) {
177  FFSWAP(int, sx, ex);
178  FFSWAP(int, sy, ey);
179  }
180 
181  sx = av_clip(sx, -100, w + 100);
182  sy = av_clip(sy, -100, h + 100);
183  ex = av_clip(ex, -100, w + 100);
184  ey = av_clip(ey, -100, h + 100);
185 
186  dx = ex - sx;
187  dy = ey - sy;
188 
189  if (dx * dx + dy * dy > 3 * 3) {
190  int rx = dx + dy;
191  int ry = -dx + dy;
192  int length = sqrt((rx * rx + ry * ry) << 8);
193 
194  // FIXME subpixel accuracy
195  rx = ROUNDED_DIV(rx * (3 << 4), length);
196  ry = ROUNDED_DIV(ry * (3 << 4), length);
197 
198  if (tail) {
199  rx = -rx;
200  ry = -ry;
201  }
202 
203  draw_line(buf, sx, sy, sx + rx, sy + ry, w, h, stride, color);
204  draw_line(buf, sx, sy, sx - ry, sy + rx, w, h, stride, color);
205  }
206  draw_line(buf, sx, sy, ex, ey, w, h, stride, color);
207 }
208 
209 static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, ptrdiff_t stride, int color)
210 {
211  for (int x = sx; x < sx + w; x++)
212  buf[x] = color;
213 
214  for (int y = sy; y < sy + h; y++) {
215  buf[sx] = color;
216  buf[sx + w - 1] = color;
217  buf += stride;
218  }
219 
220  for (int x = sx; x < sx + w; x++)
221  buf[x] = color;
222 }
223 
225 {
226  AVFilterContext *ctx = inlink->dst;
227  CodecViewContext *s = ctx->priv;
228  AVFilterLink *outlink = ctx->outputs[0];
229 
230  if (s->qp) {
231  enum AVVideoEncParamsType qp_type;
232  int qstride, ret;
233  int8_t *qp_table;
234 
235  ret = ff_qp_table_extract(frame, &qp_table, &qstride, NULL, &qp_type);
236  if (ret < 0) {
238  return ret;
239  }
240 
241  if (qp_table) {
242  int x, y;
243  const int w = AV_CEIL_RSHIFT(frame->width, s->hsub);
244  const int h = AV_CEIL_RSHIFT(frame->height, s->vsub);
245  uint8_t *pu = frame->data[1];
246  uint8_t *pv = frame->data[2];
247  const ptrdiff_t lzu = frame->linesize[1];
248  const ptrdiff_t lzv = frame->linesize[2];
249 
250  for (y = 0; y < h; y++) {
251  for (x = 0; x < w; x++) {
252  const int qp = ff_norm_qscale(qp_table[(y >> 3) * qstride + (x >> 3)], qp_type) * 128/31;
253  pu[x] = pv[x] = qp;
254  }
255  pu += lzu;
256  pv += lzv;
257  }
258  }
259  av_freep(&qp_table);
260  }
261 
262  if (s->block) {
264  if (sd) {
266  const ptrdiff_t stride = frame->linesize[0];
267 
268  if (par->nb_blocks) {
269  for (int block_idx = 0; block_idx < par->nb_blocks; block_idx++) {
271  uint8_t *buf = frame->data[0] + b->src_y * stride;
272 
273  draw_block_rectangle(buf, b->src_x, b->src_y, b->w, b->h, stride, 100);
274  }
275  }
276  }
277  }
278 
279  if (s->mv || s->mv_type) {
281  if (sd) {
282  int i;
283  const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
284  const int is_iframe = (s->frame_type & FRAME_TYPE_I) && frame->pict_type == AV_PICTURE_TYPE_I;
285  const int is_pframe = (s->frame_type & FRAME_TYPE_P) && frame->pict_type == AV_PICTURE_TYPE_P;
286  const int is_bframe = (s->frame_type & FRAME_TYPE_B) && frame->pict_type == AV_PICTURE_TYPE_B;
287 
288  for (i = 0; i < sd->size / sizeof(*mvs); i++) {
289  const AVMotionVector *mv = &mvs[i];
290  const int direction = mv->source > 0;
291 
292  if (s->mv_type) {
293  const int is_fp = direction == 0 && (s->mv_type & MV_TYPE_FOR);
294  const int is_bp = direction == 1 && (s->mv_type & MV_TYPE_BACK);
295 
296  if ((!s->frame_type && (is_fp || is_bp)) ||
297  is_iframe && is_fp || is_iframe && is_bp ||
298  is_pframe && is_fp ||
299  is_bframe && is_fp || is_bframe && is_bp)
300  draw_arrow(frame->data[0], mv->dst_x, mv->dst_y, mv->src_x, mv->src_y,
302  100, 0, direction);
303  } else if (s->mv)
304  if ((direction == 0 && (s->mv & MV_P_FOR) && frame->pict_type == AV_PICTURE_TYPE_P) ||
305  (direction == 0 && (s->mv & MV_B_FOR) && frame->pict_type == AV_PICTURE_TYPE_B) ||
306  (direction == 1 && (s->mv & MV_B_BACK) && frame->pict_type == AV_PICTURE_TYPE_B))
307  draw_arrow(frame->data[0], mv->dst_x, mv->dst_y, mv->src_x, mv->src_y,
309  100, 0, direction);
310  }
311  }
312  }
313 
314  return ff_filter_frame(outlink, frame);
315 }
316 
318 {
319  AVFilterContext *ctx = inlink->dst;
320  CodecViewContext *s = ctx->priv;
322 
323  s->hsub = desc->log2_chroma_w;
324  s->vsub = desc->log2_chroma_h;
325  return 0;
326 }
327 
328 static const AVFilterPad codecview_inputs[] = {
329  {
330  .name = "default",
331  .type = AVMEDIA_TYPE_VIDEO,
333  .filter_frame = filter_frame,
334  .config_props = config_input,
335  },
336 };
337 
339  .name = "codecview",
340  .description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."),
341  .priv_size = sizeof(CodecViewContext),
344  // TODO: we can probably add way more pixel formats without any other
345  // changes; anything with 8-bit luma in first plane should be working
347  .priv_class = &codecview_class,
349 };
MV_B_FOR
#define MV_B_FOR
Definition: vf_codecview.c:42
av_clip
#define av_clip
Definition: common.h:96
qp_table.h
opt.h
color
Definition: vf_paletteuse.c:511
av_frame_get_side_data
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
Definition: frame.c:824
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:978
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:2964
mv
static const int8_t mv[256][2]
Definition: 4xm.c:80
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
draw_arrow
static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, ptrdiff_t stride, int color, int tail, int direction)
Draw an arrow from (ex, ey) -> (sx, sy).
Definition: vf_codecview.c:171
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:100
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:340
AVFrame::width
int width
Definition: frame.h:412
w
uint8_t w
Definition: llviddspenc.c:38
AVOption
AVOption.
Definition: opt.h:251
b
#define b
Definition: input.c:41
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:170
ff_norm_qscale
static int ff_norm_qscale(int qscale, enum AVVideoEncParamsType type)
Normalize the qscale factor FIXME Add support for other values of enum AVVideoEncParamsType besides A...
Definition: qp_table.h:39
MV_P_FOR
#define MV_P_FOR
Definition: vf_codecview.c:41
video.h
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:361
CONST
#define CONST(name, help, val, unit)
Definition: vf_codecview.c:62
OFFSET
#define OFFSET(x)
Definition: vf_codecview.c:60
CodecViewContext::hsub
int hsub
Definition: vf_codecview.c:55
clip_line
static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx)
Definition: vf_codecview.c:85
draw_block_rectangle
static void draw_block_rectangle(uint8_t *buf, int sx, int sy, int w, int h, ptrdiff_t stride, int color)
Definition: vf_codecview.c:209
draw_line
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, ptrdiff_t stride, int color)
Draw a line from (ex, ey) -> (sx, sy).
Definition: vf_codecview.c:113
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:47
AVFrameSideData::size
size_t size
Definition: frame.h:249
AVVideoEncParamsType
AVVideoEncParamsType
Definition: video_enc_params.h:28
ff_video_default_filterpad
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:36
CodecViewContext::mv_type
unsigned mv_type
Definition: vf_codecview.c:54
motion_vector.h
s
#define s(width, name)
Definition: cbs_vp9.c:198
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:338
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
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
frame
static AVFrame * frame
Definition: demux_decode.c:54
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:328
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:279
f
f
Definition: af_crystalizer.c:121
AVFrame::pict_type
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:442
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:106
codecview_options
static const AVOption codecview_options[]
Definition: vf_codecview.c:64
MV_B_BACK
#define MV_B_BACK
Definition: vf_codecview.c:43
color
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
Definition: log.c:94
AVFrameSideData::data
uint8_t * data
Definition: frame.h:248
CodecViewContext
Definition: vf_codecview.c:50
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:46
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:147
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:182
CodecViewContext::vsub
int vsub
Definition: vf_codecview.c:55
CodecViewContext::block
int block
Definition: vf_codecview.c:57
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
frame_type
frame_type
Definition: jpeg2000_parser.c:31
FRAME_TYPE_B
#define FRAME_TYPE_B
Definition: vf_codecview.c:48
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:53
stride
#define stride
Definition: h264pred_template.c:537
pv
#define pv
Definition: regdef.h:60
AVFilter
Filter definition.
Definition: avfilter.h:166
ret
ret
Definition: filter_design.txt:187
FFSWAP
#define FFSWAP(type, a, b)
Definition: macros.h:52
ff_qp_table_extract
int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table_h, enum AVVideoEncParamsType *qscale_type)
Extract a libpostproc-compatible QP table - an 8-bit QP value per 16x16 macroblock,...
Definition: qp_table.c:27
AVFrame::height
int height
Definition: frame.h:412
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_codecview.c:224
AV_PICTURE_TYPE_B
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
Definition: avutil.h:281
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:170
avfilter.h
FLAGS
#define FLAGS
Definition: vf_codecview.c:61
AVFilterContext
An instance of a filter.
Definition: avfilter.h:397
desc
const char * desc
Definition: libsvtav1.c:83
AV_PICTURE_TYPE_P
@ AV_PICTURE_TYPE_P
Predicted.
Definition: avutil.h:280
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
MV_TYPE_FOR
#define MV_TYPE_FOR
Definition: vf_codecview.c:44
MV_TYPE_BACK
#define MV_TYPE_BACK
Definition: vf_codecview.c:45
AVFrameSideData
Structure to hold side data for an AVFrame.
Definition: frame.h:246
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:56
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
CodecViewContext::mv
unsigned mv
Definition: vf_codecview.c:52
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:224
imgutils.h
AVFrame::linesize
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Definition: frame.h:385
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:97
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_codecview.c:317
av_video_enc_params_block
static av_always_inline AVVideoBlockParams * av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
Get the block at the specified.
Definition: video_enc_params.h:143
h
h
Definition: vp9dsp_template.c:2038
CodecViewContext::frame_type
unsigned frame_type
Definition: vf_codecview.c:53
FRAME_TYPE_P
#define FRAME_TYPE_P
Definition: vf_codecview.c:47
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:66