83 "type:%s start_frame:%d nb_frames:%d alpha:%d\n",
89 "type:%s start_time:%f duration:%f alpha:%d\n",
156 int do_alpha,
int step)
165 for (i = slice_start; i <
slice_end; i++) {
167 for (j = 0; j < frame->
width; j++) {
168 #define INTERP(c_name, c_idx) av_clip_uint8(((c[c_idx]<<16) + ((int)p[c_name] - (int)c[c_idx]) * s->factor + (1<<15)) >> 16)
169 p[r_idx] =
INTERP(r_idx, 0);
170 p[g_idx] =
INTERP(g_idx, 1);
171 p[b_idx] =
INTERP(b_idx, 2);
173 p[a_idx] =
INTERP(a_idx, 3);
184 int slice_start = (frame->
height * jobnr ) / nb_jobs;
188 else if (s->
bpp == 3)
filter_rgb(s, frame, slice_start, slice_end, 0, 3);
189 else if (s->
bpp == 4)
filter_rgb(s, frame, slice_start, slice_end, 0, 4);
200 int slice_start = (frame->
height * jobnr ) / nb_jobs;
204 for (i = slice_start; i <
slice_end; i++) {
206 for (j = 0; j < frame->
width * s->
bpp; j++) {
226 int slice_start = (height * jobnr ) / nb_jobs;
227 int slice_end = (height * (jobnr+1)) / nb_jobs;
229 for (plane = 1; plane < 3; plane++) {
230 for (i = slice_start; i <
slice_end; i++) {
232 for (j = 0; j <
width; j++) {
236 *p = ((*p - 128) * s->
factor + 8421367) >> 16;
251 int slice_start = (frame->
height * jobnr ) / nb_jobs;
255 for (i = slice_start; i <
slice_end; i++) {
258 for (j = 0; j < frame->
width; j++) {
324 if (s->
factor < UINT16_MAX) {
336 if (frame->
data[1] && frame->
data[2]) {
348 #define OFFSET(x) offsetof(FadeContext, x)
349 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
356 {
"start_frame",
"Number of the first frame to which to apply the effect.",
358 {
"s",
"Number of the first frame to which to apply the effect.",
360 {
"nb_frames",
"Number of frames to which the effect should be applied.",
362 {
"n",
"Number of frames to which the effect should be applied.",
365 {
"start_time",
"Number of seconds of the beginning of the effect.",
367 {
"st",
"Number of seconds of the beginning of the effect.",
369 {
"duration",
"Duration of the effect in seconds.",
371 {
"d",
"Duration of the effect in seconds.",
404 .priv_class = &fade_class,
406 .
inputs = avfilter_vf_fade_inputs,
407 .
outputs = avfilter_vf_fade_outputs,