83 "type:%s start_frame:%d nb_frames:%d alpha:%d\n",
89 "type:%s start_time:%f duration:%f alpha:%d\n",
158 int do_alpha,
int step)
167 for (i = slice_start; i <
slice_end; i++) {
169 for (j = 0; j < frame->
width; j++) {
170 #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)
171 p[r_idx] =
INTERP(r_idx, 0);
172 p[g_idx] =
INTERP(g_idx, 1);
173 p[b_idx] =
INTERP(b_idx, 2);
175 p[a_idx] =
INTERP(a_idx, 3);
186 int slice_start = (frame->
height * jobnr ) / nb_jobs;
190 else if (s->
bpp == 3)
filter_rgb(s, frame, slice_start, slice_end, 0, 3);
191 else if (s->
bpp == 4)
filter_rgb(s, frame, slice_start, slice_end, 0, 4);
202 int slice_start = (frame->
height * jobnr ) / nb_jobs;
206 for (i = slice_start; i <
slice_end; i++) {
208 for (j = 0; j < frame->
width * s->
bpp; j++) {
228 int slice_start = (height * jobnr ) / nb_jobs;
229 int slice_end = (height * (jobnr+1)) / nb_jobs;
231 for (plane = 1; plane < 3; plane++) {
232 for (i = slice_start; i <
slice_end; i++) {
234 for (j = 0; j <
width; j++) {
238 *p = ((*p - 128) * s->
factor + 8421367) >> 16;
253 int slice_start = (frame->
height * jobnr ) / nb_jobs;
257 for (i = slice_start; i <
slice_end; i++) {
260 for (j = 0; j < frame->
width; j++) {
326 if (s->
factor < UINT16_MAX) {
338 if (frame->
data[1] && frame->
data[2]) {
350 #define OFFSET(x) offsetof(FadeContext, x)
351 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
358 {
"start_frame",
"Number of the first frame to which to apply the effect.",
360 {
"s",
"Number of the first frame to which to apply the effect.",
362 {
"nb_frames",
"Number of frames to which the effect should be applied.",
364 {
"n",
"Number of frames to which the effect should be applied.",
367 {
"start_time",
"Number of seconds of the beginning of the effect.",
369 {
"st",
"Number of seconds of the beginning of the effect.",
371 {
"duration",
"Duration of the effect in seconds.",
373 {
"d",
"Duration of the effect in seconds.",
406 .priv_class = &fade_class,
408 .
inputs = avfilter_vf_fade_inputs,
409 .
outputs = avfilter_vf_fade_outputs,