[x264-devel] Re: x264 for g++ compiler on r239

Dario Andrade dario at sinistro.net
Wed May 25 22:59:13 CEST 2005


> >
> >>    Recently, I started my personal hobby project "x264++" to create a
> >> C++ H.264 Codec based on x264. First, I modified x264 r239 for g++
> >> compilation. In the future, I will write c++ classes to replace each
> >> part of x264 C code. If anyone want to test it, it could be downloaded
> >> from:
> >>
> >> http://www.ccns.ncku.edu.tw/~champ/x264_239_g++.tgz
> >>
> >> I hope that offcial x264 would adopt this modification. BTW, It could
> >> still be compiled by gcc, too. Simply change the line of CC="g++" to
> >> CC="gcc" in the  'configure' file. Remeber to execute configure first
> >> before you make...^^
> >
> > Why?!
> > I mean, feel free to port x264 to whatever language you want, but my
> > version is and will remain a C program. I won't clutter the code with
> > ifdefs or unnecessary casts just to make g++ happy.
> 
> A completely separate C++ wrapper class might be useful to someone.
> IMHO, we could even consider including such a thing in the official
> tree.
> 

I don't undestand why some C++ enthusiastics are so radical about this.
Although I am a C++ person (in my definition, writing most of code lines in
C++ for most of the time make me a C++ person, although I write in C, Java,
ASM even JavaScript if it's necessary), I don't see ANY reason whatsoever to
write the codec in C++ or even writing a "wrapper" if that makes sense at
all (isn't extern "C" beautiful enough for this?).
IMO, writing in C++ makes thousand lines of a program more manageable and
easier to read, besides, writing good object oriented code is easier to
write in C++ (no vtbl writing, this pointer passing, inheritable data
definition, etc), although much achievable in C also.
One could perfectly write its own custom classes that implement the desired
funcionality using the C api by itself. Writing code for the sake of writing
it make it much more error-prone and time consuming.

Cheers,
Dario Andrade

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list