- "paddb %%mm1, %%mm0 \n\t" // add (Prev_row/2) to Avg for
- // each byte
-
- // add 1st active group (Raw(x-bpp)/2) to average with _LBCarry
- "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting
- // LBCarrys
- "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
- // where both
- // lsb's were == 1 (only valid
- // for active group)
- "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
- "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
- // byte
- "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2)
- // for each byte
- "pand %%mm6, %%mm2 \n\t" // leave only Active Group 1
- // bytes to add to Avg
- "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to Avg
- // for each Active byte
-
- // add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry
- "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover
- // bytes 2 & 3
- "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2
- "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly
- "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting
- // LBCarrys
- "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
- // where both
- // lsb's were == 1 (only valid
- // for active group)
- "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
- "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
- // byte
- "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2)
- // for each byte
- "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2
- // bytes to add to Avg
- "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to
- // Avg for each Active byte
-
- // add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry
- "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover
- // bytes 4 & 5
- "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2
- "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly
- "movq %%mm3, %%mm1 \n\t" // now use mm1 for getting
- // LBCarrys
- "pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
- // where both lsb's were == 1
- // (only valid for active group)
- "psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
- "pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
- // byte
- "paddb %%mm1, %%mm2 \n\t" // add LBCarrys to (Raw(x-bpp)/2)
- // for each byte
- "pand %%mm6, %%mm2 \n\t" // leave only Active Group 2
- // bytes to add to Avg
- "paddb %%mm2, %%mm0 \n\t" // add (Raw/2) + LBCarrys to
- // Avg for each Active byte
-
- // add 4th active group (Raw(x-bpp)/2) to average with _LBCarry
- "psllq _ShiftBpp, %%mm6 \n\t" // shift the mm6 mask to cover
- // bytes 6 & 7
- "movq %%mm0, %%mm2 \n\t" // mov updated Raws to mm2
- "psllq _ShiftBpp, %%mm2 \n\t" // shift data to pos. correctly
+ "paddb %%mm1, %%mm0 \n\t" /* add (Prev_row/2) to Avg for */
+ /* each byte */
+
+ /* add 1st active group (Raw(x-bpp)/2) to average with _LBCarry */
+ "movq %%mm3, %%mm1 \n\t" /* now use mm1 for getting */
+ /* LBCarrys */
+ "pand %%mm2, %%mm1 \n\t" /* get LBCarrys for each byte */
+ /* where both */
+ /* lsb's were == 1 (only valid */
+ /* for active group) */
+ "psrlq $1, %%mm2 \n\t" /* divide raw bytes by 2 */
+ "pand %%mm4, %%mm2 \n\t" /* clear invalid bit 7 of each */
+ /* byte */
+ "paddb %%mm1, %%mm2 \n\t" /* add LBCarrys to (Raw(x-bpp)/2) */
+ /* for each byte */
+ "pand %%mm6, %%mm2 \n\t" /* leave only Active Group 1 */
+ /* bytes to add to Avg */
+ "paddb %%mm2, %%mm0 \n\t" /* add (Raw/2) + LBCarrys to Avg */
+ /* for each Active byte */
+
+ /* add 2nd active group (Raw(x-bpp)/2) to average with _LBCarry */
+ "psllq _ShiftBpp, %%mm6 \n\t" /* shift the mm6 mask to cover */
+ /* bytes 2 & 3 */
+ "movq %%mm0, %%mm2 \n\t" /* mov updated Raws to mm2 */
+ "psllq _ShiftBpp, %%mm2 \n\t" /* shift data to pos. correctly */
+ "movq %%mm3, %%mm1 \n\t" /* now use mm1 for getting */
+ /* LBCarrys */
+ "pand %%mm2, %%mm1 \n\t" /* get LBCarrys for each byte */
+ /* where both */
+ /* lsb's were == 1 (only valid */
+ /* for active group) */
+ "psrlq $1, %%mm2 \n\t" /* divide raw bytes by 2 */
+ "pand %%mm4, %%mm2 \n\t" /* clear invalid bit 7 of each */
+ /* byte */
+ "paddb %%mm1, %%mm2 \n\t" /* add LBCarrys to (Raw(x-bpp)/2) */
+ /* for each byte */
+ "pand %%mm6, %%mm2 \n\t" /* leave only Active Group 2 */
+ /* bytes to add to Avg */
+ "paddb %%mm2, %%mm0 \n\t" /* add (Raw/2) + LBCarrys to */
+ /* Avg for each Active byte */
+
+ /* add 3rd active group (Raw(x-bpp)/2) to average with _LBCarry */
+ "psllq _ShiftBpp, %%mm6 \n\t" /* shift the mm6 mask to cover */
+ /* bytes 4 & 5 */
+ "movq %%mm0, %%mm2 \n\t" /* mov updated Raws to mm2 */
+ "psllq _ShiftBpp, %%mm2 \n\t" /* shift data to pos. correctly */
+ "movq %%mm3, %%mm1 \n\t" /* now use mm1 for getting */
+ /* LBCarrys */
+ "pand %%mm2, %%mm1 \n\t" /* get LBCarrys for each byte */
+ /* where both lsb's were == 1 */
+ /* (only valid for active group) */
+ "psrlq $1, %%mm2 \n\t" /* divide raw bytes by 2 */
+ "pand %%mm4, %%mm2 \n\t" /* clear invalid bit 7 of each */
+ /* byte */
+ "paddb %%mm1, %%mm2 \n\t" /* add LBCarrys to (Raw(x-bpp)/2) */
+ /* for each byte */
+ "pand %%mm6, %%mm2 \n\t" /* leave only Active Group 2 */
+ /* bytes to add to Avg */
+ "paddb %%mm2, %%mm0 \n\t" /* add (Raw/2) + LBCarrys to */
+ /* Avg for each Active byte */
+
+ /* add 4th active group (Raw(x-bpp)/2) to average with _LBCarry */
+ "psllq _ShiftBpp, %%mm6 \n\t" /* shift the mm6 mask to cover */
+ /* bytes 6 & 7 */
+ "movq %%mm0, %%mm2 \n\t" /* mov updated Raws to mm2 */
+ "psllq _ShiftBpp, %%mm2 \n\t" /* shift data to pos. correctly */