On Thu, Jul 20, 2017 at 05:42:51PM +0200, Nicolas George wrote: [...] > diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c > index c4a5ae3742..f94c3ed9dd 100644 > --- a/libavfilter/vsrc_testsrc.c > +++ b/libavfilter/vsrc_testsrc.c > @@ -66,6 +66,9 @@ typedef struct TestSourceContext { > /* only used by testsrc */ > int nb_decimals; > > + /* only used by testsrc2 */ > + int alpha; > + > /* only used by color */ > FFDrawContext draw; > FFDrawColor color; > @@ -685,6 +688,7 @@ AVFilter ff_vsrc_testsrc = { > > static const AVOption testsrc2_options[] = { > COMMON_OPTIONS > + { "alpha", "set global alpha (opacity)", OFFSET(alpha), AV_OPT_TYPE_INT, > {.i64 = 255}, 0, 255, FLAGS }, > { NULL } > }; > > @@ -735,6 +739,7 @@ static void test2_fill_picture(AVFilterContext *ctx, > AVFrame *frame) > { > TestSourceContext *s = ctx->priv; > FFDrawColor color; > + unsigned alpha = s->alpha << 24;
small note here: i think x<<24 is undefined for x=0xff if x is signed -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel