diff options
Diffstat (limited to 'codecs/g722')
-rw-r--r-- | codecs/g722/g722.h | 4 | ||||
-rw-r--r-- | codecs/g722/g722_decode.c | 14 | ||||
-rw-r--r-- | codecs/g722/g722_encode.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/codecs/g722/g722.h b/codecs/g722/g722.h index f57b1c882..1a1e4f9de 100644 --- a/codecs/g722/g722.h +++ b/codecs/g722/g722.h @@ -7,7 +7,7 @@ * * Copyright (C) 2005 Steve Underwood * - * Despite my general liking of the GPL, I place my own contributions + * Despite my general liking of the GPL, I place my own contributions * to this code in the public domain for the benefit of all mankind - * even the slimy ones who might try to proprietize my work and use it * to my detriment. @@ -122,7 +122,7 @@ typedef struct int nb; int det; } band[2]; - + unsigned int in_buffer; int in_bits; unsigned int out_buffer; diff --git a/codecs/g722/g722_decode.c b/codecs/g722/g722_decode.c index 3e8f7d0c6..47e63eb17 100644 --- a/codecs/g722/g722_decode.c +++ b/codecs/g722/g722_decode.c @@ -7,7 +7,7 @@ * * Copyright (C) 2005 Steve Underwood * - * Despite my general liking of the GPL, I place my own contributions + * Despite my general liking of the GPL, I place my own contributions * to this code in the public domain for the benefit of all mankind - * even the slimy ones who might try to proprietize my work and use it * to my detriment. @@ -121,7 +121,7 @@ static void block4(g722_decode_state_t *s, int band, int d) s->band[band].d[i] = s->band[band].d[i - 1]; s->band[band].b[i] = s->band[band].bp[i]; } - + for (i = 2; i > 0; i--) { s->band[band].r[i] = s->band[band].r[i - 1]; @@ -198,9 +198,9 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[] static const int wh[3] = {0, -214, 798}; static const int rh2[4] = {2, 1, 2, 1}; static const int qm2[4] = {-7408, -1616, 7408, 1616}; - static const int qm4[16] = + static const int qm4[16] = { - 0, -20456, -12896, -8968, + 0, -20456, -12896, -8968, -6288, -4240, -2584, -1200, 20456, 12896, 8968, 6288, 4240, 2584, 1200, 0 @@ -320,7 +320,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[] else if (wd1 > 18432) wd1 = 18432; s->band[0].nb = wd1; - + /* Block 3L, SCALEL */ wd1 = (s->band[0].nb >> 6) & 31; wd2 = 8 - (s->band[0].nb >> 11); @@ -328,7 +328,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[] s->band[0].det = wd3 << 2; block4(s, 0, dlowt); - + if (!s->eight_k) { /* Block 2H, INVQAH */ @@ -351,7 +351,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[] else if (wd1 > 22528) wd1 = 22528; s->band[1].nb = wd1; - + /* Block 3H, SCALEH */ wd1 = (s->band[1].nb >> 6) & 31; wd2 = 10 - (s->band[1].nb >> 11); diff --git a/codecs/g722/g722_encode.c b/codecs/g722/g722_encode.c index 5890fbf24..cf53c74eb 100644 --- a/codecs/g722/g722_encode.c +++ b/codecs/g722/g722_encode.c @@ -9,7 +9,7 @@ * * All rights reserved. * - * Despite my general liking of the GPL, I place my own contributions + * Despite my general liking of the GPL, I place my own contributions * to this code in the public domain for the benefit of all mankind - * even the slimy ones who might try to proprietize my work and use it * to my detriment. @@ -120,7 +120,7 @@ static void block4(g722_encode_state_t *s, int band, int d) s->band[band].d[i] = s->band[band].d[i - 1]; s->band[band].b[i] = s->band[band].bp[i]; } - + for (i = 2; i > 0; i--) { s->band[band].r[i] = s->band[band].r[i - 1]; @@ -289,7 +289,7 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[] s->x[i] = s->x[i + 2]; s->x[22] = amp[j++]; s->x[23] = amp[j++]; - + /* Discard every other QMF output */ sumeven = 0; sumodd = 0; @@ -337,7 +337,7 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[] s->band[0].det = wd3 << 2; block4(s, 0, dlow); - + if (s->eight_k) { /* Just leave the high bits as zero */ |