if( !api )
return NULL;
- if( HAVE_BITDEPTH8 && param->i_bitdepth == 8 )
+#if HAVE_BITDEPTH8
+ if( param->i_bitdepth == 8 )
{
api->nal_encode = x264_8_nal_encode;
api->encoder_reconfig = x264_8_encoder_reconfig;
api->x264 = x264_8_encoder_open( param, api );
}
- else if( HAVE_BITDEPTH10 && param->i_bitdepth == 10 )
+ else
+#endif
+#if HAVE_BITDEPTH10
+ if( param->i_bitdepth == 10 )
{
api->nal_encode = x264_10_nal_encode;
api->encoder_reconfig = x264_10_encoder_reconfig;
api->x264 = x264_10_encoder_open( param, api );
}
else
+#endif
x264_log_internal( X264_LOG_ERROR, "not compiled with %d bit depth support\n", param->i_bitdepth );
if( !api->x264 )
/* init threaded input while the information about the input video is unaltered by filtering */
#if HAVE_THREAD
const cli_input_t *thread_input;
- if( HAVE_BITDEPTH8 && param->i_bitdepth == 8 )
+#if HAVE_BITDEPTH8
+ if( param->i_bitdepth == 8 )
thread_input = &thread_8_input;
- else if( HAVE_BITDEPTH10 && param->i_bitdepth == 10 )
+ else
+#endif
+#if HAVE_BITDEPTH10
+ if( param->i_bitdepth == 10 )
thread_input = &thread_10_input;
else
+#endif
thread_input = NULL;
if( thread_input && info.thread_safe && (b_thread_input || param->i_threads > 1