[FFmpeg-devel] [PATCH 31/39] avcodec/msmpeg4: Reindentation

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Thu Dec 10 13:16:49 EET 2020


Forgotten in/after f5957f3fe2b8dfda13a9750acc3e3a03cd5d39c9.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavcodec/msmpeg4.c | 91 ++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 46 deletions(-)

diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index ea1083c1a0..93b6e4bbbb 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -53,56 +53,55 @@
  * except that it is inverted. */
 static av_cold void init_h263_dc_for_msmpeg4(void)
 {
-        int level, uni_code, uni_len;
-
-        for(level=-256; level<256; level++){
-            int size, v, l;
-            /* find number of bits */
-            size = 0;
-            v = abs(level);
-            while (v) {
-                v >>= 1;
-                    size++;
-            }
+    int level, uni_code, uni_len;
+
+    for (level = -256; level < 256; level++) {
+        int size, v, l;
+        /* find number of bits */
+        size = 0;
+        v = abs(level);
+        while (v) {
+            v >>= 1;
+            size++;
+        }
 
-            if (level < 0)
-                l= (-level) ^ ((1 << size) - 1);
-            else
-                l= level;
-
-            /* luminance H.263 */
-            uni_code= ff_mpeg4_DCtab_lum[size][0];
-            uni_len = ff_mpeg4_DCtab_lum[size][1];
-            uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
-
-            if (size > 0) {
-                uni_code<<=size; uni_code|=l;
-                uni_len+=size;
-                if (size > 8){
-                    uni_code<<=1; uni_code|=1;
-                    uni_len++;
-                }
+        if (level < 0)
+            l = (-level) ^ ((1 << size) - 1);
+        else
+            l = level;
+
+        /* luminance H.263 */
+        uni_code  = ff_mpeg4_DCtab_lum[size][0];
+        uni_len   = ff_mpeg4_DCtab_lum[size][1];
+        uni_code ^= (1 << uni_len) - 1; //M$ does not like compatibility
+
+        if (size > 0) {
+            uni_code <<= size; uni_code |= l;
+            uni_len   += size;
+            if (size > 8) {
+                uni_code <<= 1; uni_code |= 1;
+                uni_len++;
             }
-            ff_v2_dc_lum_table[level + 256][0] = uni_code;
-            ff_v2_dc_lum_table[level + 256][1] = uni_len;
-
-            /* chrominance H.263 */
-            uni_code= ff_mpeg4_DCtab_chrom[size][0];
-            uni_len = ff_mpeg4_DCtab_chrom[size][1];
-            uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
-
-            if (size > 0) {
-                uni_code<<=size; uni_code|=l;
-                uni_len+=size;
-                if (size > 8){
-                    uni_code<<=1; uni_code|=1;
-                    uni_len++;
-                }
+        }
+        ff_v2_dc_lum_table[level + 256][0] = uni_code;
+        ff_v2_dc_lum_table[level + 256][1] = uni_len;
+
+        /* chrominance H.263 */
+        uni_code  = ff_mpeg4_DCtab_chrom[size][0];
+        uni_len   = ff_mpeg4_DCtab_chrom[size][1];
+        uni_code ^= (1 << uni_len) - 1; //M$ does not like compatibility
+
+        if (size > 0) {
+            uni_code <<= size; uni_code |= l;
+            uni_len   +=size;
+            if (size > 8) {
+                uni_code <<= 1; uni_code |= 1;
+                uni_len++;
             }
-            ff_v2_dc_chroma_table[level + 256][0] = uni_code;
-            ff_v2_dc_chroma_table[level + 256][1] = uni_len;
-
         }
+        ff_v2_dc_chroma_table[level + 256][0] = uni_code;
+        ff_v2_dc_chroma_table[level + 256][1] = uni_len;
+    }
 }
 
 av_cold void ff_msmpeg4_common_init(MpegEncContext *s)
-- 
2.25.1



More information about the ffmpeg-devel mailing list