shithub: hj264

Download patch

ref: 422d0752f69961da3aeff3ad70b90a4b535a04f5
parent: 2d915aa23560d0af49997f36b979cb9f5a9f43da
parent: 4987378f57f6abb923d2819b3910607a1db9e2e8
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Mar 10 20:44:14 EDT 2025

merge

--- a/minih264e.h
+++ b/minih264e.h
@@ -7255,16 +7255,7 @@
 */
 static void h264e_bs_put_golomb(bs_t *bs, unsigned val)
 {
-#ifdef __arm__
-    int size = 32 - __clz(val + 1);
-#else
-    int size = 0;
-    unsigned t = val + 1;
-    do
-    {
-        size++;
-    } while (t >>= 1);
-#endif
+    int size = 32 - __builtin_clz(val + 1);
     h264e_bs_put_bits(bs, 2*size - 1, val + 1);
 }
 
--