summaryrefslogtreecommitdiffstats
path: root/src/codec_hr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec_hr.c')
-rw-r--r--src/codec_hr.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/codec_hr.c b/src/codec_hr.c
index 26a75a5..d0e09ce 100644
--- a/src/codec_hr.c
+++ b/src/codec_hr.c
@@ -18,6 +18,7 @@
*/
#include <gapk/codecs.h>
+#include <gapk/benchmark.h>
#include "config.h"
@@ -43,14 +44,22 @@ static int
codec_hr_encode(void *_state, uint8_t *cod, const uint8_t *pcm)
{
struct gsmhr *state = _state;
- return gsmhr_encode(state, (int16_t *)cod, (const int16_t *)pcm);
+ int rc;
+ BENCHMARK_START;
+ rc = gsmhr_encode(state, (int16_t *)cod, (const int16_t *)pcm);
+ BENCHMARK_STOP(CODEC_HR, 1);
+ return rc;
}
static int
codec_hr_decode(void *_state, uint8_t *pcm, const uint8_t *cod)
{
struct gsmhr *state = _state;
- return gsmhr_decode(state, (int16_t *)pcm, (const int16_t *)cod);
+ int rc;
+ BENCHMARK_START;
+ rc = gsmhr_decode(state, (int16_t *)pcm, (const int16_t *)cod);
+ BENCHMARK_STOP(CODEC_HR, 0);
+ return rc;
}
#endif /* HAVE_LIBGSMHR */