← Back to team overview

rohc team mailing list archive

Re: [Question #263508]: Schéma de comrpession Mode U

 

Question #263508 on rohc changed:
https://answers.launchpad.net/rohc/+question/263508

    Status: Open => Answered

Didier Barvaux proposed the following answer:
Hello,

Please ask your questions in English whenever possible. This way the
answer might help non-French people too ;-)


> • LSB (Least Significant Bits) :
> Je ne trouve pas dans le code de la librairie RoHC où et quelle
> fonction effectue la compression LSB (pour le Mode U)

The LSB algorithm is described in RFC 3095, §4.5.1. The document defines
2 functions f() and g(). Those functions are implemented in the ROHC
library with different names.

The f() function is named rohc_f_16bits() for 16-bit values and rohc_f_32bits() for 32-bit values. The functions are defined in the
src/common/interval.h and src/common/interval.c files.

The g() function is named rohc_g_16bits() for 16-bit values and rohc_g_32bits() for 32-bit values. The functions are defined in the
src/comp/schemes/comp_wlsb.c file.


> • Scaled RTP Timestamp :
> -La fonction c_create_sc() de création objet de type Scaled RTP se
> trouvant dans le fichier scaled_rtp_ts.c est appelée par la fonction
> c_rtp_create() dans le fichier c_rtp.c , or cette fonction n'est
> utilisée nulle part.

The c_rtp_create() function is used indirectly. The design is kind of
object oriented.

Every compression profile (IP-only, IP/UDP, IP/UDP/RTP...) defines a set
of functions that fulfil some features (create/destroy context, encode
packet...). The one for the IP/UDP/RTP profile is defined at the very
bottom of the src/comp/c_rtp.c file. It uses the c_rtp_create()
function.

The profile-agnostic part of the library then calls the functions set by
the profiles. The create() callback is for example called in the
function c_create_context() in file src/comp/rohc_comp.c.


> -La fonction c_add_ts() d'ajout de nouvel objet de type Scaled RTP
> dans le contexte de compression se trouvant dans le fichier
> scaled_rtp_ts.c est appelée par la fonction
> rtp_encode_uncomp_fields() dans le fichier c_rtp.c , or cette
> fonction n'est utilisée nulle part J'aimerais par conséquent savoir
> si ce schéma de compression est utilisé (pour le Mode
> U) et où ?

This function is called indirectly. As said for the previous question,
the library uses an object-oriented design: every profile defines a set
of functions, one per feature (create context, destroy context, encode
packet...). The set of callbacks is defined by the struct
rohc_comp_profile.

There is another level of hierarchy among the profiles. Many profiles behaves almost the same way except for minor differences. This is the case of all the profiles defined by RFC3095. In order to avoid code duplication, there is a rohc_comp_rfc3095.h/rohc_comp_rfc3095.c module that gathers most of the code in common. In order to handle the small
differences, there is another set of callbacks defined by the struct rohc_comp_rfc3095_ctxt. 


> • Time-based compression des Timestamp RTP :
> Je ne trouve pas dans le code de la librairie RoHC où et quelle
> fonction effectue la compression Timestamp RTP (pour le Mode U)

This encoding scheme is not implemented yet. See the wiki pages for the
missing pieces of standard.

Conformance with RFC:
https://rohc-lib.org/wiki/doku.php?id=library-compliance-rfcs#base_rfcs

TODO list:
https://rohc-lib.org/support/wiki/doku.php?id=library-todo&#rohc_features


> • Offset IP-ID (dédié IPv4)
> Est-ce que le schéma de compression Offset IP-ID (pour le Mode U)
> est effectuée par la fonction rohc_ntoh16() qui est appelée par la
> fonction encode_uncomp_fields() dans le fichier c_generic.c ? Sinon
> quelle est la fonction qui permet de l'effectuer et où se
> trouve-t-elle dans la librairie RoHC ?

No. The rohc_ntoh16() is a function that performs the same job as
ntohs() (see "man ntohs" for more details).

The Offset IP-ID encoding scheme is implemented in the middle of the
encode_uncomp_fields() function.

The Offset IP-ID decoding scheme is implemented in the
src/decomp/schemes/ip_id_offset.h and src/decomp/schemes/ip_id_offset.c
files.


> • Self-Describing Variable-Length (SDVL)
> La fonction de traitement sdvl_decode() est utilisée dans le fichier
> rohc_comp.c, par la fonction __rohc_comp_deliver_feedback() qui est
> appelée par le compresseur lors de la réception d'un feedback émi par
> le décompresseur. Est-ce que cela signifie que le schéma de
> compression SDVL n'est utilisable qu'en Mode O ?

No. The SDVL encoding scheme is used for the encoding of several fields
such as CID, RTP TimeStamp (TS), and RTP TS_STRIDE. It is not specific
to the U/O/R-mode.

The SDVL encoding scheme is implemented in the src/common/sdvl.c file.
The sdvl_encode(), sdvl_encode_full() and sdvl_decode() functions are
called from several places. Not only from the function
__rohc_comp_deliver_feedback().


Regards,
Didier

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.