[Ffmpeg-devel] MpegEncContext Pictures in codec development
Michael Niedermayer
michaelni
Fri Sep 29 21:29:36 CEST 2006
Hi
On Fri, Sep 29, 2006 at 09:15:06PM +0200, Denis Fortin wrote:
> Le vendredi 29 septembre 2006 ? 20:59 +0200, Michael Niedermayer a
> ?crit :
> > 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
>
> Thanks for your answers.
> I started this encoder without using much of mpegvideo.c but
> after more RTFS i think it's more reasonable to integrate it in
> mpegvideo.c like the wmv2 encoder and use some new switch()
> case CODEC_ID_WMV3:
> case CODEC_ID_VC1:
> ...
>
> is this kind of patch acceptable ?
probably
[...]
--
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