[Ffmpeg-devel] Partial frame decode in avcodec?

Måns Rullgård mru
Wed May 10 20:46:38 CEST 2006

"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
easy to do separately.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list