View Full Version : x264 win32 build
dy_dragon
15th December 2009, 03:43
The vc project (x264.sln) is removed from the win32 build. How can I create a vc project based on the newest x264 source code? Thanks!
Dark Shikari
15th December 2009, 03:50
You don't. Use MinGW.
dy_dragon
15th December 2009, 05:59
Thank you, Dark shikari. But I want to debug the x264 and test some algorithms on it ,and I'm not familiar with linux programing , so I want create a vc project.
Dark Shikari
15th December 2009, 06:27
Whoever said Linux? I program on Windows.
There's even a nice guide to compiling x264 on Windows (http://doom10.org/index.php?topic=26.0).
dy_dragon
15th December 2009, 06:56
I can use MinGW to compile the x264,but i am not familiar with the gdb debugger. So i want create a vc project to make the debug process easy.:p
kemuri-_9
15th December 2009, 07:02
I can use MinGW to compile the x264,but i am not familiar with the gdb debugger. So i want create a vc project to make the debug process easy.:p
Microsoft's C/C++ compiler (CL) does not support the C99 standard which is used fairly heavily by x264.
the lack of C99 support causes a fair number of compiling errors within such lacking compilers.
you'd need to compile with Intel's C/C++ windows platform compiler (ICL), which can support C99.
dy_dragon
15th December 2009, 07:23
the lack of C99 support causes a fair number of compiling errors within such lacking compilers
The feature of C99 used in x264 can be modified to suit to VC easily. At least x264-snapshot-20090604-2245 is easy to modified.
ChronoCross
15th December 2009, 07:51
The feature of C99 used in x264 can be modified to suit to VC easily. At least x264-snapshot-20090604-2245 is easy to modified.
Then why the thread? If it's so easy then it should be no problem for you to build an updated project.
dy_dragon
15th December 2009, 08:19
If it's so easy then it should be no problem for you to build an updated project
These is a vc project in x264-snapshot-20090604-2245. So I just need to modified some code to make it suit for vc.
However, this project is removed now.
Can I use the previous vc project (x264.sln, x264.vcproject) in current x264 version?
Dark Shikari
15th December 2009, 08:28
These is a vc project in x264-snapshot-20090604-2245. So I just need to modified some code to make it suit for vc.
However, this project is removed now.
Can I use the previous vc project (x264.sln, x264.vcproject) in current x264 version?Maybe, but I can't guarantee it. You may notice some new .c files...
LoRd_MuldeR
15th December 2009, 16:43
People are building x264 with ICL (see the "Current Patches" thread for details) and ICL integrates nicely into VisualStudio, so that may be the way to go.
Also note that you can get a free trial of ICL for 30 days. Then you simply request the next 30 days trial. And so on. It seems the trial version isn't restricted, except for the 30 days limit ;)
roozhou
15th December 2009, 18:38
Code that must be modified or implemented:
1) Statement before declaration.
2) log2f and round:
static inline int64_t round(double x)
{
__asm fld QWORD PTR x
__asm fistp QWORD PTR x
return *(int64_t*)&x;
}
static ALWAYS_INLINE double log2(int32_t x)
{
__asm{
fld1
fild x
fyl2x
}
}
3) line 3000 in encoder/analyse.c (r1373)
static const uint8_t check_mv_lists[X264_MBTYPE_MAX] = {[P_L0]=1, [B_L0_L0]=1, [B_L1_L1]=2};
4) output/flv_bitstream.c
uint64_t dbl2int( double value )
{
return (union {double f; uint64_t i;}){value}.i;
}
5) #define S_ISREG(x) (((x) & 0xF000) == 0x8000)
Dark Shikari
15th December 2009, 19:00
Using inline asm for log2f?! Why not just use #define log2f(x) (log(x)/log(2))?
roozhou
15th December 2009, 19:14
Using inline asm for log2f?! Why not just use #define log2f(x) (log(x)/log(2))?
I used to use #define log2f(x) (log(x)/log(2)), but it seems inline asm version generate faster and smaller code.
Since now log2f is only used to generate lut, performance of log2f doesn't really matter.
dy_dragon
16th December 2009, 06:08
roozhou, thank you.
I've complied the x264 in vc sucessfully under your help.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.