[MPlayer-dev-eng] [PATCH] Pan&Scan for Xvideo (again :)
D Richard Felker III
dalias at aerifal.cx
Tue Jun 4 15:43:35 CEST 2002
On Tue, Jun 04, 2002 at 02:50:40PM +0200, Arpi wrote:
> Hi,
>
> > > i had better idea yesterday:
> > > do a 2-pass playback. at pass 1, use a special filter which
> > > detects action and calculates the ideal panning value (which
> > > part of the 16:9 picture should be cropped down) and write
> > > it to a file. at the 2nd pass, do some bspline/bezier
> > > smoothing of the panning values and use it for the playback
> > >
> > > action detection could be done on dct & mc based.
> > > if the MV of neightbour macroblocks differs a lot
> > > (if all MV are similar, then it's just camera panning),
> > > or the dct coeffs are high, then there is something happening.
> >
> > Haha, is this a joke or for real? Do the codecs export necessary
> real. it would be a kickass feature :)
>
> > information?
> not yet, but should be easy to add, at least for libavcodec.
>
> and i have the feeling that Michael is already thinking about the
> implementation :)
Very cool. Building the table of center/extent of action for each
frame should be pretty easy, but then controlling the panning based on
that data could be a bit tricky to get looking natural. Perhaps it
would make sense to also keep track of existing panning in the movie
(lots of mv's with same direction and length), and when possible, pan
the viewable region at the same time, so that the result is just an
increase or decrease in existing panning speed, rather than an
entirely new pan. Not sure how often this could be exploited, but I
expect it would help eliminate the look of unnatural
computer-generated pans when it works.
Anyway, I look forward to seeing how it turns out. BTW, it would be
cool if mencoder could use the saved data from pass1 of playback to
encode a pan&scan cropped movie. I suppose as long as this is
implemented as a video filter (which would make sense IMO), this'll be
no problem. :)
Rich
More information about the MPlayer-dev-eng
mailing list