changeset 6586:01bea2407628 libavcodec

Remove redundant &.
author michael
date Sun, 13 Apr 2008 00:05:38 +0000
parents 0ec61ed36c29
children 66580b034818
files adpcm.c
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/adpcm.c	Sat Apr 12 16:54:36 2008 +0000
+++ b/adpcm.c	Sun Apr 13 00:05:38 2008 +0000
@@ -862,7 +862,7 @@
 #define DK3_GET_NEXT_NIBBLE() \
     if (decode_top_nibble_next) \
     { \
-        nibble = (last_byte >> 4) & 0x0F; \
+        nibble = last_byte >> 4; \
         decode_top_nibble_next = 0; \
     } \
     else \
@@ -950,7 +950,7 @@
         for(m=32; n>0 && m>0; n--, m--) { /* in QuickTime, IMA is encoded by chuncks of 34 bytes (=64 samples) */
             *samples = adpcm_ima_expand_nibble(cs, src[0] & 0x0F, 3);
             samples += avctx->channels;
-            *samples = adpcm_ima_expand_nibble(cs, (src[0] >> 4) & 0x0F, 3);
+            *samples = adpcm_ima_expand_nibble(cs, src[0] >> 4  , 3);
             samples += avctx->channels;
             src ++;
         }
@@ -1053,7 +1053,7 @@
         *samples++ = c->status[0].sample2;
         if (st) *samples++ = c->status[1].sample2;
         for(;n>0;n--) {
-            *samples++ = adpcm_ms_expand_nibble(&c->status[0], (src[0] >> 4) & 0x0F);
+            *samples++ = adpcm_ms_expand_nibble(&c->status[0 ], src[0] >> 4  );
             *samples++ = adpcm_ms_expand_nibble(&c->status[st], src[0] & 0x0F);
             src ++;
         }
@@ -1076,7 +1076,7 @@
 
             /* take care of the top nibble (always left or mono channel) */
             *samples++ = adpcm_ima_expand_nibble(&c->status[0],
-                (src[0] >> 4) & 0x0F, 3);
+                src[0] >> 4, 3);
 
             /* take care of the bottom nibble, which is right sample for
              * stereo, or another mono sample */
@@ -1141,12 +1141,12 @@
 
             if (st) {
                 *samples++ = adpcm_ima_expand_nibble(&c->status[0],
-                    (src[0] >> 4) & 0x0F, 3);
+                    src[0] >> 4  , 3);
                 *samples++ = adpcm_ima_expand_nibble(&c->status[1],
                     src[0] & 0x0F, 3);
             } else {
                 *samples++ = adpcm_ima_expand_nibble(&c->status[0],
-                    (src[0] >> 4) & 0x0F, 3);
+                    src[0] >> 4  , 3);
                 *samples++ = adpcm_ima_expand_nibble(&c->status[0],
                     src[0] & 0x0F, 3);
             }
@@ -1204,13 +1204,13 @@
         src += 2;
 
         for (count1 = 0; count1 < samples_in_chunk/28;count1++) {
-            coeff1l = ea_adpcm_table[(*src >> 4) & 0x0F];
-            coeff2l = ea_adpcm_table[((*src >> 4) & 0x0F) + 4];
+            coeff1l = ea_adpcm_table[ *src >> 4       ];
+            coeff2l = ea_adpcm_table[(*src >> 4  ) + 4];
             coeff1r = ea_adpcm_table[*src & 0x0F];
             coeff2r = ea_adpcm_table[(*src & 0x0F) + 4];
             src++;
 
-            shift_left = ((*src >> 4) & 0x0F) + 8;
+            shift_left  = (*src >> 4  ) + 8;
             shift_right = (*src & 0x0F) + 8;
             src++;
 
@@ -1283,8 +1283,8 @@
                         samplesC += avctx->channels;
                     }
                 } else {
-                    coeff1 = ea_adpcm_table[ (*srcC>>4) & 0x0F     ];
-                    coeff2 = ea_adpcm_table[((*srcC>>4) & 0x0F) + 4];
+                    coeff1 = ea_adpcm_table[ *srcC>>4     ];
+                    coeff2 = ea_adpcm_table[(*srcC>>4) + 4];
                     shift = (*srcC++ & 0x0F) + 8;
 
                     for (count2=0; count2<28; count2++) {
@@ -1357,7 +1357,7 @@
         while (src < buf + buf_size) {
             char hi, lo;
             lo = *src & 0x0F;
-            hi = (*src >> 4) & 0x0F;
+            hi = *src >> 4;
 
             if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV)
                 FFSWAP(char, hi, lo);
@@ -1373,12 +1373,12 @@
         while (src < buf + buf_size) {
             if (st) {
                 *samples++ = adpcm_ct_expand_nibble(&c->status[0],
-                    (src[0] >> 4) & 0x0F);
+                    src[0] >> 4);
                 *samples++ = adpcm_ct_expand_nibble(&c->status[1],
                     src[0] & 0x0F);
             } else {
                 *samples++ = adpcm_ct_expand_nibble(&c->status[0],
-                    (src[0] >> 4) & 0x0F);
+                    src[0] >> 4);
                 *samples++ = adpcm_ct_expand_nibble(&c->status[0],
                     src[0] & 0x0F);
             }
@@ -1398,7 +1398,7 @@
         if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) {
             while (src < buf + buf_size) {
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
-                    (src[0] >> 4) & 0x0F, 4, 0);
+                    src[0] >> 4, 4, 0);
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
                     src[0] & 0x0F, 4, 0);
                 src++;
@@ -1406,7 +1406,7 @@
         } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) {
             while (src < buf + buf_size && samples + 2 < samples_end) {
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
-                    (src[0] >> 5) & 0x07, 3, 0);
+                     src[0] >> 5        , 3, 0);
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
                     (src[0] >> 2) & 0x07, 3, 0);
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1416,7 +1416,7 @@
         } else {
             while (src < buf + buf_size && samples + 3 < samples_end) {
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
-                    (src[0] >> 6) & 0x03, 2, 2);
+                     src[0] >> 6        , 2, 2);
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
                     (src[0] >> 4) & 0x03, 2, 2);
                 *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1494,12 +1494,12 @@
                 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
                         src[0] & 0x0F);
                 *samples++ = adpcm_yamaha_expand_nibble(&c->status[1],
-                        (src[0] >> 4) & 0x0F);
+                        src[0] >> 4  );
             } else {
                 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
                         src[0] & 0x0F);
                 *samples++ = adpcm_yamaha_expand_nibble(&c->status[0],
-                        (src[0] >> 4) & 0x0F);
+                        src[0] >> 4  );
             }
             src++;
         }