[FFmpeg-cvslog] avcodec/msmpeg4: Reindentation

Andreas Rheinhardt git at videolan.org
Tue Apr 27 02:30:07 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Thu Dec 10 05:42:35 2020 +0100| [0d30c04e5d1414b402a3ea45e586b955a286333e] | committer: Andreas Rheinhardt

avcodec/msmpeg4: Reindentation

Forgotten in/after f5957f3fe2b8dfda13a9750acc3e3a03cd5d39c9.

Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d30c04e5d1414b402a3ea45e586b955a286333e
---

 libavcodec/msmpeg4.c | 90 +++++++++++++++++++++++++---------------------------
 1 file changed, 44 insertions(+), 46 deletions(-)

diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index ea1083c1a0..6673b45231 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -53,56 +53,54 @@
  * 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++;
-            }
+    for (int level = -256; level < 256; level++) {
+        int uni_code, uni_len;
+        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)



More information about the ffmpeg-cvslog mailing list