]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Reindent xan_unpack code
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 17 Apr 2009 18:56:47 +0000 (18:56 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 17 Apr 2009 18:56:47 +0000 (18:56 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18587 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/xan.c

index d17527992f91e1efe829fe14286a49cf1357f8d0..d4fc1f742124da055975dd325290dcb0f5a5ef5f 100644 (file)
@@ -136,38 +136,38 @@ static void xan_unpack(unsigned char *dest, const unsigned char *src, int dest_l
         opcode = *src++;
 
         if (opcode < 0xe0) {
-           int size2, back;
-        if ( (opcode & 0x80) == 0 ) {
+            int size2, back;
+            if ( (opcode & 0x80) == 0 ) {
 
-            offset = *src++;
+                offset = *src++;
 
-            size = opcode & 3;
+                size = opcode & 3;
 
-            size2 = ((opcode & 0x1c) >> 2) + 3;
-            back = ((opcode & 0x60) << 3) + offset + 1;
+                size2 = ((opcode & 0x1c) >> 2) + 3;
+                back = ((opcode & 0x60) << 3) + offset + 1;
 
-        } else if ( (opcode & 0x40) == 0 ) {
+            } else if ( (opcode & 0x40) == 0 ) {
 
-            byte1 = *src++;
-            byte2 = *src++;
+                byte1 = *src++;
+                byte2 = *src++;
 
-            size = byte1 >> 6;
+                size = byte1 >> 6;
 
-            size2 = (opcode & 0x3f) + 4;
-            back = ((byte1 & 0x3f) << 8) + byte2 + 1;
+                size2 = (opcode & 0x3f) + 4;
+                back = ((byte1 & 0x3f) << 8) + byte2 + 1;
 
-        } else {
+            } else {
 
-            byte1 = *src++;
-            byte2 = *src++;
-            byte3 = *src++;
+                byte1 = *src++;
+                byte2 = *src++;
+                byte3 = *src++;
 
-            size = opcode & 3;
+                size = opcode & 3;
 
-            size2 = byte3 + 5 + ((opcode & 0xc) << 6);
-            back = ((opcode & 0x10) << 12) + 1 + (byte1 << 8) + byte2;
-            if (dest >= dest_end || size > dest_end - dest)
-                return;
+                size2 = byte3 + 5 + ((opcode & 0xc) << 6);
+                back = ((opcode & 0x10) << 12) + 1 + (byte1 << 8) + byte2;
+                if (dest >= dest_end || size > dest_end - dest)
+                    return;
             }
             memcpy(dest, src, size);  dest += size;  src += size;
             av_memcpy_backptr(dest, back, size2);