FFmpeg
vf_blackdetect.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 Stefano Sabatini
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 /**
22  * @file
23  * Video black detector, loosely based on blackframe with extended
24  * syntax and features
25  */
26 
27 #include <float.h>
28 #include "libavutil/mem.h"
29 #include "libavutil/opt.h"
30 #include "libavutil/pixdesc.h"
31 #include "libavutil/timestamp.h"
32 #include "avfilter.h"
33 #include "filters.h"
34 #include "video.h"
35 
36 typedef struct BlackDetectContext {
37  const AVClass *class;
38  double black_min_duration_time; ///< minimum duration of detected black, in seconds
39  int64_t black_min_duration; ///< minimum duration of detected black, expressed in timebase units
40  int64_t black_start; ///< pts start time of the first black picture
41  int64_t black_end; ///< pts end time of the last black picture
42  int64_t last_picref_pts; ///< pts of the last input picture
44 
47  unsigned int pixel_black_th_i;
48 
49  unsigned int nb_black_pixels; ///< number of black pixels counted so far
51  int depth;
53  unsigned int *counter;
55 
56 #define OFFSET(x) offsetof(BlackDetectContext, x)
57 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
58 
59 static const AVOption blackdetect_options[] = {
60  { "d", "set minimum detected black duration in seconds", OFFSET(black_min_duration_time), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, DBL_MAX, FLAGS },
61  { "black_min_duration", "set minimum detected black duration in seconds", OFFSET(black_min_duration_time), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, DBL_MAX, FLAGS },
62  { "picture_black_ratio_th", "set the picture black ratio threshold", OFFSET(picture_black_ratio_th), AV_OPT_TYPE_DOUBLE, {.dbl=.98}, 0, 1, FLAGS },
63  { "pic_th", "set the picture black ratio threshold", OFFSET(picture_black_ratio_th), AV_OPT_TYPE_DOUBLE, {.dbl=.98}, 0, 1, FLAGS },
64  { "pixel_black_th", "set the pixel black threshold", OFFSET(pixel_black_th), AV_OPT_TYPE_DOUBLE, {.dbl=.10}, 0, 1, FLAGS },
65  { "pix_th", "set the pixel black threshold", OFFSET(pixel_black_th), AV_OPT_TYPE_DOUBLE, {.dbl=.10}, 0, 1, FLAGS },
66  { NULL }
67 };
68 
69 AVFILTER_DEFINE_CLASS(blackdetect);
70 
71 #define YUVJ_FORMATS \
72  AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P
73 
74 static const enum AVPixelFormat yuvj_formats[] = {
76 };
77 
78 static const enum AVPixelFormat pix_fmts[] = {
99 };
100 
102 {
103  AVFilterContext *ctx = inlink->dst;
104  BlackDetectContext *s = ctx->priv;
106  const int depth = desc->comp[0].depth;
107 
108  s->depth = depth;
109  s->nb_threads = ff_filter_get_nb_threads(ctx);
110  s->time_base = inlink->time_base;
111  s->black_min_duration = s->black_min_duration_time / av_q2d(s->time_base);
112  s->counter = av_calloc(s->nb_threads, sizeof(*s->counter));
113  if (!s->counter)
114  return AVERROR(ENOMEM);
115 
117  "black_min_duration:%s pixel_black_th:%f picture_black_ratio_th:%f\n",
118  av_ts2timestr(s->black_min_duration, &s->time_base),
119  s->pixel_black_th, s->picture_black_ratio_th);
120  return 0;
121 }
122 
124 {
125  BlackDetectContext *s = ctx->priv;
126 
127  if ((s->black_end - s->black_start) >= s->black_min_duration) {
129  "black_start:%s black_end:%s black_duration:%s\n",
130  av_ts2timestr(s->black_start, &s->time_base),
131  av_ts2timestr(s->black_end, &s->time_base),
132  av_ts2timestr(s->black_end - s->black_start, &s->time_base));
133  }
134 }
135 
137  int jobnr, int nb_jobs)
138 {
139  BlackDetectContext *s = ctx->priv;
140  const unsigned int threshold = s->pixel_black_th_i;
141  unsigned int *counterp = &s->counter[jobnr];
142  AVFrame *in = arg;
143  const int linesize = in->linesize[0];
144  const int w = in->width;
145  const int h = in->height;
146  const int start = (h * jobnr) / nb_jobs;
147  const int end = (h * (jobnr+1)) / nb_jobs;
148  const int size = end - start;
149  unsigned int counter = 0;
150 
151  if (s->depth == 8) {
152  const uint8_t *p = in->data[0] + start * linesize;
153 
154  for (int i = 0; i < size; i++) {
155  for (int x = 0; x < w; x++)
156  counter += p[x] <= threshold;
157  p += linesize;
158  }
159  } else {
160  const uint16_t *p = (const uint16_t *)(in->data[0] + start * linesize);
161 
162  for (int i = 0; i < size; i++) {
163  for (int x = 0; x < w; x++)
164  counter += p[x] <= threshold;
165  p += linesize / 2;
166  }
167  }
168 
169  *counterp = counter;
170 
171  return 0;
172 }
173 
175 {
177  AVFilterContext *ctx = inlink->dst;
178  BlackDetectContext *s = ctx->priv;
179  double picture_black_ratio = 0;
180  const int max = (1 << s->depth) - 1;
181  const int factor = (1 << (s->depth - 8));
182  const int full = picref->color_range == AVCOL_RANGE_JPEG ||
183  ff_fmt_is_in(picref->format, yuvj_formats);
184 
185  s->pixel_black_th_i = full ? s->pixel_black_th * max :
186  // luminance_minimum_value + pixel_black_th * luminance_range_size
187  16 * factor + s->pixel_black_th * (235 - 16) * factor;
188 
190  FFMIN(inlink->h, s->nb_threads));
191 
192  for (int i = 0; i < s->nb_threads; i++)
193  s->nb_black_pixels += s->counter[i];
194 
195  picture_black_ratio = (double)s->nb_black_pixels / (inlink->w * inlink->h);
196 
198  "frame:%"PRId64" picture_black_ratio:%f pts:%s t:%s type:%c\n",
199  inl->frame_count_out, picture_black_ratio,
200  av_ts2str(picref->pts), av_ts2timestr(picref->pts, &s->time_base),
202 
203  if (picture_black_ratio >= s->picture_black_ratio_th) {
204  if (!s->black_started) {
205  /* black starts here */
206  s->black_started = 1;
207  s->black_start = picref->pts;
208  av_dict_set(&picref->metadata, "lavfi.black_start",
209  av_ts2timestr(s->black_start, &s->time_base), 0);
210  }
211  } else if (s->black_started) {
212  /* black ends here */
213  s->black_started = 0;
214  s->black_end = picref->pts;
216  av_dict_set(&picref->metadata, "lavfi.black_end",
217  av_ts2timestr(s->black_end, &s->time_base), 0);
218  }
219 
220  s->last_picref_pts = picref->pts;
221  s->nb_black_pixels = 0;
222  return ff_filter_frame(inlink->dst->outputs[0], picref);
223 }
224 
226 {
227  BlackDetectContext *s = ctx->priv;
228 
229  av_freep(&s->counter);
230 
231  if (s->black_started) {
232  // FIXME: black_end should be set to last_picref_pts + last_picref_duration
233  s->black_end = s->last_picref_pts;
235  }
236 }
237 
238 static const AVFilterPad blackdetect_inputs[] = {
239  {
240  .name = "default",
241  .type = AVMEDIA_TYPE_VIDEO,
242  .config_props = config_input,
243  .filter_frame = filter_frame,
244  },
245 };
246 
248  .name = "blackdetect",
249  .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."),
250  .priv_size = sizeof(BlackDetectContext),
254  .uninit = uninit,
255  .priv_class = &blackdetect_class,
257 };
AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:546
BlackDetectContext::time_base
AVRational time_base
Definition: vf_blackdetect.c:50
AVFrame::color_range
enum AVColorRange color_range
MPEG vs JPEG YUV range.
Definition: frame.h:668
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
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
opt.h
blackdetect_options
static const AVOption blackdetect_options[]
Definition: vf_blackdetect.c:59
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: filters.h:242
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1062
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3170
int64_t
long long int64_t
Definition: coverity.c:34
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
BlackDetectContext::black_end
int64_t black_end
pts end time of the last black picture
Definition: vf_blackdetect.c:41
BlackDetectContext::black_min_duration_time
double black_min_duration_time
minimum duration of detected black, in seconds
Definition: vf_blackdetect.c:38
AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:538
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
BlackDetectContext::last_picref_pts
int64_t last_picref_pts
pts of the last input picture
Definition: vf_blackdetect.c:42
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:389
pixdesc.h
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:501
AVFrame::width
int width
Definition: frame.h:461
AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:545
w
uint8_t w
Definition: llviddspenc.c:38
AVCOL_RANGE_JPEG
@ AVCOL_RANGE_JPEG
Full range content.
Definition: pixfmt.h:717
AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:540
AVOption
AVOption.
Definition: opt.h:429
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:502
black_counter
static int black_counter(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: vf_blackdetect.c:136
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:225
float.h
YUVJ_FORMATS
#define YUVJ_FORMATS
Definition: vf_blackdetect.c:71
AV_PIX_FMT_YUV440P
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:106
max
#define max(a, b)
Definition: cuda_runtime.h:33
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:205
video.h
AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:541
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:410
AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:537
BlackDetectContext::depth
int depth
Definition: vf_blackdetect.c:51
AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:547
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:500
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:486
AVFilterPad
A filter pad used for either input or output.
Definition: filters.h:38
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:505
av_cold
#define av_cold
Definition: attributes.h:90
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:514
ff_vf_blackdetect
const AVFilter ff_vf_blackdetect
Definition: vf_blackdetect.c:247
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:37
blackdetect_inputs
static const AVFilterPad blackdetect_inputs[]
Definition: vf_blackdetect.c:238
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_PIX_FMT_YUVA420P
@ 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_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:515
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_blackdetect.c:225
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
av_q2d
static double av_q2d(AVRational a)
Convert an AVRational to a double.
Definition: rational.h:104
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_blackdetect.c:101
filters.h
AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUVA444P12
Definition: pixfmt.h:544
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:499
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:230
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:513
ctx
AVFormatContext * ctx
Definition: movenc.c:49
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:485
ff_fmt_is_in
int ff_fmt_is_in(int fmt, const int *fmts)
Tell if an integer is contained in the provided -1-terminated list of integers.
Definition: formats.c:406
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:73
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
BlackDetectContext::pixel_black_th
double pixel_black_th
Definition: vf_blackdetect.c:46
arg
const char * arg
Definition: jacosubdec.c:67
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:483
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
NULL
#define NULL
Definition: coverity.c:32
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AV_PIX_FMT_YUV440P10
#define AV_PIX_FMT_YUV440P10
Definition: pixfmt.h:504
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:503
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
yuvj_formats
static enum AVPixelFormat yuvj_formats[]
Definition: vf_blackdetect.c:74
ff_filter_link
static FilterLink * ff_filter_link(AVFilterLink *link)
Definition: filters.h:197
AVFrame::pict_type
enum AVPictureType pict_type
Picture type of the frame.
Definition: frame.h:491
av_ts2timestr
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Definition: timestamp.h:83
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:94
BlackDetectContext::counter
unsigned int * counter
Definition: vf_blackdetect.c:53
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:507
size
int size
Definition: twinvq_data.h:10344
BlackDetectContext::black_started
int black_started
Definition: vf_blackdetect.c:43
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:509
BlackDetectContext::black_start
int64_t black_start
pts start time of the first black picture
Definition: vf_blackdetect.c:40
AVFrame::format
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
Definition: frame.h:476
AV_PIX_FMT_YUVA444P
@ 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_YUVA444P10
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:542
FLAGS
#define FLAGS
Definition: vf_blackdetect.c:57
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:220
av_get_picture_type_char
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
Definition: utils.c:40
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:841
BlackDetectContext
Definition: vf_blackdetect.c:36
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
check_black_end
static void check_black_end(AVFilterContext *ctx)
Definition: vf_blackdetect.c:123
AV_PIX_FMT_NV21
@ AV_PIX_FMT_NV21
as above, but U and V bytes are swapped
Definition: pixfmt.h:97
AVFilterPad::name
const char * name
Pad name.
Definition: filters.h:44
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:264
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:501
BlackDetectContext::nb_threads
int nb_threads
Definition: vf_blackdetect.c:52
AVFilter
Filter definition.
Definition: avfilter.h:201
BlackDetectContext::picture_black_ratio_th
double picture_black_ratio_th
Definition: vf_blackdetect.c:45
BlackDetectContext::black_min_duration
int64_t black_min_duration
minimum duration of detected black, expressed in timebase units
Definition: vf_blackdetect.c:39
AV_PIX_FMT_NV12
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: pixfmt.h:96
AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:539
BlackDetectContext::pixel_black_th_i
unsigned int pixel_black_th_i
Definition: vf_blackdetect.c:47
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:506
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:511
AVFrame::height
int height
Definition: frame.h:461
BlackDetectContext::nb_black_pixels
unsigned int nb_black_pixels
number of black pixels counted so far
Definition: vf_blackdetect.c:49
ff_filter_execute
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: avfilter.c:1667
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_PIX_FMT_YUVA422P12
#define AV_PIX_FMT_YUVA422P12
Definition: pixfmt.h:543
avfilter.h
AVFrame::metadata
AVDictionary * metadata
metadata.
Definition: frame.h:707
AVFILTER_FLAG_METADATA_ONLY
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
Definition: avfilter.h:168
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_blackdetect.c:78
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AVFilterContext
An instance of a filter.
Definition: avfilter.h:457
factor
static const int factor[16]
Definition: vf_pp7.c:80
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
Definition: vf_blackdetect.c:174
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:152
desc
const char * desc
Definition: libsvtav1.c:79
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
mem.h
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(blackdetect)
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
av_dict_set
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:88
AV_PIX_FMT_YUV411P
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:80
timestamp.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:434
AV_PIX_FMT_YUV410P
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:79
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
av_ts2str
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Definition: timestamp.h:54
AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV440P12
Definition: pixfmt.h:508
h
h
Definition: vp9dsp_template.c:2070
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:512
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:484
OFFSET
#define OFFSET(x)
Definition: vf_blackdetect.c:56
AV_PIX_FMT_YUVA422P
@ 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_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:510