From 30209cedddb3b6ece5614b40f65f6a04e84388b4 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 30 Aug 2017 20:26:02 +0700 Subject: Install GAPK headers to '${includedir}/osmocom/gapk/' To be able to use the library, external applications need to know, which symbols are exposed. This information is provided by header files, which are being installed to a system's ${includedir} since this change. --- configure.ac | 1 - include/Makefile.am | 14 +++- include/gapk/Makefile.am | 6 -- include/gapk/benchmark.h | 60 ----------------- include/gapk/codecs.h | 71 -------------------- include/gapk/formats.h | 94 -------------------------- include/gapk/get_cycles.h | 138 -------------------------------------- include/gapk/procqueue.h | 72 -------------------- include/gapk/utils.h | 104 ---------------------------- include/osmocom/gapk/benchmark.h | 60 +++++++++++++++++ include/osmocom/gapk/codecs.h | 71 ++++++++++++++++++++ include/osmocom/gapk/formats.h | 94 ++++++++++++++++++++++++++ include/osmocom/gapk/get_cycles.h | 138 ++++++++++++++++++++++++++++++++++++++ include/osmocom/gapk/procqueue.h | 72 ++++++++++++++++++++ include/osmocom/gapk/utils.h | 104 ++++++++++++++++++++++++++++ src/benchmark.c | 2 +- src/codec_amr.c | 4 +- src/codec_efr.c | 4 +- src/codec_fr.c | 4 +- src/codec_hr.c | 4 +- src/codec_pcm.c | 2 +- src/codecs.c | 2 +- src/fmt_amr.c | 6 +- src/fmt_amr_opencore.c | 6 +- src/fmt_gsm.c | 4 +- src/fmt_hr_ref.c | 6 +- src/fmt_racal.c | 6 +- src/fmt_rawpcm.c | 4 +- src/fmt_rtp_amr.c | 6 +- src/fmt_rtp_efr.c | 6 +- src/fmt_rtp_hr_etsi.c | 6 +- src/fmt_rtp_hr_ietf.c | 6 +- src/fmt_ti.c | 6 +- src/formats.c | 2 +- src/main.c | 8 +-- src/pq_alsa.c | 6 +- src/pq_codec.c | 6 +- src/pq_file.c | 6 +- src/pq_format.c | 6 +- src/pq_rtp.c | 6 +- src/procqueue.c | 2 +- 41 files changed, 614 insertions(+), 611 deletions(-) delete mode 100644 include/gapk/Makefile.am delete mode 100644 include/gapk/benchmark.h delete mode 100644 include/gapk/codecs.h delete mode 100644 include/gapk/formats.h delete mode 100644 include/gapk/get_cycles.h delete mode 100644 include/gapk/procqueue.h delete mode 100644 include/gapk/utils.h create mode 100644 include/osmocom/gapk/benchmark.h create mode 100644 include/osmocom/gapk/codecs.h create mode 100644 include/osmocom/gapk/formats.h create mode 100644 include/osmocom/gapk/get_cycles.h create mode 100644 include/osmocom/gapk/procqueue.h create mode 100644 include/osmocom/gapk/utils.h diff --git a/configure.ac b/configure.ac index c24e8f0..85d722d 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,6 @@ AC_CONFIG_FILES([ src/Makefile libgsmhr/Makefile include/Makefile - include/gapk/Makefile include/gsmhr/Makefile ]) diff --git a/include/Makefile.am b/include/Makefile.am index ddb25df..f64faeb 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,5 +1,15 @@ -SUBDIRS = gapk +noinst_HEADERS = \ + osmocom/gapk/utils.h \ + $(NULL) + +nobase_include_HEADERS = \ + osmocom/gapk/get_cycles.h \ + osmocom/gapk/benchmark.h \ + osmocom/gapk/procqueue.h \ + osmocom/gapk/formats.h \ + osmocom/gapk/codecs.h \ + $(NULL) if ENABLE_GSMHR -SUBDIRS += gsmhr +SUBDIRS = gsmhr endif diff --git a/include/gapk/Makefile.am b/include/gapk/Makefile.am deleted file mode 100644 index 5fcc3b9..0000000 --- a/include/gapk/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -noinst_HEADERS = benchmark.h \ - codecs.h \ - formats.h \ - get_cycles.h \ - procqueue.h \ - utils.h diff --git a/include/gapk/benchmark.h b/include/gapk/benchmark.h deleted file mode 100644 index 49c2c36..0000000 --- a/include/gapk/benchmark.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _BENCHMARK_H -#define _BENCHMARK_H - -/* - * This file is part of gapk (GSM Audio Pocket Knife). - * - * gapk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gapk is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gapk. If not, see . - * - * (C) 2014 Harald Welte - */ - -#include -#include - -#define NUM_AVG 102400 - -struct benchmark_cycles { - cycles_t enc[NUM_AVG]; - unsigned int enc_used; - cycles_t dec[NUM_AVG]; - unsigned int dec_used; -}; - -extern struct benchmark_cycles codec_cycles[_CODEC_MAX]; - -static inline void benchmark_stop(enum codec_type codec, int encode, unsigned long cycles) -{ - struct benchmark_cycles *bc = &codec_cycles[codec]; - - if (encode) { - bc->enc_used = (bc->enc_used + 1) % NUM_AVG; - bc->enc[bc->enc_used] = cycles; - } else { - bc->dec_used = (bc->dec_used + 1) % NUM_AVG; - bc->dec[bc->dec_used] = cycles; - } -} - -#define BENCHMARK_START do { \ - cycles_t _cycles_start, _cycles_stop; \ - _cycles_start = get_cycles() - -#define BENCHMARK_STOP(x,y) _cycles_stop = get_cycles(); \ - benchmark_stop(x, y, _cycles_stop - _cycles_start); \ - } while (0) - -void benchmark_dump(void); - -#endif diff --git a/include/gapk/codecs.h b/include/gapk/codecs.h deleted file mode 100644 index aa1c829..0000000 --- a/include/gapk/codecs.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Codecs handling */ - -/* - * This file is part of gapk (GSM Audio Pocket Knife). - * - * gapk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gapk is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gapk. If not, see . - */ - -#ifndef __GAPK_CODECS_H__ -#define __GAPK_CODECS_H__ - -#include - -#define FR_CANON_LEN 33 -#define HR_CANON_LEN 14 -#define EFR_CANON_LEN 31 -#define PCM_CANON_LEN (160*sizeof(uint16_t)) -#define HR_REF_ENC_LEN (20 * sizeof(uint16_t)) -#define HR_REF_DEC_LEN (22 * sizeof(uint16_t)) - -enum codec_type { - CODEC_INVALID = 0, - CODEC_PCM, /* 16 bits PCM samples */ - CODEC_HR, /* GSM Half Rate codec GSM 06.20 */ - CODEC_FR, /* GSM Full Rate codec GSM 06.10 */ - CODEC_EFR, /* GSM Enhanced Full Rate codec GSM 06.60 */ - CODEC_AMR, /* GSM Adaptive Multi Rate codec GSM 26.071 */ - _CODEC_MAX, -}; - -#include /* need to import here because or enum interdep */ - -/*! call-back for actual codec conversion function - * \param[in] state opaque state pointer (returned by codec->init) - * \param[out] dst caller-allocated buffer for output data - * \param[in] src input data - * \param[in] src_len length of input data \a src - * \returns number of output bytes written to \a dst; negative on error */ -typedef int (*codec_conv_cb_t)(void *state, uint8_t *dst, const uint8_t *src, unsigned int src_len); - -struct codec_desc { - enum codec_type type; - const char * name; - const char * description; - /*! canonical frame size (in bytes); 0 in case of variable length */ - unsigned int canon_frame_len; - - enum format_type codec_enc_format_type; /* what the encoder provides */ - enum format_type codec_dec_format_type; /* what to give the decoder */ - /*! codec initialization function pointer, returns opaque state */ - void * (*codec_init)(void); - /*! codec exit function pointer, gets passed opaque state */ - void (*codec_exit)(void *state); - codec_conv_cb_t codec_encode; - codec_conv_cb_t codec_decode; -}; - -const struct codec_desc *codec_get_from_type(enum codec_type type); - -#endif /* __GAPK_CODECS_H__ */ diff --git a/include/gapk/formats.h b/include/gapk/formats.h deleted file mode 100644 index 81670b8..0000000 --- a/include/gapk/formats.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Formats handling */ - -/* - * This file is part of gapk (GSM Audio Pocket Knife). - * - * gapk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gapk is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gapk. If not, see . - */ - -#ifndef __GAPK_FORMATS_H__ -#define __GAPK_FORMATS_H__ - -#include - -enum format_type { - FMT_INVALID = 0, - - /* Classic .amr container */ - FMT_AMR_EFR, - - /* Classic .gsm file for FR */ - FMT_GSM, - - /* 3GPP Reference HR vocodec files */ - FMT_HR_REF_DEC, - FMT_HR_REF_ENC, - - /* Racal 6103E TCH recordings */ - FMT_RACAL_HR, - FMT_RACAL_FR, - FMT_RACAL_EFR, - - /* Raw PCM */ - FMT_RAWPCM_S16LE, - - /* Texas Instrument calypso/locosto buffer format */ - FMT_TI_HR, - FMT_TI_FR, - FMT_TI_EFR, - - /* AMR encoded data, variable length */ - FMT_AMR_OPENCORE, - FMT_RTP_AMR, - - FMT_RTP_EFR, - - /* HR in RTP according to ETSI TS 101 318 */ - FMT_RTP_HR_ETSI, - /* HR in RTP according to IETF RFC5993 */ - FMT_RTP_HR_IETF, - - _FMT_MAX, -}; - -#include /* need to import here because or enum interdep */ - -/*! call-back for actual format conversion function - * \param[out] dst caller-allocated buffer for output data - * \param[in] src input data - * \param[in] src_len length of input data \a src - * \returns number of output bytes written to \a dst; negative on error */ -typedef int (*fmt_conv_cb_t)(uint8_t *dst, const uint8_t *src, unsigned int src_len); - -struct format_desc { - enum format_type type; - enum codec_type codec_type; - const char * name; - const char * description; - - /*! length of frames in this format (as opposed to canonical) */ - unsigned int frame_len; - fmt_conv_cb_t conv_from_canon; - fmt_conv_cb_t conv_to_canon; - - /*! length of a (global) header at start of file */ - unsigned int header_len; - /*! exact match for (global) header at start of file */ - const uint8_t * header; -}; - -const struct format_desc *fmt_get_from_type(enum format_type type); -const struct format_desc *fmt_get_from_name(const char *name); - -#endif /* __GAPK_FORMATS_H__ */ diff --git a/include/gapk/get_cycles.h b/include/gapk/get_cycles.h deleted file mode 100644 index 9eb7bc3..0000000 --- a/include/gapk/get_cycles.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2005 Mellanox Technologies Ltd., - * (c) 2005 Harald Welte , All rights reserved. - * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * $Id$ - */ - -#ifndef GET_CLOCK_H -#define GET_CLOCK_H - -#if 0 - -#define _POSIX_C_SOURCE 199506L -#include -#include - -/* Ideally we would be using clock_getres() and clock_gettime(). - * glibc manpage says CLOCK_PROCESS_CPUTIME_ID is only defined if it is - * actually present. however, on ppc64 it is defined but not implemented. */ -#ifdef CLOCK_PROCESS_CPUTIME_ID -typedef long cycles_t; -static inline cycles_t get_cycles() -{ - struct timespec ts; - -#if defined (__x86_64__) || defined(__i386__) - asm volatile ("cpuid" : : : "eax", "ebx", "ecx", "edx" ); /* flush pipeline */ -#endif - clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts); - return ts.tv_nsec; -} -#endif - -#endif - -#if defined (__x86_64__) || defined(__i386__) -/* Note: only x86 CPUs which have rdtsc instruction are supported. */ -typedef unsigned long long cycles_t; -static inline cycles_t get_cycles() -{ - unsigned low, high; - unsigned long long val; - asm volatile ("cpuid" : : : "eax", "ebx", "ecx", "edx" ); /* flush pipeline */ - asm volatile ("rdtsc" : "=a" (low), "=d" (high)); - val = high; - val = (val << 32) | low; - return val; -} -#elif defined(__PPC64__) -/* Note: only PPC CPUs which have mftb instruction are supported. */ -typedef unsigned long long cycles_t; -static inline cycles_t get_cycles() -{ - cycles_t ret; - - asm volatile ("mftb %0" : "=r" (ret) : ); - return ret; -} -#elif defined(__sparc__) -/* Note: only sparc64 supports this register */ -typedef unsigned long long cycles_t; -#define TICK_PRIV_BIT (1ULL << 63) -static inline cycles_t get_cycles() -{ - cycles_t ret; - -#if defined(__sparcv9) || defined(__arch64__) - asm volatile ("rd %%tick, %0" : "=r" (ret)); -#else - asm volatile ("rd %%tick, %%g1\n\t" - "srlx %%g1, 32, %H0\n\t" - "srl %%g1, 0, %L0" - : "=r" (ret) - : /* no inputs */ - : "g1"); -#endif - return ret & ~TICK_PRIV_BIT; -} -#elif defined(__PPC__) -#define CPU_FTR_601 0x00000100 -typedef unsigned long cycles_t; -static inline cycles_t get_cycles() -{ - cycles_t ret; - - asm volatile ( - "98: mftb %0\n" - "99:\n" - ".section __ftr_fixup,\"a\"\n" - " .long %1\n" - " .long 0\n" - " .long 98b\n" - " .long 99b\n" - ".previous" - : "=r" (ret) : "i" (CPU_FTR_601)); - return ret; -} -#elif defined(__ia64__) || defined(__mips__) || \ - defined(__s390__) -/* Itanium2 and up has ar.itc (Itanium1 has errata) */ -/* PPC64 has mftb */ -#include -#else -#warning get_cycles not implemented for this architecture: attempt asm/timex.h -#include -#endif - -extern double get_cpu_mhz(void); - -#endif /* GET_CLOCK_H */ diff --git a/include/gapk/procqueue.h b/include/gapk/procqueue.h deleted file mode 100644 index d9a5546..0000000 --- a/include/gapk/procqueue.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Processing Queue Management */ - -/* - * This file is part of gapk (GSM Audio Pocket Knife). - * - * gapk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gapk is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gapk. If not, see . - */ - -#ifndef __GAPK_PROCQUEUE_H__ -#define __GAPK_PROCQUEUE_H__ - -#include -#include /* for FILE */ - -struct pq; - -struct pq_item { - /*! input frame size (in bytes). '0' in case of variable frames */ - int len_in; - /*! output frame size (in bytes). '0' in case of variable frames */ - int len_out; - /*! opaque state */ - void *state; - /*! call-back for actual format conversion function - * \param[in] state opaque state pointer - * \param[out] out caller-allocated buffer for output data - * \param[in] in input data - * \param[in] in_len length of input data \a in - * \returns number of output bytes written to \a out; negative on error */ - int (*proc)(void *state, uint8_t *out, const uint8_t *in, unsigned int in_len); - void (*exit)(void *state); -}; - -/* Management */ -struct pq * pq_create(void); -void pq_destroy(struct pq *pq); -struct pq_item * pq_add_item(struct pq *pq); -int pq_prepare(struct pq *pq); -int pq_execute(struct pq *pq); - -/* File */ -int pq_queue_file_input(struct pq *pq, FILE *src, unsigned int block_len); -int pq_queue_file_output(struct pq *pq, FILE *dst, unsigned int block_len); - -/* RTP */ -int pq_queue_rtp_input(struct pq *pq, int rtp_fd, unsigned int block_len); -int pq_queue_rtp_output(struct pq *pq, int rtp_fd, unsigned int block_len); - -/* ALSA */ -int pq_queue_alsa_input(struct pq *pq, const char *hwdev, unsigned int blk_len); -int pq_queue_alsa_output(struct pq *pq, const char *hwdev, unsigned int blk_len); - -/* Format */ -struct format_desc; -int pq_queue_fmt_convert(struct pq *pq, const struct format_desc *fmt, int to_from_n); - -/* Codec */ -struct codec_desc; -int pq_queue_codec(struct pq *pq, const struct codec_desc *codec, int encode); - -#endif /* __GAPK_PROCQUEUE_H__ */ diff --git a/include/gapk/utils.h b/include/gapk/utils.h deleted file mode 100644 index 3b02049..0000000 --- a/include/gapk/utils.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Various helpers */ - -/* - * This file is part of gapk (GSM Audio Pocket Knife). - * - * gapk is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * gapk is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with gapk. If not, see . - */ - -#ifndef __GAPK_UTILS_H__ -#define __GAPK_UTILS_H__ - -#include - -static inline int -msb_get_bit(const uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = 7 - (bn & 7); - - return (buf[pos_byte] >> pos_bit) & 1; -} - -static inline void -msb_put_bit(uint8_t *buf, int bn, int bit) -{ - int pos_byte = bn >> 3; - int pos_bit = 7 - (bn & 7); - - if (bit) - buf[pos_byte] |= (1 << pos_bit); - else - buf[pos_byte] &= ~(1 << pos_bit); -} - -static inline void -msb_set_bit(uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = 7 - (bn & 7); - - buf[pos_byte] |= (1 << pos_bit); -} - -static inline void -msb_clr_bit(uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = 7 - (bn & 7); - - buf[pos_byte] &= ~(1 << pos_bit); -} - - -static inline int -lsb_get_bit(const uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = bn & 7; - - return (buf[pos_byte] >> pos_bit) & 1; -} - -static inline void -lsb_put_bit(uint8_t *buf, int bn, int bit) -{ - int pos_byte = bn >> 3; - int pos_bit = bn & 7; - - if (bit) - buf[pos_byte] |= (1 << pos_bit); - else - buf[pos_byte] &= ~(1 << pos_bit); -} - -static inline void -lsb_set_bit(uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = bn & 7; - - buf[pos_byte] |= (1 << pos_bit); -} - -static inline void -lsb_clr_bit(uint8_t *buf, int bn) -{ - int pos_byte = bn >> 3; - int pos_bit = bn & 7; - - buf[pos_byte] &= ~(1 << pos_bit); -} - -#endif /* __GAPK_UTILS_H__ */ diff --git a/include/osmocom/gapk/benchmark.h b/include/osmocom/gapk/benchmark.h new file mode 100644 index 0000000..b67af6f --- /dev/null +++ b/include/osmocom/gapk/benchmark.h @@ -0,0 +1,60 @@ +#ifndef _BENCHMARK_H +#define _BENCHMARK_H + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see . + * + * (C) 2014 Harald Welte + */ + +#include +#include + +#define NUM_AVG 102400 + +struct benchmark_cycles { + cycles_t enc[NUM_AVG]; + unsigned int enc_used; + cycles_t dec[NUM_AVG]; + unsigned int dec_used; +}; + +extern struct benchmark_cycles codec_cycles[_CODEC_MAX]; + +static inline void benchmark_stop(enum codec_type codec, int encode, unsigned long cycles) +{ + struct benchmark_cycles *bc = &codec_cycles[codec]; + + if (encode) { + bc->enc_used = (bc->enc_used + 1) % NUM_AVG; + bc->enc[bc->enc_used] = cycles; + } else { + bc->dec_used = (bc->dec_used + 1) % NUM_AVG; + bc->dec[bc->dec_used] = cycles; + } +} + +#define BENCHMARK_START do { \ + cycles_t _cycles_start, _cycles_stop; \ + _cycles_start = get_cycles() + +#define BENCHMARK_STOP(x,y) _cycles_stop = get_cycles(); \ + benchmark_stop(x, y, _cycles_stop - _cycles_start); \ + } while (0) + +void benchmark_dump(void); + +#endif diff --git a/include/osmocom/gapk/codecs.h b/include/osmocom/gapk/codecs.h new file mode 100644 index 0000000..1ad4e73 --- /dev/null +++ b/include/osmocom/gapk/codecs.h @@ -0,0 +1,71 @@ +/* Codecs handling */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see . + */ + +#ifndef __GAPK_CODECS_H__ +#define __GAPK_CODECS_H__ + +#include + +#define FR_CANON_LEN 33 +#define HR_CANON_LEN 14 +#define EFR_CANON_LEN 31 +#define PCM_CANON_LEN (160*sizeof(uint16_t)) +#define HR_REF_ENC_LEN (20 * sizeof(uint16_t)) +#define HR_REF_DEC_LEN (22 * sizeof(uint16_t)) + +enum codec_type { + CODEC_INVALID = 0, + CODEC_PCM, /* 16 bits PCM samples */ + CODEC_HR, /* GSM Half Rate codec GSM 06.20 */ + CODEC_FR, /* GSM Full Rate codec GSM 06.10 */ + CODEC_EFR, /* GSM Enhanced Full Rate codec GSM 06.60 */ + CODEC_AMR, /* GSM Adaptive Multi Rate codec GSM 26.071 */ + _CODEC_MAX, +}; + +#include /* need to import here because or enum interdep */ + +/*! call-back for actual codec conversion function + * \param[in] state opaque state pointer (returned by codec->init) + * \param[out] dst caller-allocated buffer for output data + * \param[in] src input data + * \param[in] src_len length of input data \a src + * \returns number of output bytes written to \a dst; negative on error */ +typedef int (*codec_conv_cb_t)(void *state, uint8_t *dst, const uint8_t *src, unsigned int src_len); + +struct codec_desc { + enum codec_type type; + const char * name; + const char * description; + /*! canonical frame size (in bytes); 0 in case of variable length */ + unsigned int canon_frame_len; + + enum format_type codec_enc_format_type; /* what the encoder provides */ + enum format_type codec_dec_format_type; /* what to give the decoder */ + /*! codec initialization function pointer, returns opaque state */ + void * (*codec_init)(void); + /*! codec exit function pointer, gets passed opaque state */ + void (*codec_exit)(void *state); + codec_conv_cb_t codec_encode; + codec_conv_cb_t codec_decode; +}; + +const struct codec_desc *codec_get_from_type(enum codec_type type); + +#endif /* __GAPK_CODECS_H__ */ diff --git a/include/osmocom/gapk/formats.h b/include/osmocom/gapk/formats.h new file mode 100644 index 0000000..7847782 --- /dev/null +++ b/include/osmocom/gapk/formats.h @@ -0,0 +1,94 @@ +/* Formats handling */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see . + */ + +#ifndef __GAPK_FORMATS_H__ +#define __GAPK_FORMATS_H__ + +#include + +enum format_type { + FMT_INVALID = 0, + + /* Classic .amr container */ + FMT_AMR_EFR, + + /* Classic .gsm file for FR */ + FMT_GSM, + + /* 3GPP Reference HR vocodec files */ + FMT_HR_REF_DEC, + FMT_HR_REF_ENC, + + /* Racal 6103E TCH recordings */ + FMT_RACAL_HR, + FMT_RACAL_FR, + FMT_RACAL_EFR, + + /* Raw PCM */ + FMT_RAWPCM_S16LE, + + /* Texas Instrument calypso/locosto buffer format */ + FMT_TI_HR, + FMT_TI_FR, + FMT_TI_EFR, + + /* AMR encoded data, variable length */ + FMT_AMR_OPENCORE, + FMT_RTP_AMR, + + FMT_RTP_EFR, + + /* HR in RTP according to ETSI TS 101 318 */ + FMT_RTP_HR_ETSI, + /* HR in RTP according to IETF RFC5993 */ + FMT_RTP_HR_IETF, + + _FMT_MAX, +}; + +#include /* need to import here because or enum interdep */ + +/*! call-back for actual format conversion function + * \param[out] dst caller-allocated buffer for output data + * \param[in] src input data + * \param[in] src_len length of input data \a src + * \returns number of output bytes written to \a dst; negative on error */ +typedef int (*fmt_conv_cb_t)(uint8_t *dst, const uint8_t *src, unsigned int src_len); + +struct format_desc { + enum format_type type; + enum codec_type codec_type; + const char * name; + const char * description; + + /*! length of frames in this format (as opposed to canonical) */ + unsigned int frame_len; + fmt_conv_cb_t conv_from_canon; + fmt_conv_cb_t conv_to_canon; + + /*! length of a (global) header at start of file */ + unsigned int header_len; + /*! exact match for (global) header at start of file */ + const uint8_t * header; +}; + +const struct format_desc *fmt_get_from_type(enum format_type type); +const struct format_desc *fmt_get_from_name(const char *name); + +#endif /* __GAPK_FORMATS_H__ */ diff --git a/include/osmocom/gapk/get_cycles.h b/include/osmocom/gapk/get_cycles.h new file mode 100644 index 0000000..9eb7bc3 --- /dev/null +++ b/include/osmocom/gapk/get_cycles.h @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2005 Mellanox Technologies Ltd., + * (c) 2005 Harald Welte , All rights reserved. + * + * This software is available to you under a choice of one of two + * licenses. You may choose to be licensed under the terms of the GNU + * General Public License (GPL) Version 2, available from the file + * COPYING in the main directory of this source tree, or the + * OpenIB.org BSD license below: + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. + * + * - Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * $Id$ + */ + +#ifndef GET_CLOCK_H +#define GET_CLOCK_H + +#if 0 + +#define _POSIX_C_SOURCE 199506L +#include +#include + +/* Ideally we would be using clock_getres() and clock_gettime(). + * glibc manpage says CLOCK_PROCESS_CPUTIME_ID is only defined if it is + * actually present. however, on ppc64 it is defined but not implemented. */ +#ifdef CLOCK_PROCESS_CPUTIME_ID +typedef long cycles_t; +static inline cycles_t get_cycles() +{ + struct timespec ts; + +#if defined (__x86_64__) || defined(__i386__) + asm volatile ("cpuid" : : : "eax", "ebx", "ecx", "edx" ); /* flush pipeline */ +#endif + clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts); + return ts.tv_nsec; +} +#endif + +#endif + +#if defined (__x86_64__) || defined(__i386__) +/* Note: only x86 CPUs which have rdtsc instruction are supported. */ +typedef unsigned long long cycles_t; +static inline cycles_t get_cycles() +{ + unsigned low, high; + unsigned long long val; + asm volatile ("cpuid" : : : "eax", "ebx", "ecx", "edx" ); /* flush pipeline */ + asm volatile ("rdtsc" : "=a" (low), "=d" (high)); + val = high; + val = (val << 32) | low; + return val; +} +#elif defined(__PPC64__) +/* Note: only PPC CPUs which have mftb instruction are supported. */ +typedef unsigned long long cycles_t; +static inline cycles_t get_cycles() +{ + cycles_t ret; + + asm volatile ("mftb %0" : "=r" (ret) : ); + return ret; +} +#elif defined(__sparc__) +/* Note: only sparc64 supports this register */ +typedef unsigned long long cycles_t; +#define TICK_PRIV_BIT (1ULL << 63) +static inline cycles_t get_cycles() +{ + cycles_t ret; + +#if defined(__sparcv9) || defined(__arch64__) + asm volatile ("rd %%tick, %0" : "=r" (ret)); +#else + asm volatile ("rd %%tick, %%g1\n\t" + "srlx %%g1, 32, %H0\n\t" + "srl %%g1, 0, %L0" + : "=r" (ret) + : /* no inputs */ + : "g1"); +#endif + return ret & ~TICK_PRIV_BIT; +} +#elif defined(__PPC__) +#define CPU_FTR_601 0x00000100 +typedef unsigned long cycles_t; +static inline cycles_t get_cycles() +{ + cycles_t ret; + + asm volatile ( + "98: mftb %0\n" + "99:\n" + ".section __ftr_fixup,\"a\"\n" + " .long %1\n" + " .long 0\n" + " .long 98b\n" + " .long 99b\n" + ".previous" + : "=r" (ret) : "i" (CPU_FTR_601)); + return ret; +} +#elif defined(__ia64__) || defined(__mips__) || \ + defined(__s390__) +/* Itanium2 and up has ar.itc (Itanium1 has errata) */ +/* PPC64 has mftb */ +#include +#else +#warning get_cycles not implemented for this architecture: attempt asm/timex.h +#include +#endif + +extern double get_cpu_mhz(void); + +#endif /* GET_CLOCK_H */ diff --git a/include/osmocom/gapk/procqueue.h b/include/osmocom/gapk/procqueue.h new file mode 100644 index 0000000..d9a5546 --- /dev/null +++ b/include/osmocom/gapk/procqueue.h @@ -0,0 +1,72 @@ +/* Processing Queue Management */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see . + */ + +#ifndef __GAPK_PROCQUEUE_H__ +#define __GAPK_PROCQUEUE_H__ + +#include +#include /* for FILE */ + +struct pq; + +struct pq_item { + /*! input frame size (in bytes). '0' in case of variable frames */ + int len_in; + /*! output frame size (in bytes). '0' in case of variable frames */ + int len_out; + /*! opaque state */ + void *state; + /*! call-back for actual format conversion function + * \param[in] state opaque state pointer + * \param[out] out caller-allocated buffer for output data + * \param[in] in input data + * \param[in] in_len length of input data \a in + * \returns number of output bytes written to \a out; negative on error */ + int (*proc)(void *state, uint8_t *out, const uint8_t *in, unsigned int in_len); + void (*exit)(void *state); +}; + +/* Management */ +struct pq * pq_create(void); +void pq_destroy(struct pq *pq); +struct pq_item * pq_add_item(struct pq *pq); +int pq_prepare(struct pq *pq); +int pq_execute(struct pq *pq); + +/* File */ +int pq_queue_file_input(struct pq *pq, FILE *src, unsigned int block_len); +int pq_queue_file_output(struct pq *pq, FILE *dst, unsigned int block_len); + +/* RTP */ +int pq_queue_rtp_input(struct pq *pq, int rtp_fd, unsigned int block_len); +int pq_queue_rtp_output(struct pq *pq, int rtp_fd, unsigned int block_len); + +/* ALSA */ +int pq_queue_alsa_input(struct pq *pq, const char *hwdev, unsigned int blk_len); +int pq_queue_alsa_output(struct pq *pq, const char *hwdev, unsigned int blk_len); + +/* Format */ +struct format_desc; +int pq_queue_fmt_convert(struct pq *pq, const struct format_desc *fmt, int to_from_n); + +/* Codec */ +struct codec_desc; +int pq_queue_codec(struct pq *pq, const struct codec_desc *codec, int encode); + +#endif /* __GAPK_PROCQUEUE_H__ */ diff --git a/include/osmocom/gapk/utils.h b/include/osmocom/gapk/utils.h new file mode 100644 index 0000000..3b02049 --- /dev/null +++ b/include/osmocom/gapk/utils.h @@ -0,0 +1,104 @@ +/* Various helpers */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see . + */ + +#ifndef __GAPK_UTILS_H__ +#define __GAPK_UTILS_H__ + +#include + +static inline int +msb_get_bit(const uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = 7 - (bn & 7); + + return (buf[pos_byte] >> pos_bit) & 1; +} + +static inline void +msb_put_bit(uint8_t *buf, int bn, int bit) +{ + int pos_byte = bn >> 3; + int pos_bit = 7 - (bn & 7); + + if (bit) + buf[pos_byte] |= (1 << pos_bit); + else + buf[pos_byte] &= ~(1 << pos_bit); +} + +static inline void +msb_set_bit(uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = 7 - (bn & 7); + + buf[pos_byte] |= (1 << pos_bit); +} + +static inline void +msb_clr_bit(uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = 7 - (bn & 7); + + buf[pos_byte] &= ~(1 << pos_bit); +} + + +static inline int +lsb_get_bit(const uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = bn & 7; + + return (buf[pos_byte] >> pos_bit) & 1; +} + +static inline void +lsb_put_bit(uint8_t *buf, int bn, int bit) +{ + int pos_byte = bn >> 3; + int pos_bit = bn & 7; + + if (bit) + buf[pos_byte] |= (1 << pos_bit); + else + buf[pos_byte] &= ~(1 << pos_bit); +} + +static inline void +lsb_set_bit(uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = bn & 7; + + buf[pos_byte] |= (1 << pos_bit); +} + +static inline void +lsb_clr_bit(uint8_t *buf, int bn) +{ + int pos_byte = bn >> 3; + int pos_bit = bn & 7; + + buf[pos_byte] &= ~(1 << pos_bit); +} + +#endif /* __GAPK_UTILS_H__ */ diff --git a/src/benchmark.c b/src/benchmark.c index 91e2ce5..6dfc33b 100644 --- a/src/benchmark.c +++ b/src/benchmark.c @@ -19,7 +19,7 @@ #include -#include +#include struct benchmark_cycles codec_cycles[_CODEC_MAX]; diff --git a/src/codec_amr.c b/src/codec_amr.c index 4aae733..4c4b3e6 100644 --- a/src/codec_amr.c +++ b/src/codec_amr.c @@ -18,8 +18,8 @@ * along with gapk. If not, see . */ -#include -#include +#include +#include #include "config.h" diff --git a/src/codec_efr.c b/src/codec_efr.c index 339172a..84e5fc5 100644 --- a/src/codec_efr.c +++ b/src/codec_efr.c @@ -17,8 +17,8 @@ * along with gapk. If not, see . */ -#include -#include +#include +#include #include "config.h" diff --git a/src/codec_fr.c b/src/codec_fr.c index 2ce44b4..0cda1f4 100644 --- a/src/codec_fr.c +++ b/src/codec_fr.c @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include "config.h" diff --git a/src/codec_hr.c b/src/codec_hr.c index b3247e0..6e5948a 100644 --- a/src/codec_hr.c +++ b/src/codec_hr.c @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include "config.h" diff --git a/src/codec_pcm.c b/src/codec_pcm.c index 9fa8c1b..95e83ca 100644 --- a/src/codec_pcm.c +++ b/src/codec_pcm.c @@ -17,7 +17,7 @@ * along with gapk. If not, see . */ -#include +#include const struct codec_desc codec_pcm_desc = { .type = CODEC_PCM, diff --git a/src/codecs.c b/src/codecs.c index 623e80c..f7f86bd 100644 --- a/src/codecs.c +++ b/src/codecs.c @@ -19,7 +19,7 @@ #include /* for NULL */ -#include +#include /* Extern codec descriptors */ extern const struct codec_desc codec_pcm_desc; diff --git a/src/fmt_amr.c b/src/fmt_amr.c index e28024c..06f4158 100644 --- a/src/fmt_amr.c +++ b/src/fmt_amr.c @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #define EFR_LEN 32 diff --git a/src/fmt_amr_opencore.c b/src/fmt_amr_opencore.c index 3fa547b..07281fd 100644 --- a/src/fmt_amr_opencore.c +++ b/src/fmt_amr_opencore.c @@ -21,9 +21,9 @@ #include #include -#include -#include -#include +#include +#include +#include static int amr_opencore_from_canon(uint8_t *dst, const uint8_t *src, unsigned int src_len) diff --git a/src/fmt_gsm.c b/src/fmt_gsm.c index 27701f0..1963692 100644 --- a/src/fmt_gsm.c +++ b/src/fmt_gsm.c @@ -18,8 +18,8 @@ */ #include -#include -#include +#include +#include #define GSM_LEN 33 #define GSM_MAGIC 0xd diff --git a/src/fmt_hr_ref.c b/src/fmt_hr_ref.c index d64918b..fb5b008 100644 --- a/src/fmt_hr_ref.c +++ b/src/fmt_hr_ref.c @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include static const int params_unvoiced[] = { 5, /* R0 */ diff --git a/src/fmt_racal.c b/src/fmt_racal.c index 1dbc61d..add202b 100644 --- a/src/fmt_racal.c +++ b/src/fmt_racal.c @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #define RACAL_HR_LEN 14 #define RACAL_FR_LEN 33 diff --git a/src/fmt_rawpcm.c b/src/fmt_rawpcm.c index 207708c..c0c83c1 100644 --- a/src/fmt_rawpcm.c +++ b/src/fmt_rawpcm.c @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include static int rawpcm_s16le_from_canon(uint8_t *dst, const uint8_t *src, unsigned int src_len) diff --git a/src/fmt_rtp_amr.c b/src/fmt_rtp_amr.c index 1d5357d..79dd37c 100644 --- a/src/fmt_rtp_amr.c +++ b/src/fmt_rtp_amr.c @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include /* conversion function: RTP payload -> canonical format */ static int diff --git a/src/fmt_rtp_efr.c b/src/fmt_rtp_efr.c index 0132e32..f900f75 100644 --- a/src/fmt_rtp_efr.c +++ b/src/fmt_rtp_efr.c @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #define EFR_LEN 31 #define EFR_MAGIC 0xc diff --git a/src/fmt_rtp_hr_etsi.c b/src/fmt_rtp_hr_etsi.c index fe6728a..475f156 100644 --- a/src/fmt_rtp_hr_etsi.c +++ b/src/fmt_rtp_hr_etsi.c @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include /* conversion function: RTP payload -> canonical format */ static int diff --git a/src/fmt_rtp_hr_ietf.c b/src/fmt_rtp_hr_ietf.c index 3e8e6a3..cedf461 100644 --- a/src/fmt_rtp_hr_ietf.c +++ b/src/fmt_rtp_hr_ietf.c @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include #define HR_LEN (HR_CANON_LEN+1) diff --git a/src/fmt_ti.c b/src/fmt_ti.c index 582bff4..5f2da9f 100644 --- a/src/fmt_ti.c +++ b/src/fmt_ti.c @@ -30,9 +30,9 @@ #include -#include -#include -#include +#include +#include +#include #define TI_LEN 33 diff --git a/src/formats.c b/src/formats.c index 60182fe..8544186 100644 --- a/src/formats.c +++ b/src/formats.c @@ -20,7 +20,7 @@ #include /* for NULL */ #include -#include +#include /* Extern format descriptors */ extern const struct format_desc fmt_amr_efr; diff --git a/src/main.c b/src/main.c index 58e23c1..9b56e58 100644 --- a/src/main.c +++ b/src/main.c @@ -33,10 +33,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include struct gapk_options diff --git a/src/pq_alsa.c b/src/pq_alsa.c index cad76ca..1902d7b 100644 --- a/src/pq_alsa.c +++ b/src/pq_alsa.c @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "config.h" diff --git a/src/pq_codec.c b/src/pq_codec.c index f1884fb..4b41e1d 100644 --- a/src/pq_codec.c +++ b/src/pq_codec.c @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include /*! Add a codecl to the processing queue diff --git a/src/pq_file.c b/src/pq_file.c index 96f7b3f..e20b52b 100644 --- a/src/pq_file.c +++ b/src/pq_file.c @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include struct pq_state_file { diff --git a/src/pq_format.c b/src/pq_format.c index d6bc8af..ae98483 100644 --- a/src/pq_format.c +++ b/src/pq_format.c @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include static int diff --git a/src/pq_rtp.c b/src/pq_rtp.c index f5603de..d7d924e 100644 --- a/src/pq_rtp.c +++ b/src/pq_rtp.c @@ -27,9 +27,9 @@ #include -#include -#include -#include +#include +#include +#include #ifndef __BYTE_ORDER # ifdef __APPLE__ diff --git a/src/procqueue.c b/src/procqueue.c index 01ad581..f54da40 100644 --- a/src/procqueue.c +++ b/src/procqueue.c @@ -21,7 +21,7 @@ #include #include -#include +#include #define VAR_BUF_SIZE 320 #define MAX_PQ_ITEMS 8 -- cgit v1.2.3