<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Sooo, ok, since I'm wired (don't know why I can't sleep....)<DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>if (dst is 16 byte aligned)</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN></DIV><DIV>#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_A(dest, idctv) {\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u8_t dstv = vec_ld(0, dest);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_s16_t idct_sh6 = vec_sra(idctv, sixv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u16_t dst16h = vec_mergeh(zero_u8v, dstv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u16_t dst16l = vec_mergel(zero_u8v, dstv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_s16_t sum16 = vec_adds(idct_sh6, (vec_s16_t)dst16h);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u8_t sum8 = vec_packsu(sum16, dst16l);\ <- I swear pengvado made a mistake here, if that's possible</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_st(sum8, 0, dest);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">else (8 byte aligned but not 16 byte aligned)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV>#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_A(dest, idctv) {\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u8_t dstv = vec_ld(0, dest);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_s16_t idct_sh6 = vec_sra(idctv, sixv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u16_t dst16h = vec_mergeh(zero_u8v, dstv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u16_t dst16l = vec_mergel(zero_u8v, dstv);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_s16_t sum16 = vec_adds(idct_sh6, (vec_s16_t)dst16);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_u8_t sum8 = vec_packsu(dst16h, sum16);\ </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> vec_st(sum8, 0, dest);\</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Sep 18, 2006, at 12:24 PM, Loren Merritt wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_A(dest, idctv) {\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_u8_t dstv = vec_ld(0, dest);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_s16_t idct_sh6 = vec_sra(idctv, sixv);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_u16_t dst16h = vec_mergeh(zero_u8v, dstv);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_u16_t dst16l = vec_mergel(zero_u8v, dstv);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_s16_t sum16 = vec_adds(idct_sh6, (vec_s16_t)dst16h);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_u8_t sum8 = vec_packsu(dst16l, sum16);\</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_st(sum8, 0, dest);\</FONT></P> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>