[FFmpeg-devel] [PATCH] VP8 de/encode via libvpx

Reimar Döffinger Reimar.Doeffinger
Wed May 19 23:47:53 CEST 2010


On Wed, May 19, 2010 at 04:59:47PM -0400, James Zern wrote:
> On Wed, May 19, 2010 at 16:40, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> >> + ?if(vpx_codec_decode(&ctx->decoder,buf,buf_size,NULL,0)!=VPX_CODEC_OK) {
> >
> > To handle codec delay, buf == NULL and buf_size == 0 is valid in FFmpeg,
> > is using it this way also part of the VPX API and has the same meaning?
> > Otherwise it would be better to handle it specially.
> No that will actually get you the last frame, though I thought NULL
> buf would only occur if _DELAY was set.

In practice maybe, however it is not what API asks for I think
(I only looked at the avcodec_decode_video* function documentation).

> > Also, does the decoder somehow tell how much of the data it actually used?
> Frame based so it expects to consume the entire buffer.

Yes, all FFmpeg decoders are, they still return a size that can be used
e.g, for debugging purposes.
Not important, just a useful feature particularly for consistency.



More information about the ffmpeg-devel mailing list