[MPlayer-dev-eng] About r16155…

Clément Bœsch ubitux at gmail.com
Thu May 5 23:51:35 CEST 2011


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);


-- 
Clément B.


More information about the MPlayer-dev-eng mailing list