[MPlayer-dev-eng] About r16155…

Ivan Kalvachev ikalvachev at gmail.com
Fri May 6 11:42:09 CEST 2011


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;


More information about the MPlayer-dev-eng mailing list