[FFmpeg-cvslog] lavfi/vignette: simplify dmax definition.

Clément Bœsch git at videolan.org
Thu May 30 20:53:35 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu May 30 20:41:37 2013 +0200| [bfafcc4ebe633d23961a079b888e836d7d2154e6] | committer: Clément Bœsch

lavfi/vignette: simplify dmax definition.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bfafcc4ebe633d23961a079b888e836d7d2154e6
---

 libavfilter/vf_vignette.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c
index a570611..694d10f 100644
--- a/libavfilter/vf_vignette.c
+++ b/libavfilter/vf_vignette.c
@@ -283,12 +283,11 @@ static int config_props(AVFilterLink *inlink)
     if (sar.num > sar.den) {
         s->xscale = av_q2d(sar);
         s->yscale = 1;
-        s->dmax = hypot(inlink->w / 2., s->yscale * inlink->h / 2.);
     } else {
         s->yscale = av_q2d(av_inv_q(sar));
         s->xscale = 1;
-        s->dmax = hypot(s->xscale * inlink->w / 2., inlink->h / 2.);
     }
+    s->dmax = hypot(inlink->w / 2., inlink->h / 2.);
 
     s->fmap_linesize = FFALIGN(inlink->w, 32);
     s->fmap = av_malloc(s->fmap_linesize * inlink->h * sizeof(*s->fmap));



More information about the ffmpeg-cvslog mailing list