*
* Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#ifdef CAN_COMPILE_SSE2
#define _STRING(x) #x
#define STRING(x) _STRING(x)
+VLC_SSE
static void BlockBlendSse2(uint8_t *dst, size_t dst_pitch,
const uint8_t *src, size_t src_pitch,
const int16_t *noise)
[src1]"r"(&src[(2*i+0) * src_pitch]),
[src2]"r"(&src[(2*i+1) * src_pitch]),
[noise]"r"(&noise[2*i * BANK_SIZE])
- : "memory");
+ : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "memory");
}
#else
# error "BLEND_SIZE unsupported"
if (w >= BLEND_SIZE && h >= BLEND_SIZE)
sys->blend(dstp, dst->i_pitch, srcp, src->i_pitch, noise);
else
- BlockBlend(dstp, dst->i_pitch, srcp, src->i_pitch, noise, w, h);
+ BlockBlend(dstp, dst->i_pitch, srcp, src->i_pitch, noise,
+ __MIN(w, BLEND_SIZE), __MIN(h, BLEND_SIZE));
}
}
if (sys->emms)
sys->blend = BlockBlendC;
sys->emms = NULL;
#if defined(CAN_COMPILE_SSE2) && 1
- if (vlc_CPU() & CPU_CAPABILITY_SSE2) {
+ if (vlc_CPU_SSE2()) {
sys->blend = BlockBlendSse2;
sys->emms = Emms;
}