44 unsigned int nb_frames;
48 sscanf(args,
" %3[^:]:%u:%u", in_out, &fade->
start_frame, &nb_frames) != 3) {
50 "Expected 3 arguments '(in|out):#:#':'%s'\n", args);
54 nb_frames = nb_frames ? nb_frames : 1;
56 if (!strcmp(in_out,
"in"))
58 else if (!strcmp(in_out,
"out")) {
63 "first argument must be 'in' or 'out':'%s'\n", in_out);
69 "type:%s start_frame:%d nb_frames:%d\n",
107 if (fade->
factor < UINT16_MAX) {
109 for (i = 0; i < frame->
video->
h; i++) {
111 for (j = 0; j < inlink->
w * fade->
bpp; j++) {
115 *p = (*p * fade->
factor + 32768) >> 16;
120 if (frame->
data[1] && frame->
data[2]) {
122 for (plane = 1; plane < 3; plane++) {
123 for (i = 0; i < frame->
video->
h; i++) {
125 for (j = 0; j < inlink->
w >> fade->
hsub; j++) {
129 *p = ((*p - 128) * fade->
factor + 8421367) >> 16;
174 .
inputs = avfilter_vf_fade_inputs,
175 .
outputs = avfilter_vf_fade_outputs,
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
static const AVFilterPad avfilter_vf_fade_outputs[]
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const AVFilterPad outputs[]
packed RGB 8:8:8, 24bpp, RGBRGB...
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
static int config_props(AVFilterLink *inlink)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
static av_cold int init(AVFilterContext *ctx, const char *args)
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of PIX_FMT_YUV440P and setting color_range ...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_...
A filter pad used for either input or output.
A link between two filters.
static int query_formats(AVFilterContext *ctx)
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
void av_log(void *avcl, int level, const char *fmt,...)
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV420P and setting color_...
packed RGB 8:8:8, 24bpp, BGRBGR...
static const AVFilterPad avfilter_vf_fade_inputs[]
int format
agreed upon media format
A reference to an AVFilterBuffer.
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
AVFilter avfilter_vf_fade
static int start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static const AVFilterPad inputs[]
const char * name
filter name
AVFilterLink ** outputs
array of pointers to output links
#define AV_PERM_PRESERVE
nobody else can overwrite the buffer
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal and external API header
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV444P and setting color_...
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
uint8_t * data[8]
picture/audio data for each plane
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
AVFilterBufferRef * ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
AVPixelFormat
Pixel format.
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)