[MPlayer-dev-eng] [PATCH] mp_image flags in filters

Rich Felker dalias at aerifal.cx
Thu Jul 28 17:02:29 CEST 2005


On Thu, Jul 28, 2005 at 01:04:44AM +0300, Ivan Kalvachev wrote:
> On 7/27/05, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > Hi,
> > I think a lot of filters use the wrong flags in their vf_get_image
> > calls, most of them use MP_IMAGETYPE_TEMP, to which mp_image.h says:
> > > //codec just needs some WO memory, where it writes/copies the whole frame
> > 
> > But a lot of codecs also read from it, IMHO they should/must set
> > MP_IMGFLAG_READABLE then (as it currently is this just gives horrible
> > performance when doign dr directly into video ram).
> > For others like softpulldown, telecine and tinterlace I really can't see why they
> > set MP_IMGFLAG_PRESERVE, since they seem to never use that mp_image
> > again.
> > For tile I think MP_IMGTYPE_STATIC is not neccessary, as I understand it
> > you'd only need that if you call vf_next_put_image more than once with
> > the same mp_image, which is not the case here.
> 
> I would preffer this to stay static. Don;t forget that tile is called
> multiple times over same (result) image

But it only calls vf_next_put_image once. Thus it does not need static.

> boxblur, doesn't seem to support direct rendering. It doesn't
> implement get_image funtion. So setting readable in the dest image is
> bad (will actually prevent DR in valid case). I guess that the
> algorithm requires not to modify the source image.

ok.

> denoise3d - same as above

ok.

> dint - MAXROWSIZE should be commited separately;)

:)

> divtc - commit that, it does reading and the other get_image() do use readable.

ok.

> down3dright - commit that too.

ok.

> pp - no idea, ask michael ;)

:)

> rectangle - commit. This could really be done better. 
> 
> smartblur - commit.

didn't read.

> softpulldown - I don't see why are you removing PRESERVE flag. This
> filter obviously doesn't want to allow next filters to mess the image,
> as it needs it on next pass.(btw this also mean that vo cannot draw
> osd in it;) It seems static and preserve is valid trick for storing
> image.

ah, clever trick.

> telecine - same as above. (and this is rich filters)

:)

> tinterlace - same as softpulldown. But I agree that READABLE is
> probably not needed here. We don't read from destination buffer.

agree, readable is pointless.

rich




More information about the MPlayer-dev-eng mailing list