Log in

View Full Version : x264 compilation


Pages : 1 2 3 4 5 6 7 8 9 [10] 11

Cef
15th July 2007, 09:48
In my builds, strtok_r is coming from pthread.h
#if !defined(__MINGW32__)
#define strtok_r( _s, _sep, _lasts ) \
( *(_lasts) = strtok( (_s), (_sep) ) )
#endif /* !__MINGW32__ */

bob0r
15th July 2007, 13:16
Yeah, same here, but i get that error anyway.
Hopefully pengvado returns soon and we can have this fixed.
I am sure he will know what to do.

Cef
15th July 2007, 13:34
Are you sure __MINGW32__ isn't defined ? You shouldn't get "undefined reference to `strtok_r'" since this define replaces strtok_r with a call to strtok.
I'm getting the same error when I try to compile without HAVE_PTHREAD

bob0r
15th July 2007, 13:52
Ok, a kind friend in #x264 told me temp solution for Mingw:

file: encoder/ratecontrol.c


#include <assert.h>

#include "common/common.h"


Change to, add:


#include <assert.h>

#if defined(__MINGW32__)
#define strtok_r( _s, _sep, _lasts ) \
( *(_lasts) = strtok( (_s), (_sep) ) )
#endif /* __MINGW32__ */

#include "common/common.h"


For Cygwin users:


#include <assert.h>

#if defined(SYS_CYGWIN)
#define strtok_r( _s, _sep, _lasts ) \
( *(_lasts) = strtok( (_s), (_sep) ) )
#endif /* SYS_CYGWIN*/

#include "common/common.h"

TheRyuu
15th July 2007, 19:46
Well, x264 seems to be completely random when it comes to compiling it.
The above does help.

I'm sure there's something I must be doing, but I'm just not sure what it is.

I keep getting this "invalid operands in non-64bit mode" or something like that. So annoying.

I managed to get it compiled a few times. Then it doesn't compile anymore when god knows what happened.

I also sometimes get this non-referenced error to some ssse3 files. No idea where they came from.

TheRyuu
21st July 2007, 17:34
I can successfully build x264. I can also now consistently build x264 :)

Problem is now my build is crashing.
Not only do I get these errors on the first pass, but the second pass doesn't even run.
http://img522.imageshack.us/img522/3927/x264builderrorcc4.jpg

I get the error with GCC 4.3.0 (experimental), GCC 4.2.0 (latest stable), and even the fall back stable GCC 3.4.4.
This is with our without custom flags.

I don't get what I'm doing wrong. Everything seems to build fine.

I'd love to know what I'm doing wrong.
Thanks. :thanks:

@Cef
What flags are you using to compile x264? (probably been asked before)
I'm not getting an exe near the size of the one you release in your builds. Does it have something to do with -march=i686 with -mtune=pentium3 (as an example, using both march and mtune?)

squid_80
22nd July 2007, 01:54
Those errors are coming from your source (are you using ffmpegsource?) not x264.

TheRyuu
22nd July 2007, 03:05
Those errors are coming from your source (are you using ffmpegsource?) not x264.

Well, I'm using the x264 SVN, and I've also tried the source from the page were Cef's builds are. Both give me that.

Oh, you mean the source of the file.
Well, I'm using directshowsource. Only the difference is Cef's builds don't give me that error. My builds do.

Why?

:thanks:

squid_80
22nd July 2007, 03:41
Because the matroska @ errors and the libavcodec message aren't coming from x264 at all, they're being spit out by libavcodec which is probably being used by ffdshow, which is probably being used by directshowsource to decode the original video. It's not an x264 issue.

TheRyuu
22nd July 2007, 05:31
Because the matroska @ errors and the libavcodec message aren't coming from x264 at all, they're being spit out by libavcodec which is probably being used by ffdshow, which is probably being used by directshowsource to decode the original video. It's not an x264 issue.

Yes, but why are Cef's build NOT giving me that error on the same file that my builds are?
Is there an option that may be set differently so that Cef's builds are still getting the error only I'm not seeing it? (like debug mode is enabled on mine?)

And yes, libavcodec is being used by ffdshow for the file.

But the fact that Cef's builds are working and mine aren't is what is bothering me. I'll try a d2v source next. See if I get any errors.

TheRyuu
22nd July 2007, 18:40
Well, my builds just seem to be full of problems.
Now I can build it (consistently), and run it without the error (was the source, and it was using ffmpegsource, switched it to directshowsource())

Now, my second pass always crashes it.
Always something isn't it.

I'm real close to just giving up and using Cef's builds :)

:thanks:

Sagittaire
19th September 2007, 14:15
http://forum.doom9.org/showthread.php?p=723782#post723782

It's really good and simple faq ... :goodpost:

But how enable multithread ... ?


configure --enable-avis-input --enable-mp4-output --enable-pthread --extra-cflags="-Ic:/gpac/include" --extra-ldflags="-Lc:/gpac/bin/gcc"

Don't work for me ... ???

Dark Shikari
19th September 2007, 15:14
http://forum.doom9.org/showthread.php?p=723782#post723782

It's really good and simple faq ... :goodpost:

But how enable multithread ... ?


configure --enable-avis-input --enable-mp4-output --enable-pthread --extra-cflags="-Ic:/gpac/include" --extra-ldflags="-Lc:/gpac/bin/gcc"

Don't work for me ... ???It'll enable automatically if you have the proper libraries installed in GCC. You need pthreads for windows, I believe.

Sharktooth
19th September 2007, 15:29
yep, get pthread for win and it will work.
i usually compile myself pthreads with -O3 -march=pentium2 -fomit-frame-pointer too

Sagittaire
19th September 2007, 15:31
yep, get pthread for win and it will work.
i usually compile myself pthreads with -O3 -march=pentium2 -fomit-frame-pointer too

Where I can find pthread for win?

Dark Shikari
19th September 2007, 15:52
yep, get pthread for win and it will work.
i usually compile myself pthreads with -O3 -march=pentium2 -fomit-frame-pointer too
Add -funroll-loops to that, very useful.

Sharktooth
19th September 2007, 16:10
i think it's already there too... ;)

@Sagittaire: http://sourceware.org/pthreads-win32/

Sagittaire
19th September 2007, 22:27
i think it's already there too... ;)

@Sagittaire: http://sourceware.org/pthreads-win32/

last question ... :helpful:

where install these .dll, .lib ... ???

bob0r
19th September 2007, 22:53
cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/pthreads-win32 checkout pthreads

configure
make clean GC-static
copy *.h to include dir
copy libpthreadGC2.a to lib dir

muneebel
6th October 2007, 14:59
Hi All

I have am new to x264. I have downloaded snapshot of x264. I want to compile x264 under linux. when I ran the configure script and ran make it compiles successfully. But when I ran the configure script and want to compile it under the code::blocks IDE using gcc under linux I get error messages. I have checked the source tree and there are some files in the encoder and common folder that have the same name and I think thats where the problem lies. I would appreciate if anyone can help me in compiling the x264 under Linux IDE environment such as code::blocks.

Thanks

vicfred
8th October 2007, 07:32
im gettin this error when i use configure (i used hpn tutorial)

Vicfred@PC /c/gpac
$ configure
error: zlib not found on system or in local libs

any idea?

foxyshadis
8th October 2007, 08:57
gpac compilation doesn't really go here, but the message is pretty explicit. You just need to download zlib, make and make install it. (Along with any dependencies it may have... lots of fun chasing down everything the first time.)

mitsubishi
13th January 2008, 19:43
Has anyone got any hints to compiling with VS2008? I got it compiled and running fine, but only with pthreads.dll. It runs as quick as official builds single threaded, but is a bit slower multithreaded. I managed to convince it to compile with pthreads statically, but then it throws an exception when running :(

I don't suppose it really matters, since I don't know c, so it's unlikely I can contribute, I just wanted to find out more about how rate control works for something I was working on, which I can do as-is.

EDIT: NM, I fixed it, I had defined "PTW32_STATIC_LIB" in libx264, but not in x264 project

mitsubishi
14th January 2008, 19:10
For those that are interested, it appears to be a fraction quicker when compiled with VS2008 to the x264.nl builds, on my machine at least. Over a series of tests, I'm getting a 1%ish increase.

The quickest build I got (this is really far too close to call though, so a fairly meaningless statement) seemed to be with yasm and not telling VS to use SSE2.

hpn
16th January 2008, 17:28
For those that are interested, it appears to be a fraction quicker when compiled with VS2008 to the x264.nl builds, on my machine at least. Over a series of tests, I'm getting a 1%ish increase.

Would you upload your build somewhere so I can test it?

mitsubishi
16th January 2008, 18:23
Would you upload your build somewhere so I can test it?

Sure, this is the one which seemed fastest on my my c2d: http://www.mediafire.com/?dsz3znil34l

BTW it was built from svn 719 and doesn't contain mp4 support.

bob0r
27th January 2008, 18:21
Compiling Gpac lib on Mingw is broken:

cvs -z3 -d:pserver:anonymous@gpac.cvs.sourceforge.net:/cvsroot/gpac co -P gpac
cd gpac
configure
make lib

Results in:
gcc -O3 -fno-strict-aliasing -Wall -I/home/user/gpac/include -c -o terminal/inline.o terminal/inline.c
terminal/inline.c:1513: error: conflicting types for 'gf_inline_set_fragment_uri'
F:/msys/home/user/gpac/include/gpac/internal/terminal_dev.h:206: error: previous declaration of 'gf_inline_set_fragment_uri' was here
terminal/inline.c:1513: error: conflicting types for 'gf_inline_set_fragment_uri'
F:/msys/home/user/gpac/include/gpac/internal/terminal_dev.h:206: error: previous declaration of 'gf_inline_set_fragment_uri' was here
make[1]: *** [terminal/inline.o] Error 1
make[1]: Leaving directory `/home/user/gpac/src'
make: *** [lib] Error 2

What would be the best way of contacting the coder(s)?

bob0r
30th January 2008, 04:21
1.68 is compiling again :)

vicfred
8th February 2008, 09:30
i need some help installing pthreads to compile it with x264 source :)

trying this
http://forum.doom9.org/showpost.php?p=1046796&postcount=469

but i get this error when i try configure
Vicfred@MAGGIE ~/pthreads
$ ./configure
sh: ./configure: No such file or directory

leoenc
8th February 2008, 11:09
i need some help installing pthreads to compile it with x264 source :)


See end of this thread:
http://forum.doom9.org/showthread.php?t=134260&highlight=pthreads

bob0r
8th February 2008, 12:52
1: cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/pthreads-win32 checkout pthreads
2: cd pthreads
3: make clean GC-static
4: copy libpthreadGC2.a to your LIB dir.
5: copy pthread.h, sched.h and semaphore.h to your INCLUDE dir.

(6: run configure with no options for x264 and let it detect pthreads: pthread: yes)

techouse
9th February 2008, 01:28
Hey!

I tried cross compiling x264 with Debian Lenny/Sid (amd64) today and I can't seem to get pthreads working. Here's what I did:

1. apt-get install mingw32 mingw32-binutils mingw32-runtime
2. cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/pthreads-win32 checkout pthreads
3. cd pthreads
4. make CROSS=-i586-mingw32msvc- clean GC-static
5. cp libpthreadGC2.a /usr/i586-mingw32msvc/lib
6. cp pthread.h /usr/i586-mingw32msvc/include
7. cp semaphore.h /usr/i586-mingw32msvc/include
8. cp sched.h /usr/i586-mingw32msvc/include
9. cd x264
10. ./configure --host=i586-mingw32msvc

I got this output:

techouse@Mk2:/x264$ sudo ./configure --host=i586-mingw32msvc
Platform: X86
System: MINGW
avis input: yes
mp4 output: no
pthread: no
gtk: no
debug: no
gprof: no
PIC: no
shared: no
visualize: no

I got the same with these additional ./configure options:
--extra-cflags=-I/usr/i586-mingw32msvc/include
--extra-ldflags=-I/usr/i586-mingw32msvc/lib

--extra-cflags=-I/pthreads
--extra-ldflags=-I/pthreads



Can anyone help me out on this one?

EDIT

LOL! I just did the same thing on my laptop (Debian Lenny/Sid i386) and i get this output:

memi@Satellite:/x264$ sudo ./configure --host=i586-mingw32msvc
Platform: X86
System: MINGW
avis input: yes
mp4 output: no
pthread: yes
gtk: no
debug: no
gprof: no
PIC: no
shared: no
visualize: no

Must be cause I'm using i386.

EDIT v2

I get errors when running make.

memi@Satellite:/x264$ sudo ./configure --host=i586-mingw32msvc
Platform: X86
System: MINGW
avis input: yes
mp4 output: no
pthread: yes
gtk: no
debug: no
gprof: no
PIC: no
shared: no
visualize: no

You can run 'make' or 'make fprofiled' now.
memi@Satellite:/x264$ sudo make CROSS=-i586-mingw32msvc-
rm -f .depend
( echo -n "`dirname common/mc.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/mc.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/predict.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/predict.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/pixel.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/pixel.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/macroblock.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/macroblock.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/frame.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/frame.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/dct.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/dct.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/cpu.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/cpu.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/cabac.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/cabac.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/common.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/common.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/mdate.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/mdate.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/set.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/set.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/quant.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/quant.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/analyse.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/analyse.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/me.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/me.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/ratecontrol.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/ratecontrol.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/set.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/set.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/macroblock.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/macroblock.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/cabac.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/cabac.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/cavlc.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/cavlc.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/encoder.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/encoder.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname encoder/eval.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer encoder/eval.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/i386/mc-c.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/i386/mc-c.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname common/i386/predict-c.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer common/i386/predict-c.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname x264.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer x264.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname matroska.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer matroska.c -MM -g0 ) 1>> .depend; ( echo -n "`dirname muxers.c`/" && gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer muxers.c -MM -g0 ) 1>> .depend;
gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer -c -o x264.o x264.c
gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer -c -o matroska.o matroska.c
gcc -O4 -ffast-math -Wall -I. -DHAVE_MMX -DARCH_X86 -DSYS_MINGW -DHAVE_PTHREAD -s -fomit-frame-pointer -c -o muxers.o muxers.c
muxers.c:33:21: error: windows.h: No such file or directory
muxers.c:34:17: error: vfw.h: No such file or directory
muxers.c:328: error: expected specifier-qualifier-list before ‘PAVISTREAM’
muxers.c: In function ‘open_file_avis’:
muxers.c:335: error: ‘AVISTREAMINFO’ undeclared (first use in this function)
muxers.c:335: error: (Each undeclared identifier is reported only once
muxers.c:335: error: for each function it appears in.)
muxers.c:335: error: expected ‘;’ before ‘info’
muxers.c:340: warning: implicit declaration of function ‘AVIFileInit’
muxers.c:341: warning: implicit declaration of function ‘AVIStreamOpenFromFile’
muxers.c:341: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:341: error: ‘streamtypeVIDEO’ undeclared (first use in this function)
muxers.c:341: error: ‘OF_READ’ undeclared (first use in this function)
muxers.c:343: warning: implicit declaration of function ‘AVIFileExit’
muxers.c:347: warning: implicit declaration of function ‘AVIStreamInfo’
muxers.c:347: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:347: error: ‘info’ undeclared (first use in this function)
muxers.c:349: warning: implicit declaration of function ‘AVIStreamRelease’
muxers.c:349: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:355: warning: implicit declaration of function ‘MAKEFOURCC’
muxers.c:361: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:367: error: ‘avis_input_t’ has no member named ‘width’
muxers.c:369: error: ‘avis_input_t’ has no member named ‘height’
muxers.c: In function ‘get_frame_total_avis’:
muxers.c:386: error: ‘AVISTREAMINFO’ undeclared (first use in this function)
muxers.c:386: error: expected ‘;’ before ‘info’
muxers.c:388: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:388: error: ‘info’ undeclared (first use in this function)
muxers.c: In function ‘read_frame_avis’:
muxers.c:400: warning: implicit declaration of function ‘AVIStreamRead’
muxers.c:400: error: ‘avis_input_t’ has no member named ‘p_avi’
muxers.c:400: error: ‘avis_input_t’ has no member named ‘width’
muxers.c:400: error: ‘avis_input_t’ has no member named ‘height’
muxers.c: In function ‘close_file_avis’:
muxers.c:409: error: ‘avis_input_t’ has no member named ‘p_avi’
make: *** [muxers.o] Error 1
memi@Satellite:/x264$

Has anyone got any idea how to solve this windows.h and vfw.h (I HAVE THEM BOTH INSTALLED!!!) dependency error.

memi@Satellite:/usr/i586-mingw32msvc/include$ ls windows.h vfw.h
vfw.h windows.h

Henrikx
16th April 2008, 13:51
x264 core:59 r820+7 bd7b626 (Ubuntu 7.10)
What does mean +7?

SpAwN_gUy
17th April 2008, 09:36
does anyone has troubles with r821.. under MSVC?

i've changed frame.c from (diff from 820 to 821... part of..)
@@ -55,20 +56,20 @@ x264_frame_t *x264_frame_new( x264_t *h )
frame->i_stride[i] = i_stride >> !!i;
frame->i_width[i] = i_width >> !!i;
frame->i_lines[i] = i_lines >> !!i;
- CHECKED_MALLOC( frame->buffer[i],
- frame->i_stride[i] * (i_lines + 2*i_padv) >> !!i );
- frame->plane[i] = ((uint8_t*)frame->buffer[i]) +
- ((frame->i_stride[i] * i_padv + PADH) >> !!i);
}

- frame->filtered[0] = frame->plane[0];
- for( i = 0; i < 3; i++ )
+ luma_plane_size = (frame->i_stride[0] * ( frame->i_lines[0] + 2*i_padv ));
+ for( i = 1; i < 3; i++ )
{
- CHECKED_MALLOC( frame->buffer[4+i],
- frame->i_stride[0] * ( frame->i_lines[0] + 2*i_padv ) );
- frame->filtered[i+1] = ((uint8_t*)frame->buffer[4+i]) +
- frame->i_stride[0] * i_padv + PADH;
+ CHECKED_MALLOC( frame->buffer[i], luma_plane_size/4 );
+ frame->plane[i] = (uint8_t*)frame->buffer[i] + (frame->i_stride[i] * i_padv + PADH)/2;
}
+ /* all 4 luma planes allocated together, since the cacheline split code
+ * requires them to be in-phase wrt cacheline alignment. */
+ CHECKED_MALLOC( frame->buffer[0], 4*luma_plane_size);
+ for( i = 0; i < 4; i++ )
+ frame->filtered[i] = (uint8_t*)frame->buffer[0] + i*luma_plane_size + frame->i_stride[0] * i_padv + PADH;
+ frame->plane[0] = frame->filtered[0];

if( h->frames.b_have_lowres )
{ is it the proper solution?

audyovydeo
17th April 2008, 10:06
if anyone has made a windows build with visualize=yes, I'd love to try it. Even oldish version is OK.


cheers
a/v

SpAwN_gUy
17th April 2008, 10:20
if anyone has made a windows build with visualize=yes, I'd love to try it. Even oldish version is OK. .. and anyone knows what is needed? to compile with it?
some visualize library? (i guess i've seen some lib in linux for that)

UPD: i guess... it is NOT possible under Win (at least as i can see)... it is X11 (www.x.org) only.. and that is, Linux, Solaris and BSD systems...

btw... what does it do? outputs video in textmode?

nm
17th April 2008, 11:26
btw... what does it do? outputs video in textmode?
x264 --longhelp:
--visualize Show MB types overlayed on the encoded video

DarkZell666
17th April 2008, 11:50
x264 --longhelp:
--visualize Show MB types overlayed on the encoded video

Which means you'll have Dark Shikari's avatar all over the place :D

SpAwN_gUy
17th April 2008, 13:07
Which means you'll have Dark Shikari's avatar all over the place :D
yeah...looks like that :)
(i've found A picture: http://akuvian.org/src/x264/visualize.png )

what a shame... i thought, that i'd see lots of ASCIIart :(

btw... isn't one of the ffdshow's filters otputs motion vectors when video is played?

techouse
17th April 2008, 15:42
LOL :p

LoRd_MuldeR
24th April 2008, 00:56
According to Gruntster (Avidemux developer) the compilation of x264 as shared library (DLL) is broken on Win32 :(

x264 r826 is hereIt no longer compiles with MSVC6 and the MinGW compilation is still borked. It seems like no one else uses x264 as a DLL.


Can this be confirmed? And if so, any chance it will be fixed?

bob0r
24th April 2008, 03:22
Then http://files.x264.nl/libx264-59.826.dll is not working?
Let me know please...

LoRd_MuldeR
24th April 2008, 03:39
Nope, Avidemux simply fails with "Filter Init Faild" error message :o

I cannot see any error messages on the log...

LoRd_MuldeR
24th April 2008, 19:23
Bobor, where any patches included in your DLL?

Most important: x264.h changed? If so, this might explain the problem...


// EDIT

Gruntster has made a "patched" build with MSVC6 compiler and this one seems to work okay:
http://www.razorbyte.com.au/dev_dump/libx264_r828.zip

bob0r
25th April 2008, 03:09
Yes it is this build:
http://forum.doom9.org/showthread.php?p=1127870#post1127870

I should add modified to the .dll filename also, ill do this when i got time, then also compile a clean .dll for you to try :D

LoRd_MuldeR
25th April 2008, 03:43
Well, if the interface of the DLL has changed, it won't work with existing Avidemux builds for obvious reasons ;)
It seems Gruntster has manged to build a working x264 DLL with MSVC6. Fresh Avidemux build is available!

So this problem is solved for now...

Sagittaire
25th April 2008, 08:54
I have bug with all "git" version (error on cabac).
Someone can help to solve that.

bob0r
26th April 2008, 10:08
What error?

gigah72
23rd July 2008, 19:00
maybe someone can help me with my questions about compilation:
(using mingw 4.3.0 alpha)
1.
i made the pthread.a and put it into the lib folder, also the 3 *.h files in include folder. on configure pthreads is YES, but the resulting exe file needs the pthreads.dll to run. why?

2.
i wanted to apply 2 patches, progressindicator, psyrdo, but both fail:

Administrator@SDFBF-9RX23LR8A /c/x264
$ patch < x264.progress.indication.01.diff -p0
patching file `x264.c'
Hunk #2 succeeded at 776 (offset 25 lines).
Hunk #3 succeeded at 816 (offset -1 lines).
patch unexpectedly ends in middle of line
patch unexpectedly ends in middle of line


Administrator@SDFBF-9RX23LR8A /c/x264
$ patch < x264_psyRDO_0.5.diff -p0
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/common/common.c b/common/common.c
|index 71a29b1..301b9ed 100644
|--- a/common/common.c
|+++ b/common/common.c
--------------------------
File to patch: ./common/common.c
Skip this patch? [y] n
File to patch: /c/x264/common/common.c
Skip this patch? [y] n
File to patch:


source is downloaded with git clone.

3.
then i run make, the build just starts, with fprofiled, i'm asked for avisynthfiles. what do i have to type here, and what is the advantage of fprofiled?

LoRd_MuldeR
23rd July 2008, 19:03
Maybe "patch -p1 < x264_psyRDO_0.5.diff" works better? Make sure current directory is x264 root directory (that's where x264.h is located).