Beispiel #1
0
/* Half pixel interpolation in the x direction */
static inline void MC_avg_x_mmx (const int width, int height, uint8_t * dest,
				 const uint8_t * ref, const int stride)
{
    mmx_zero_reg ();

    do {
	mmx_interp_average_2_U8 (dest, ref, ref+1);

	if (width == 16)
	    mmx_interp_average_2_U8 (dest+8, ref+8, ref+9);

	dest += stride;
	ref += stride;
    } while (--height);
}
Beispiel #2
0
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);
}