about feedback curr

Asked by qingbaibai on 2011-12-10

hello,

I test file pcap of voip in samples. I get results of "feedback curr -12" and "feedback curr 0". I don't read the rohc library source code in detail. Follow is the related source code in rohc_decomp.c:
1 default: /* ROHC_OK_NO_DATA, ROHC_OK */
2 decomp->curval -= decomp->okval; /* framework (S-NACK) */
3 ddata.active->curval -= decomp->okval; /* context (NACK) */
4 rohc_debugf(2, "feedback curr %d\n", ddata.active->curval);
5 if(decomp->curval < 0)
6 decomp->curval = 0;
7
8 if(ddata.active->curval < 0)
9 ddata.active->curval = 0;
10
11 rohc_debugf(2, "feedback curr %d\n", ddata.active->curval);
12 if(decomp->compressor != NULL && ddata.active->mode == U_MODE)
13 {
14 /* switch active context to O-mode */
15 ddata.active->mode = O_MODE;
16 d_operation_mode_feedback(decomp, ROHC_OK, ddata.cid, ddata.addcidUsed,
17 ddata.largecidUsed, ddata.active->mode,
18 ddata.active);
19 }

"feedback curr -12" corresponding to line 4
"feedback curr 0" corresponding to line 11
Thank you.

Regards,
qingbaibai

Question information

Language:
English Edit question
Status:
Answered
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
2011-12-10
Last reply:
2011-12-10

Hello,

The "feedback curr" trace represents a sort of ratio of decompression failures over decompression successes:
 - Every time the decompressor succeeds to decompress a packet, it removes
   "okval" from "curval".
 - Every time the decompressor fails to decompress a packet, it adds "errval" to
   "curval". If "curval" is greater than "maxval" and the decompressor is not in
   undirectional mode, then a Negative ACK (NACK) is transmitted to the compressor.
 - Every time the decompressor processes a packet (ie. both success or failure),
   it compares 'curval' to 'maxval'.

Does it clarify the situation?

The names of variables (curval/errval/okval/maxval) were badly chosen. And the overall
algorithm is not documented. One task more to add to the TODO list I think :-)

Regards,
Didier

I created bug #902465 as a reminder for the task.

Can you help with this problem?

Provide an answer of your own, or ask qingbaibai for more information if necessary.

To post a message you must log in.