Difference between revisions of "Packed to Unpacked"

From GNU Radio
Jump to: navigation, search
Line 9: Line 9:
  
 
== Parameters ==  
 
== Parameters ==  
# '''bits_per_chunk''':  
+
# '''bits_per_chunk''': How many bits to include in each output byte/short
 
# '''endianness''':
 
# '''endianness''':
 
# '''Number of Ports''': Number of input and output ports, in case you need multiple parallel streams
 
# '''Number of Ports''': Number of input and output ports, in case you need multiple parallel streams

Revision as of 23:32, 3 May 2019

Converts a stream of packed bytes or shorts to stream of unpacked bytes or shorts

This is the inverse of Unpacked to Packed

The bits in the bytes or shorts input stream are grouped into chunks of bits and each resulting chunk is written right-justified to the output stream of bytes or shorts. All 8 or 16 bits of the each input byte or short are processed.

The combination of this block followed by Chunks to Symbols handles the general case of mapping from a stream of bytes or shorts into arbitrary float or complex symbols.

Parameters

  1. bits_per_chunk: How many bits to include in each output byte/short
  2. endianness:
  3. Number of Ports: Number of input and output ports, in case you need multiple parallel streams

Example:

If bits_per_chunk = 1

in 0b11110000

out 0b00000001 0b00000001 0b00000001 0b00000001 0b00000000 0b00000000 0b00000000 0b00000000