Subject: [rohc] questions about UDVM implementation,

From: "liuyang" <[email-masked]>
Date: Tue, 5 Apr 2005 15:44:09 +0800

Dear all;
  
  I am working on my sigcomp layer for a sip phone.for the reason of simplicity,
my sigcomp layer will only support the messages compressed by LZSS in the begining,so there are only 
12 UDVM instructions that i must to implement.
  But here are some questions i met:
    1.in the <draft-price-rohc-sigcomp-user-guide-02.txt>, an example message compressed using the LZSS algorithm is given 
        as: 0x279a 0406 e378 b200 6074 1018 4ce6 1349 b842 ,but i can't decomprese this message correctly,i don't know why.
    2.the instruction  INPUT-HUFFMAN (index, end_of_message, 2, 9, 0, 255, 16384, 4, 4096, 8191, 1) 
             i don't know why taking out 9 bits from the compressed message and what exactly the function of this                 instruction will do.
          Thank you in advance,have a nice day!

/*****************************quotoed****************************************/
4.2.  LZSS 
    
   This section provides UDVM bytecode for the simple but effective LZSS 
   compression algorithm [LZSS]. 
    
   The principal improvement offered by LZSS over LZ77 is that each 
   compressed character begins with a 1-bit indicator flag to specify 
   whether the character is a literal or an offset/length pair. A 
   literal value is simply a single uncompressed byte that is appended 
   directly to the decompressed message. 
    
   An offset/length pair contains a 12-bit offset value from 1 to 4096 
   inclusive, followed by a 4-bit length value from 3 to 18 inclusive. 
   Taken together these values specify one of the previously received 

 
Price et al.                                                   [Page 14] 

INTERNET-DRAFT             SigComp User Guide               May 15, 2003 

   text strings in the circular buffer, which is then appended to the 
   end of the decompressed message. 
    
   Assembly for an LZSS decompressor is given below: 
    
   at (32) 
    
   :index                          pad (2) 
   :length_value                   pad (2) 
   :old_pointer                    pad (2) 
    
   at (42) 
    
   set (requested_feedback_location, 0) 
    
   at (64) 
    
   :byte_copy_left                 pad (2) 
   :byte_copy_right                pad (2) 
   :input_bit_order                pad (2) 
   :decompressed_pointer           pad (2) 
    
   set (returned_parameters_location, 0) 
    
   align (64) 
    
   :initialize_memory 
    
   set (udvm_memory_size, 8192) 
   set (state_length, (udvm_memory_size - 64)) 
    
   MULTILOAD (64, 4, circular_buffer, udvm_memory_size, 0, 
   circular_buffer) 
    
   :decompress_sigcomp_message 
    
   :next_character 
    
   INPUT-HUFFMAN (index, end_of_message, 2, 9, 0, 255, 16384, 4, 4096, 
   8191, 1) 
   COMPARE ($index, 8192, length, end_of_message, literal) 
    
    :literal 
    
   set (index_lsb, (index + 1)) 
    
   OUTPUT (index_lsb, 1) 
   COPY-LITERAL (index_lsb, 1, $decompressed_pointer) 
   JUMP (next_character) 
    
   :length 

 
Price et al.                                                   [Page 15] 

INTERNET-DRAFT             SigComp User Guide               May 15, 2003 

   INPUT-BITS (4, length_value, !) 
   ADD ($length_value, 3) 
   LOAD (old_pointer, $decompressed_pointer) 
   COPY-OFFSET ($index, $length_value, $decompressed_pointer) 
   OUTPUT ($old_pointer, $length_value) 
   JUMP (next_character) 
    
   :end_of_message 
    
   END-MESSAGE (requested_feedback_location, 
   returned_parameters_location, state_length, 64, 
   decompress_sigcomp_message, 6, 0) 
    
   :circular_buffer 
    
   An example message compressed using the LZSS algorithm is given 
   below: 
    
   0x279a 0406 e378 b200 6074 1018 4ce6 1349 b842 
/**************************************quotoed***********************************/
　　
_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc