On Tue, Dec 30, 2014 at 11:14:29PM +0100, Reimar Döffinger wrote: > On Tue, Dec 30, 2014 at 09:12:13PM +0100, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > > --- > > libavfilter/vf_cropdetect.c | 9 ++++++--- > > 1 file changed, 6 insertions(+), 3 deletions(-) > > > > diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c > > index dd237ef..d49101c 100644 > > --- a/libavfilter/vf_cropdetect.c > > +++ b/libavfilter/vf_cropdetect.c > > @@ -137,9 +137,12 @@ static int config_input(AVFilterLink *inlink) > > { > > AVFilterContext *ctx = inlink->dst; > > CropDetectContext *s = ctx->priv; > > + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); > > > > - av_image_fill_max_pixsteps(s->max_pixsteps, NULL, > > - av_pix_fmt_desc_get(inlink->format)); > > + av_image_fill_max_pixsteps(s->max_pixsteps, NULL, desc); > > + > > + if (s->limit < 0) > > + s->limit = 24 << (desc->comp[0].depth_minus1 - 7); > > I'd feel better if you added an assert that depth_minus1 is at least 7.
> Also, it would be nice if it was possible to specify a limit in a way > that doesn't depend on bit depth (which you might not know when typing > the command), e.g. as a float value? ok, changed to make that possible applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel