Displaying 3 results from an estimated 3 matches for "longterm_margin".
2005 Dec 21
1
Is it a bug?
hi,Jean-Marc
In jitter.c, the function speex_jitter_get has such code,
if (late_ratio_short > .1 || late_ratio_long > .03)
{
jitter->shortterm_margin[MAX_MARGIN-1] +=
jitter->shortterm_margin[MAX_MARGIN-2];
jitter->longterm_margin[MAX_MARGIN-1] +=
jitter->longterm_margin[MAX_MARGIN-2];
for (i=MAX_MARGIN-2;i>=0;i--)
{
jitter->shortterm_margin[i+1] = jitter->shortterm_margin[i];
jitter->longterm_margin[i+1] = jitter->longterm_margin[i];
}
jitter->shortterm_margin[0...
2005 Sep 18
0
How does the jitter buffer "catch up"?
...like. Other than that, I don't think there
> should be any other possible race (assuming CPU cache coherence).
Weeeeelll.. Actually, now that you mention it, the histogram shifting is a
race as well.
In _put, the lines
jitter->shortterm_margin[i] *= .98;
jitter->longterm_margin[i] *= .995;
jitter->shortterm_margin[int_margin] += .02;
jitter->longterm_margin[int_margin] += .005;
are read-accumulate-write operations.
Let's assume the +40 bin has the shorterm_margin 1.0, and _put just read
it to do a multiply.
At this point, _get shifts the...
2005 Sep 18
3
How does the jitter buffer "catch up"?
> Err, unless I'm totally wrong, there are a few race conditions.
>
> Assume the buffer is full of packets newer than the current pointer, and
> one that is at the current pointer.
>
> get and put start at the same time.
>
> get will find the correct buffer index. Now, just after it finds it's
> index, assume we switch to the put thread.
>
> Put needs