[XviD-devel] xvid decompression
Stephan Assmus
superstippi at gmx.de
Wed Jun 11 10:59:52 CEST 2008
Hi,
reno reballos wrote:
> >Yes, you can have multiple instances of the decoder. You can call int
> >ret = xvid_decore(NULL, XVID_DEC_CREATE, &xvidDecoderCreate, NULL);
> --- in my application i have at least five decoders, thus i have to
> create also 5 different decoder instances and 5 different decoder handle,
Yes.
> then, with this situation that i have 5 decoders decoding at the same
> time, will it not affect the system performance, because right now i have
> lagging problem when the conference over TCP/IP are full, i mean there
> are 5 people are in the conference...
What can I say... decoding 5 streams simultaneously should not be a problem
at all with that video size on a modern computer. The last time I tested
the speed, I decoded 684 by 384 video with YCbCr colorspace, and that took
about 4 or 5 ms per frame on a Core 2 Duo @ 1.8 GHz. Using both cores, you
should be able to decode about 7 streams. Of course the encoding takes more
CPU, but I have not done that myself and have no numbers ready. However,
you should be able to make tests yourself and get an overview of what is
possible on your hardware.
> by the way, to give you a brief description with my application on video
> conference, raw video is 352x288 at 30frames per second, 16-bit RGB, the
> output of xvid encoder is also RGB 16-bit, the video conference is 1:4,
> thus in one computer there is one xvid encoder and 4 xvid decoders that
> will run simultaneously during the process.
If windows allows you to playback multiple YCbCr bitmaps (because it uses
3D acceleration instead of the (mostly) one video overlay engine on
graphics card), I would recommend using that colorspace, that should save
you a good amount of CPU. If you absolutely _have_ to use RGB, then use 32
bits, 16 bits will only slow it down.
> when decoding the frames at the receiver, one thing that i noticed is
> that, decoder does not decode if it is a series of I P P I P P I P P... ?
> coz when i set the encoder to XVID_TYPE_AUTO so that i can have a series
> of I P P I P P...., the decoder at the other side gets trouble when
> decoding, thus i have to set it always XVID_TYPE_IVOP, in effect i got
> still big amount of data after compression at around 6000bytes...
That is expected when only encoding keyframes. But I cannot help you with
that, sorry.
> is it safe to use multi-threading in the decoding process? will it not
> cause lagging problem?
Yes, of course you should use multi-threading. In fact that's a requirement
if you want to use the full potential of a dual or more core CPU. Why would
it cause lagging problems?
You have two limiting factors in your application. One is the
encoding/decoding CPU power, the other is the network bandwidth. You need
to figure out which of the two is your problem, but that should be easy to
analyse, me thinks.
Best regards,
-Stephan
More information about the XviD-devel
mailing list