Skip to content

Commit 4719efc

Browse files
committed
Updated to latest codec2 version
1 parent ba491e1 commit 4719efc

File tree

148 files changed

+57937
-29918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+57937
-29918
lines changed

examples/i2s/i2s_loopback/i2s_loopback.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void setup() {
9494

9595
void audio_task(void *param) {
9696
// construct and configure codec2
97-
c2_ = codec2_create(CODEC2_MODE_450);
97+
c2_ = codec2_create(CODEC2_MODE_700C);
9898
if (c2_ == NULL) {
9999
LOG_ERROR("Failed to create Codec2");
100100
return;

examples/i2s/i2s_lora_walkie_talkie/i2s_lora_walkie_talkie.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SX1268 lora_radio_ = new Module(LORA_RADIO_PIN_SS, LORA_RADIO_PIN_A, LORA_RADIO_
6868
#define AUDIO_MIC_SCK 4 // i2s clock
6969

7070
// audio support
71-
#define AUDIO_CODEC2_MODE CODEC2_MODE_450 // codec2 mode
71+
#define AUDIO_CODEC2_MODE CODEC2_MODE_700C // codec2 mode
7272
#define AUDIO_SAMPLE_RATE 8000 // audio sample rate
7373
#define AUDIO_MAX_PACKET_SIZE 48 // maximum packet size, multiple audio frames are inside
7474
#define AUDIO_TASK_PLAY_BIT 0x01 // task bit flag to start playback

src/H2064_516_sparse_test.h

Lines changed: 1893 additions & 8 deletions
Large diffs are not rendered by default.

src/HRA_112_112.c

Lines changed: 132 additions & 9 deletions
Large diffs are not rendered by default.

src/HRA_112_112.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#define HRA_112_112_DEC_TYPE 0
1313
#define HRA_112_112_MAX_ITER 100
1414

15+
#include <stdint.h>
16+
1517
extern const uint16_t HRA_112_112_H_rows[];
1618
extern const uint16_t HRA_112_112_H_cols[];
1719
extern const float HRA_112_112_input[];
1820
extern const char HRA_112_112_detected_data[];
19-

src/HRA_112_112_test.h

Lines changed: 130 additions & 8 deletions
Large diffs are not rendered by default.

src/HRA_56_56.c

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,73 @@
44
Static arrays for LDPC codec HRA_56_56, generated by ldpc_gen_c_h_file.m.
55
*/
66

7-
#include <stdint.h>
87
#include "HRA_56_56.h"
98

9+
#include <stdint.h>
10+
1011
const uint16_t HRA_56_56_H_rows[] = {
11-
4, 33, 22, 2, 7, 12, 15, 41, 6, 2, 8, 4, 1, 7, 20, 10, 2, 1, 28, 7, 3, 25, 18, 19, 17, 15, 8, 13, 9, 12, 39, 6, 17, 32, 3, 6, 10, 18, 4, 34, 1, 14, 9, 5, 15, 12, 5, 35, 5, 17, 16, 36, 20, 9, 34, 33, 14, 46, 39, 27, 43, 22, 19, 45, 16, 23, 31, 52, 3, 8, 51, 13, 31, 11, 31, 36, 11, 28, 30, 21, 38, 26, 42, 29, 23, 33, 45, 19, 28, 40, 10, 23, 41, 25, 29, 36, 29, 49, 38, 11, 30, 42, 16, 37, 49, 35, 18, 47, 24, 25, 54, 34, 41, 55, 47, 44, 56, 46, 20, 55, 21, 40, 37, 53, 13, 32, 52, 22, 32, 24, 44, 42, 49, 38, 48, 24, 56, 48, 50, 39, 26, 50, 54, 26, 37, 56, 14, 27, 46, 44, 45, 43, 53, 52, 40, 21, 51, 47, 30, 50, 51, 43, 27, 54, 53, 48, 55, 35
12-
};
12+
4, 33, 22, 2, 7, 12, 15, 41, 6, 2, 8, 4, 1, 7, 20, 10, 2, 1, 28,
13+
7, 3, 25, 18, 19, 17, 15, 8, 13, 9, 12, 39, 6, 17, 32, 3, 6, 10, 18,
14+
4, 34, 1, 14, 9, 5, 15, 12, 5, 35, 5, 17, 16, 36, 20, 9, 34, 33, 14,
15+
46, 39, 27, 43, 22, 19, 45, 16, 23, 31, 52, 3, 8, 51, 13, 31, 11, 31, 36,
16+
11, 28, 30, 21, 38, 26, 42, 29, 23, 33, 45, 19, 28, 40, 10, 23, 41, 25, 29,
17+
36, 29, 49, 38, 11, 30, 42, 16, 37, 49, 35, 18, 47, 24, 25, 54, 34, 41, 55,
18+
47, 44, 56, 46, 20, 55, 21, 40, 37, 53, 13, 32, 52, 22, 32, 24, 44, 42, 49,
19+
38, 48, 24, 56, 48, 50, 39, 26, 50, 54, 26, 37, 56, 14, 27, 46, 44, 45, 43,
20+
53, 52, 40, 21, 51, 47, 30, 50, 51, 43, 27, 54, 53, 48, 55, 35};
1321

1422
const uint16_t HRA_56_56_H_cols[] = {
15-
13, 4, 13, 1, 44, 9, 5, 11, 29, 16, 18, 6, 13, 1, 7, 9, 25, 23, 7, 7, 9, 3, 10, 18, 22, 26, 4, 19, 28, 23, 11, 14, 2, 40, 48, 20, 11, 22, 3, 10, 1, 20, 5, 4, 8, 2, 3, 23, 21, 27, 15, 12, 12, 31, 2, 5, 18, 10, 21, 12, 47, 32, 14, 14, 43, 35, 21, 30, 16, 35, 26, 47, 33, 38, 24, 15, 24, 6, 29, 24, 38, 29, 36, 22, 39, 45, 17, 17, 30, 55, 50, 40, 33, 25, 28, 34, 8, 27, 40, 19, 31, 6, 46, 26, 42, 30, 45, 15, 41, 52, 8, 25, 41, 17, 35, 39, 49, 36, 20, 27, 54, 37, 44, 46, 28, 42, 45, 51, 50, 51, 32, 53, 44, 16, 36, 53, 54, 32, 51, 33, 41, 47, 19, 34, 56, 56, 56, 52, 48, 43, 31, 43, 37, 46, 50, 38, 39, 37, 52, 54, 49, 48, 49, 42, 53, 55, 55, 34
16-
};
23+
13, 4, 13, 1, 44, 9, 5, 11, 29, 16, 18, 6, 13, 1, 7, 9, 25, 23, 7,
24+
7, 9, 3, 10, 18, 22, 26, 4, 19, 28, 23, 11, 14, 2, 40, 48, 20, 11, 22,
25+
3, 10, 1, 20, 5, 4, 8, 2, 3, 23, 21, 27, 15, 12, 12, 31, 2, 5, 18,
26+
10, 21, 12, 47, 32, 14, 14, 43, 35, 21, 30, 16, 35, 26, 47, 33, 38, 24, 15,
27+
24, 6, 29, 24, 38, 29, 36, 22, 39, 45, 17, 17, 30, 55, 50, 40, 33, 25, 28,
28+
34, 8, 27, 40, 19, 31, 6, 46, 26, 42, 30, 45, 15, 41, 52, 8, 25, 41, 17,
29+
35, 39, 49, 36, 20, 27, 54, 37, 44, 46, 28, 42, 45, 51, 50, 51, 32, 53, 44,
30+
16, 36, 53, 54, 32, 51, 33, 41, 47, 19, 34, 56, 56, 56, 52, 48, 43, 31, 43,
31+
37, 46, 50, 38, 39, 37, 52, 54, 49, 48, 49, 42, 53, 55, 55, 34};
1732
const float HRA_56_56_input[] = {
18-
14.298032547127473, -11.608683311452998, 0.061009204291271366, 8.7391847645722684, -12.795277326577247, 6.7260364215470982, -7.5723272788156795, 3.020497481136375, 8.2196966933834599, 11.034906196221687, 8.9543980103634855, 7.577128824074272, 11.270326150592165, 8.9523294544722756, 13.083603245905977, 10.444986837116906, 14.412579891463047, -0.8166007558942513, 9.668894733671868, 9.8522676575640613, 7.5958239024346623, 3.3746023851032851, 12.95322595905497, -7.1449563352606029, 1.2577795908906082, -9.5332224407426533, -17.239402070035631, -6.3014111920535631, -6.3042395285059891, 10.610150547425137, -3.8501667154717536, 13.993722156033463, -11.103807489470984, -0.23655217621193034, -11.820607488167541, -14.520377014662206, 14.480439663208152, -14.74956701516993, 5.8803502868629876, 16.404549902101486, 1.7430972286160022, 3.5578988903336057, -10.514179494138832, 15.893919839476579, -15.088901968318774, 8.8240079988183187, -11.214227098114568, 15.245351554277944, -8.0630908862483555, -4.2718917016539022, -6.8904115533020676, 7.1059188065004335, -15.465940930478686, 7.1911507113949069, -7.3855595052175262, 8.2801168546061081, 7.7415094545890444, 12.447605971579639, -7.1709811194443134, -16.91513428272188, -7.1177366282735868, -15.474578777159717, -9.5942142791182636, -6.9537488066001139, -7.7476201276622323, 4.1904181285877389, -6.2099572289514366, 10.754678540144104, -3.9339356682709932, 14.679906470086319, -8.142754803364026, -9.9243587954743582, -8.3178402502703221, 12.312937678168655, 8.8921607910136853, 12.075156922922833, 16.513528553689049, -13.145624744678896, 3.5338893311207094, -1.1150068888984415, 17.69091341508814, -7.0011692651766051, 11.611823808269614, -2.2724478894865379, 5.5105851969653212, 10.230592589300167, -10.45300755375545, 2.3936930052496277, -12.582400877459929, -10.207872559757952, 11.527552494414541, -6.8352398173173716, -5.9832808666428097, -10.392213829350812, -19.448491316457705, -3.5592349479718512, -7.2921546103361257, 12.917679155812705, -16.567433882993001, 8.2654374923309515, -12.878121359778884, 6.2541630279508933, -12.780545162108599, -10.751773785029803, 9.429146662721827, 10.341931054806189, 18.701038410743397, 9.823780098709431, 14.192912051007719, -16.603334298788742, 7.2592993795204217, 13.495247736424982
19-
};
33+
14.298032547127473, -11.608683311452998, 0.061009204291271366,
34+
8.7391847645722684, -12.795277326577247, 6.7260364215470982,
35+
-7.5723272788156795, 3.020497481136375, 8.2196966933834599,
36+
11.034906196221687, 8.9543980103634855, 7.577128824074272,
37+
11.270326150592165, 8.9523294544722756, 13.083603245905977,
38+
10.444986837116906, 14.412579891463047, -0.8166007558942513,
39+
9.668894733671868, 9.8522676575640613, 7.5958239024346623,
40+
3.3746023851032851, 12.95322595905497, -7.1449563352606029,
41+
1.2577795908906082, -9.5332224407426533, -17.239402070035631,
42+
-6.3014111920535631, -6.3042395285059891, 10.610150547425137,
43+
-3.8501667154717536, 13.993722156033463, -11.103807489470984,
44+
-0.23655217621193034, -11.820607488167541, -14.520377014662206,
45+
14.480439663208152, -14.74956701516993, 5.8803502868629876,
46+
16.404549902101486, 1.7430972286160022, 3.5578988903336057,
47+
-10.514179494138832, 15.893919839476579, -15.088901968318774,
48+
8.8240079988183187, -11.214227098114568, 15.245351554277944,
49+
-8.0630908862483555, -4.2718917016539022, -6.8904115533020676,
50+
7.1059188065004335, -15.465940930478686, 7.1911507113949069,
51+
-7.3855595052175262, 8.2801168546061081, 7.7415094545890444,
52+
12.447605971579639, -7.1709811194443134, -16.91513428272188,
53+
-7.1177366282735868, -15.474578777159717, -9.5942142791182636,
54+
-6.9537488066001139, -7.7476201276622323, 4.1904181285877389,
55+
-6.2099572289514366, 10.754678540144104, -3.9339356682709932,
56+
14.679906470086319, -8.142754803364026, -9.9243587954743582,
57+
-8.3178402502703221, 12.312937678168655, 8.8921607910136853,
58+
12.075156922922833, 16.513528553689049, -13.145624744678896,
59+
3.5338893311207094, -1.1150068888984415, 17.69091341508814,
60+
-7.0011692651766051, 11.611823808269614, -2.2724478894865379,
61+
5.5105851969653212, 10.230592589300167, -10.45300755375545,
62+
2.3936930052496277, -12.582400877459929, -10.207872559757952,
63+
11.527552494414541, -6.8352398173173716, -5.9832808666428097,
64+
-10.392213829350812, -19.448491316457705, -3.5592349479718512,
65+
-7.2921546103361257, 12.917679155812705, -16.567433882993001,
66+
8.2654374923309515, -12.878121359778884, 6.2541630279508933,
67+
-12.780545162108599, -10.751773785029803, 9.429146662721827,
68+
10.341931054806189, 18.701038410743397, 9.823780098709431,
69+
14.192912051007719, -16.603334298788742, 7.2592993795204217,
70+
13.495247736424982};
2071
const char HRA_56_56_detected_data[] = {
21-
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0
22-
};
72+
0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
73+
1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0,
74+
1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
75+
0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1,
76+
1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0};

src/HRA_56_56.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#define HRA_56_56_DEC_TYPE 0
1313
#define HRA_56_56_MAX_ITER 100
1414

15+
#include <stdint.h>
16+
1517
extern const uint16_t HRA_56_56_H_rows[];
1618
extern const uint16_t HRA_56_56_H_cols[];
1719
extern const float HRA_56_56_input[];
1820
extern const char HRA_56_56_detected_data[];
19-

src/HRAa_1536_512.c

Lines changed: 1689 additions & 9 deletions
Large diffs are not rendered by default.

src/HRAa_1536_512.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#define HRAa_1536_512_DEC_TYPE 0
1313
#define HRAa_1536_512_MAX_ITER 100
1414

15+
#include <stdint.h>
16+
1517
extern const uint16_t HRAa_1536_512_H_rows[];
1618
extern const uint16_t HRAa_1536_512_H_cols[];
1719
extern const float HRAa_1536_512_input[];
1820
extern const char HRAa_1536_512_detected_data[];
19-

0 commit comments

Comments
 (0)