[FFmpeg-soc] [soc]: r3904 - dirac/libavcodec/diracdec.c

conrad subversion at mplayerhq.hu
Thu Jan 1 21:31:14 CET 2009


Author: conrad
Date: Thu Jan  1 21:31:13 2009
New Revision: 3904

Log:
Cosmetics: indentation

Modified:
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	Thu Jan  1 21:31:11 2009	(r3903)
+++ dirac/libavcodec/diracdec.c	Thu Jan  1 21:31:13 2009	(r3904)
@@ -824,53 +824,53 @@ static int parse_frame(DiracContext *s)
     if (s->zero_res)
         return 0;
 
-        s->wavelet_idx = svq3_get_ue_golomb(gb);
+    s->wavelet_idx = svq3_get_ue_golomb(gb);
 
-        if (s->wavelet_idx > 6)
-            return -1;
+    if (s->wavelet_idx > 6)
+        return -1;
 
-        s->decoding.wavelet_depth = svq3_get_ue_golomb(gb);
+    s->decoding.wavelet_depth = svq3_get_ue_golomb(gb);
 
-        if (!s->low_delay) {
-            /* Codeblock paramaters (core syntax only) */
-            if (get_bits1(gb)) {
-                for (i = 0; i <= s->decoding.wavelet_depth; i++) {
-                    s->codeblocksh[i] = svq3_get_ue_golomb(gb);
-                    s->codeblocksv[i] = svq3_get_ue_golomb(gb);
-                }
+    if (!s->low_delay) {
+        /* Codeblock paramaters (core syntax only) */
+        if (get_bits1(gb)) {
+            for (i = 0; i <= s->decoding.wavelet_depth; i++) {
+                s->codeblocksh[i] = svq3_get_ue_golomb(gb);
+                s->codeblocksv[i] = svq3_get_ue_golomb(gb);
+            }
 
-                s->codeblock_mode = svq3_get_ue_golomb(gb);
-            } else
-                for (i = 0; i <= s->decoding.wavelet_depth; i++)
-                    s->codeblocksh[i] = s->codeblocksv[i] = 1;
+            s->codeblock_mode = svq3_get_ue_golomb(gb);
+        } else
+            for (i = 0; i <= s->decoding.wavelet_depth; i++)
+                s->codeblocksh[i] = s->codeblocksv[i] = 1;
+    } else {
+        s->x_slices        = svq3_get_ue_golomb(gb);
+        s->y_slices        = svq3_get_ue_golomb(gb);
+        s->slice_bytes.num = svq3_get_ue_golomb(gb);
+        s->slice_bytes.den = svq3_get_ue_golomb(gb);
+
+        if (get_bits1(gb)) {
+            // custom quantization matrix
+            s->quant_matrix[0][0] = svq3_get_ue_golomb(gb);
+            for (level = 0; level < s->decoding.wavelet_depth; level++) {
+                s->quant_matrix[level][1] = svq3_get_ue_golomb(gb);
+                s->quant_matrix[level][2] = svq3_get_ue_golomb(gb);
+                s->quant_matrix[level][3] = svq3_get_ue_golomb(gb);
+            }
         } else {
-            s->x_slices        = svq3_get_ue_golomb(gb);
-            s->y_slices        = svq3_get_ue_golomb(gb);
-            s->slice_bytes.num = svq3_get_ue_golomb(gb);
-            s->slice_bytes.den = svq3_get_ue_golomb(gb);
+            // default quantization matrix
+            for (level = 0; level < s->decoding.wavelet_depth; level++)
+                for (i = 0; i < 4; i++) {
+                    s->quant_matrix[level][i] =
+                        ff_dirac_default_qmat[s->wavelet_idx][level][i];
 
-            if (get_bits1(gb)) {
-                // custom quantization matrix
-                s->quant_matrix[0][0] = svq3_get_ue_golomb(gb);
-                for (level = 0; level < s->decoding.wavelet_depth; level++) {
-                    s->quant_matrix[level][1] = svq3_get_ue_golomb(gb);
-                    s->quant_matrix[level][2] = svq3_get_ue_golomb(gb);
-                    s->quant_matrix[level][3] = svq3_get_ue_golomb(gb);
+                    // haar with no shift differs for different depths
+                    if (s->wavelet_idx == 3)
+                        s->quant_matrix[level][i] +=
+                            4*(s->decoding.wavelet_depth-1 - level);
                 }
-            } else {
-                // default quantization matrix
-                for (level = 0; level < s->decoding.wavelet_depth; level++)
-                    for (i = 0; i < 4; i++) {
-                        s->quant_matrix[level][i] =
-                            ff_dirac_default_qmat[s->wavelet_idx][level][i];
-
-                        // haar with no shift differs for different depths
-                        if (s->wavelet_idx == 3)
-                            s->quant_matrix[level][i] +=
-                                4*(s->decoding.wavelet_depth-1 - level);
-                    }
-            }
         }
+    }
     return 0;
 }
 



More information about the FFmpeg-soc mailing list