dexter has uploaded this change for review. ( https://gerrit.osmocom.org/13212


Change subject: amr: make buffer in osmo_amr_bwe_to_oa() static
......................................................................

amr: make buffer in osmo_amr_bwe_to_oa() static

The function osmo_amr_bwe_to_oa() uses an internal buffer to store
intermediate results. Since osmo_amr_bwe_to_oa() is called for every AMR
packet that is processed, lets have the buffer static to save some
overhead.

Change-Id: I8ffbf3a4515e1c2385a0b6b2d5fe8e756056fb0d
---
M src/amr.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/12/13212/1

diff --git a/src/amr.c b/src/amr.c
index 9c63f60..24e0ecb 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -149,7 +149,7 @@
 int osmo_amr_bwe_to_oa(uint8_t *payload, unsigned int payload_len,
                       unsigned int payload_maxlen)
 {
-       uint8_t buf[256];
+       static uint8_t buf[256];
        unsigned int frame_len = payload_len - 1;
        unsigned int i;


--
To view, visit https://gerrit.osmocom.org/13212
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ffbf3a4515e1c2385a0b6b2d5fe8e756056fb0d
Gerrit-Change-Number: 13212
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pma...@sysmocom.de>

Reply via email to