On Wed, 21 Jun 2006 15:24:35 +0200 Christian Bodenstedt <[EMAIL PROTECTED]> wrote:
> > At very first glance, it seems the problem is that there isn't a clean > > way to known buffer sizes in audio/video frames, at least at encoding > > step. > You are talking about the buffer "outframe->video_buf" which is > provided through the third parameter of "*encode_video(...)", aren't you? > > I was stumbling over "outframe", too (and I didn't manage to find any > documentation on it). To go on I'll need some informations: > > - In which function will "outframe->video_buf" be allocated? > - If it's already allocated when *encode_video() is entered: > - what is its size? > - How can I find out this size? OK, after a bit of thinking and a few commits, there is an official answer for those questions :) Now *frame_list_t structure ships length and size fields, were size is the real size of buffer, and length is the amount of valid data stored in buffer. This looked to me as quite clean and less painful soluction avalaible, so I've commited; except for removal of an unused field (plane_mode, nonbody cares about it) and a field reordering, nothing is changed, so nothing is supposed to be broken. For uncompressed frame, we have length == size, but for encoded frame (passed around between demultiplexor and decoder and between encoder and multiplexor), it will be length <= size, so length matters here and here it's supposed to be useful ;) This concept was also explained with other words in a comment on CVS in src/framebuffer.h. Just let me know if neither explanation is clear enough (!!). encode_x264 was fixed (as well as existing encoders/multiplexors module) and seems to produce at least watchable streams now. My next task is a bit of sanitization in frame buffers allocation/deletion, so everyone will use same common routines. Best regards, -- Francesco Romani - Ikitt ['people always complain, no matther what you do'] IM contact : (email first, Antispam default deny!) icq://27-83-87-867 known bugs : http://www.transcoding.org/cgi-bin/transcode?Bug_Showcase tiny homepage : http://fromani.exit1.org (see IDEAS if you want send code!)
