Go to the documentation of this file.
48 ptrdiff_t mlinesize, ptrdiff_t alinesize,
54 #define OFFSET(x) offsetof(PreMultiplyContext, x)
55 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
63 #define premultiply_options options
94 ptrdiff_t mlinesize, ptrdiff_t alinesize,
101 for (y = 0; y <
h; y++) {
102 for (x = 0; x <
w; x++) {
103 dst[x] = ((msrc[x] * (((asrc[x] >> 1) & 1) + asrc[x])) + 128) >> 8;
114 ptrdiff_t mlinesize, ptrdiff_t alinesize,
121 for (y = 0; y <
h; y++) {
122 for (x = 0; x <
w; x++) {
123 dst[x] = ((((msrc[x] - 128) * (((asrc[x] >> 1) & 1) + asrc[x]))) >> 8) + 128;
134 ptrdiff_t mlinesize, ptrdiff_t alinesize,
141 for (y = 0; y <
h; y++) {
142 for (x = 0; x <
w; x++) {
143 dst[x] = ((((msrc[x] -
offset) * (((asrc[x] >> 1) & 1) + asrc[x])) + 128) >> 8) +
offset;
154 ptrdiff_t mlinesize, ptrdiff_t alinesize,
159 const uint16_t *msrc = (
const uint16_t *)mmsrc;
160 const uint16_t *asrc = (
const uint16_t *)aasrc;
161 uint16_t *dst = (uint16_t *)ddst;
164 for (y = 0; y <
h; y++) {
165 for (x = 0; x <
w; x++) {
166 dst[x] = ((msrc[x] * (((asrc[x] >> 1) & 1) + asrc[x])) + half) >>
shift;
169 dst += dlinesize / 2;
170 msrc += mlinesize / 2;
171 asrc += alinesize / 2;
177 ptrdiff_t mlinesize, ptrdiff_t alinesize,
182 const uint16_t *msrc = (
const uint16_t *)mmsrc;
183 const uint16_t *asrc = (
const uint16_t *)aasrc;
184 uint16_t *dst = (uint16_t *)ddst;
187 for (y = 0; y <
h; y++) {
188 for (x = 0; x <
w; x++) {
189 dst[x] = ((((msrc[x] - half) * (int64_t)(((asrc[x] >> 1) & 1) + asrc[x]))) >>
shift) + half;
192 dst += dlinesize / 2;
193 msrc += mlinesize / 2;
194 asrc += alinesize / 2;
200 ptrdiff_t mlinesize, ptrdiff_t alinesize,
205 const uint16_t *msrc = (
const uint16_t *)mmsrc;
206 const uint16_t *asrc = (
const uint16_t *)aasrc;
207 uint16_t *dst = (uint16_t *)ddst;
210 for (y = 0; y <
h; y++) {
211 for (x = 0; x <
w; x++) {
212 dst[x] = ((((msrc[x] -
offset) * (int64_t)(((asrc[x] >> 1) & 1) + asrc[x])) + half) >>
shift) +
offset;
215 dst += dlinesize / 2;
216 msrc += mlinesize / 2;
217 asrc += alinesize / 2;
223 ptrdiff_t mlinesize, ptrdiff_t alinesize,
230 for (y = 0; y <
h; y++) {
231 for (x = 0; x <
w; x++) {
232 if (asrc[x] > 0 && asrc[x] < 255)
233 dst[x] =
FFMIN(msrc[x] * 255 / asrc[x], 255);
246 ptrdiff_t mlinesize, ptrdiff_t alinesize,
253 for (y = 0; y <
h; y++) {
254 for (x = 0; x <
w; x++) {
255 if (asrc[x] > 0 && asrc[x] < 255)
256 dst[x] =
FFMIN((msrc[x] - 128) * 255 / asrc[x] + 128, 255);
269 ptrdiff_t mlinesize, ptrdiff_t alinesize,
276 for (y = 0; y <
h; y++) {
277 for (x = 0; x <
w; x++) {
278 if (asrc[x] > 0 && asrc[x] < 255)
292 ptrdiff_t mlinesize, ptrdiff_t alinesize,
297 const uint16_t *msrc = (
const uint16_t *)mmsrc;
298 const uint16_t *asrc = (
const uint16_t *)aasrc;
299 uint16_t *dst = (uint16_t *)ddst;
302 for (y = 0; y <
h; y++) {
303 for (x = 0; x <
w; x++) {
304 if (asrc[x] > 0 && asrc[x] <
max)
305 dst[x] =
FFMIN(msrc[x] * (
unsigned)
max / asrc[x],
max);
310 dst += dlinesize / 2;
311 msrc += mlinesize / 2;
312 asrc += alinesize / 2;
318 ptrdiff_t mlinesize, ptrdiff_t alinesize,
323 const uint16_t *msrc = (
const uint16_t *)mmsrc;
324 const uint16_t *asrc = (
const uint16_t *)aasrc;
325 uint16_t *dst = (uint16_t *)ddst;
328 for (y = 0; y <
h; y++) {
329 for (x = 0; x <
w; x++) {
330 if (asrc[x] > 0 && asrc[x] <
max)
331 dst[x] =
FFMAX(
FFMIN((msrc[x] - half) *
max / asrc[x], half - 1), -half) + half;
336 dst += dlinesize / 2;
337 msrc += mlinesize / 2;
338 asrc += alinesize / 2;
344 ptrdiff_t mlinesize, ptrdiff_t alinesize,
349 const uint16_t *msrc = (
const uint16_t *)mmsrc;
350 const uint16_t *asrc = (
const uint16_t *)aasrc;
351 uint16_t *dst = (uint16_t *)ddst;
354 for (y = 0; y <
h; y++) {
355 for (x = 0; x <
w; x++) {
356 if (asrc[x] > 0 && asrc[x] <
max)
362 dst += dlinesize / 2;
363 msrc += mlinesize / 2;
364 asrc += alinesize / 2;
377 for (p = 0; p <
s->nb_planes; p++) {
378 const int slice_start = (
s->height[p] * jobnr) / nb_jobs;
379 const int slice_end = (
s->height[p] * (jobnr+1)) / nb_jobs;
381 if (!((1 << p) &
s->planes) || p == 3) {
384 base->data[p] + slice_start *
base->linesize[p],
390 s->premultiply[p](
base->data[p] + slice_start *
base->linesize[p],
391 s->inplace ?
alpha->data[3] + slice_start *
alpha->linesize[3] :
392 alpha->data[0] + slice_start *
alpha->linesize[0],
393 out->data[p] + slice_start *
out->linesize[p],
394 base->linesize[p],
s->inplace ?
alpha->linesize[3] :
alpha->linesize[0],
397 s->half,
s->inverse ?
s->max :
s->depth,
s->offset);
409 if (
ctx->is_disabled) {
426 switch (outlink->
format) {
473 switch (outlink->
format) {
564 vsub =
desc->log2_chroma_h;
566 s->height[0] =
s->height[3] =
inlink->h;
568 s->width[0] =
s->width[3] =
inlink->w;
570 s->depth =
desc->comp[0].depth;
571 s->max = (1 <<
s->depth) - 1;
572 s->half = (1 <<
s->depth) / 2;
573 s->offset = 16 << (
s->depth - 8);
597 "(size %dx%d) do not match the corresponding "
598 "second input link %s parameters (%dx%d) ",
605 outlink->
w =
base->w;
606 outlink->
h =
base->h;
618 in[0].time_base =
base->time_base;
619 in[1].time_base =
alpha->time_base;
672 if (!strcmp(
ctx->filter->name,
"unpremultiply"))
711 #if CONFIG_PREMULTIPLY_FILTER
714 .
name =
"premultiply",
715 .description =
NULL_IF_CONFIG_SMALL(
"PreMultiply first stream with first plane of second stream."),
723 .priv_class = &premultiply_class,
731 #if CONFIG_UNPREMULTIPLY_FILTER
733 #define unpremultiply_options options
737 .
name =
"unpremultiply",
738 .description =
NULL_IF_CONFIG_SMALL(
"UnPreMultiply first stream with first plane of second stream."),
746 .priv_class = &unpremultiply_class,
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
#define AV_PIX_FMT_GBRAP16
int ff_framesync_configure(FFFrameSync *fs)
Configure a frame sync structure.
AVPixelFormat
Pixel format.
they must not be accessed directly The fifo field contains the frames that are queued in the input for processing by the filter The status_in and status_out fields contains the queued status(EOF or error) 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
void ff_framesync_uninit(FFFrameSync *fs)
Free all memory currently allocated.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe, unsigned get)
Get the current frame in an input.
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 void unpremultiply16yuv(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
@ AVCOL_RANGE_JPEG
the normal 2^n-1 "JPEG" YUV ranges
static void unpremultiply8offset(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
const char * name
Filter name.
@ EXT_INFINITY
Extend the frame to infinity.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
A link between two filters.
void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, int bytewidth, int height)
Copy image plane from src to dst.
static int ff_insert_inpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new input pad for the filter.
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
static const AVOption options[]
@ EXT_STOP
Completely stop all streams with this one.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
#define AV_PIX_FMT_GBRP14
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUVA444P16
static void unpremultiply8yuv(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
#define AV_PIX_FMT_GRAY16
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
A filter pad used for either input or output.
#define AV_PIX_FMT_YUV444P10
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int premultiply_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
AVFilter ff_vf_unpremultiply
#define AV_PIX_FMT_GBRAP10
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
static int process_frame(FFFrameSync *fs)
void ff_inlink_request_frame(AVFilterLink *link)
Mark that a frame is wanted on the link.
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.
#define AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_YUV444P16
#define AV_CEIL_RSHIFT(a, b)
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
static const AVFilterPad outputs[]
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0,...
static int query_formats(AVFilterContext *ctx)
#define AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_GRAY14
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
static void unpremultiply8(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
#define AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GBRP16
AVFilter ff_vf_premultiply
Describe the class of an AVClass context structure.
static void premultiply16offset(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define fs(width, name, subs,...)
static void premultiply8offset(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
static av_cold int init(AVFilterContext *ctx)
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
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
static int activate(AVFilterContext *ctx)
int(* config_props)(AVFilterLink *link)
Link configuration callback.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static void unpremultiply16offset(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
int format
agreed upon media format
#define AV_PIX_FMT_YUV444P12
static int config_output(AVFilterLink *outlink)
AVFilterContext * src
source filter
static void premultiply8yuv(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
#define AV_PIX_FMT_YUVA444P10
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static void premultiply8(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
static const struct @315 planes[]
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
static av_cold void uninit(AVFilterContext *ctx)
int w
agreed upon image width
#define AV_PIX_FMT_GBRP12
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Used for passing data between threads.
static void unpremultiply16(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int max, int offset)
const char * name
Pad name.
@ AVCOL_RANGE_MPEG
the normal 219*2^(n-8) "MPEG" YUV ranges
#define AV_PIX_FMT_YUV444P9
enum AVMediaType type
AVFilterPad type.
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
void(* premultiply[4])(const uint8_t *msrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
#define AV_PIX_FMT_YUVA444P9
int ff_framesync_init(FFFrameSync *fs, AVFilterContext *parent, unsigned nb_in)
Initialize a frame sync structure.
int h
agreed upon image height
static void premultiply16yuv(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
static void premultiply16(const uint8_t *mmsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t mlinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h, int half, int shift, int offset)
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
static const AVFilterPad premultiply_outputs[]
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static int shift(int a, int b)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVFILTER_DEFINE_CLASS(premultiply)
static int config_input(AVFilterLink *inlink)
static const int16_t alpha[]
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
#define flags(name, subs,...)
the definition of that something depends on the semantic of the filter The callback must examine the status of the filter s links and proceed accordingly The status of output links is stored in the status_in and status_out fields and tested by the ff_outlink_frame_wanted() function. If this function returns true
#define AV_PIX_FMT_YUV444P14
int ff_framesync_activate(FFFrameSync *fs)
Examine the frames in the filter's input and try to produce output.
#define AV_PIX_FMT_GRAY12
static enum AVPixelFormat alpha_pix_fmts[]
static int filter_frame(AVFilterContext *ctx, AVFrame **out, AVFrame *base, AVFrame *alpha)