[zaptel-commits] kpfleming: branch 1.4 r3552 - /branches/1.4/arith.h
SVN commits to the Zaptel project
zaptel-commits at lists.digium.com
Fri Dec 21 09:20:15 CST 2007
Author: kpfleming
Date: Fri Dec 21 09:20:14 2007
New Revision: 3552
URL: http://svn.digium.com/view/zaptel?view=rev&rev=3552
Log:
coding guidelines cleanup
Modified:
branches/1.4/arith.h
Modified: branches/1.4/arith.h
URL: http://svn.digium.com/view/zaptel/branches/1.4/arith.h?view=diff&rev=3552&r1=3551&r2=3552
==============================================================================
--- branches/1.4/arith.h (original)
+++ branches/1.4/arith.h Fri Dec 21 09:20:14 2007
@@ -261,16 +261,18 @@
#ifdef ZT_CHUNKSIZE
static inline void ACSS(short *dst, short *src)
{
+ int x;
+
+ /* Add src to dst with saturation, storing in dst */
+
#ifdef BFIN
- int x;
-/* Add src to dst with saturation, storing in dst */
- for (x=0;x<ZT_CHUNKSIZE;x++)
+ for (x = 0; x < ZT_CHUNKSIZE; x++)
dst[x] = __builtin_bfin_add_fr1x16(dst[x], src[x]);
#else
- int x,sum;
- /* Add src to dst with saturation, storing in dst */
- for (x=0;x<ZT_CHUNKSIZE;x++) {
- sum = dst[x]+src[x];
+ int sum;
+
+ for (x = 0; x < ZT_CHUNKSIZE; x++) {
+ sum = dst[x] + src[x];
if (sum > 32767)
sum = 32767;
else if (sum < -32768)
@@ -282,16 +284,17 @@
static inline void SCSS(short *dst, short *src)
{
+ int x;
+
+ /* Subtract src from dst with saturation, storing in dst */
#ifdef BFIN
- int x;
-/* subtract src from dst with saturation, storing in dst */
- for (x=0;x<ZT_CHUNKSIZE;x++)
+ for (x = 0; x < ZT_CHUNKSIZE; x++)
dst[x] = __builtin_bfin_sub_fr1x16(dst[x], src[x]);
#else
- int x,sum;
- /* Add src to dst with saturation, storing in dst */
- for (x=0;x<ZT_CHUNKSIZE;x++) {
- sum = dst[x]-src[x];
+ int sum;
+
+ for (x = 0; x < ZT_CHUNKSIZE; x++) {
+ sum = dst[x] - src[x];
if (sum > 32767)
sum = 32767;
else if (sum < -32768)
More information about the zaptel-commits
mailing list