[Ffmpeg-devel] MPV_* usage

Michael Niedermayer michaelni
Tue Jun 13 14:55:39 CEST 2006


Hi

On Tue, Jun 13, 2006 at 07:54:31AM +0300, Kostya wrote:
> Hello, I'm trying to hack VC9 decoder to decode at least something.
> Current decoder shows telltale signs of reusing code from h263dec.c
> but does not produce a picture at all, s->current_picture has data
> though.
> 
> Can somebody (Michael) tell how to make this decoder to produce
> pictures and what functions from MPV_ and ff_ series I should use
> to rewrite decoder.

iam not sure, vc9.c is a mess, at least the following lines make no sense
and should be completly removed


    len = avpicture_get_size(avctx->pix_fmt, avctx->width,
                             avctx->height);
    tmp_buf = (uint8_t *)av_mallocz(len);
    avpicture_fill((AVPicture *)pict, tmp_buf, avctx->pix_fmt,
                   avctx->width, avctx->height);

...
    *data_size = len;


then check that the output pict matches current_picture_ptr and that
current_picture_ptr.data and current_picture.data match

also keep in mind that if the stream is not low_delay (= has b frames)
then the output picture MUST NOT be the current picture unless the
current picture is a b frame, for non b frames the output is the last
non b picture (should be in last_picture_ptr)


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

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