[ENet-discuss] CPU Usage
Kenneth Bull
llubnek at gmail.com
Mon Sep 27 12:31:45 PDT 2010
On 26 September 2010 20:35, Nicholas J Ingrassellino
<nick at lifebloodnetworks.com> wrote:
> My disclaimer in my first message was meant to pose this as an experiment.
> This is a proof of concept kind of thing and nothing more. The idea is to
> develop an alternative to sending hold frames (or only the deltas). Much
> like VoIP does not suffer from some missing data I want to do a little work
> on how much an image would suffer from the smallest discrete unit (a pixel)
> missing unexpectedly. Look at my experiment as anything other than
> academic-- or a what if-- and you miss the point.
It would probably be better to simply simulate that sort of loss,
especially for early development, rather than using the loss that
naturally occurs with an unreliable stream.
Something like this:
for (int i = 0; i < num_pixels; ++i) {
if (rand() % 30 < 1) { /* drop one pixel in 30 pseudo-randomly */
continue;
}
do_stuff_with _pixel(i);
}
This also allows you to simulate different amounts of loss. You might
want a better rand() function than the standard though.
More information about the ENet-discuss
mailing list