static inline void MC_put_x_mmx (int width, int height, uint8_t * dest, uint8_t * ref, int stride) { mmx_zero_reg (); do { mmx_average_2_U8 (dest, ref, ref+1); if (width == 16) mmx_average_2_U8 (dest+8, ref+8, ref+9); dest += stride; ref += stride; } while (--height); }
static inline void MC_avg_mmx (const int width, int height, uint8_t * dest, const uint8_t * ref, const int stride) { mmx_zero_reg (); do { mmx_average_2_U8 (dest, dest, ref); if (width == 16) mmx_average_2_U8 (dest+8, dest+8, ref+8); dest += stride; ref += stride; } while (--height); }
static inline void MC_put_xy_mmx (const int width, int height, uint8_t * dest, const uint8_t * ref, const int stride) { const uint8_t * ref_next = ref + stride; mmx_zero_reg (); do { mmx_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1); if (width == 16) mmx_average_4_U8 (dest+8, ref+8, ref+9, ref_next+8, ref_next+9); dest += stride; ref += stride; ref_next += stride; } while (--height); }
static inline void MC_avg_y_mmx (int width, int height, uint8_t * dest, uint8_t * ref, int stride) { uint8_t * ref_next = ref+stride; mmx_zero_reg (); do { mmx_interp_average_2_U8 (dest, ref, ref_next); if (width == 16) mmx_interp_average_2_U8 (dest+8, ref+8, ref_next+8); dest += stride; ref += stride; ref_next += stride; } while (--height); }
static inline void MC_put_mmx (const int width, int height, uint8_t * dest, const uint8_t * ref, const int stride) { mmx_zero_reg (); do { movq_m2r (* ref, mm1); /* load 8 ref bytes */ movq_r2m (mm1,* dest); /* store 8 bytes at curr */ if (width == 16) { movq_m2r (* (ref+8), mm1); /* load 8 ref bytes */ movq_r2m (mm1,* (dest+8)); /* store 8 bytes at curr */ } dest += stride; ref += stride; } while (--height); }