64 int end,
int x,
int k,
int depth);
67 const uint16_t *
const next,
68 const uint16_t *
const prev2,
69 const uint16_t *
const next2,
70 const uint16_t *
const prev3,
71 const uint16_t *
const next3,
72 int end,
int x,
int k,
int depth);
76 #define S (MAX_R * 2 + 1) 78 #define OFFSET(x) offsetof(ESTDIFContext, x) 79 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM 80 #define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, 0, 0, FLAGS, unit } 84 CONST(
"frame",
"send one frame for each frame", 0,
"mode"),
85 CONST(
"field",
"send one frame for each field", 1,
"mode"),
87 CONST(
"tff",
"assume top field first", 0,
"parity"),
88 CONST(
"bff",
"assume bottom field first", 1,
"parity"),
89 CONST(
"auto",
"auto detect parity", -1,
"parity"),
91 CONST(
"all",
"deinterlace all frames", 0,
"deint"),
92 CONST(
"interlaced",
"only deinterlace frames marked as interlaced", 1,
"deint"),
96 CONST(
"2p",
"two-point interpolation", 0,
"interp"),
97 CONST(
"4p",
"four-point interpolation", 1,
"interp"),
98 CONST(
"6p",
"six-point interpolation", 2,
"interp"),
155 #define MIDL(type, ss) \ 156 static unsigned midl_##ss(const type *const prev, \ 157 const type *const next, \ 158 int end, int x, int k) \ 160 return (prev[av_clip(x + k, 0, end)] + \ 161 next[av_clip(x - k, 0, end)] + 1) >> 1; \ 167 #define MID2(type, ss) \ 168 static unsigned mid2_##ss(const type *const prev, \ 169 const type *const next, \ 170 const type *const prev2, \ 171 const type *const next2, \ 172 const type *const prev3, \ 173 const type *const next3, \ 174 int end, int x, int k, int depth) \ 176 return (prev[av_clip(x + k, 0, end)] + \ 177 next[av_clip(x - k, 0, end)] + 1) >> 1; \ 183 #define MID4(type, ss) \ 184 static unsigned mid4_##ss(const type *const prev, \ 185 const type *const next, \ 186 const type *const prev2, \ 187 const type *const next2, \ 188 const type *const prev3, \ 189 const type *const next3, \ 190 int end, int x, int k, int depth) \ 192 return av_clip_uintp2_c(( \ 193 9 * (prev[av_clip(x + k, 0, end)] + \ 194 next[av_clip(x - k, 0, end)]) - \ 195 1 * (prev2[av_clip(x + k*3, 0, end)] + \ 196 next2[av_clip(x - k*3, 0, end)]) + 8) >> 4, \ 203 #define MID6(type, ss) \ 204 static unsigned mid6_##ss(const type *const prev, \ 205 const type *const next, \ 206 const type *const prev2, \ 207 const type *const next2, \ 208 const type *const prev3, \ 209 const type *const next3, \ 210 int end, int x, int k, int depth) \ 212 return av_clip_uintp2_c(( \ 213 20 * (prev[av_clip(x + k, 0, end)] + \ 214 next[av_clip(x - k, 0, end)]) - \ 215 5 * (prev2[av_clip(x + k*3, 0, end)] + \ 216 next2[av_clip(x - k*3, 0, end)]) + \ 217 1 * (prev3[av_clip(x + k*5, 0, end)] + \ 218 next3[av_clip(x - k*5, 0, end)]) + 16) >> 5, \ 225 #define DIFF(type, ss) \ 226 static unsigned diff_##ss(const type *const prev, \ 227 const type *const next, \ 228 int end, int x, int k, int j) \ 230 return FFABS(prev[av_clip(x + k + j, 0, end)] - \ 231 next[av_clip(x - k + j, 0, end)]); \ 237 #define COST(type, ss) \ 238 static unsigned cost_##ss(const type *const prev, \ 239 const type *const next, \ 240 int end, int x, int k) \ 242 const int m = midl_##ss(prev, next, end, x, k); \ 243 const int p = prev[x]; \ 244 const int n = next[x]; \ 246 return FFABS(p - m) + FFABS(n - m); \ 252 #define INTERPOLATE(type, atype, max, ss) \ 253 static void interpolate_##ss(ESTDIFContext *s, uint8_t *ddst, \ 254 const uint8_t *const pprev_line, \ 255 const uint8_t *const nnext_line, \ 256 const uint8_t *const pprev2_line, \ 257 const uint8_t *const nnext2_line, \ 258 const uint8_t *const pprev3_line, \ 259 const uint8_t *const nnext3_line, \ 260 int x, int width, int rslope, \ 261 int redge, unsigned h, int depth, \ 264 type *dst = (type *)ddst; \ 265 const type *const prev_line = (const type *const)pprev_line; \ 266 const type *const prev2_line = (const type *const)pprev2_line; \ 267 const type *const prev3_line = (const type *const)pprev3_line; \ 268 const type *const next_line = (const type *const)nnext_line; \ 269 const type *const next2_line = (const type *const)nnext2_line; \ 270 const type *const next3_line = (const type *const)nnext3_line; \ 271 const int interp = s->interp; \ 272 const int end = width - 1; \ 273 const atype f = redge + 2; \ 274 atype sd[S], sD[S], di = 0; \ 278 for (int i = -rslope; i <= rslope && abs(k) > rslope; i++) { \ 281 for (int j = -redge; j <= redge; j++) { \ 282 sum += diff_##ss(prev_line, next_line, end, x, i, j); \ 283 sum += diff_##ss(prev2_line, prev_line, end, x, i, j); \ 284 sum += diff_##ss(next_line, next2_line, end, x, i, j); \ 287 sD[i + rslope] = sum; \ 288 sD[i + rslope] += f * cost_##ss(prev_line, next_line, end, x, i); \ 289 sD[i + rslope] += h * abs(i); \ 291 dmin = FFMIN(sD[i + rslope], dmin); \ 294 for (int i = -rslope; i <= rslope; i++) { \ 297 for (int j = -redge; j <= redge; j++) { \ 298 sum += diff_##ss(prev_line, next_line, end, x, k + i, j); \ 299 sum += diff_##ss(prev2_line, prev_line, end, x, k + i, j); \ 300 sum += diff_##ss(next_line, next2_line, end, x, k + i, j); \ 303 sd[i + rslope] = sum; \ 304 sd[i + rslope] += f * cost_##ss(prev_line, next_line, end, x, k + i); \ 305 sd[i + rslope] += h * abs(k + i); \ 307 dmin = FFMIN(sd[i + rslope], dmin); \ 310 for (int i = -rslope; i <= rslope && abs(k) > rslope; i++) { \ 311 if (dmin == sD[i + rslope]) { \ 318 for (int i = -rslope; i <= rslope && !di; i++) { \ 319 if (dmin == sd[i + rslope]) { \ 325 dst[x] = s->mid_##ss[interp](prev_line, next_line, \ 326 prev2_line, next2_line, \ 327 prev3_line, next3_line, \ 337 int jobnr,
int nb_jobs)
351 for (
int plane = 0; plane < s->
nb_planes; plane++) {
357 const int src_linesize = in->
linesize[plane];
358 const int dst_linesize = out->
linesize[plane];
359 const int start = (height * jobnr) / nb_jobs;
360 const int end = (height * (jobnr+1)) / nb_jobs;
361 const uint8_t *prev_line, *prev2_line, *next_line, *next2_line, *in_line;
362 const uint8_t *prev3_line, *next3_line;
366 y_out = start + (tff ^ (start & 1));
368 in_line = src_data + (y_out * src_linesize);
369 out_line = dst_data + (y_out * dst_linesize);
371 while (y_out < end) {
372 memcpy(out_line, in_line, linesize);
374 in_line += src_linesize * 2;
375 out_line += dst_linesize * 2;
378 y_out = start + ((!tff) ^ (start & 1));
379 out_line = dst_data + (y_out * dst_linesize);
381 for (
int y = y_out; y < end; y += 2) {
382 int y_prev3_in = y - 5;
383 int y_next3_in = y + 5;
384 int y_prev2_in = y - 3;
385 int y_next2_in = y + 3;
386 int y_prev_in = y - 1;
387 int y_next_in = y + 1;
390 while (y_prev3_in < 0)
393 while (y_next3_in >= height)
396 while (y_prev2_in < 0)
399 while (y_next2_in >= height)
402 while (y_prev_in < 0)
405 while (y_next_in >= height)
408 prev3_line = src_data + (y_prev3_in * src_linesize);
409 next3_line = src_data + (y_next3_in * src_linesize);
411 prev2_line = src_data + (y_prev2_in * src_linesize);
412 next2_line = src_data + (y_next2_in * src_linesize);
414 prev_line = src_data + (y_prev_in * src_linesize);
415 next_line = src_data + (y_next_in * src_linesize);
419 for (
int x = 0; x <
width; x++) {
421 prev_line, next_line,
422 prev2_line, next2_line,
423 prev3_line, next3_line,
424 x, width, rslope, redge, half, depth, &k);
427 out_line += 2 * dst_linesize;
482 s->
mid_8[0] = mid2_8;
483 s->
mid_8[1] = mid4_8;
484 s->
mid_8[2] = mid6_8;
512 if (ret < 0 || s->
mode == 0) {
546 }
else if (ret < 0) {
584 .priv_class = &estdif_class,
int mode
0 is frame, 1 is field
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUV440P10
static int request_frame(AVFilterLink *link)
#define AV_PIX_FMT_YUVA422P9
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
#define INTERPOLATE(type, atype, max, ss)
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_GBRAP10
static av_cold void uninit(AVFilterContext *ctx)
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Main libavfilter public API header.
static int query_formats(AVFilterContext *ctx)
int h
agreed upon image height
int rslope
best edge slope search radius
static int filter(AVFilterContext *ctx, int is_second, AVFrame *in)
static int config_input(AVFilterLink *inlink)
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUV420P12
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
int is_disabled
the enabled state from the last expression evaluation
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
int planeheight[4]
height of each plane
#define AV_PIX_FMT_GRAY10
unsigned(* mid_8[3])(const uint8_t *const prev, const uint8_t *const next, const uint8_t *const prev2, const uint8_t *const next2, const uint8_t *const prev3, const uint8_t *const next3, int end, int x, int k, int depth)
const char * name
Pad name.
#define AV_PIX_FMT_GRAY12
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static const AVOption estdif_options[]
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
unsigned(* mid_16[3])(const uint16_t *const prev, const uint16_t *const next, const uint16_t *const prev2, const uint16_t *const next2, const uint16_t *const prev3, const uint16_t *const next3, int end, int x, int k, int depth)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AV_PIX_FMT_YUVA420P9
int planewidth[4]
width of each plane
#define CONST(name, help, val, unit)
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
int redge
best edge match search radius
#define AVERROR_EOF
End of file.
#define AV_PIX_FMT_YUV444P16
int interlaced_frame
The content of the picture is interlaced.
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUVA420P16
int parity
frame field parity
A filter pad used for either input or output.
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0, will be automatically copied from the first input of the source filter if it exists.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad estdif_inputs[]
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...
void * priv
private data for use by the filter
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
#define AV_PIX_FMT_YUVA444P16
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
#define AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_GBRAP16
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
#define AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_GBRP16
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
#define AV_PIX_FMT_GRAY16
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define AV_PIX_FMT_YUVA444P12
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
static int config_output(AVFilterLink *outlink)
AVFilterContext * src
source filter
#define AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_GBRP14
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
static const AVFilterPad outputs[]
int format
agreed upon media format
#define AV_PIX_FMT_YUV420P16
int field
which field are we on, 0 or 1
#define AV_PIX_FMT_YUV420P14
Used for passing data between threads.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AV_PIX_FMT_GRAY14
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 inputs
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31))))#define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac){}void ff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map){AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);return NULL;}return ac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;}int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){int use_generic=1;int len=in->nb_samples;int p;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
#define AV_PIX_FMT_YUV420P10
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
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.
int interp
type of interpolation
int deint
which frames to deinterlace
const char * name
Filter name.
#define AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV420P9
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 link
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
AVFILTER_DEFINE_CLASS(estdif)
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GBRP12
#define flags(name, subs,...)
AVFilterInternal * internal
An opaque struct for libavfilter internal use.
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int deinterlace_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
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
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
static const AVFilterPad estdif_outputs[]
common internal and external API header
void(* interpolate)(struct ESTDIFContext *s, uint8_t *dst, const uint8_t *prev_line, const uint8_t *next_line, const uint8_t *prev2_line, const uint8_t *next2_line, const uint8_t *prev3_line, const uint8_t *next3_line, int x, int width, int rslope, int redge, unsigned half, int depth, int *K)
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_YUVA444P9
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
avfilter_execute_func * execute
int top_field_first
If the content is interlaced, is top field displayed first.
AVFilterContext * dst
dest filter
int linesize[4]
bytes of pixel data per line for each plane
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
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
int depth
Number of bits in the component.
AVPixelFormat
Pixel format.
mode
Use these values in ebur128_init (or'ed).
#define AV_PIX_FMT_YUV422P16
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define AV_PIX_FMT_YUVA422P12
#define AV_CEIL_RSHIFT(a, b)