diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2011-11-24 11:53:49 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2011-11-24 11:53:49 +0100 |
commit | 03d2c8906b99318b7a9ca2d967f5354cabbf69bd (patch) | |
tree | 27131e06b82ee39bc7cd65fa717a3df35498625b /include/osmocom/core | |
parent | 9a5f3b8f787886302591641a729eefe99af08217 (diff) |
core/conv: Minor documentation improvements
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/conv.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/include/osmocom/core/conv.h b/include/osmocom/core/conv.h index db3058cd..ba490b45 100644 --- a/include/osmocom/core/conv.h +++ b/include/osmocom/core/conv.h @@ -35,25 +35,31 @@ #include <osmocom/core/bits.h> -/*! \brief structure describing a given convolutional code */ +/*! \brief structure describing a given convolutional code + * + * The only required fields are N,K and the next_output/next_state arrays. The + * other can be left to default value of zero depending on what the code does. + * If 'len' is left at 0 then only the low level API can be used. + */ struct osmo_conv_code { - int N; - int K; - int len; + int N; /*!< \brief Inverse of code rate */ + int K; /*!< \brief Constraint length */ + int len; /*!< \brief # of data bits */ - const uint8_t (*next_output)[2]; - const uint8_t (*next_state)[2]; + const uint8_t (*next_output)[2];/*!< \brief Next output array */ + const uint8_t (*next_state)[2]; /*!< \brief Next state array */ - const uint8_t *next_term_output; - const uint8_t *next_term_state; + const uint8_t *next_term_output;/*!< \brief Flush termination output */ + const uint8_t *next_term_state; /*!< \brief Flush termination state */ - const int *puncture; + const int *puncture; /*!< \brief Punctured bits indexes */ }; /* Encoding */ /* Low level API */ + /*! \brief convolutional encoder state */ struct osmo_conv_encoder { const struct osmo_conv_code *code; /*!< \brief for which code? */ @@ -76,10 +82,10 @@ int osmo_conv_encode(const struct osmo_conv_code *code, /* Decoding */ /* Low level API */ + /*! \brief convolutional decoder state */ struct osmo_conv_decoder { - /*! \brief description of convolutional code */ - const struct osmo_conv_code *code; + const struct osmo_conv_code *code; /*!< \brief for which code? */ int n_states; /*!< \brief number of states */ @@ -88,7 +94,7 @@ struct osmo_conv_decoder { int o_idx; /*!< \brief output index */ int p_idx; /*!< \brief puncture index */ - unsigned int *ae; /*!< \brief accumulater error */ + unsigned int *ae; /*!< \brief accumulated error */ unsigned int *ae_next; /*!< \brief next accumulated error (tmp in scan) */ uint8_t *state_history; /*!< \brief state history [len][n_states] */ }; |