[x264-devel] Re: problem with X264 over Itanium - IA64

Guillaume POIRIER poirierg at gmail.com
Fri Apr 21 21:28:29 CEST 2006


Hi,

On 4/21/06, Henri-Pierre Charles <hpcharles at gmail.com> wrote:
> Hello,
>
> On 4/20/06, Guillaume POIRIER <poirierg at gmail.com> wrote:
> > What kind of optimizations do you have in mind?
>
> My main focus are low level optimization, ILP, but we are also interested
> on multithreading and memory access.

Interesting. In case you didn't know, x264 already supports
multi-threaded encoding, though I'm sure there's still room for
improvement.


> > I suppose GCC has some pragmas to force aligment by using padding...
>
> Well, not really. It has -Wpadded which give hints like :
>
> ./common/common.h:215: warning: padding struct size to alignment boundary
> ./common/common.h:262: warning: padding struct to align 'nal'
> ./common/common.h:264: warning: padding struct to align 'p_bitstream'
> ./common/common.h:328: warning: padding struct size to alignment boundary
> ./common/common.h:449: warning: padding struct size to alignment boundary
> ./common/common.h:404: warning: padding struct to align 'type'
> ./common/common.h:449: warning: padding struct to align 'pic'
> ./common/common.h:493: warning: padding struct size to alignment boundary
> ./common/common.h:534: warning: padding struct to align 'i_sqe_global'
> ./common/common.h:283: warning: padding struct to align 'sps'
> ./common/common.h:300: warning: padding struct to align 'sh'
> ./common/common.h:338: warning: padding struct to align 'fref0'
> ./common/common.h:340: warning: padding struct to align 'fref1'
> ./common/common.h:573: warning: padding struct size to alignment boundary

Ahem, scratch that idea: gcc isn't worth a damn on Itanium, so you're
much better off using icc, which I'm sure you're using already if you
have such a machine ;)


> But without actual knowledge on the code, it's a little bit difficult.
>
> On what documentation is based the x264 encoder (if any :-) ?

I'm afraid there's none except the code, which is fairly decently commented.


> > Among the platforms supported by x264 is the PPC64, which, like most
> > RISC cpu (like Sparc), has strong aligment restrictions, so I'm
> > surprised that you experience unaligned access problems and PPC64
> > users don't (but maybe it's because no userland app runs in 64bits
> > mode on PPC64, like on early Sparc64).
> > x86-64 is a special case as all aligment is allowed.
>
> Yes, but maybe, on the ppc, the alignment problems are done at the
> altivec level ?

That's quite possible, but I'd find that quite no-probable... x264 is
supposed to be able to work if you compile just the plain C version.


> (I am unable to compile x264 on ppc/macos without
> -faltivec, is it possible ?)

If you manualy edit the file config.mak, you can drive the building
process better.
Here are the relevant lines that I've changed to make x264 compile on
PPC without altivec:

ARCH=UNK
SYS=LINUX
CC=gcc
CFLAGS=-Wall -I. -O4 -ffast-math -D__X264__ -DHAVE_MALLOC_H -DARCH_UNK
-DSYS_LINUX -DHAVE_PTHREAD -s -fomit-frame-pointer

note that I removed all occurences of altivec, and that I set ARCH to
smth different than PPC, here UNK (unknown).

Keep us posed on your work on Itanium2: the kind of research you'd
doing at prism is clearly impressive... I can't way to see what your
work is gonna do to x264...

:-)

Guillaume
--
I am disillusioned enough to know that no man's opinion on any subject
is worth a damn unless backed up with enough genuine information to
make him really know what he's talking about.

-- H. P. Lovecraft (about the flamewars on FFmpeg and MPlayer-dev mailing lists)
http://www.brainyquote.com/quotes/quotes/h/hplovecr278144.html

-- 
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