Commit Graph

11 Commits

Author SHA1 Message Date
Tom Tsou 35536807ab core/conv: implement optimized Viterbi decoder
Add a separate, faster convolution decoding implementation for rates
up to N=4 and constraint lengths of K=5 and K=7, which covers the
most GSM code uses. The decoding algorithm exploits the symmetric
structure of the Viterbi add-compare-select (ACS) operation - commonly
known as the ACS butterfly. This shift-register optimization can be
found in the well-known text by Dave Forney.

Forney, G.D., "The Viterbi Algorithm," Proc. of the IEEE, March 1973.

Implementation is non-architecture specific and improves performance on
x86 as well as ARM processors. Existing API is unchanged with optimized
code being called internally for supported codes.

The original code was relicensed under GPLv2-or-later with permission
of copyright holder - Tom Tsou.

Change-Id: I74d355274b4176a7d924f91ef3c96912ce338fb2
2017-04-11 00:36:08 +00:00
Katerina Barone-Adesi c28c6a02d2 misc: Doxygen tweaks: fixed some typos and minor errors
Doxygen generates quite a lot of warnings on libosmocore. Some of them
are obvious typos - this patch aims to fix such low-hanging fruit.
2013-02-15 13:27:59 +01:00
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Sylvain Munaut ae8dbb4d77 core/conv: Add utility methods to know length of coded/decoded vectors
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24 17:47:32 +01:00
Sylvain Munaut 297d13f460 core/conv: Add support for other termination types (trunc & tail biting)
Note that this breaks the ABI and the low level API. But it shouldn't
break the high level API, nor the conv code definitions (because fields
default to 0, and for new fields '0' is the previous behavior)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24 17:46:58 +01:00
Sylvain Munaut d4440d4cfa core/conv: Really only consider error for non-zero soft values
This should have been done with 1dd7c84733
but somehow was missed and only applied to the 'finish' method and
not the 'scan' method.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24 16:04:58 +01:00
Sylvain Munaut 03d2c8906b core/conv: Minor documentation improvements
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24 11:53:49 +01:00
Holger Hans Peter Freyther 4772348b4f freebsd: Fixes for the compilation of libosmocore on FreeBSD
alloca.h is not available on FreeBSD, use the default autoconf
function to check for it, there is a complete list[1] of what to
do for using alloca but let us see how far we get with this test.

Include netinet/in.h for the IPv4 and IPv6 socket address. Check
for dlopen in libraries and use this instead of linking -dl.

[1] http://www.gnu.org/s/hello/manual/autoconf/Particular-Functions.html
2011-11-09 11:56:56 +01:00
Harald Welte ba6988bd89 some more doxygen work (include the notion of modules) 2011-08-17 17:14:11 +02:00
Sylvain Munaut 1dd7c84733 core/conv: Only consider error for non-zero soft values
If the input value is '0' it should not really affect the error
since it's just an indecisive bit. We accept this either an internal
'0' (generated via puncture) or as an external '0' (generated via an
external puncturing scheme). A real received bit should never be '0',
it's always gonna be closer to 1 or the other value ...

(thanks to mad@auth.se on the ML for the idea)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-28 22:30:30 +02:00
Sylvain Munaut 19dc5c9cca core/conv: Add some generic code for convolutional coding/decoding
Far from perfect but suits our need thus far.

The viterbi with softbit input is quite cpu-intensive. Since
most received bursts are often mostly error free, you could
use a less cpu intensive algorithm (Fano ?) and with hard bit
input. Then only switch to viterbi soft bit input if the channel
is bad enough to justify it.

Soft output is not implemented as its usefulness for the block
coding is limited.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-04-26 14:40:49 +02:00