changeset 1093:b6442efcdd27 libavcodec

* minor optimalization
author kabi
date Mon, 03 Mar 2003 17:13:26 +0000
parents f59c3f66363b
children 0ed00edd4d74
files adpcm.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/adpcm.c	Mon Mar 03 14:54:00 2003 +0000
+++ b/adpcm.c	Mon Mar 03 17:13:26 2003 +0000
@@ -427,18 +427,19 @@
             src++; /* if != 0  -> out-of-sync */
         }
 
-        for(m=3; src < (buf + buf_size);) {
-            *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F);
+        for(m=4; src < (buf + buf_size);) {
+	    *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F);
             if (st)
                 *samples++ = adpcm_ima_expand_nibble(&c->status[1], src[4] & 0x0F);
             *samples++ = adpcm_ima_expand_nibble(&c->status[0], (src[0] >> 4) & 0x0F);
-            if (st)
+	    if (st) {
                 *samples++ = adpcm_ima_expand_nibble(&c->status[1], (src[4] >> 4) & 0x0F);
-            src++;
-            if (st && !m--) {
-                m=3;
-                src+=4;
-            }
+		if (!--m) {
+		    m=4;
+		    src+=4;
+		}
+	    }
+	    src++;
 	}
         break;
     case CODEC_ID_ADPCM_MS: