diff mbox series

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

Message ID 20201210111657.2276739-32-andreas.rheinhardt@gmail.com
State New
Headers show
Series Make mpegvideo encoders init-threadsafe
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 10, 2020, 11:16 a.m. UTC
Forgotten in/after f5957f3fe2b8dfda13a9750acc3e3a03cd5d39c9.

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

Patch

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)