[x264-devel] [Git][videolan/x264][master] Fix compilation of only 8 or 10 bit by a non-optimizing compiler
Anton Mitrofanov (@BugMaster)
gitlab at videolan.org
Sat Jan 28 22:11:07 UTC 2023
Anton Mitrofanov pushed to branch master at VideoLAN / x264
Commits:
cd31a90b by Anton Mitrofanov at 2023-01-28T21:45:30+03:00
Fix compilation of only 8 or 10 bit by a non-optimizing compiler
- - - - -
2 changed files:
- encoder/api.c
- x264.c
Changes:
=====================================
encoder/api.c
=====================================
@@ -79,7 +79,8 @@ REALIGN_STACK x264_t *x264_encoder_open( x264_param_t *param )
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;
@@ -94,7 +95,10 @@ REALIGN_STACK x264_t *x264_encoder_open( x264_param_t *param )
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;
@@ -110,6 +114,7 @@ REALIGN_STACK x264_t *x264_encoder_open( x264_param_t *param )
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 )
=====================================
x264.c
=====================================
@@ -1673,11 +1673,16 @@ generic_option:
/* 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
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/cd31a90ba5a0895a3ff476da8c84b561475189a9
--
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/cd31a90ba5a0895a3ff476da8c84b561475189a9
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the x264-devel
mailing list