[FFmpeg-devel] [PATCH] RoQ video encoder, take 2

Michael Niedermayer michaelni
Mon May 28 15:29:55 CEST 2007


Hi

On Mon, May 28, 2007 at 01:21:54PM +0200, Vitor wrote:
[...]
> > [...]
> >   
> >> +    AVFrame *last_frame;
> >> +    AVFrame *current_frame;
> >> +
> >> +    uint8_t **last_frame_data;
> >> +    uint8_t **current_frame_data;
> >>     
> >
> > Are these two really needed, can't you just use the AVFrames above as in
> > the decoder?
> > At least they should be uint8_t *last_frame_data[3]; IMO, thus avoiding
> > an extra malloc and indirection step on access. I don't think it matters
> > much if you copy 4/8 or 12/24 bytes on swapping them.
> >
> >   
> 
> Well, I have to put them because I use the apply_motion_xx and 
> apply_vector_xx in the encoder, where the last frame is reconstructed. 
> But I agree with using *last_frame_data[3].

you should be able to just call get/release_buffer() in the encoder
like you do in the decoder and use these frames

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070528/b1c3eb01/attachment.pgp>



More information about the ffmpeg-devel mailing list