[x264-devel] Re: compile problem on PPC

Mauricio Alvarez alvarez at ac.upc.edu
Fri Apr 28 20:32:20 CEST 2006


Eric Petit wrote:
> Peter Czanik wrote:
> 
>> I have a compile problem on PPC. x264 was changed recently and PPC
>  Can you please try the current SVN or the next snapshot (r513 or later)?
> 

Hi.
 I am using x264 rev 513 on a PPC 970 machine with Mac OS X and (apple)
gcc-3.3.

X264 build is broken with the same errors mentioned by Peter Czanik.

I was making an analysis of the code and see that most of the errors
come from vec_sum4s operations that are assigned to a destionation with
a "wrong" type, for example in line 663:

sum0v = (vec_s32_t) vec_sum4s( vec_sub( vec_max( fencv, pix0v ),
vec_min( fencv, pix0v ) ), (vec_u32_t) sum0v );

The parameters for the vec_sum4s instruction are OK (vector unsigned
char, vector unsigned int), and the result is a (vector unsigned int).
  The  variable "sum0V" is also a (vector unsigned int) but there is a
cast that tries to change the tyope of the result to a type "different"
type from the destination variable.

In summary, but avoiding the cast the compiler does not see any problems...

sum0v =  vec_sum4s( vec_sub( vec_max( fencv, pix0v ), vec_min( fencv,
pix0v ) ), (vec_u32_t) sum0v );

... But I don't know exactly if this is OK for the purposes of this
function.

I have made these changes and the compilation passes OK. Also I tested
with the coding of a DVD sized video and it was OK.

pcbalcells:$  x264  -o test.264  yuv/576p25_blue_sky.yuv 720x576
x264 [info]: using cpu capabilities Altivec
...
encoded 217 frames, 7.31 fps, 2324.44 kb/s

So, I am sending a patch with the mentioned changes.

Hope this helps

Mauricio Alvarez

gcc -Wall -I. -O4 -ffast-math -D__X264__ -falign-loops=16 -faltivec
-fastf -mcpu=G4 -DARCH_PPC -DSYS_MACOSX -DHAVE_PTHREAD -s
-fomit-frame-pointer   -c -o common/ppc/pixel.o common/ppc/pixel.c
common/ppc/pixel.c: In function `pixel_sad_x4_16x16_altivec':
common/ppc/pixel.c:663: error: incompatible types in assignment
common/ppc/pixel.c:665: error: incompatible types in assignment
common/ppc/pixel.c:667: error: incompatible types in assignment
common/ppc/pixel.c:669: error: incompatible types in assignment
common/ppc/pixel.c:695: error: incompatible types in assignment
common/ppc/pixel.c:697: error: incompatible types in assignment
common/ppc/pixel.c:699: error: incompatible types in assignment
common/ppc/pixel.c:701: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x3_16x16_altivec':
common/ppc/pixel.c:779: error: incompatible types in assignment
common/ppc/pixel.c:781: error: incompatible types in assignment
common/ppc/pixel.c:783: error: incompatible types in assignment
common/ppc/pixel.c:805: error: incompatible types in assignment
common/ppc/pixel.c:807: error: incompatible types in assignment
common/ppc/pixel.c:809: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x4_16x8_altivec':
common/ppc/pixel.c:891: error: incompatible types in assignment
common/ppc/pixel.c:893: error: incompatible types in assignment
common/ppc/pixel.c:895: error: incompatible types in assignment
common/ppc/pixel.c:897: error: incompatible types in assignment
common/ppc/pixel.c:923: error: incompatible types in assignment
common/ppc/pixel.c:925: error: incompatible types in assignment
common/ppc/pixel.c:927: error: incompatible types in assignment
common/ppc/pixel.c:929: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x3_16x8_altivec':
common/ppc/pixel.c:1008: error: incompatible types in assignment
common/ppc/pixel.c:1010: error: incompatible types in assignment
common/ppc/pixel.c:1012: error: incompatible types in assignment
common/ppc/pixel.c:1034: error: incompatible types in assignment
common/ppc/pixel.c:1036: error: incompatible types in assignment
common/ppc/pixel.c:1038: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x4_8x16_altivec':
common/ppc/pixel.c:1121: error: incompatible types in assignment
common/ppc/pixel.c:1123: error: incompatible types in assignment
common/ppc/pixel.c:1125: error: incompatible types in assignment
common/ppc/pixel.c:1127: error: incompatible types in assignment
common/ppc/pixel.c:1154: error: incompatible types in assignment
common/ppc/pixel.c:1156: error: incompatible types in assignment
common/ppc/pixel.c:1158: error: incompatible types in assignment
common/ppc/pixel.c:1160: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x3_8x16_altivec':
common/ppc/pixel.c:1235: error: incompatible types in assignment
common/ppc/pixel.c:1237: error: incompatible types in assignment
common/ppc/pixel.c:1239: error: incompatible types in assignment
common/ppc/pixel.c:1263: error: incompatible types in assignment
common/ppc/pixel.c:1265: error: incompatible types in assignment
common/ppc/pixel.c:1267: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x4_8x8_altivec':
common/ppc/pixel.c:1349: error: incompatible types in assignment
common/ppc/pixel.c:1351: error: incompatible types in assignment
common/ppc/pixel.c:1353: error: incompatible types in assignment
common/ppc/pixel.c:1355: error: incompatible types in assignment
common/ppc/pixel.c:1382: error: incompatible types in assignment
common/ppc/pixel.c:1384: error: incompatible types in assignment
common/ppc/pixel.c:1386: error: incompatible types in assignment
common/ppc/pixel.c:1388: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_sad_x3_8x8_altivec':
common/ppc/pixel.c:1465: error: incompatible types in assignment
common/ppc/pixel.c:1467: error: incompatible types in assignment
common/ppc/pixel.c:1469: error: incompatible types in assignment
common/ppc/pixel.c:1493: error: incompatible types in assignment
common/ppc/pixel.c:1495: error: incompatible types in assignment
common/ppc/pixel.c:1497: error: incompatible types in assignment
common/ppc/pixel.c: In function `pixel_ssd_16x16_altivec':
common/ppc/pixel.c:1601: error: incompatible types in assignment
common/ppc/pixel.c: At top level:
x264.h:76: warning: `x264_direct_pred_names' defined but not used
x264.h:77: warning: `x264_motion_est_names' defined but not used
common/set.h:203: warning: `x264_cqm_flat16' defined but not used
common/set.h:214: warning: `x264_cqm_jvt' defined but not used
common/predict.h:41: warning: `x264_mb_pred_mode8x8c_fix' defined but
not used
common/predict.h:58: warning: `x264_mb_pred_mode16x16_fix' defined but
not used
common/predict.h:80: warning: `x264_mb_pred_mode4x4_fix' defined but not
used
common/pixel.h:49: warning: `x264_pixel_size' defined but not used
common/pixel.h:57: warning: `x264_size2pixel' defined but not used
common/dct.h:34: warning: `x264_dct8_weight_tab' defined but not used
common/dct.h:51: warning: `x264_dct4_weight2_tab' defined but not used
common/dct.h:57: warning: `x264_dct4_weight2_zigzag' defined but not used
common/dct.h:69: warning: `x264_dct8_weight2_tab' defined but not used
common/dct.h:80: warning: `x264_dct8_weight2_zigzag' defined but not used
common/common.h:164: warning: `slice_type_to_char' defined but not used
common/common.h:222: warning: `x264_scan8' defined but not used
common/macroblock.h:66: warning: `x264_mb_type_fix' defined but not used
common/macroblock.h:73: warning: `x264_mb_type_list0_table' defined but
not used
common/macroblock.h:86: warning: `x264_mb_type_list1_table' defined but
not used
common/macroblock.h:131: warning: `x264_mb_partition_listX_table'
defined but not used
common/macroblock.h:146: warning: `x264_mb_partition_count_table'
defined but not used
common/macroblock.h:159: warning: `x264_mb_partition_pixel_table'
defined but not used
common/macroblock.h:165: warning: `x264_zigzag_scan4' defined but not used
common/macroblock.h:169: warning: `x264_zigzag_scan8' defined but not used
common/macroblock.h:177: warning: `block_idx_x' defined but not used
common/macroblock.h:181: warning: `block_idx_y' defined but not used
common/macroblock.h:185: warning: `block_idx_xy' defined but not used
common/macroblock.h:193: warning: `i_chroma_qp_table' defined but not used
make: *** [common/ppc/pixel.o] Error 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: put_pixel.c.r513.patch
Type: text/x-patch
Size: 16960 bytes
Desc: not available
Url : http://mailman.videolan.org/pipermail/x264-devel/attachments/20060428/1ff9269d/attachment.bin 


More information about the x264-devel mailing list