[Ffmpeg-devel] MpegEncContext Pictures in codec development

Michael Niedermayer michaelni
Fri Sep 29 20:59:38 CEST 2006


Hi

On Thu, Sep 28, 2006 at 09:37:30PM +0200, Denis Fortin wrote:
> Hi,
> 
> I'm writing a codec (vc1 coder), and i'm a little confused about all
> those pictures in 
> MpegEncContext.
> 
> Currently i need to store the result of an encoded/decoded I frame (for
> future use in P frames). From what i could understand new_picture is the
> original picture (the one to encode) and current_picture is the one i
> should use to store the encoded/decoded I frame.
> Am i right ?

yes


> Then how can i get a correctly allocated current_picture ?

IIRC MPV_frame_start() does that for you


> 
> More generally, how the picture/ff_find_unused_picture stuff is
> working : 

RTFS :)
but maybe you wont need ff_find_unused_picture() at all i dunno


> When encoding a P frame, how should i get the forward/backward ref
> pictures ?

P frames dont have backward ref pictures


> How the reordered P frames are stored while encoding the forward ref
> picture ?
>            vv        
>           IPPIPP...

if you have only I and P frames then there should be no reordering

[...]
-- 
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