[x264-devel] Re: compiling rdo.c

Loren Merritt lorenm at u.washington.edu
Mon Apr 30 02:16:42 CEST 2007


On Sun, 29 Apr 2007, Fejes Dávid wrote:

> I'm a little confused, but i've a strange problem with compiling x264.
> I've a special gcc compiler (it's name gcc-powerpc-eabi, but this is
> not important), and it has found an error. And I mean, he has right.
>
> rdo.c defines the bs_write, bs_write1, etc macros to override the real
> bs_write, etc functions with a simple cost computation. Then it
> includes the cavlc.c, what includes the common.h header file. The
> common.h file includes the bs.h file, which has the declaration
> bs_write, bs_write1.. functions again. Of course, bs_write, bs_write1
> macros are definied, so the c precompiler replaces the function names
> with the macros, and so the c compiler stops then with errors. I don't
> understand, how it is possible that another c compilers eliminate
> this.

rdo.c isn't compiled by itself, it's #included in analyse.c. analyse.c 
already #includes common.h, which is protected against multiple 
inclusion by #ifndef _COMMON_H. So cavlc.c sees an empty file when it 
#includes common.h again.

--Loren Merritt


More information about the x264-devel mailing list