Comment 18 for bug 1587011

Revision history for this message
Didier Barvaux (didier-barvaux) wrote :

Hello,

The stats are wrong. There are too many CRC corrections. The CRC repair stats retrieved with rohc_decomp_get_last_packet_info() are cumulative, so you should not add them to the values retrieved from previous calls to this function.

The fix is not straight forward. You cannot just use the last retrieved value, since the value is cumulative by context (not for all contexts) and the function gives no information about the context itself (the CID for example).

So, I propose you to introduce a new function rohc_decomp_get_context_info() that retrieves some information for a given context. The CRC repair stats are part of them. They are cumulative counters. So, you may retrieves the stats for all contexts at the very end of the program.

* The description of the function may be found there: https://github.com/didier-barvaux/rohc/commit/3bd7f2fa981da4c28a6e7bdd2069eba4dce4876e#diff-a7250f80721fe35bfcf368fbcc82ca93R2505
* The stats retrieved are found here: https://github.com/didier-barvaux/rohc/commit/3bd7f2fa981da4c28a6e7bdd2069eba4dce4876e#diff-c2a52ba517eeaac7846e6c06f4c04090R157
* an example of use may be found here: https://github.com/didier-barvaux/rohc/commit/3bd7f2fa981da4c28a6e7bdd2069eba4dce4876e#diff-cd3c1a82b2b16f40aa35b1d594c6b322R529

The patch is available in the new dev_fix_bug_1587011 branch, just after the previous patch that fixes the problem you reported previously: https://github.com/didier-barvaux/rohc/commits/dev_fix_bug_1587011
You can either retrieve that branch or manually download the patch from Github.

I also enhanced the rohc_decomp_get_general_info() function to retrieve the sames 3 counters but cumulated for all the contexts of one decompressor. Please have a look at https://github.com/didier-barvaux/rohc/commit/28ab10540374ffb118bf9bcfc050d076e20b5fc4

Please tell me if those functions fit your needs and what are the new computed stats in your use case.

Regards,
Didier