<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>On the second</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite">#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_A</BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>and<DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite">vec_s16_t sum16 = vec_adds(idct_sh6, (vec_s16_t)dst16);\ </BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>should be <DIV><BR class="khtml-block-placeholder"></DIV><DIV>#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_B(dest, idctv) {\<BR><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>vec_s16_t sum16 = vec_adds(idct_sh6, (vec_s16_t)dst16l);\ </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Sorry - tired :(</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On Sep 19, 2006, at 2:27 AM, David Wolstencroft wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">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"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">#define ALTIVEC_STORE_SUM_CLIP_ALIGN8_A(dest, idctv) {\</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 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></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>vec_st(sum8, 0, dest);\</FONT></DIV> </BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>