[Mplayer-cvslog] CVS: main/libmpcodecs vf_noise.c,1.1,1.2
Michael Niedermayer
michaelni at gmx.at
Sun Jun 16 16:00:09 CEST 2002
Hi
On Sunday 16 June 2002 15:54, Arpi wrote:
> Hi,
>
> > direct rendering (hopefully at least, TFM for the video filters is a bit
> > non existent or iam just too stupid) ;)
>
> hmm i should write some (more) docs :)
> until now i was the only one writting/porting such filters
>
> isn't this noise rendering is something like
> dst_pixel[x,y]=src_pixel[x,y]+noise_func(x,y) ?
yes
>
> so i can't see where can DR helps...
>
> with this get_image(), the codec will render image to the dest buffer,
> then you do dst_pixel[x,y]+=noise_func(x,y)... why is it better?
> maybe it's even slower... especially if dst_* is in video ram
if the user wants only luma-noise than chroma isnt touched, so dr should help,
but if its in vram than thats bad ...
>
> > + if(!(mpi->flags&MP_IMGFLAG_ACCEPT_STRIDE) &&
> > mpi->imgfmt!=vf->priv->out fmt)
>
> imho that && should be ||
hmm, its just copy & pasted from vf_pp.c seems to make more sense with ||
though ;)
> and that mpi->flags&MP_IMGFLAG_ACCEPT_STRIDE is not needed at all, just
> pass
ok
>
> these flags to the vf_get_image here, as you do now:
> > + return; // colorspace differ
> > + // ok, we can do pp in-place (or pp disabled):
> > + vf->priv->dmpi=vf_get_image(vf->next,mpi->imgfmt,
> > + mpi->type, mpi->flags, mpi->w, mpi->h);
>
> also note, that mpi->type may be EXPORT, where this won't work imho
as mentioned above its mostly copy& pasted from vf_pp.c :( i dont completly
understand it but i can add "if(mpi->type==MP_IMGTYPE_EXPORT) return;"
[...]
Michael
More information about the MPlayer-cvslog
mailing list