Comments (28)
Indeed, https://travis-ci.com/intel/SVT-HEVC/jobs/180097899
Edit: Wrong one.
from svt-hevc.
Segmentation fault when using mingw-gcc. Seems to work with mingw clang though
from svt-hevc.
Well, the least that you could and should do is release a Windows binary. And drop the CMake nonsense entirely. Nobody should be forced to use Visual Studio when the goal is create a command-line application.
from svt-hevc.
Appveyor will be implemented once they transfer the repo to OpenVisualCloud from Intel. I do want the program to be able to work with mingw though.
from svt-hevc.
@filler56789 and @1480c1 for posting the question. I agree that another build option should be provided on Windows. Since MinGW-clang works, could you work on a PR to update the README for the instruction to build with clang on Windows? Thank you!
from svt-hevc.
@filler56789 and @1480c1 for posting the question. I agree that another build option should be provided on Windows. Since MinGW-clang works, could you work on a PR to update the README for the instruction to build with clang on Windows? Thank you!
Sure, however I would probably wait until the cmakefiles are edited since if compiled as is, it will only compile with -march=x86_64 and no other flags since the cmakefiles only list gnu GCC and Intel and not clang. The fPIE and fPIC flags will need to be separated with if not mingw and the optimize unroll loops will need to use if clang pragma since clang doesn't support __attribute optimize unroll loop thing. Might submit a pr later if I can make sure it works.
from svt-hevc.
It seems I have lied on the mingw-clang being able be usable. It will compile without error and there is no segmentation faults with the resulting file. However, the output video file looks like:
Which I am pretty sure is not intended.
from svt-hevc.
Yet another problem:
please consider replacing "#ifdef _MSC_VER" with "#if defined(_WIN32) || defined(_WIN64)" in EbAppMain.c,
otherwise stdin and stdout will NOT work with the MinGW-w64 builds.
By the way, stdin apparently does not work with the INTEL compiler builds either.
from svt-hevc.
@filler56789 Thanks for pointing out the MACRO. Do you mind submitting a new PR for that? Thanks!
from svt-hevc.
please consider replacing "#ifdef _MSC_VER" with "#if defined(_WIN32) || defined(_WIN64)" in EbAppMain.c,
Checking _WIN64
is redundant here since _WIN32
is defined on both x86 and x64 Windows, hence simply checking _WIN32
is sufficient.
from svt-hevc.
When replacing _MSC_VER with _WIN32 when appropriate, It compiles, however it will segfault.
When running through gdb,
Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000000040724e in main (argc=2, argv=0x7b4be0)
at C:/msys64/home/cddeg/SVT-HEVC/Source/App/EbAppMain.c:79
79 int32_t main(int32_t argc, char *argv[]) {
Dr. Memory
~~Dr.M~~ Dr. Memory version 1.11.17952
~~Dr.M~~ Running "C:\msys64\home\cddeg\SVT-HEVC\Bin\Debug\SvtHevcEncApp.exe -help"
~~Dr.M~~
~~Dr.M~~ Error #1: UNADDRESSABLE ACCESS: reading 0x0000000000000000-0x0000000000000008 8 byte(s)
~~Dr.M~~ # 0 main [C:/msys64/home/cddeg/SVT-HEVC/Source/App/EbAppMain.c:79]
~~Dr.M~~ Note: @0:00:00.512 in thread 11692
~~Dr.M~~ Note: instruction: mov %fs:0x00 -> %rax
~~Dr.M~~ Fetching 1 symbol files...
~~Dr.M~~ [1/1] Fetching symbols for C:\WINDOWS\System32\msvcrt.dll
~~Dr.M~~ Fetched 1 symbol files successfully
~~Dr.M~~ WARNING: application exited with abnormal code 0xc0000005
It will also give a warning (Probably because it is gcc8.2, Probably need an ignore for it.)
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:116:25: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U32, EBhar *, unsigned int, unsigned char *, unsigned int, unsigned int, unsigned in
/*5 */ (EB_SADKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:118:25: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U32, EBhar *, unsigned int, unsigned char *, unsigned int, unsigned int, unsigned in
/*7 */ (EB_SADKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:132:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*5 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:134:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*7 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:144:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*5 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:146:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*7 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
In file included from C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbProductCo
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:116:25: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U32, EBhar *, unsigned int, unsigned char *, unsigned int, unsigned int, unsigned in
/*5 */ (EB_SADKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:118:25: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U32, EBhar *, unsigned int, unsigned char *, unsigned int, unsigned int, unsigned in
/*7 */ (EB_SADKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:132:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*5 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:134:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*7 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:144:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*5 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
C:/msys64/home/cddeg/SVT-HEVC/Source/Lib/Codec/EbComputeSAD.h:146:29: warning: cfrom 'void (*)()' to 'EB_U32 (*)(EB_U8 *, EB_U32, EB_U8 *, EB_U32, EB_U8 *, EBint (*)(unsigned char *, unsigned int, unsigned char *, unsigned int, unsignednsigned int)'} [-Wcast-function-type]
/*7 */ (EB_SADAVGKERNELNxM_TYPE)NxMSadKernelVoidFunc,
^
from svt-hevc.
@filler56789 can you confirm that this builds with mingw? Don't use build.sh since it doesn't specify the generator ( I will submit a redo ). Do
cd Build/linux
cmake ../.. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make -j $(nproc)
modifying the Unix Makefiles to Mingw Makefiles if you don't use msys2 or something similar
from svt-hevc.
@filler56789 can you confirm that this builds with mingw? Don't use build.sh since it doesn't specify the generator ( I will submit a redo ). Do
cd Build/linux cmake ../.. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release make -j $(nproc)modifying the Unix Makefiles to Mingw Makefiles if you don't use msys2 or something similar
Regardless of the chosen makefile type, this is the error I get when trying to compile the messy code:
[ 95%] Building C object Source/Lib/Codec/CMakeFiles/SvtHevcEnc.dir/EbUtility.c.obj
Linking C shared library ../../../../../Bin/Release/libSvtHevcEnc.dll
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o::(.text+0xb76): undefined reference to __stack_chk_fail' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o:<artificial>:(.text+0x1167): undefined reference to
__stack_chk_fail'
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o::(.text+0x1516): undefined reference to __stack_chk_fail' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o:<artificial>:(.text+0x17d9): undefined reference to
__stack_chk_fail'
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o::(.text+0x1fad): undefined reference to __stack_chk_fail' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o:<artificial>:(.text+0x2a6e): more undefined references to
__stack_chk_fail' follow
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans0.ltrans.o::(.rdata$.refptr.__stack_chk_guard[.refptr.__stack_chk_guard]+0x0): undefined reference to __stack_chk_guard' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o:<artificial>:(.text+0x1086): undefined reference to
__stack_chk_fail'
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o::(.text+0x113c): undefined reference to __stack_chk_fail' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o:<artificial>:(.text+0x14e7): undefined reference to
__stack_chk_fail'
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o::(.text+0x1841): undefined reference to __stack_chk_fail' r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o:<artificial>:(.text+0x1c35): undefined reference to
__stack_chk_fail'
r:/make6t4/gccs64/910/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: R:\MAKE6T4\tmp\libSvtHevcEnc.dll.98zQme.ltrans1.ltrans.o::(.text+0x1d46): more undefined references to `__stack_chk_fail' follow
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Source/Lib/Codec/CMakeFiles/SvtHevcEnc.dir/build.make:1943: ../../Bin/Release/libSvtHevcEnc.dll] Error 1
make[1]: *** [CMakeFiles/Makefile2:113: Source/Lib/Codec/CMakeFiles/SvtHevcEnc.dir/all] Error 2
make: *** [Makefile:117: all] Error 2
from svt-hevc.
@filler56789, how did you get your mingw-w64 gcc?
from svt-hevc.
@ 1480c1 — I compile my own builds of GCC by using the script created by Zeranoe and modified by nevcairiel. I have an MSYS2 environment that I downloaded three years ago and it keeps working as expected so far.
from svt-hevc.
@filler56789, can you try compiling from https://github.com/1480c1/SVT-HEVC/tree/testmingw on the testmingw branch? It doesn't add stack-protector-strong if mingw, which should be the reason why you are getting those errors. I myself am not able to reproduce with the msys2 pacman supplied gcc, I will try to use zeranoe's script to build one and test
from svt-hevc.
Yes, now the damn thing gets to be compiled.
Now all that it needs is an entire usability refactoring, so to speak.
The help screen is not very helpful and the following error message is very useless too:
"SVT [Error]: Instance 1: Input yuv does not contain enough frames"
What the devil does that mean?
from svt-hevc.
Probably it either did not detect a y4m header to read the height, width, fps from or it was not supplied. The printed text does need a lot of help on the readability side
from svt-hevc.
OR the stdin support simply sucks. FWIW, x265 reads the input from avs2yuv without a problem.
from svt-hevc.
It doesn't add stack-protector-strong if mingw, which should be the reason why you are getting those errors. I myself am not able to reproduce with the msys2 pacman supplied gcc, I will try to use zeranoe's script to build one and test
PERHAPS it's because my GCC stuff uses MinGW-w64 6.0.0 (surely) and yours (possibly /probably) still uses MingW-w64 version 5.0.x. Already in 2016 I learned to mistrust the GCC from MSYS2's pacman. Recently some members of the Doom9 forum were unable to build x265.exe with the 32-bit GCC 8.3.0 because the ADA compiler (which "nobody uses") refused to be included in the 32-bit package and so pacman gave them only the 64-bit edition of GCC 8.3.0 🤦♀️
from svt-hevc.
gcc.exe (Rev2, Built by MSYS2 project) 9.1.0
from svt-hevc.
So is your gcc 9.1.0 or 6.0.0?
from svt-hevc.
GCC = 9.1.0, MinGW-w64 = 6.0.0.
from svt-hevc.
Interestingly, msys2/MINGW-packages@7e59389 adds back in ada. I was wondering why it was wasn't present in pacman, I didn't update the database.
from svt-hevc.
@filler56789, can you try using ./build.sh -- -G"Unix Makefiles"
now (Replace "Unix Makefiles" with whatever generator you want) ? I think it should be better.
from svt-hevc.
Yeah, it compiled fine (again).
Now I need EXACT instructions of how to make the stupid .exe read the stdin from avs2yuv.
The error message "wrote only 1377271 of 1382400 bytes" is completely useless.
from svt-hevc.
Also:
"invalid input file"
What does it "think" is a valid input file?
And nope, I am not gonna create a huge .y4m file only for testing a sub-alpha code.
This is not 2013 anymore and I am not testing the old x265 anymore.
from svt-hevc.
Anyway, consider this issue closed, even though the binary remains useless to me.
from svt-hevc.
Related Issues (20)
- FFMPEG compile failing again HOT 3
- Could Not Allocate Enough Memory For Channel 1 HOT 2
- Methods to improve the coding quality of SVtheVC encoder HOT 3
- [BUILD FAILED] Looking for some alternatives about `immintrin.h` HOT 1
- Is it possible to control bitrate by frame or window level? HOT 2
- Patching ffmpeg failed -> solution HOT 2
- Whether or not, at most only *two* pictures can be referenced by a frame?
- Whether or not, at most only *two* pictures can be referenced by a frame? HOT 2
- memory exhaustion when encodig 4K UHD 4:4:4 10-bit video HOT 3
- Reading from stdin don't work for me
- Reading from stdin doesn't work HOT 2
- The output stream of test using the same parameters inconsistent HOT 2
- the derivation of lambdaModeDecisionLdSad
- FFmpeg SVT-HEVC stress test failed HOT 1
- how obtain the YUV media files? HOT 1
- How to use ffmpeg svt-hevc encoding to start TileSliceMode mode, can you give an example of the command
- Can't apply patch on FFmpeg 6.0 HOT 10
- Feature request: log callback
- FFMPEG: Couldn't apply patch for SVT-HEVC encoder while building FFMPEG for 64 bit Windows. HOT 2
- Output(s) from FFmpeg's `libsvt_hevc` encoder wrapper cannot be packaged via `shaka-packager` unless `forced-idr 1` is set.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svt-hevc.