[MPlayer-dev-eng] About r16155…
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat May 7 18:19:30 CEST 2011
On Sat, May 07, 2011 at 06:10:29PM +0200, Clément Bœsch wrote:
> On Fri, May 06, 2011 at 12:42:09PM +0300, Ivan Kalvachev wrote:
> > On 5/6/11, Clément Bœsch <ubitux at gmail.com> wrote:
> > > On Thu, May 05, 2011 at 11:28:45PM +0200, Clément Bœsch wrote:
> > >> Yeah I know it's pretty old. But it seems this change introduced a strange
> > >> warning. Is the attached patch correct? Should I select chroma? Something
> > >> else? I admit I didn't test…
> > >>
> > >> Also, about the other warnings, the getSubSampleFactors (copied in a few
> > >> other places) can be replaced with mp_get_chroma_shift and will fix the
> > >> issue.
> > >>
> > >> Regards,
> > >>
> > >
> > > After a discussion with Uoti, something like this may be more appropriate:
> > >
> > > static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
> > > int cw= mpi->w >> mpi->chroma_x_shift;
> > > int ch= mpi->h >> mpi->chroma_y_shift;
> > > - FilterParam *f= &vf->priv;
> > >
> > > mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
> > > MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|
> > > - (f->threshold) ? MP_IMGFLAG_READABLE : 0,
> > > + (vf->priv->luma.threshold || vf->priv->chroma.threshold) ?
> > > MP_IMGFLAG_READABLE : 0,
> > > mpi->w,mpi->h);
> > >
> > >
> > > --
> >
> > This patch looks more correct.
> > But I think It needs another set of brackets around the (i?x:y).
> >
> > Right now it is equivalent to if(ACCEPT_STRIDE| threshold) return
> > READABLE; else return 0;
>
> Well spotted. Thank you Ivan, thank you Uoti :)
>
> Patch re-attached. Will be committed tomorrow with the following message:
>
> vf_smartblur: fix threshold condition.
>
> This will shut up a warning in the meantime.
Go ahead any time, but please improve the commit message,
e.g. mention that it fixes setting MP_IMGFLAG_READABLE
in vf_get_image call.
More information about the MPlayer-dev-eng
mailing list