[x265] [PATCH] bpc instead of bpp

Peter Kovář peter.kovar at reflexion.tv
Tue Jun 16 22:08:33 CEST 2015


# HG changeset patch
# User Peter Kovář <peter.kovar at reflexion.tv>
# Date 1434400816 -7200
#      Mon Jun 15 22:40:16 2015 +0200
# Node ID afbea8642b653c999f2d38f88438b9685ad76ddf
# Parent  32590b25678b5b87bf6beed4c3074ec3837d35da
bpc instead of bpp

Bits per channel, not bits per pixel

diff -r 32590b25678b -r afbea8642b65 doc/reST/api.rst
--- a/doc/reST/api.rst	Fri Jun 12 16:48:06 2015 +0530
+++ b/doc/reST/api.rst	Mon Jun 15 22:40:16 2015 +0200
@@ -366,7 +366,7 @@
 =======================
 
 If your application might want to make a runtime selection between
-a number of libx265 libraries (perhaps 8bpp and 16bpp), then you will
+a number of libx265 libraries (perhaps 8bpc and 16bpc), then you will
 want to use the multi-library interface.
 
 Instead of directly using all of the **x265_** methods documented
@@ -405,12 +405,12 @@
     Linux it is .so while on Mac it is .dylib)
 
 For example on Windows, one could package together an x265.exe
-statically linked against the 8bpp libx265 together with a
+statically linked against the 8bpc libx265 together with a
 libx265_main10.dll in the same folder, and this executable would be able
 to encode main and main10 bitstreams.
 
-On Linux, x265 packagers could install 8bpp static and shared libraries
-under the name libx265 (so all applications link against 8bpp libx265)
+On Linux, x265 packagers could install 8bpc static and shared libraries
+under the name libx265 (so all applications link against 8bpc libx265)
 and then also install libx265_main10.so (symlinked to its numbered solib).
 Thus applications which use x265_api_get() will be able to generate main
 or main10 bitstreams.
diff -r 32590b25678b -r afbea8642b65 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/CMakeLists.txt	Mon Jun 15 22:40:16 2015 +0200
@@ -272,8 +272,8 @@
 set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables")
 
 if(X64)
-    # NOTE: We only officially support 16bit-per-pixel compiles of x265
-    # on 64bit architectures. 16bpp plus large resolution plus slow
+    # NOTE: We only officially support 16bit-per-channel compiles of x265
+    # on 64bit architectures. 16bpc plus large resolution plus slow
     # preset plus 32bit address space usually means malloc failure.  You
     # can disable this if(X64) check if you desparately need a 32bit
     # build with 10bit/12bit support, but this violates the "shrink wrap
@@ -295,10 +295,10 @@
     set(X265_NS x265)
     add_definitions(-DEXPORT_C_API=1)
 elseif(HIGH_BIT_DEPTH)
-    set(X265_NS x265_10bpp)
+    set(X265_NS x265_10bpc)
     add_definitions(-DEXPORT_C_API=0)
 else()
-    set(X265_NS x265_8bpp)
+    set(X265_NS x265_8bpc)
     add_definitions(-DEXPORT_C_API=0)
 endif()
 add_definitions(-DX265_NS=${X265_NS})
diff -r 32590b25678b -r afbea8642b65 source/common/quant.h
--- a/source/common/quant.h	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/common/quant.h	Mon Jun 15 22:40:16 2015 +0200
@@ -41,7 +41,7 @@
     int per;
     int qp;
     int64_t lambda2; /* FIX8 */
-    int32_t lambda;  /* FIX8, dynamic range is 18-bits in 8bpp and 20-bits in 16bpp */
+    int32_t lambda;  /* FIX8, dynamic range is 18-bits in 8bpc and 20-bits in 16bpc */
 
     QpParam() : qp(MAX_INT) {}
 
diff -r 32590b25678b -r afbea8642b65 source/common/version.cpp
--- a/source/common/version.cpp	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/common/version.cpp	Mon Jun 15 22:40:16 2015 +0200
@@ -82,10 +82,10 @@
 #endif
 
 #if HIGH_BIT_DEPTH
-#define BITDEPTH "16bpp"
+#define BITDEPTH "16bpc"
 const int x265_max_bit_depth = 10;
 #else
-#define BITDEPTH "8bpp"
+#define BITDEPTH "8bpc"
 const int x265_max_bit_depth = 8;
 #endif
 
diff -r 32590b25678b -r afbea8642b65 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Mon Jun 15 22:40:16 2015 +0200
@@ -794,7 +794,7 @@
 
 #if HIGH_BIT_DEPTH
 
-void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask) // 16bpp
+void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask) // 16bpc
 {
 #if !defined(X86_64)
 #error "Unsupported build configuration (32bit x86 and HIGH_BIT_DEPTH), you must configure ENABLE_ASSEMBLY=OFF"
@@ -2006,7 +2006,7 @@
 }
 #else // if HIGH_BIT_DEPTH
 
-void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask) // 8bpp
+void setupAssemblyPrimitives(EncoderPrimitives &p, int cpuMask) // 8bpc
 {
 #if X86_64
     p.scanPosLast = x265_scanPosLast_x64;
diff -r 32590b25678b -r afbea8642b65 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/common/x86/pixel-a.asm	Mon Jun 15 22:40:16 2015 +0200
@@ -7089,7 +7089,7 @@
 %endif ; ARCH_X86_64=1
 %endif ; HIGH_BIT_DEPTH
 
-; Input 16bpp, Output 8bpp
+; Input 16bpc, Output 8bpc
 ;------------------------------------------------------------------------------------------------------------------------
 ;void planecopy_sp(uint16_t *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int width, int height, int shift, uint16_t mask)
 ;------------------------------------------------------------------------------------------------------------------------
@@ -7183,7 +7183,7 @@
 .end:
     RET
 
-; Input 16bpp, Output 8bpp
+; Input 16bpc, Output 8bpc
 ;-------------------------------------------------------------------------------------------------------------------------------------
 ;void planecopy_sp(uint16_t *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int width, int height, int shift, uint16_t mask)
 ;-------------------------------------------------------------------------------------------------------------------------------------
@@ -7294,7 +7294,7 @@
 .end:
     RET
 
-; Input 8bpp, Output 16bpp
+; Input 8bpc, Output 16bpc
 ;---------------------------------------------------------------------------------------------------------------------
 ;void planecopy_cp(uint8_t *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int width, int height, int shift)
 ;---------------------------------------------------------------------------------------------------------------------
diff -r 32590b25678b -r afbea8642b65 source/encoder/api.cpp
--- a/source/encoder/api.cpp	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/encoder/api.cpp	Mon Jun 15 22:40:16 2015 +0200
@@ -420,7 +420,7 @@
 /* multilib namespace reflectors */
 #if X265_DEPTH == 8 && !EXPORT_C_API
 
-namespace x265_10bpp {
+namespace x265_10bpc {
 const x265_api* x265_api_get(int bitDepth);
 const x265_api* x265_api_query(int bitDepth, int apiVersion, int* err);
 }
@@ -429,9 +429,9 @@
 const x265_api* x265_api_get(int bitDepth)
 {
     if (!bitDepth || bitDepth == 8)
-        return x265_8bpp::x265_api_get(0);
+        return x265_8bpc::x265_api_get(0);
     else if (bitDepth == 10)
-        return x265_10bpp::x265_api_get(0);
+        return x265_10bpc::x265_api_get(0);
     return NULL;
 }
 
@@ -439,9 +439,9 @@
 const x265_api* x265_api_query(int bitDepth, int apiVersion, int* err)
 {
     if (!bitDepth || bitDepth == 8)
-        return x265_8bpp::x265_api_query(0, apiVersion, err);
+        return x265_8bpc::x265_api_query(0, apiVersion, err);
     else if (bitDepth == 10)
-        return x265_10bpp::x265_api_query(0, apiVersion, err);
+        return x265_10bpc::x265_api_query(0, apiVersion, err);
     return NULL;
 }
 #endif
diff -r 32590b25678b -r afbea8642b65 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/encoder/sao.cpp	Mon Jun 15 22:40:16 2015 +0200
@@ -706,7 +706,7 @@
     int8_t _upBuff1[MAX_CU_SIZE + 2], *upBuff1 = _upBuff1 + 1;
     int8_t _upBufft[MAX_CU_SIZE + 2], *upBufft = _upBufft + 1;
 
-    // Dynamic Range: 64x64x14bpp = 24bits
+    // Dynamic Range: 64x64x14bpc = 24bits
     int32_t tmp_stats[NUM_EDGETYPE];
     // TODO: improve by uint64_t, but need Haswell SHLX
     uint16_t tmp_count[NUM_EDGETYPE];
diff -r 32590b25678b -r afbea8642b65 source/test/testbench.cpp
--- a/source/test/testbench.cpp	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/test/testbench.cpp	Mon Jun 15 22:40:16 2015 +0200
@@ -137,8 +137,8 @@
     }
 
     int seed = (int)time(NULL);
-    const char *bpp[] = { "8bpp", "16bpp" };
-    printf("Using random seed %X %s\n", seed, bpp[HIGH_BIT_DEPTH]);
+    const char *bpc[] = { "8bpc", "16bpc" };
+    printf("Using random seed %X %s\n", seed, bpc[HIGH_BIT_DEPTH]);
     srand(seed);
 
     // To disable classes of tests, simply comment them out in this list
diff -r 32590b25678b -r afbea8642b65 source/x265.h
--- a/source/x265.h	Fri Jun 12 16:48:06 2015 +0530
+++ b/source/x265.h	Mon Jun 15 22:40:16 2015 +0200
@@ -1318,8 +1318,8 @@
 /* === Multi-lib API ===
  * By using this method to gain access to the libx265 interfaces, you allow run-
  * time selection between various available libx265 libraries based on the
- * encoder parameters. The most likely use case is to choose between 8bpp and
- * 16bpp builds of libx265. */
+ * encoder parameters. The most likely use case is to choose between 8bpc and
+ * 16bpc builds of libx265. */
 
 typedef struct x265_api
 {


More information about the x265-devel mailing list