<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">From abb3db6e09bc2cbe4509162a253165dda9f0a2c2 Mon Sep 17 00:00:00 2001<br>From: PavanTarun <<a href="mailto:pavan.tarun@multicorewareinc.com">pavan.tarun@multicorewareinc.com</a>><br>Date: Tue, 12 Nov 2024 20:19:13 +0530<br>Subject: [PATCH] Fix indentation issues<br><br>---<br> source/encoder/encoder.cpp |  2 +-<br> source/encoder/sei.cpp     | 94 +++++++++++++++++++-------------------<br> 2 files changed, 48 insertions(+), 48 deletions(-)<br><br>diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>index 1fbaf3228..ce33e8f9b 100644<br>--- a/source/encoder/encoder.cpp<br>+++ b/source/encoder/encoder.cpp<br>@@ -6167,7 +6167,7 @@ void Encoder::readUserSeiFile(x265_sei_payload& seiMsg, int curPoc)<br>         char *base64Encode = strtok(NULL, "\n");<br>         int base64EncodeLength = (int)strlen(base64Encode);<br>         char* decodedString;<br>-           decodedString = (char*)malloc(sizeof(char) * (base64EncodeLength));<br>+        decodedString = (char*)malloc(sizeof(char) * (base64EncodeLength));<br>         char *base64Decode = SEI::base64Decode(base64Encode, base64EncodeLength, decodedString);<br>         if (nalType == NAL_UNIT_PREFIX_SEI && (!strcmp(prefix, "PREFIX")))<br>         {<br>diff --git a/source/encoder/sei.cpp b/source/encoder/sei.cpp<br>index 85cd7894a..6f95bf3e6 100644<br>--- a/source/encoder/sei.cpp<br>+++ b/source/encoder/sei.cpp<br>@@ -94,52 +94,52 @@ void SEI::setSize(uint32_t size)<br> <br> char* SEI::base64Decode(char encodedString[], int base64EncodeLength, char* decodedString)<br> {<br>-   int i, j, k = 0;<br>-     // stores the bitstream<br>-      int bitstream = 0;<br>-   // countBits stores the current number of bits in bitstream<br>-  int countBits = 0;<br>-<br>-        for (i = 0; i < base64EncodeLength; i += 4)<br>-       {<br>-            bitstream = 0;<br>-               countBits = 0;<br>-<br>-            for (j = 0; j < 4; j++)<br>-           {<br>-                    if (encodedString[i + j] != '=')<br>-                     {<br>-                            int value = 0;<br>-                               if (encodedString[i + j] >= 'A' && encodedString[i + j] <= 'Z')<br>-                                        value = encodedString[i + j] - 'A';<br>-                          else if (encodedString[i + j] >= 'a' && encodedString[i + j] <= 'z')<br>-                                   value = encodedString[i + j] - 'a' + 26;<br>-                             else if (encodedString[i + j] >= '0' && encodedString[i + j] <= '9')<br>-                                   value = encodedString[i + j] - '0' + 52;<br>-                             else if (encodedString[i + j] == '+')<br>-                                        value = 62;<br>-                          else if (encodedString[i + j] == '/')<br>-                                        value = 63;<br>-                          else<br>-                                 value = 0;<br>-<br>-                                bitstream = (bitstream << 6) | value;<br>-                          countBits += 6;<br>-                      }<br>-            }<br>-<br>-         while (countBits >= 8)<br>-            {<br>-                    countBits -= 8;<br>-                      decodedString[k++] = (bitstream >> countBits) & 0xFF;<br>-              }<br>-    }<br>-<br>- if (k < base64EncodeLength)<br>-       {<br>-            decodedString[k] = '\0';<br>-     }<br>-<br>- return decodedString;<br>+    int i, j, k = 0;<br>+    // stores the bitstream<br>+    int bitstream = 0;<br>+    // countBits stores the current number of bits in bitstream<br>+    int countBits = 0;<br>+<br>+    for (i = 0; i < base64EncodeLength; i += 4)<br>+    {<br>+        bitstream = 0;<br>+        countBits = 0;<br>+<br>+        for (j = 0; j < 4; j++)<br>+        {<br>+            if (encodedString[i + j] != '=')<br>+            {<br>+                int value = 0;<br>+                if (encodedString[i + j] >= 'A' && encodedString[i + j] <= 'Z')<br>+                    value = encodedString[i + j] - 'A';<br>+                else if (encodedString[i + j] >= 'a' && encodedString[i + j] <= 'z')<br>+                    value = encodedString[i + j] - 'a' + 26;<br>+                else if (encodedString[i + j] >= '0' && encodedString[i + j] <= '9')<br>+                    value = encodedString[i + j] - '0' + 52;<br>+                else if (encodedString[i + j] == '+')<br>+                    value = 62;<br>+                else if (encodedString[i + j] == '/')<br>+                    value = 63;<br>+                else<br>+                    value = 0;<br>+<br>+                bitstream = (bitstream << 6) | value;<br>+                countBits += 6;<br>+            }<br>+        }<br>+<br>+        while (countBits >= 8)<br>+        {<br>+            countBits -= 8;<br>+            decodedString[k++] = (bitstream >> countBits) & 0xFF;<br>+        }<br>+    }<br>+<br>+    if (k < base64EncodeLength)<br>+    {<br>+        decodedString[k] = '\0';<br>+    }<br>+<br>+    return decodedString;<br> }<br> <br>-- <br>2.41.0.windows.1<br><br></div></div>