Re: [x265] [PATCH] strtok_r: fix detection on Windows
On 04/05/14 22:27, Steve Borho wrote: On Sat, Apr 5, 2014 at 4:26 AM, Rafaël Carré fun...@videolan.org wrote: Make sure HAVE_STRTOK_R is always defined, to 0 if absent Fix typo in #if mingw-w64's pthread.h #defines strtok_r, make sure to undef it before we use our own definition. --- source/common/CMakeLists.txt | 3 +++ source/common/param.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index 09029ba..63cdf09 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -130,6 +130,9 @@ if(ENABLE_ASSEMBLY) endif(ENABLE_ASSEMBLY) check_symbol_exists(strtok_r string.h HAVE_STRTOK_R) +if(HAVE_STRTOK_R STREQUAL ) +set(HAVE_STRTOK_R 0) +endif() hmm, I think I would prefer to use: if(HAVE_STRTOK_R) set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R=1) endif() then use #ifndef in the source Works for me set_source_files_properties(param.cpp PROPERTIES COMPILE_FLAGS -DHAVE_STRTOK_R=${HAVE_STRTOK_R}) if(GCC AND GCC_HAS_NO_NARROWING) diff --git a/source/common/param.cpp b/source/common/param.cpp index 57e3388..ac19c7e 100644 --- a/source/common/param.cpp +++ b/source/common/param.cpp @@ -37,7 +37,7 @@ #define strcasecmp _stricmp #endif -#if !HAVE_STROTOK_R +#if !HAVE_STRTOK_R this is an obvious fix, thanks /* * adapted from public domain strtok_r() by Charlie Gordon * @@ -49,6 +49,7 @@ * http://groups.google.com/group/comp.lang.c/msg/7c7b39328fefab9c */ +#undef strtok_r and I understand the need for this char* strtok_r( char *str, const char *delim, Cheers ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 2/2] Fix x86_64 build
On 03/05/14 18:08, Steve Borho wrote: On Wed, Mar 5, 2014 at 4:38 AM, Rafaël Carré fun...@videolan.org wrote: --- source/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 2febfaa..d2fea1a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -21,7 +21,7 @@ configure_file(${PROJECT_SOURCE_DIR}/x265_config.h.in SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86) +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64) set(X86 1) add_definitions(-DX265_ARCH_X86=1) if(${CMAKE_SIZEOF_VOID_P} MATCHES 8) I suspect there is something wrong with your git clone. This line now looks like: string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} SYSPROC) if(${SYSPROC} STREQUAL i386 OR ${SYSPROC} STREQUAL amd64 OR ${SYSPROC} STREQUAL x86_64 OR ${SYSPROC} STREQUAL x86 OR ${SYSPROC} STREQUAL ) message(STATUS Detected x86 system processor) The line you have is over a month old. Hum right, it stops after 31 january. I'll look it up ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 1/2] weight prediction: use sqrtf
On 03/05/14 18:06, Steve Borho wrote: On Wed, Mar 5, 2014 at 4:38 AM, Rafaël Carré fun...@videolan.org wrote: --- source/encoder/weightPrediction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/encoder/weightPrediction.cpp b/source/encoder/weightPrediction.cpp index c04361a..c0710fd 100644 --- a/source/encoder/weightPrediction.cpp +++ b/source/encoder/weightPrediction.cpp @@ -203,7 +203,7 @@ bool WeightPrediction::checkDenom(int denom) uint64_t fencVar = fenc-wp_ssd[yuv] + !ref-wp_ssd[yuv]; uint64_t refVar = ref-wp_ssd[yuv] + !ref-wp_ssd[yuv]; if (fencVar refVar) -guessScale[yuv] = Clip3(-2.f, 1.8f, std::sqrt((float)fencVar / refVar)); +guessScale[yuv] = Clip3(-2.f, 1.8f, sqrtf((float)fencVar / refVar)); Is something wrong with std::sqrt? I got: x265/source/encoder/weightPrediction.cpp:206:57: error: 'sqrt' is not a member of 'std' With g++ 4.8.2 Full command line is : cd /home/fun/x265/source/encoder /usr/bin/c++ -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DLOG_CU_STATISTICS=0 -DX265_ARCH_X86=1 -DX86_64=1 -O2 -g -DNDEBUG -I/home/fun/x265/source/. -I/home/fun/x265/source/Lib -I/home/fun/x265/source/common -I/home/fun/x265/source/encoder -I/home/fun/x265/source-Wall -Wextra -Wshadow -ffast-math -mstackrealign -fPIC -o CMakeFiles/encoder.dir/weightPrediction.cpp.o -c /home/fun/x265/source/encoder/weightPrediction.cpp Perhaps I am missing a -stdc++=something that was added later? This line recently caught my attention; I could not figure out why the output of sqrt() was being clipped to a negative base number, or why it was clipped on top either, for that matter. ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 1/2] weight prediction: use sqrtf
On 03/06/14 18:56, Steve Borho wrote: On Thu, Mar 6, 2014 at 11:44 AM, Rafaël Carré fun...@videolan.org wrote: On 03/05/14 18:06, Steve Borho wrote: On Wed, Mar 5, 2014 at 4:38 AM, Rafaël Carré fun...@videolan.org wrote: --- source/encoder/weightPrediction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/encoder/weightPrediction.cpp b/source/encoder/weightPrediction.cpp index c04361a..c0710fd 100644 --- a/source/encoder/weightPrediction.cpp +++ b/source/encoder/weightPrediction.cpp @@ -203,7 +203,7 @@ bool WeightPrediction::checkDenom(int denom) uint64_t fencVar = fenc-wp_ssd[yuv] + !ref-wp_ssd[yuv]; uint64_t refVar = ref-wp_ssd[yuv] + !ref-wp_ssd[yuv]; if (fencVar refVar) -guessScale[yuv] = Clip3(-2.f, 1.8f, std::sqrt((float)fencVar / refVar)); +guessScale[yuv] = Clip3(-2.f, 1.8f, sqrtf((float)fencVar / refVar)); Is something wrong with std::sqrt? I got: x265/source/encoder/weightPrediction.cpp:206:57: error: 'sqrt' is not a member of 'std' With g++ 4.8.2 Full command line is : cd /home/fun/x265/source/encoder /usr/bin/c++ -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DLOG_CU_STATISTICS=0 -DX265_ARCH_X86=1 -DX86_64=1 -O2 -g -DNDEBUG -I/home/fun/x265/source/. -I/home/fun/x265/source/Lib -I/home/fun/x265/source/common -I/home/fun/x265/source/encoder -I/home/fun/x265/source-Wall -Wextra -Wshadow -ffast-math -mstackrealign -fPIC -o CMakeFiles/encoder.dir/weightPrediction.cpp.o -c /home/fun/x265/source/encoder/weightPrediction.cpp Perhaps I am missing a -stdc++=something that was added later? No, I don't believe so. I build this regularly with gcc 4.8.1 on both Linux and MinGW. http://en.cppreference.com/w/cpp/numeric/math/sqrt Does adding #include cmath to the file help? Yes, no problem if cmath is included. ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH 1/2] weight prediction: use sqrtf
--- source/encoder/weightPrediction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/encoder/weightPrediction.cpp b/source/encoder/weightPrediction.cpp index c04361a..c0710fd 100644 --- a/source/encoder/weightPrediction.cpp +++ b/source/encoder/weightPrediction.cpp @@ -203,7 +203,7 @@ bool WeightPrediction::checkDenom(int denom) uint64_t fencVar = fenc-wp_ssd[yuv] + !ref-wp_ssd[yuv]; uint64_t refVar = ref-wp_ssd[yuv] + !ref-wp_ssd[yuv]; if (fencVar refVar) -guessScale[yuv] = Clip3(-2.f, 1.8f, std::sqrt((float)fencVar / refVar)); +guessScale[yuv] = Clip3(-2.f, 1.8f, sqrtf((float)fencVar / refVar)); else guessScale[yuv] = 1.8f; fencMean[yuv] = (float)fenc-wp_sum[yuv] / (height[yuv] * width[yuv]) / (1 (X265_DEPTH - 8)); -- 1.9.0 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH 2/2] Fix x86_64 build
--- source/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 2febfaa..d2fea1a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -21,7 +21,7 @@ configure_file(${PROJECT_SOURCE_DIR}/x265_config.h.in SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86) +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64) set(X86 1) add_definitions(-DX265_ARCH_X86=1) if(${CMAKE_SIZEOF_VOID_P} MATCHES 8) -- 1.9.0 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH 2/2] Fix x86_64 build
I know, I sent patches to mercurial to properly apply git patches with utf8, but never finished them :/ Can you e.g. apply the diff manually and fix my name after? I'm using git hg clone for all my development so making a hg patch is not easy for me. If you have a suggestion I'm all ears though On 03/05/14 12:15, Deepthi Nandakumar wrote: Can you convert this to an hg patch? Git patches don't apply cleanly On Wed, Mar 5, 2014 at 4:08 PM, Rafaël Carré fun...@videolan.org wrote: --- source/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 2febfaa..d2fea1a 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -21,7 +21,7 @@ configure_file(${PROJECT_SOURCE_DIR}/x265_config.h.in SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) -if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86) +if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL i386 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86 OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64) set(X86 1) add_definitions(-DX265_ARCH_X86=1) if(${CMAKE_SIZEOF_VOID_P} MATCHES 8) -- 1.9.0 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH 1/2] Check if we are in a hg repository before running hg
--- source/cmake/version.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/cmake/version.cmake b/source/cmake/version.cmake index af16e28..0d2346f 100644 --- a/source/cmake/version.cmake +++ b/source/cmake/version.cmake @@ -29,7 +29,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/../.hg_archival.txt) endif() elseif(DEFINED ENV{X265_VERSION}) set(X265_VERSION $ENV{X265_REVISION}) -elseif(HG_EXECUTABLE) +elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.hg) execute_process(COMMAND ${HG_EXECUTABLE} log -r. --template {latesttag} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} -- 1.8.5.2 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH 2/2] Set version and latest tag if using a git repository
--- source/cmake/version.cmake | 19 +++ 1 file changed, 19 insertions(+) diff --git a/source/cmake/version.cmake b/source/cmake/version.cmake index 0d2346f..5aa5935 100644 --- a/source/cmake/version.cmake +++ b/source/cmake/version.cmake @@ -1,4 +1,5 @@ find_program(HG_EXECUTABLE hg) +find_program(GIT_EXECUTABLE git) if(EXISTS ${CMAKE_SOURCE_DIR}/../.hg_archival.txt) # read the lines of the archive summary file to extract the version @@ -71,6 +72,24 @@ elseif(HG_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.hg) endif() set(X265_VERSION ${HG_REVISION}) +elseif(GIT_EXECUTABLE AND EXISTS ${CMAKE_SOURCE_DIR}/../.git) +execute_process( +COMMAND +${GIT_EXECUTABLE} describe --tags --abbrev=0 +WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +OUTPUT_VARIABLE X265_LATEST_TAG +ERROR_QUIET +OUTPUT_STRIP_TRAILING_WHITESPACE +) + +execute_process( +COMMAND +${GIT_EXECUTABLE} describe --tags +WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +OUTPUT_VARIABLE X265_VERSION +ERROR_QUIET +OUTPUT_STRIP_TRAILING_WHITESPACE +) else() set(X265_VERSION unknown) endif() -- 1.8.5.2 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] cmake: generate and install pkgconfig file
Le 23/10/2013 12:03, Derek Buitenhuis a écrit : On 10/23/2013 6:16 AM, Steve Borho wrote: # HG changeset patch # User Steve Borho st...@borho.org # Date 1382480398 18000 # Tue Oct 22 17:19:58 2013 -0500 # Node ID a8d4928926e82026ed71ca0af210a5f4f16d405d # Parent 6d96d64c4e9a2c526b57274760a7147241328cb3 cmake: generate and install pkgconfig file This installs the x265.pc into /usr/local/lib/pkgconfig/ with these contents: s#/usr/local/lib/#/specificed/prefix/#g in the commit message... Name: x265 Description: H.265/HEVC video encoder Version: 0.4.1 Libs: -L${libdir} -lx265 Libs.private: -lstdc++ -lm -lc -lpthread -lrt This is not portable between systems, which may not use GNU's libsdtc++. OS X, can for example, use libc++. Don't get me started on Libav's MSVC stuff... ;) Yeah, this should be generated dynamically of course. @CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@ @PLATFORM_LIBS@ Seems to be the way to go. Also, I thought you're not supposed to specify -lpthread explicitly -- that is, use -pthread when compiling/linking instead. info gcc only mentions -pthread for Solaris 2, _RS/6000 and PowerPC and says: Add support for multithreading using the POSIX threads library. This option sets flags for both the preprocessor and linker. This option does not affect the thread safety of object code produced by the compiler or that of libraries supplied with it. No preprocessor option are needed, so -lpthread is the right thing to do here, afaik. -lc should not be added. Not all systems use librt, and it is also not portable. I think MinGW might not. All of these things should be set properly based on configure checks. Yeah it will depend for which platform the build is made. The pkg-config file is only generated and installed if CMake finds pkg-config Q1: it seems unwise to hard-code /lib in a few places, what if lib64 is used or something else? Autotools can set --libdir IIRC, which works around it as such: ${prefix}/${libdir} Or at least, it has *something* like this, which I cannot recall the name of off the top of my head. Q2: Should x265.pc have a version number like x265-0.4.1.pc? No. This demeans the entire point of pkg-config. The version is set in the .pc file, and it is what should be checked by end users, via pkg-config. - Derek ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] cmake: generate and install pkgconfig file
Le 23/10/2013 06:12, Steve Borho a écrit : On Tue, Oct 22, 2013 at 5:59 PM, Rafaël Carré fun...@videolan.org wrote: Hi Steve, Le 23/10/2013 00:20, Steve Borho a écrit : # HG changeset patch # User Steve Borho st...@borho.org # Date 1382480398 18000 # Tue Oct 22 17:19:58 2013 -0500 # Node ID f51a70b352878bb64c71cbcdc40898a9706db2cf # Parent 6d96d64c4e9a2c526b57274760a7147241328cb3 cmake: generate and install pkgconfig file Feedback appreciated; what is this missing? diff -r 6d96d64c4e9a -r f51a70b35287 source/CMakeLists.txt --- a/source/CMakeLists.txt Tue Oct 22 23:36:36 2013 +0530 +++ b/source/CMakeLists.txt Tue Oct 22 17:19:58 2013 -0500 @@ -189,6 +189,13 @@ ARCHIVE DESTINATION lib) install(FILES x265.h ${PROJECT_BINARY_DIR}/x265_config.h DESTINATION include) +if(UNIX AND NOT APPLE) Hm this should always be installed, think about cross compilation. In VLC we use pkg-config on both OSX and when cross compiling our Windows binaries (with custom install prefixes in both cases). Is it possible to disable installation only when targetting MSVC ? dead easy; but would it be better if I checked for whether pkgconfig was available? Not sure if it is a good idea as pkg-config is not necessarily present. e.g. debian packages are often made in a chroot with only the strict minimal build requirements, and as x265 only depends on yasm pkg-config would not be installed. + # Produce a pkg-config file for linking against the shared lib + configure_file(x265.pc.in x265.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/x265.pc + DESTINATION ${PROJECT_LIBRARY_INSTALL_DIR}/pkgconfig) PROJECT_LIBRARY_INSTALL_DIR is not defined for me, I replaced it with ${CMAKE_INSTALL_PREFIX}/lib locally. ok +endif() + if(NOT WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake diff -r 6d96d64c4e9a -r f51a70b35287 source/x265.pc.in --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/source/x265.pc.in Tue Oct 22 17:19:58 2013 -0500 @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: @CMAKE_PROJECT_NAME@ +Description: H.265/HEVC video encoder +Version: @X265_LATEST_TAG@ +Libs: -L${libdir} -lx265 For static linking to work, this also needs: Libs.private: -lstdc++ -lm -lpthread Does this work? Libs.private: @CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@ @PLATFORM_LIBS@ Some processing is needed: this expands to Libs.private: stdc++;m;c pthread;m;rt ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] cmake: generate and install pkgconfig file
Hi Steve, Le 23/10/2013 00:20, Steve Borho a écrit : # HG changeset patch # User Steve Borho st...@borho.org # Date 1382480398 18000 # Tue Oct 22 17:19:58 2013 -0500 # Node ID f51a70b352878bb64c71cbcdc40898a9706db2cf # Parent 6d96d64c4e9a2c526b57274760a7147241328cb3 cmake: generate and install pkgconfig file Feedback appreciated; what is this missing? diff -r 6d96d64c4e9a -r f51a70b35287 source/CMakeLists.txt --- a/source/CMakeLists.txt Tue Oct 22 23:36:36 2013 +0530 +++ b/source/CMakeLists.txt Tue Oct 22 17:19:58 2013 -0500 @@ -189,6 +189,13 @@ ARCHIVE DESTINATION lib) install(FILES x265.h ${PROJECT_BINARY_DIR}/x265_config.h DESTINATION include) +if(UNIX AND NOT APPLE) Hm this should always be installed, think about cross compilation. In VLC we use pkg-config on both OSX and when cross compiling our Windows binaries (with custom install prefixes in both cases). Is it possible to disable installation only when targetting MSVC ? + # Produce a pkg-config file for linking against the shared lib + configure_file(x265.pc.in x265.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/x265.pc + DESTINATION ${PROJECT_LIBRARY_INSTALL_DIR}/pkgconfig) PROJECT_LIBRARY_INSTALL_DIR is not defined for me, I replaced it with ${CMAKE_INSTALL_PREFIX}/lib locally. +endif() + if(NOT WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake diff -r 6d96d64c4e9a -r f51a70b35287 source/x265.pc.in --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/source/x265.pc.in Tue Oct 22 17:19:58 2013 -0500 @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: @CMAKE_PROJECT_NAME@ +Description: H.265/HEVC video encoder +Version: @X265_LATEST_TAG@ +Libs: -L${libdir} -lx265 For static linking to work, this also needs: Libs.private: -lstdc++ -lm -lpthread +Cflags: -I${includedir} ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] cmake: generate and install pkgconfig file
Le 23/10/2013 01:17, Derek Buitenhuis a écrit : On 10/22/2013 11:59 PM, Rafaël Carré wrote: For static linking to work, this also needs: Libs.private: -lstdc++ -lm -lpthread That only makes sense on GNU systems. Sorry, I don't understand why it doesn't apply to OSX or Windows, or BSDs ? ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] ratecontrol: initialize frameThreads
https://bitbucket.org/multicoreware/x265/commits/3fe9a9d0a0b6279643c9272805f4d9b46c2cdcd9 =?utf-8?b?UmFmYcOrbCBDYXJyw6kgPGZ1bm1hbkB2aWRlb2xhbi5vcmc+?= committed Indeed :) I am sending these from my git hg clone with git send-email. Any idea how to make these patches more smooth from hg point of view? http://stackoverflow.com/questions/2626898/mercurial-copy-patch-to-repository seems to say hg import should work. How did you apply this one? Thanks, Le 21/10/2013 18:47, Deepthi Nandakumar a écrit : Pushed this - but the user name has not been configured properly. On Mon, Oct 21, 2013 at 6:16 PM, Rafaël Carré fun...@videolan.org wrote: Fix a floating point exceptio --- source/encoder/ratecontrol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp index b588bde..9085ec3 100644 --- a/source/encoder/ratecontrol.cpp +++ b/source/encoder/ratecontrol.cpp @@ -129,6 +129,7 @@ void RateControl::calcAdaptiveQuantFrame(TComPic *pic) RateControl::RateControl(TEncCfg * _cfg) { this-cfg = _cfg; +frameThreads = cfg-param.frameNumThreads; bitrate = cfg-param.rc.bitrate * 1000; frameDuration = 1.0 / cfg-param.frameRate; ncu = (int)((cfg-param.sourceHeight * cfg-param.sourceWidth) / pow((int)cfg-param.maxCUSize, 2.0)); -- 1.8.3.2 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] getopt: grab an unambiguously LGPL version of getopt
Le 17/10/2013 02:31, Steve Borho a écrit : On Tue, Oct 15, 2013 at 8:35 AM, Rafaël Carré fun...@videolan.org wrote: Hi Steve, Le 14/10/2013 20:55, Steve Borho a écrit : # HG changeset patch # User Steve Borho st...@borho.org # Date 1381776922 18000 # Mon Oct 14 13:55:22 2013 -0500 # Node ID b6cca1b1a9b700a8ffc316f3186dbf10bc1149cc # Parent abae6903e0af0d9940bb734ba34dff6928d72e61 getopt: grab an unambiguously LGPL version of getopt Found at: https://github.com/Tietew/mediawiki-xml2sql/tree/master/getopt The only change made was to move getopt_long() into getopt.c from getopt1.c Why not take it directly from upstream? https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/getopt.c;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/getopt.h;hb=HEAD Does this version has MSVC specific changes? Yeah, as it turned out these upstream files won't build on MSVC without substantial work; which defeats the purpose for why we're borrowing them. OK, it's not worth spending much time on this, just take the version that is working. ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] x265 : Removed unused x265opts
Hello, Le 16/10/2013 12:36, Gopu Govindaswamy a écrit : # HG changeset patch # User Gopu Govindaswamy g...@multicorewareinc.com # Date 1381919772 -19800 # Node ID d84ba96117b5c9f41361967211f524d459c2cd0b # Parent 1b69368780ab4fe67349e089d6bf10482c9dbed4 x265 : Removed unused x265opts diff -r 1b69368780ab -r d84ba96117b5 source/CMakeLists.txt --- a/source/CMakeLists.txt Wed Oct 16 15:58:35 2013 +0530 +++ b/source/CMakeLists.txt Wed Oct 16 16:06:12 2013 +0530 @@ -211,7 +211,7 @@ endif() add_executable(cli ../COPYING ${InputFiles} ${OutputFiles} - x265.cpp x265opts.h x265.h + x265.cpp x265.h compat/msvc/getopt.c compat/msvc/getopt.h) target_link_libraries(cli x265-static ${PLATFORM_LIBS}) set_target_properties(cli PROPERTIES OUTPUT_NAME x265) diff -r 1b69368780ab -r d84ba96117b5 source/x265opts.h --- a/source/x265opts.h Wed Oct 16 15:58:35 2013 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 + There is still an include x265opts.h in x265.cpp ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] x265: Implemented do_help() without using x265opts
Hello, Le 16/10/2013 11:19, Gopu Govindaswamy a écrit : # HG changeset patch # User Gopu Govindaswamy g...@multicorewareinc.com # Date 1381915132 -19800 # Node ID 5f173d255d550efefbbf63837bee5fe9d2d12f00 # Parent de3b1f54873c23189284f63f471d4c95440bacc6 x265: Implemented do_help() without using x265opts diff -r de3b1f54873c -r 5f173d255d55 source/x265.cpp --- a/source/x265.cpp Wed Oct 16 11:43:31 2013 +0530 +++ b/source/x265.cpp Wed Oct 16 14:48:52 2013 +0530 Looks good to me ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] x265 : option - long_options structure initialization without using x265opts
Hello, Le 16/10/2013 12:28, Gopu Govindaswamy a écrit : # HG changeset patch # User Gopu Govindaswamy g...@multicorewareinc.com # Date 1381919315 -19800 # Node ID 1b69368780ab4fe67349e089d6bf10482c9dbed4 # Parent 5f173d255d550efefbbf63837bee5fe9d2d12f00 x265 : option - long_options structure initialization without using x265opts diff -r 5f173d255d55 -r 1b69368780ab source/x265.cpp --- a/source/x265.cpp Wed Oct 16 14:48:52 2013 +0530 +++ b/source/x265.cpp Wed Oct 16 15:58:35 2013 +0530 Looks good to me, @@ -81,14 +81,79 @@ static const char short_options[] = o:f:F:r:i:b:s:q:m:hV; static struct option long_options[] = { I think this should be made const though although it was already not const before your patch :) ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
Re: [x265] [PATCH] common : Added new function x265_param2string
Hello, Le 16/10/2013 13:50, Gopu Govindaswamy a écrit : # HG changeset patch # User Gopu Govindaswamy g...@multicorewareinc.com # Date 1381924237 -19800 # Node ID 5ad0aaa72d6ef149a63cd979751c86b3fed48855 # Parent d84ba96117b5c9f41361967211f524d459c2cd0b common : Added new function x265_param2string diff -r d84ba96117b5 -r 5ad0aaa72d6e source/common/common.cpp --- a/source/common/common.cppWed Oct 16 16:06:12 2013 +0530 +++ b/source/common/common.cppWed Oct 16 17:20:37 2013 +0530 That file looks good, diff -r d84ba96117b5 -r 5ad0aaa72d6e source/common/common.h --- a/source/common/common.h Wed Oct 16 16:06:12 2013 +0530 +++ b/source/common/common.h Wed Oct 16 17:20:37 2013 +0530 @@ -73,6 +73,7 @@ #define MAX_NAL_UNITS 5 #define MIN_FIFO_SIZE 1000 #define EMULATION_SIZE 1000 +#define PARAM_BUFF_SIZE 5000 I think this value does not need to be put in a header, there is no point in sharing it with other files. #define CHECKED_MALLOC(var, type, count)\ {\ @@ -114,5 +115,6 @@ int x265_check_params(x265_param_t *param); void x265_print_params(x265_param_t *param); int x265_set_globals(x265_param_t *param); +char *x265_param2string( x265_param_t *p); #endif // ifndef X265_COMMON_H Thanks, can't wait for x265_param_parse :) ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel
[x265] [PATCH] library header: use #ifdef __cplusplus
Remove a warning when using from C --- source/x265.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/x265.h b/source/x265.h index a5affe4..339ea17 100644 --- a/source/x265.h +++ b/source/x265.h @@ -26,7 +26,7 @@ #include stdint.h -#if __cplusplus +#ifdef __cplusplus extern C { #endif @@ -344,7 +344,7 @@ voidx265_encoder_close(x265_t *, double *globalPsnr); */ void x265_cleanup(void); -#if __cplusplus +#ifdef __cplusplus } #endif -- 1.8.1.2 ___ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel