Signed-off-by: Paul B Mahol <onemda@gmail.com>
@item overlap
Set the number of frames to overlap when tiling several successive frames together.
The value must be between @code{0} and @var{nb_frames - 1}.
@item overlap
Set the number of frames to overlap when tiling several successive frames together.
The value must be between @code{0} and @var{nb_frames - 1}.
+
+@item init_padding
+Set the number of frames to initially be empty before displaying first output frame.
+This controls how soon will one get first output frame.
+The value must be between @code{0} and @var{nb_frames - 1}.
@end table
@subsection Examples
@end table
@subsection Examples
unsigned margin;
unsigned padding;
unsigned overlap;
unsigned margin;
unsigned padding;
unsigned overlap;
unsigned current;
unsigned nb_frames;
FFDrawContext draw;
unsigned current;
unsigned nb_frames;
FFDrawContext draw;
{ "color", "set the color of the unused area", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS },
{ "overlap", "set how many frames to overlap for each render", OFFSET(overlap),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
{ "color", "set the color of the unused area", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS },
{ "overlap", "set how many frames to overlap for each render", OFFSET(overlap),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
+ { "init_padding", " set how many frames to initially pad", OFFSET(init_padding),
+ AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
tile->overlap = tile->nb_frames - 1;
}
tile->overlap = tile->nb_frames - 1;
}
+ if (tile->init_padding >= tile->nb_frames) {
+ av_log(ctx, AV_LOG_WARNING, "init_padding must be less than %d\n", tile->nb_frames);
+ } else {
+ tile->current = tile->init_padding;
+ }
+
tile->out_ref->height = outlink->h;
/* fill surface once for margin/padding */
tile->out_ref->height = outlink->h;
/* fill surface once for margin/padding */
- if (tile->margin || tile->padding)
+ if (tile->margin || tile->padding || tile->init_padding)
ff_fill_rectangle(&tile->draw, &tile->blank,
tile->out_ref->data,
tile->out_ref->linesize,
0, 0, outlink->w, outlink->h);
ff_fill_rectangle(&tile->draw, &tile->blank,
tile->out_ref->data,
tile->out_ref->linesize,
0, 0, outlink->w, outlink->h);
+ tile->init_padding = 0;
}
if (tile->prev_out_ref) {
}
if (tile->prev_out_ref) {