]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthony.minessale@gmail.com>
Sun, 3 Sep 2006 13:29:13 +0000 (13:29 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sun, 3 Sep 2006 13:29:13 +0000 (13:29 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2486 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_bitpack.h
src/include/switch_types.h
src/mod/codecs/mod_g726/mod_g726.c

index 15634cac03f06011c868a8c33e257334fcc0a9c9..76a8b901474320831c95d4f428863ef2b92435a8 100644 (file)
@@ -88,23 +88,23 @@ static inline void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, s
 
 static inline void pack_check_over(switch_bitpack_t *pack)
 {
-       switch_byte_t this = pack->this;        
+       switch_byte_t this_byte = pack->this_byte;      
 
        if (pack->over) {
                pack->bits_cur = pack->over;
 
                if (pack->mode == SWITCH_BITPACK_MODE_RFC3551) {
-                       this &= SWITCH_BITPACKED_MASKS[pack->over];
-                       this <<= pack->under;
-                       *pack->cur |= this;
+                       this_byte &= SWITCH_BITPACKED_MASKS[pack->over];
+                       this_byte <<= pack->under;
+                       *pack->cur |= this_byte;
                        pack->cur++;
                } else {
                        switch_byte_t mask = SWITCH_BITS_PER_BYTE - pack->over;
-                       this &= SWITCH_REVERSE_BITPACKED_MASKS[mask];
-                       this >>= mask;
+                       this_byte &= SWITCH_REVERSE_BITPACKED_MASKS[mask];
+                       this_byte >>= mask;
 
                        *pack->cur <<= pack->over;
-                       *pack->cur |= this;
+                       *pack->cur |= this_byte;
                        pack->cur++;
                }
 
@@ -145,14 +145,14 @@ static inline int8_t switch_bitpack_done(switch_bitpack_t *pack)
 DoxyDefine(int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t in))
 static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t in)
 {
-       switch_byte_t this;
+       switch_byte_t this_byte;
 
        if (unpack->cur - unpack->buf > unpack->buflen) {
                return -1;
        }
 
        unpack->bits_cur = 0;
-       unpack->this = this = in;
+       unpack->this_byte = this_byte = in;
 
 
 
@@ -161,7 +161,7 @@ static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t
                switch_byte_t next = unpack->bits_cur + unpack->frame_bits;
                switch_byte_t under_in;
                switch_byte_t mask;
-               this = unpack->this;
+               this_byte = unpack->this_byte;
 
                if (next > SWITCH_BITS_PER_BYTE) {
                        unpack->over = next - SWITCH_BITS_PER_BYTE;
@@ -170,12 +170,12 @@ static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t
                        if (unpack->mode == SWITCH_BITPACK_MODE_RFC3551) {
                                mask = SWITCH_BITS_PER_BYTE - unpack->under;
 
-                               under_in = this & SWITCH_REVERSE_BITPACKED_MASKS[mask];
+                               under_in = this_byte & SWITCH_REVERSE_BITPACKED_MASKS[mask];
                                under_in >>= mask;
                                *unpack->cur |= under_in;
                        } else {
                                mask = unpack->under;
-                               under_in = this & SWITCH_BITPACKED_MASKS[mask];
+                               under_in = this_byte & SWITCH_BITPACKED_MASKS[mask];
                                *unpack->cur <<= mask;
                                *unpack->cur |= under_in;
                        }
@@ -184,15 +184,15 @@ static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t
                }
 
                if (unpack->mode == SWITCH_BITPACK_MODE_RFC3551) {
-                       this >>= unpack->bits_cur;
-                       this &= SWITCH_BITPACKED_MASKS[unpack->frame_bits];
-                       *unpack->cur |= this;
+                       this_byte >>= unpack->bits_cur;
+                       this_byte &= SWITCH_BITPACKED_MASKS[unpack->frame_bits];
+                       *unpack->cur |= this_byte;
                        unpack->cur++;
                } else {
-                       this >>= (SWITCH_BITS_PER_BYTE - next);
-                       this &= SWITCH_BITPACKED_MASKS[unpack->frame_bits];
+                       this_byte >>= (SWITCH_BITS_PER_BYTE - next);
+                       this_byte &= SWITCH_BITPACKED_MASKS[unpack->frame_bits];
 
-                       *unpack->cur |= this;
+                       *unpack->cur |= this_byte;
                        unpack->cur++;
                }
 
index 83d11a456a63dd74b6fdde9368c3791f4ade1f5c..e3663acb8f05cd2e7e82c155f9001ee213190061 100644 (file)
@@ -91,7 +91,7 @@ typedef struct {
        switch_byte_t bits_rem;
        switch_byte_t frame_bits;
        switch_byte_t shiftby;
-       switch_byte_t this;
+       switch_byte_t this_byte;
        switch_byte_t under;
        switch_byte_t over;
        switch_bitpack_mode_t mode;
index 7e63506357dad1c64172719cad41c9a1d7e406cf..7e7749e4795235465ac5aa8fe448425cde75d85f 100644 (file)
@@ -138,8 +138,7 @@ static switch_status_t switch_g726_encode(switch_codec_t *codec,
                uint32_t new_len = 0;
                int16_t *ddp = decoded_data;
                uint8_t *edp = encoded_data;
-               int x;
-               uint32_t loops = decoded_data_len / (sizeof(*ddp));
+               uint32_t x, loops = decoded_data_len / (sizeof(*ddp));
 
                switch_bitpack_init(&handle->pack, handle->bits_per_frame, edp, *encoded_data_len, handle->mode);