[XviD-devel] single-function API

tomas carnecky tom at dbservice.com
Thu Jan 29 19:46:05 CET 2004


Hi folks,

I've a question about B-frames:
The 'B' stands for bidirectional, that means that the B-frame depends
on the previous and following frame, but how does it work with the
encoder/decoder? You pass a raw frame to the encoder and you get the
bitstream back. So it meight happen that for 10 frames the bitstream is
'empty' and that you then get 8000 kbits at once. Wouldn't it be better
to 'push' the frames to the encoder and then, let's say every 10 frames,
get the bitstream? I think it's faster to call write([to file]) once for
a while, but with many data than for every frame with only a few bytes.

I think then it would be easier to have _real_ SMP support (encoding a
movie with several threads):
First thread analyzes the frames and passes them together with some
statistics/info further, to the second thread, to the 'core' of the
encoder.

int xvid_enc_push_frame(): returns != 0 if the bitstream is enough
long (> 10000 bytes).
int xvid_get_bitstream(void *, int *): gets the bitstream.

So it would also be possible to 'feed' the encoder from one thread and
read the data/write them to a file from another

Just a few thoughts...

-- 
wereHamster a.k.a. Tom Carnecky   Emmen, Switzerland

(GC 3.1) GIT d+ s+: a--- C++ UL++ P L++ E- W++ N++ !o !K  w ?O ?M
           ?V PS PE ?Y PGP t ?5 X R- tv b+ ?DI D+ G++ e-- h! !r !y+



More information about the XviD-devel mailing list