[Ffmpeg-devel] Partial frame decode in avcodec?

Michael Niedermayer michaelni
Thu May 11 00:29:55 CEST 2006


Hi

On Wed, May 10, 2006 at 07:46:38PM +0100, M?ns Rullg?rd wrote:
> "Matt Schuckmann" <mschuck at imoveinc.com> writes:
> 
> > I've been experimenting with the avcodec library for a couple of months now
> > as a replacement for an old implementation of the MPEG4 codec. So far
> > avcodec is working great and totally blows the old codec away in all
> > categories. 
> >
> > The one thing I haven't been able to find in avcodec that I kind of need is
> > the ability to decode only a part of a frame. 
> >
> > The old codec supported this via a SetView() function that took a height and
> > width and upper left corner of the region of interest. I primarily used this
> > to reduce the decode processing time since often the user is only looking a
> > small part of a very large frame and large processing time savings could be
> > had by decoding only the visible part of the frame. 
> 
> What happens if a predicted block depends on pixels outside the
> region?  Are you sure your old decoder didn't simply decode the full
> frame and crop it for you?
> 
> > Can anybody tell me if avcodec supports this type of feature for MPEG4? Or
> > for any other codec?
> 
> There is no such thing in lavc.  Cropping the image after decoding is

theres hardly anything, sane or not that lavc doesnt support ;)
see AVCodecContext.top_skip / bottom_skip

they where intended for avoiding to decode the black bands in movies with
the assumtation that motion vectors wont point there hopefully ...
but noone stops you from using them even if there are no black bands, though
it wont look to good if the MV assumtation is false obviously ...

[...]


-- 
Michael

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is





More information about the ffmpeg-devel mailing list