Control: tags -1 confirmed patch

On 2015-01-12 11:08:34, djcj wrote:
> Package: x265
> Version: 1.4-5
> 
> Running the x265 binary with the 10 bit library version preloaded (which is
> what the x265-10bit wrapper script does) does not work:
>  $ LD_PRELOAD=./libx265.so.35 ./x265 --pass 1 --bitrate 10 -o /dev/null
> test.y4m
> x265 [error]: Only bit depths of 8 are supported in this build
> 
> You have to build the CLI together with the library.

To me it looks like the check in the x265 should just check against
x265_max_bit_depth. Maybe something like the following patch could be
used instead of shipping two binaries that only differ in this check.

diff --git a/source/x265.cpp b/source/x265.cpp
--- a/source/x265.cpp
+++ b/source/x265.cpp
@@ -659,19 +659,11 @@
         return true;
     }
 
-#if HIGH_BIT_DEPTH
-    if (param->internalBitDepth != 10)
+    if (param->internalBitDepth != x265_max_bit_depth)
     {
-        x265_log(param, X265_LOG_ERROR, "Only bit depths of 10 are supported 
in this build\n");
+        x265_log(param, X265_LOG_ERROR, "Only bit depths of %d are supported 
in this build\n", x265_max_bit_depth);
         return true;
     }
-#else
-    if (param->internalBitDepth != 8)
-    {
-        x265_log(param, X265_LOG_ERROR, "Only bit depths of 8 are supported in 
this build\n");
-        return true;
-    }
-#endif // if HIGH_BIT_DEPTH
 
     InputFileInfo info;
     info.filename = inputfn;

Cheers
-- 
Sebastian Ramacher

Attachment: signature.asc
Description: Digital signature

Reply via email to