[x265] [PATCH 02 of 14] bitcost: use enums for special constants rather than static const ints

Steve Borho steve at borho.org
Sat Sep 20 18:46:01 CEST 2014


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1411227060 -3600
#      Sat Sep 20 16:31:00 2014 +0100
# Node ID d5d19ae212568c35309f23646c8e2b53a38a3c6e
# Parent  44f174426508ee9b03562d46f16ea7eaa2e0d493
bitcost: use enums for special constants rather than static const ints

enums require no storage

diff -r 44f174426508 -r d5d19ae21256 source/encoder/bitcost.h
--- a/source/encoder/bitcost.h	Sat Sep 20 16:19:00 2014 +0100
+++ b/source/encoder/bitcost.h	Sat Sep 20 16:31:00 2014 +0100
@@ -76,9 +76,9 @@
     /* default log2_max_mv_length_horizontal and log2_max_mv_length_horizontal
      * are 15, specified in quarter-pel luma sample units. making the maximum
      * signaled ful-pel motion distance 4096, max qpel is 32768 */
-    static const int BC_MAX_MV = (1 << 15);
+    enum { BC_MAX_MV = (1 << 15) };
 
-    static const int BC_MAX_QP = 82;
+    enum { BC_MAX_QP = 82 };
 
     static float *s_bitsizes;
 


More information about the x265-devel mailing list