X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264_dynamic.cpp;h=f8b63cea69769d76480300dee7d50d63e6d4a0d0;hb=6ffaabac0a523617b686f40c154a25cb548cc561;hp=6aa649e43ff7ca51737cc943b8bea04dd2d9247f;hpb=0556d8cb8416bdc7b432a432c3d58239a94358d2;p=nageru 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;