]> git.sesse.net Git - nageru/blobdiff - x264_dynamic.cpp
Support x264 >= 153.
[nageru] / x264_dynamic.cpp
index 6aa649e43ff7ca51737cc943b8bea04dd2d9247f..f8b63cea69769d76480300dee7d50d63e6d4a0d0 100644 (file)
@@ -14,7 +14,14 @@ using namespace std;
 X264Dynamic load_x264_for_bit_depth(unsigned depth)
 {
        X264Dynamic dyn;
-       if (unsigned(x264_bit_depth) >= depth) {
+#if defined(X264_BIT_DEPTH) && X264_BIT_DEPTH == 0
+       bool suitable = true;  // x264 compiled to support all bit depths.
+#elif defined(X264_BIT_DEPTH)
+       bool suitable = X264_BIT_DEPTH >= depth;
+#else
+       bool suitable = unsigned(x264_bit_depth) >= depth;
+#endif
+       if (suitable) {
                // Just use the one we are linked to.
                dyn.handle = nullptr;
                dyn.x264_encoder_close = x264_encoder_close;