mirror of
https://git.vladimir.cc/vladimir/libfec.git
synced 2026-08-25 17:27:34 +00:00
init commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/* Portable C version of peakval
|
||||
* Copyright 2004 Phil Karn, KA9Q
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "fec.h"
|
||||
int peakval_port(signed short *b,int len){
|
||||
int peak = 0;
|
||||
int a,i;
|
||||
|
||||
for(i=0;i<len;i++){
|
||||
a = abs(b[i]);
|
||||
if(a > peak)
|
||||
peak = a;
|
||||
}
|
||||
return peak;
|
||||
}
|
||||
Reference in New Issue
Block a user