Loading...
Searching...
No Matches
volk_8u_x3_encodepolar_8u_x2

Overview

encode given data for POLAR code

Dispatcher Prototype

void volk_8u_x3_encodepolar_8u_x2(unsigned char* frame, const unsigned char*
frozen_bit_mask, const unsigned char* frozen_bits, const unsigned char* info_bits,
unsigned int frame_size, unsigned int info_bit_size)

Inputs

- frame: buffer for encoded frame
- frozen_bit_mask: bytes with 0xFF for frozen bit positions or 0x00 otherwise.
- frozen_bits: values of frozen bits, 1 bit per byte
- info_bits: info bit values, 1 bit per byte
- frame_size: power of 2 value for frame size.
- info_bit_size: number of info bits in a frame

Outputs

- frame: polar encoded frame.

Example

int frame_exp = 10;
int frame_size = 0x01 << frame_exp;
int num_info_bits = frame_size;
int num_frozen_bits = frame_size - num_info_bits;
// function sets frozenbit positions to 0xff and all others to 0x00.
unsigned char* frozen_bit_mask = get_frozen_bit_mask(frame_size, num_frozen_bits);
// set elements to desired values. Typically all zero.
unsigned char* frozen_bits = (unsigned char) volk_malloc(sizeof(unsigned char) *
num_frozen_bits, volk_get_alignment());
unsigned char* frame = (unsigned char) volk_malloc(sizeof(unsigned char) * frame_size,
volk_get_alignment()); unsigned char* temp = (unsigned char)
volk_malloc(sizeof(unsigned char) * frame_size, volk_get_alignment());
unsigned char* info_bits = get_info_bits_to_encode(num_info_bits);
volk_8u_x3_encodepolar_8u_x2(
frame, temp, frozen_bit_mask, frozen_bits, info_bits, frame_size);
volk_free(frozen_bit_mask);
volk_free(frozen_bits);
volk_free(frame);
volk_free(temp);
volk_free(info_bits);