Bug#907659: nageru: FTBFS against x264 0.155
On Fri, Aug 31, 2018 at 08:19:31AM +0200, Sebastian Ramacher wrote: > The attached (untested) patch should be enough to adopt to this change. I didn't use your patch, but it was useful in making my own -- I wanted things ever so slightly differently. :-) Upload coming, thanks for the help. /* Steinar */ -- Homepage: https://www.sesse.net/
Bug#907659: nageru: FTBFS against x264 0.155
On 2018-08-31 10:22:54, Steinar H. Gunderson wrote: > On Fri, Aug 31, 2018 at 08:19:31AM +0200, Sebastian Ramacher wrote: > > I'm not aware of any documentation, but the major change for X264_BUILD >= > > 153 > > is that it now supports 8 and 10 bit simultaneously. Now the correct encoder > > is selected by setting x264_param_t's i_bitdepth to 8 or 10. Unless > > X264_BIT_DEPTH is non-zero, support for all bit depths is available. > > Thanks; the build number was what I was after. I'll have to experiment a bit > to find the cleanest solution; eventually I'll just drop the dynamic loading, > but I want to be backportable to stretch until buster releases (not to > mention that I'll need to be buildable in unstable until x264 155 hits :-) ). If acked by the release team, the upload of 155 to unstable should happen soon. Let me know if you need more time. nageru is currently the only blocker. Cheers -- Sebastian Ramacher signature.asc Description: PGP signature
Bug#907659: nageru: FTBFS against x264 0.155
On Fri, Aug 31, 2018 at 08:19:31AM +0200, Sebastian Ramacher wrote: > I'm not aware of any documentation, but the major change for X264_BUILD >= 153 > is that it now supports 8 and 10 bit simultaneously. Now the correct encoder > is selected by setting x264_param_t's i_bitdepth to 8 or 10. Unless > X264_BIT_DEPTH is non-zero, support for all bit depths is available. Thanks; the build number was what I was after. I'll have to experiment a bit to find the cleanest solution; eventually I'll just drop the dynamic loading, but I want to be backportable to stretch until buster releases (not to mention that I'll need to be buildable in unstable until x264 155 hits :-) ). /* Steinar */ -- Homepage: https://www.sesse.net/
Bug#907659: nageru: FTBFS against x264 0.155
On 2018-08-30 23:18:43, Steinar H. Gunderson wrote: > On Thu, Aug 30, 2018 at 09:47:24PM +0200, Sebastian Ramacher wrote: > > nageru does not build against the current version of x264 available in > > experimental: > > Hi, > > Do you know if there's documentation anywhere about the new handling of > 10-bit? And what #ifdef I should use to check whether x264_bit_depth is > available or not? I'm not aware of any documentation, but the major change for X264_BUILD >= 153 is that it now supports 8 and 10 bit simultaneously. Now the correct encoder is selected by setting x264_param_t's i_bitdepth to 8 or 10. Unless X264_BIT_DEPTH is non-zero, support for all bit depths is available. The attached (untested) patch should be enough to adopt to this change. Best -- Sebastian Ramacher --- nageru-1.7.3.orig/x264_dynamic.cpp +++ nageru-1.7.3/x264_dynamic.cpp @@ -14,7 +14,13 @@ using namespace std; X264Dynamic load_x264_for_bit_depth(unsigned depth) { X264Dynamic dyn; - if (unsigned(x264_bit_depth) >= depth) { +#if X264_BUILD < 153 + if (unsigned(x264_bit_depth) >= depth) +#elif X264_BIT_DEPTH != 0 + // The linked library was configured to only support one bit depth. + if (X264_BIT_DEPTH >= depth) +#endif + { // Just use the one we are linked to. dyn.handle = nullptr; dyn.x264_encoder_close = x264_encoder_close; @@ -31,6 +37,7 @@ X264Dynamic load_x264_for_bit_depth(unsi return dyn; } +#if X264_BUILD < 153 || X264_BIT_DEPTH != 0 // Uh-oh, our currently loaded library doesn't have the required support. // Let's try to dynamically load a 10-bit version; in particular, Debian // has a version in /usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so., @@ -82,4 +89,5 @@ X264Dynamic load_x264_for_bit_depth(unsi dyn.x264_param_parse = (decltype(::x264_param_parse) *)dlsym(x264_dlhandle, "x264_param_parse"); dyn.x264_picture_init = (decltype(::x264_picture_init) *)dlsym(x264_dlhandle, "x264_picture_init"); return dyn; +#endif } --- nageru-1.7.3.orig/x264_encoder.cpp +++ nageru-1.7.3/x264_encoder.cpp @@ -140,6 +140,9 @@ void X264Encoder::init_x264() param.i_width = global_flags.width; param.i_height = global_flags.height; param.i_csp = X264_CSP_NV12; +#if X265_BUILD >= 153 + param.i_bitdepth = global_flags.x264_bit_depth; +#endif if (global_flags.x264_bit_depth > 8) { param.i_csp |= X264_CSP_HIGH_DEPTH; } signature.asc Description: PGP signature
Bug#907659: nageru: FTBFS against x264 0.155
On Thu, Aug 30, 2018 at 09:47:24PM +0200, Sebastian Ramacher wrote: > nageru does not build against the current version of x264 available in > experimental: Hi, Do you know if there's documentation anywhere about the new handling of 10-bit? And what #ifdef I should use to check whether x264_bit_depth is available or not? /* Steinar */ -- Homepage: https://www.sesse.net/
Bug#907659: nageru: FTBFS against x264 0.155
Source: nageru Version: 1.7.3-1 Severity: important Tags: sid buster nageru does not build against the current version of x264 available in experimental: | g++ -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++11 -fPIC -DQT_OPENGLEXTENSIONS_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -pthread -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGLExtensions -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtOpenGL -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/movit -I/usr/include/luajit-2.1 -I/usr/include/p11-kit-1 -I/usr/include/libusb-1.0 -I/usr/include/eigen3 -pthread -DMOVIT_SHADER_DIR=\"/usr/share/movit\" -Idecklink/ -o x264_dynamic.o -c x264_dynamic.cpp | x264_dynamic.cpp: In function 'X264Dynamic load_x264_for_bit_depth(unsigned int)': | x264_dynamic.cpp:17:15: error: 'x264_bit_depth' was not declared in this scope | if (unsigned(x264_bit_depth) >= depth) { |^~ | x264_dynamic.cpp:17:15: note: suggested alternative: 'x264_picture_t' | if (unsigned(x264_bit_depth) >= depth) { |^~ |x264_picture_t | make[1]: *** [Makefile:87: x264_dynamic.o] Error 1 Cheers -- Sebastian Ramacher signature.asc Description: PGP signature