46 #define REASONABLE_SIZE 1024
48 #define OFFSET(x) offsetof(TileContext, x)
49 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
53 {.str =
"6x5"}, 0, 0,
FLAGS },
54 {
"nb_frames",
"set maximum number of frame to render",
OFFSET(nb_frames),
56 {
"margin",
"set outer border margin in pixels",
OFFSET(margin),
58 {
"padding",
"set inner border thickness in pixels",
OFFSET(padding),
79 tile->
w, tile->
h, tile->
w * tile->
h);
97 const unsigned total_margin_w = (tile->
w - 1) * tile->
padding + 2*tile->
margin;
98 const unsigned total_margin_h = (tile->
h - 1) * tile->
padding + 2*tile->
margin;
100 if (inlink->
w > (INT_MAX - total_margin_w) / tile->
w) {
105 if (inlink->
h > (INT_MAX - total_margin_h) / tile->
h) {
110 outlink->
w = tile->
w * inlink->
w + total_margin_w;
111 outlink->
h = tile->
h * inlink->
h + total_margin_h;
128 const unsigned tx = tile->
current % tile->
w;
129 const unsigned ty = tile->
current / tile->
w;
144 x0, y0, inlink->
w, inlink->
h);
185 0, 0, outlink->
w, outlink->
h);
192 x0, y0, 0, 0, inlink->
w, inlink->
h);
241 .priv_class = &tile_class,