comparison ppc/h264_altivec.c @ 8536:87450160a913 libavcodec

fix compilation with GCC-4.3+ patch by David Conrad + fix by myself
author gpoirier
date Tue, 06 Jan 2009 10:44:45 +0000
parents 8f3e20061aff
children 16a315fdad0b
comparison
equal deleted inserted replaced
8535:8f3e20061aff 8536:87450160a913
951 temp[0] = log2_denom+1; 951 temp[0] = log2_denom+1;
952 temp[1] = weights; 952 temp[1] = weights;
953 temp[2] = weightd; 953 temp[2] = weightd;
954 temp[3] = offset; 954 temp[3] = offset;
955 955
956 vtemp = vec_ld(0, temp); 956 vtemp = (vec_s16)vec_ld(0, temp);
957 vlog2_denom = vec_splat(vtemp, 1); 957 vlog2_denom = (vec_u16)vec_splat(vtemp, 1);
958 vweights = vec_splat(vtemp, 3); 958 vweights = vec_splat(vtemp, 3);
959 vweightd = vec_splat(vtemp, 5); 959 vweightd = vec_splat(vtemp, 5);
960 voffset = vec_splat(vtemp, 7); 960 voffset = vec_splat(vtemp, 7);
961 dst_aligned = !((unsigned long)dst & 0xf); 961 dst_aligned = !((unsigned long)dst & 0xf);
962 src_aligned = !((unsigned long)src & 0xf); 962 src_aligned = !((unsigned long)src & 0xf);
963 963
964 for (y=0; y<h; y++) { 964 for (y=0; y<h; y++) {
965 vdst = vec_ld(0, dst); 965 vdst = vec_ld(0, dst);
966 vsrc = vec_ld(0, src); 966 vsrc = vec_ld(0, src);
967 967
968 v0 = vec_mergeh(zero_u8v, vdst); 968 v0 = (vec_s16)vec_mergeh(zero_u8v, vdst);
969 v1 = vec_mergel(zero_u8v, vdst); 969 v1 = (vec_s16)vec_mergel(zero_u8v, vdst);
970 v2 = vec_mergeh(zero_u8v, vsrc); 970 v2 = (vec_s16)vec_mergeh(zero_u8v, vsrc);
971 v3 = vec_mergel(zero_u8v, vsrc); 971 v3 = (vec_s16)vec_mergel(zero_u8v, vsrc);
972 972
973 if (w == 8) { 973 if (w == 8) {
974 if (src_aligned) 974 if (src_aligned)
975 v3 = v2; 975 v3 = v2;
976 else 976 else