64 enum {VF_FADE_WAITING=0, VF_FADE_FADING, VF_FADE_DONE} fade_state;
82 "type:%s start_frame:%d nb_frames:%d alpha:%d\n",
88 "type:%s start_time:%f duration:%f alpha:%d\n",
147 int slice_start = (frame->
height * jobnr ) / nb_jobs;
151 for (i = slice_start; i <
slice_end; i++) {
153 for (j = 0; j < frame->
width * s->
bpp; j++) {
173 int slice_start = (height * jobnr ) / nb_jobs;
174 int slice_end = (height * (jobnr+1)) / nb_jobs;
176 for (plane = 1; plane < 3; plane++) {
177 for (i = slice_start; i <
slice_end; i++) {
179 for (j = 0; j <
width; j++) {
183 *p = ((*p - 128) * s->
factor + 8421367) >> 16;
198 int slice_start = (frame->
height * jobnr ) / nb_jobs;
202 for (i = slice_start; i <
slice_end; i++) {
205 for (j = 0; j < frame->
width; j++) {
233 s->
start_time = frame_timestamp*(double)AV_TIME_BASE;
271 if (s->
factor < UINT16_MAX) {
280 if (frame->
data[1] && frame->
data[2]) {
294 #define OFFSET(x) offsetof(FadeContext, x)
295 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
302 {
"start_frame",
"Number of the first frame to which to apply the effect.",
304 {
"s",
"Number of the first frame to which to apply the effect.",
306 {
"nb_frames",
"Number of frames to which the effect should be applied.",
308 {
"n",
"Number of frames to which the effect should be applied.",
311 {
"start_time",
"Number of seconds of the beginning of the effect.",
313 {
"st",
"Number of seconds of the beginning of the effect.",
315 {
"duration",
"Duration of the effect in seconds.",
317 {
"d",
"Duration of the effect in seconds.",
349 .priv_class = &fade_class,
352 .
inputs = avfilter_vf_fade_inputs,
353 .
outputs = avfilter_vf_fade_outputs,