diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-08-14 21:51:27 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-08-16 12:40:01 +0000 |
commit | ef6718a5f7ebd3fed907a7037234f33ff20d10af (patch) | |
tree | 3105ae2ed1d4e3cb879a992b87c281e46ced7d24 /libavfilter | |
parent | d7ed473d5c4b7156c535d264c3c6613d727ba36e (diff) | |
download | ffmpeg-ef6718a5f7ebd3fed907a7037234f33ff20d10af.tar.gz |
lavfi/tile: make color of blank/unused area configurable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_tile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index f5eb763201..fb3ac859c4 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -41,6 +41,7 @@ typedef struct { FFDrawContext draw; FFDrawColor blank; AVFrame *out_ref; + uint8_t rgba_color[4]; } TileContext; #define REASONABLE_SIZE 1024 @@ -57,6 +58,7 @@ static const AVOption tile_options[] = { AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS }, { "padding", "set inner border thickness in pixels", OFFSET(padding), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS }, + { "color", "set the color of the unused area", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str = "black"}, .flags = FLAGS }, {NULL}, }; @@ -113,8 +115,7 @@ static int config_props(AVFilterLink *outlink) outlink->frame_rate = av_mul_q(inlink->frame_rate, (AVRational){ 1, tile->nb_frames }); ff_draw_init(&tile->draw, inlink->format, 0); - /* TODO make the color an option, or find an unified way of choosing it */ - ff_draw_color(&tile->draw, &tile->blank, (uint8_t[]){ 0, 0, 0, -1 }); + ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color); outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; |