From: Michael Niedermayer <[email protected]>

Signed-off-by: Michael Niedermayer <[email protected]>

Conflicts:

        libavcodec/j2k.c
---
 libavcodec/jpeg2000.c |   52 ++++++++++++++++++-------------------------------
 1 file changed, 19 insertions(+), 33 deletions(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 705399a..f9e8235 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -95,47 +95,33 @@ static int getsigctxno(int flag, int bandno)
         ((flag & JPEG2000_T1_SIG_NW) ? 1 : 0) +
         ((flag & JPEG2000_T1_SIG_SE) ? 1 : 0) +
         ((flag & JPEG2000_T1_SIG_SW) ? 1 : 0);
-    if (bandno < 3) {
+
+    if (bandno < 3){
         if (bandno == 1)
             FFSWAP(int, h, v);
-        if (h == 2)
-            return 8;
-        if (h == 1) {
-            if (v >= 1)
-                return 7;
-            if (d >= 1)
-                return 6;
+        if (h == 2) return 8;
+        if (h == 1){
+            if (v >= 1) return 7;
+            if (d >= 1) return 6;
             return 5;
         }
-        if (v == 2)
-            return 4;
-        if (v == 1)
-            return 3;
-        if (d >= 2)
-            return 2;
-        if (d == 1)
-            return 1;
-        return 0;
-    } else {
-        if (d >= 3)
-            return 8;
-        if (d == 2) {
-            if (h + v >= 1)
-                return 7;
+        if (v == 2) return 4;
+        if (v == 1) return 3;
+        if (d >= 2) return 2;
+        if (d == 1) return 1;
+    } else{
+        if (d >= 3) return 8;
+        if (d == 2){
+            if (h+v >= 1) return 7;
             return 6;
         }
-        if (d == 1) {
-            if (h + v >= 2)
-                return 5;
-            if (h + v == 1)
-                return 4;
+        if (d == 1){
+            if (h+v >= 2) return 5;
+            if (h+v == 1) return 4;
             return 3;
         }
-        if (h + v >= 2)
-            return 2;
-        if (h + v == 1)
-            return 1;
-        return 0;
+        if (h+v >= 2) return 2;
+        if (h+v == 1) return 1;
     }
     return 0;
 }
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to