diff options
author | Pravin Kumarvel <pmanohar@radisys.com> | 2016-10-17 11:00:57 +0530 |
---|---|---|
committer | Pravin Kumarvel <pmanohar@radisys.com> | 2016-10-17 11:00:57 +0530 |
commit | 0a4a6c120040c8dd0744f745e08f24624df62647 (patch) | |
tree | bb26bcb0e1127248a86f246a13ac177b27f88a94 /src/decoding.cpp | |
parent | 6348aea6a2cdc753021e5324a0dd2aecf8791f10 (diff) |
EGPRS: Add EPDAN CRBB Tree based decoding
Implemented tree based algorithm to decode compressed bitmap in EPDAN
as described in section 9.1.10 of 3GPP 44.060.
This algorithm intends to improve the performance over existing method.
New Regression test is added under bitcomp directory.
Test case is added to validate decompressed result of the bitmap
Present in EPDAN.
Test is done for multiple bitmaps of varying length.
Invalid inputs are also part of the test vector.
Change-Id: Ieae1992ed4b02bb1e09eec2d3de1a030eabd16ce
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r-- | src/decoding.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp index 3f5c4d27..6ae4b16c 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -20,6 +20,7 @@ #include <decoding.h> #include <rlc.h> #include <gprs_debug.h> +#include <egprs_rlc_compression.h> extern "C" { #include <osmocom/core/utils.h> @@ -692,21 +693,17 @@ int Decoding::decode_egprs_acknack_bits(const EGPRS_AckNack_Desc_t *desc, if (crbb_len > 0) { int old_len = bits->cur_bit; - struct bitvec crbb; - - crbb.data = (uint8_t *)desc->CRBB; - crbb.data_len = sizeof(desc->CRBB); - crbb.cur_bit = desc->CRBB_LENGTH; - - rc = osmo_t4_decode(&crbb, desc->CRBB_STARTING_COLOR_CODE, - bits); + LOGP(DRLCMACDL, LOGL_DEBUG, "Compress bitmap exists, " + "CRBB LEN = %d and Starting color code = %d", + desc->CRBB_LENGTH, desc->CRBB_STARTING_COLOR_CODE); + rc = egprs_compress::decompress_crbb(desc->CRBB_LENGTH, + desc->CRBB_STARTING_COLOR_CODE, desc->CRBB, bits); if (rc < 0) { LOGP(DRLCMACUL, LOGL_NOTICE, - "Failed to decode CRBB: " - "length %d, data '%s'\n", - desc->CRBB_LENGTH, - osmo_hexdump(crbb.data, crbb.data_len)); + "Failed to decode CRBB: length %d, data '%s'\n", + desc->CRBB_LENGTH, osmo_hexdump( + desc->CRBB, (desc->CRBB_LENGTH + 7)/8)); /* We don't know the SSN offset for the URBB, * return what we have so far and assume the * bitmap has stopped here */ |