Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th December 2009, 03:43   #1  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
x264 win32 build

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!
dy_dragon is offline   Reply With Quote
Old 15th December 2009, 03:50   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
You don't. Use MinGW.
Dark Shikari is offline   Reply With Quote
Old 15th December 2009, 05:59   #3  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
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.
dy_dragon is offline   Reply With Quote
Old 15th December 2009, 06:27   #4  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Whoever said Linux? I program on Windows.

There's even a nice guide to compiling x264 on Windows.
Dark Shikari is offline   Reply With Quote
Old 15th December 2009, 06:56   #5  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
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.
dy_dragon is offline   Reply With Quote
Old 15th December 2009, 07:02   #6  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by dy_dragon View Post
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.
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.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 15th December 2009, 07:23   #7  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
Quote:
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.
dy_dragon is offline   Reply With Quote
Old 15th December 2009, 07:51   #8  |  Link
ChronoCross
Does it really matter?
 
ChronoCross's Avatar
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
Quote:
Originally Posted by dy_dragon View Post
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.
ChronoCross is offline   Reply With Quote
Old 15th December 2009, 08:19   #9  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
Quote:
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?
dy_dragon is offline   Reply With Quote
Old 15th December 2009, 08:28   #10  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by dy_dragon View Post
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...
Dark Shikari is offline   Reply With Quote
Old 15th December 2009, 16:43   #11  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 15th December 2009, 18:38   #12  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Code that must be modified or implemented:

1) Statement before declaration.
2) log2f and round:
Code:
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)
Code:
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
Code:
uint64_t dbl2int( double value )
{
    return (union {double f; uint64_t i;}){value}.i;
}
5) #define S_ISREG(x) (((x) & 0xF000) == 0x8000)
roozhou is offline   Reply With Quote
Old 15th December 2009, 19:00   #13  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Using inline asm for log2f?! Why not just use #define log2f(x) (log(x)/log(2))?
Dark Shikari is offline   Reply With Quote
Old 15th December 2009, 19:14   #14  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by Dark Shikari View Post
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.
roozhou is offline   Reply With Quote
Old 16th December 2009, 06:08   #15  |  Link
dy_dragon
Registered User
 
Join Date: Feb 2008
Posts: 32
roozhou, thank you.
I've complied the x264 in vc sucessfully under your help.
dy_dragon is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.