Browse Source

lavfi/vignette: simplify dmax definition.

tags/n2.0
Clément Bœsch 12 years ago
parent
commit
bfafcc4ebe
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavfilter/vf_vignette.c

+ 1
- 2
libavfilter/vf_vignette.c View File

@@ -283,12 +283,11 @@ static int config_props(AVFilterLink *inlink)
if (sar.num > sar.den) { if (sar.num > sar.den) {
s->xscale = av_q2d(sar); s->xscale = av_q2d(sar);
s->yscale = 1; s->yscale = 1;
s->dmax = hypot(inlink->w / 2., s->yscale * inlink->h / 2.);
} else { } else {
s->yscale = av_q2d(av_inv_q(sar)); s->yscale = av_q2d(av_inv_q(sar));
s->xscale = 1; 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_linesize = FFALIGN(inlink->w, 32);
s->fmap = av_malloc(s->fmap_linesize * inlink->h * sizeof(*s->fmap)); s->fmap = av_malloc(s->fmap_linesize * inlink->h * sizeof(*s->fmap));


Loading…
Cancel
Save