X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=x264_dynamic.cpp;fp=x264_dynamic.cpp;h=f8b63cea69769d76480300dee7d50d63e6d4a0d0;hp=6aa649e43ff7ca51737cc943b8bea04dd2d9247f;hb=60bb3e298549d83fa62a7d140e0fce2856048811;hpb=b973bd3828a729a7a2c12bba4e4927300987dd23 diff --git a/x264_dynamic.cpp b/x264_dynamic.cpp index 6aa649e..f8b63ce 100644 --- a/x264_dynamic.cpp +++ b/x264_dynamic.cpp @@ -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;