[MPlayer-cvslog] r37325 - in trunk/libmpcodecs: ad_ffmpeg.c dec_video.c pullup.c vf_ass.c vf_decimate.c vf_divtc.c vf_eq.c vf_eq2.c vf_filmdint.c vf_fspp.c vf_gradfun.c vf_halfpack.c vf_ilpack.c vf_ivtc.c vf_noise....
michael
subversion at mplayerhq.hu
Sun Nov 16 17:20:49 CET 2014
Author: michael
Date: Sun Nov 16 17:20:49 2014
New Revision: 37325
Log:
mpcodecs: Use XXX_INLINE defines for inline asm
Patch-by: Matt Oliver <protogonoi at gmail.com>
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Modified:
trunk/libmpcodecs/ad_ffmpeg.c
trunk/libmpcodecs/dec_video.c
trunk/libmpcodecs/pullup.c
trunk/libmpcodecs/vf_ass.c
trunk/libmpcodecs/vf_decimate.c
trunk/libmpcodecs/vf_divtc.c
trunk/libmpcodecs/vf_eq.c
trunk/libmpcodecs/vf_eq2.c
trunk/libmpcodecs/vf_filmdint.c
trunk/libmpcodecs/vf_fspp.c
trunk/libmpcodecs/vf_gradfun.c
trunk/libmpcodecs/vf_halfpack.c
trunk/libmpcodecs/vf_ilpack.c
trunk/libmpcodecs/vf_ivtc.c
trunk/libmpcodecs/vf_noise.c
trunk/libmpcodecs/vf_pp7.c
trunk/libmpcodecs/vf_scale.c
trunk/libmpcodecs/vf_spp.c
trunk/libmpcodecs/vf_tfields.c
trunk/libmpcodecs/vf_unsharp.c
trunk/libmpcodecs/vf_uspp.c
trunk/libmpcodecs/vf_yadif.c
Modified: trunk/libmpcodecs/ad_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/ad_ffmpeg.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/ad_ffmpeg.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -225,7 +225,7 @@ static av_always_inline void copy_sample
{
size_t s, c, o = 0;
-#if HAVE_NEON
+#if HAVE_NEON_INLINE
if (nb_channels == 2 && bps == 4) {
const unsigned char *src0 = src[0];
const unsigned char *src1 = src[1];
Modified: trunk/libmpcodecs/dec_video.c
==============================================================================
--- trunk/libmpcodecs/dec_video.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/dec_video.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -429,9 +429,9 @@ void *decode_video(sh_video_t *sh_video,
// some codecs are broken, and doesn't restore MMX state :(
// it happens usually with broken/damaged files.
- if (HAVE_AMD3DNOW && gCpuCaps.has3DNow) {
+ if (HAVE_AMD3DNOW_INLINE && gCpuCaps.has3DNow) {
__asm__ volatile ("femms\n\t":::"memory");
- } else if (HAVE_MMX && gCpuCaps.hasMMX) {
+ } else if (HAVE_MMX_INLINE && gCpuCaps.hasMMX) {
__asm__ volatile ("emms\n\t":::"memory");
}
Modified: trunk/libmpcodecs/pullup.c
==============================================================================
--- trunk/libmpcodecs/pullup.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/pullup.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -27,7 +27,7 @@
#if ARCH_X86
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
{
int ret;
@@ -785,7 +785,7 @@ void pullup_init_context(struct pullup_c
c->comb = licomb_y;
c->var = var_y;
#if ARCH_X86
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if (c->cpu & PULLUP_CPU_MMX) {
c->diff = diff_y_mmx;
c->comb = licomb_y_mmx;
Modified: trunk/libmpcodecs/vf_ass.c
==============================================================================
--- trunk/libmpcodecs/vf_ass.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_ass.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -61,14 +61,14 @@
/* map 0 - 0xFF -> 0 - 0x10101 */
#define MAP_24BIT(v) RSHIFT(0x10203 * (v), 8)
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
DECLARE_ASM_CONST(16, uint32_t, sse_int32_80h[4])
= { 0x80, 0x80, 0x80, 0x80 };
DECLARE_ASM_CONST(16, uint32_t, sse_int32_map_factor[4])
= { 0x102, 0x102, 0x102, 0x102 };
-#endif // HAVE_SSE4
+#endif // HAVE_SSE4_INLINE
static const struct vf_priv_s {
int outh, outw;
@@ -205,7 +205,7 @@ static void render_frame_yuv422(vf_insta
}
}
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
static void render_frame_yuv422_sse4(vf_instance_t *vf)
{
@@ -316,7 +316,7 @@ static void render_frame_yuv422_sse4(vf_
}
}
-#endif // HAVE_SSE4
+#endif // HAVE_SSE4_INLINE
static void prepare_buffer_420p(vf_instance_t *vf)
{
@@ -345,7 +345,7 @@ static void prepare_buffer_420p(vf_insta
}
}
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
// for render_frame_yuv420p_sse4
if (gCpuCaps.hasSSE4 && outw % 32 == 0) {
for (i = 0; i < outh; i += 2) {
@@ -365,7 +365,7 @@ static void prepare_buffer_420p(vf_insta
}
}
}
-#endif // HAVE_SSE4
+#endif // HAVE_SSE4_INLINE
}
static void render_frame_yuv420p(vf_instance_t *vf)
@@ -417,7 +417,7 @@ static void render_frame_yuv420p(vf_inst
}
}
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
#define CHECK_16_ALPHA \
"cmpl $-1, 0(%[alpha], %[j], 1) \n\t" \
@@ -560,7 +560,7 @@ static void render_frame_yuv420p_sse4(vf
#undef MAP_16_ALPHA
#undef MUL_ALPHA
-#endif // HAVE_SSE4
+#endif // HAVE_SSE4_INLINE
static void clean_buffer(vf_instance_t *vf)
{
@@ -628,7 +628,7 @@ static int config(struct vf_instance *vf
vf->priv->draw_image = draw_image_yuv;
vf->priv->render_frame = render_frame_yuv420p;
vf->priv->prepare_buffer = prepare_buffer_420p;
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
if (gCpuCaps.hasSSE4 && outw % 32 == 0)
vf->priv->render_frame = render_frame_yuv420p_sse4;
#endif
@@ -641,7 +641,7 @@ static int config(struct vf_instance *vf
vf->priv->draw_image = draw_image_yuv;
vf->priv->render_frame = render_frame_yuv422;
vf->priv->prepare_buffer = prepare_buffer_422;
-#if HAVE_SSE4
+#if HAVE_SSE4_INLINE
if (gCpuCaps.hasSSE4 && outw % 8 == 0)
vf->priv->render_frame = render_frame_yuv422_sse4;
#endif
Modified: trunk/libmpcodecs/vf_decimate.c
==============================================================================
--- trunk/libmpcodecs/vf_decimate.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_decimate.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -37,7 +37,7 @@ struct vf_priv_s {
int max, last, cnt;
};
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
{
volatile short out[4];
@@ -182,7 +182,7 @@ static int vf_open(vf_instance_t *vf, ch
p->frac = 0.33;
if (args) sscanf(args, "%d:%d:%d:%f", &p->max, &p->hi, &p->lo, &p->frac);
diff = diff_C;
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
if(gCpuCaps.hasMMX) diff = diff_MMX;
#endif
return 1;
Modified: trunk/libmpcodecs/vf_divtc.c
==============================================================================
--- trunk/libmpcodecs/vf_divtc.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_divtc.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -52,7 +52,7 @@ struct vf_priv_s
* diff_MMX and diff_C stolen from vf_decimate.c
*/
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
{
volatile short out[4];
@@ -703,7 +703,7 @@ static int vf_open(vf_instance_t *vf, ch
goto nomem;
diff = diff_C;
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
if(gCpuCaps.hasMMX) diff = diff_MMX;
#endif
Modified: trunk/libmpcodecs/vf_eq.c
==============================================================================
--- trunk/libmpcodecs/vf_eq.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_eq.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -44,7 +44,7 @@ static struct vf_priv_s {
0
};
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, int sstride,
int w, int h, int brightness, int contrast)
{
@@ -227,7 +227,7 @@ static int vf_open(vf_instance_t *vf, ch
vf->uninit=uninit;
process = process_C;
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) process = process_MMX;
#endif
Modified: trunk/libmpcodecs/vf_eq2.c
==============================================================================
--- trunk/libmpcodecs/vf_eq2.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_eq2.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -120,7 +120,7 @@ void create_lut (eq2_param_t *par)
par->lut_clean = 1;
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static
void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src,
unsigned w, unsigned h, unsigned dstride, unsigned sstride)
@@ -289,7 +289,7 @@ void check_values (eq2_param_t *par)
if ((par->c == 1.0) && (par->b == 0.0) && (par->g == 1.0)) {
par->adjust = NULL;
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
else if (par->g == 1.0 && gCpuCaps.hasMMX) {
par->adjust = &affine_1d_MMX;
}
Modified: trunk/libmpcodecs/vf_filmdint.c
==============================================================================
--- trunk/libmpcodecs/vf_filmdint.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_filmdint.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -449,7 +449,7 @@ block_metrics_3dnow(unsigned char *a, un
int lines, struct vf_priv_s *p, struct frame_stats *s)
{
struct metrics tm;
-#if !HAVE_AMD3DNOW
+#if !HAVE_AMD3DNOW_INLINE
mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_3dnow: internal error\n");
#else
static const unsigned long long ones = 0x0101010101010101ull;
@@ -478,7 +478,7 @@ block_metrics_mmx2(unsigned char *a, uns
int lines, struct vf_priv_s *p, struct frame_stats *s)
{
struct metrics tm;
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_mmx2: internal error\n");
#else
static const unsigned long long ones = 0x0101010101010101ull;
@@ -607,7 +607,7 @@ static inline int
dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
long cos, int ds, int ss, int w, int t)
{
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
mp_msg(MSGT_VFILTER, MSGL_FATAL, "dint_copy_line_mmx2: internal error\n");
return 0;
#else
@@ -1438,10 +1438,10 @@ static int vf_open(vf_instance_t *vf, ch
}
if (p->mmx2 > 2)
p->mmx2 = 0;
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
p->mmx2 = 0;
#endif
-#if !HAVE_AMD3DNOW
+#if !HAVE_AMD3DNOW_INLINE
p->mmx2 &= 1;
#endif
p->thres.odd = p->thres.even;
Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_fspp.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -101,7 +101,7 @@ struct vf_priv_s { //align 16 !
};
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
//This func reads from 1 slice, 1 and clears 0 & 1
static void store_slice_c(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
@@ -177,7 +177,7 @@ static void row_fdct_c(int16_t *data, co
#define row_idct_s row_idct_c
#define row_fdct_s row_fdct_c
-#else /* HAVE_MMX */
+#else /* HAVE_MMX_INLINE */
//This func reads from 1 slice, 1 and clears 0 & 1
static void store_slice_mmx(uint8_t *dst, int16_t *src, long dst_stride, long src_stride, long width, long height, long log2_scale)
@@ -404,7 +404,7 @@ static void row_fdct_mmx(int16_t *data,
#define column_fidct_s column_fidct_mmx
#define row_idct_s row_idct_mmx
#define row_fdct_s row_fdct_mmx
-#endif // HAVE_MMX
+#endif // HAVE_MMX_INLINE
static void filter(struct vf_priv_s *p, uint8_t *dst, uint8_t *src,
int dst_stride, int src_stride,
@@ -563,10 +563,10 @@ static int put_image(struct vf_instance
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
return vf_next_put_image(vf,dmpi, pts);
@@ -707,7 +707,7 @@ const vf_info_t vf_info_fspp = {
#define THRESHOLD(r,x,t) if(((unsigned)((x)+t))>t*2) r=(x);else r=0;
#define DESCALE(x,n) (((x) + (1 << ((n)-1))) >> n)
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14);
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14);
@@ -728,7 +728,7 @@ DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_
DECLARE_ASM_CONST(8, uint64_t, MM_DESCALE_RND)=C64(4);
DECLARE_ASM_CONST(8, uint64_t, MM_2)=C64(2);
-#else /* !HAVE_MMX */
+#else /* !HAVE_MMXEXT_INLINE */
typedef int32_t int_simd16_t;
static const int16_t FIX_0_382683433=FIX(0.382683433, 14);
@@ -743,7 +743,7 @@ static const int16_t FIX_1_082392200=FIX
#endif
-#if !HAVE_MMX
+#if !HAVE_MMXEXT_INLINE
static void column_fidct_c(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt)
{
@@ -868,7 +868,7 @@ static void column_fidct_c(int16_t* thr_
}
}
-#else /* HAVE_MMX */
+#else /* HAVE_MMX_INLINE */
static void column_fidct_mmx(int16_t* thr_adr, int16_t *data, int16_t *output, int cnt)
{
@@ -1605,9 +1605,9 @@ static void column_fidct_mmx(int16_t* th
);
}
-#endif // HAVE_MMX
+#endif // HAVE_MMX_INLINE
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
static void row_idct_c(int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt)
@@ -1672,7 +1672,7 @@ static void row_idct_c(int16_t* workspac
}
}
-#else /* HAVE_MMX */
+#else /* HAVE_MMX_INLINE */
static void row_idct_mmx (int16_t* workspace,
int16_t* output_adr, int output_stride, int cnt)
@@ -1876,9 +1876,9 @@ static void row_idct_mmx (int16_t* works
);
}
-#endif // HAVE_MMX
+#endif // HAVE_MMX_INLINE
-#if !HAVE_MMX
+#if !HAVE_MMX_INLINE
static void row_fdct_c(int16_t *data, const uint8_t *pixels, int line_size, int cnt)
{
@@ -1941,7 +1941,7 @@ static void row_fdct_c(int16_t *data, co
}
}
-#else /* HAVE_MMX */
+#else /* HAVE_MMX_INLINE */
static void row_fdct_mmx(int16_t *data, const uint8_t *pixels, int line_size, int cnt)
{
@@ -2121,4 +2121,4 @@ static void row_fdct_mmx(int16_t *data,
: "%"REG_d);
}
-#endif // HAVE_MMX
+#endif // HAVE_MMX_INLINE
Modified: trunk/libmpcodecs/vf_gradfun.c
==============================================================================
--- trunk/libmpcodecs/vf_gradfun.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_gradfun.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -93,7 +93,7 @@ static void blur_line_c(uint16_t *dc, ui
}
}
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
static void filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers)
{
@@ -142,7 +142,7 @@ static void filter_line_mmx2(uint8_t *ds
}
#endif
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
static void filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc,
int width, int thresh, const uint16_t *dithers)
{
@@ -188,9 +188,9 @@ static void filter_line_ssse3(uint8_t *d
:"memory"
);
}
-#endif // HAVE_SSSE3
+#endif // HAVE_SSSE3_INLINE
-#if HAVE_SSE2 && HAVE_6REGS
+#if HAVE_SSE2_INLINE && HAVE_6REGS
#define BLURV(load)\
intptr_t x = -2*width;\
__asm__ volatile(\
@@ -233,7 +233,7 @@ static void blur_line_sse2(uint16_t *dc,
BLURV("movdqa");
}
}
-#endif // HAVE_6REGS && HAVE_SSE2
+#endif // HAVE_6REGS && HAVE_SSE2_INLINE
static void filter(struct vf_priv_s *ctx, uint8_t *dst, uint8_t *src,
int width, int height, int dstride, int sstride, int r)
@@ -387,15 +387,15 @@ static int vf_open(vf_instance_t *vf, ch
vf->priv->blur_line = blur_line_c;
vf->priv->filter_line = filter_line_c;
-#if HAVE_SSE2 && HAVE_6REGS
+#if HAVE_SSE2_INLINE && HAVE_6REGS
if (gCpuCaps.hasSSE2)
vf->priv->blur_line = blur_line_sse2;
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if (gCpuCaps.hasMMX2)
vf->priv->filter_line = filter_line_mmx2;
#endif
-#if HAVE_SSSE3
+#if HAVE_SSSE3_INLINE
if (gCpuCaps.hasSSSE3)
vf->priv->filter_line = filter_line_ssse3;
#endif
Modified: trunk/libmpcodecs/vf_halfpack.c
==============================================================================
--- trunk/libmpcodecs/vf_halfpack.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_halfpack.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -38,7 +38,7 @@ struct vf_priv_s {
struct SwsContext *ctx;
};
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void halfpack_MMX(unsigned char *dst, unsigned char *src[3],
int dststride, int srcstride[3],
int w, int h)
@@ -238,7 +238,7 @@ static int vf_open(vf_instance_t *vf, ch
if (args) sscanf(args, "%d", &vf->priv->field);
halfpack = halfpack_C;
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) halfpack = halfpack_MMX;
#endif
return 1;
Modified: trunk/libmpcodecs/vf_ilpack.c
==============================================================================
--- trunk/libmpcodecs/vf_ilpack.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_ilpack.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -78,7 +78,7 @@ static void pack_li_1_C(unsigned char *d
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
unsigned char *u, unsigned char *v, int w,
int av_unused us, int av_unused vs)
@@ -420,7 +420,7 @@ static int vf_open(vf_instance_t *vf, ch
pack_nn = pack_nn_C;
pack_li_0 = pack_li_0_C;
pack_li_1 = pack_li_1_C;
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) {
pack_nn = pack_nn_MMX;
#if HAVE_EBX_AVAILABLE
Modified: trunk/libmpcodecs/vf_ivtc.c
==============================================================================
--- trunk/libmpcodecs/vf_ivtc.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_ivtc.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -58,7 +58,7 @@ enum {
F_SHOW
};
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char *new, int os, int ns)
{
int i;
@@ -534,7 +534,7 @@ static int vf_open(vf_instance_t *vf, ch
p->first = 1;
if (args) sscanf(args, "%d", &p->drop);
block_diffs = block_diffs_C;
-#if HAVE_MMX && HAVE_EBX_AVAILABLE
+#if HAVE_MMX_INLINE && HAVE_EBX_AVAILABLE
if(gCpuCaps.hasMMX) block_diffs = block_diffs_MMX;
#endif
return 1;
Modified: trunk/libmpcodecs/vf_noise.c
==============================================================================
--- trunk/libmpcodecs/vf_noise.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_noise.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -147,7 +147,7 @@ static int8_t *initNoise(FilterParam *fp
/***************************************************************************/
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
x86_reg mmx_len= len&(~7);
noise+=shift;
@@ -176,7 +176,7 @@ static inline void lineNoise_MMX(uint8_t
#endif
//duplicate of previous except movntq
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
x86_reg mmx_len= len&(~7);
noise+=shift;
@@ -218,7 +218,7 @@ static inline void lineNoise_C(uint8_t *
/***************************************************************************/
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
x86_reg mmx_len= len&(~7);
@@ -358,10 +358,10 @@ static int put_image(struct vf_instance
vf_clone_mpi_attributes(dmpi, mpi);
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
@@ -449,13 +449,13 @@ static int vf_open(vf_instance_t *vf, ch
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX){
lineNoise= lineNoise_MMX;
lineNoiseAvg= lineNoiseAvg_MMX;
}
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) lineNoise= lineNoise_MMX2;
// if(gCpuCaps.hasMMX) lineNoiseAvg= lineNoiseAvg_MMX2;
#endif
Modified: trunk/libmpcodecs/vf_pp7.c
==============================================================================
--- trunk/libmpcodecs/vf_pp7.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_pp7.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -155,7 +155,7 @@ static void dctB_c(int16_t *dst, int16_t
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void dctB_mmx(int16_t *dst, int16_t *src){
__asm__ volatile (
"movq (%0), %%mm0 \n\t"
@@ -397,10 +397,10 @@ static int put_image(struct vf_instance
memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[2], mpi->stride[2]);
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
@@ -464,7 +464,7 @@ static int vf_open(vf_instance_t *vf, ch
case 2: requantize= mediumthresh_c; break;
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX){
dctB= dctB_mmx;
}
Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_scale.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -599,7 +599,7 @@ void sws_getFlagsAndFilterFromCmdLine(in
static int firstTime=1;
*flags=0;
-#if ARCH_X86
+#if ARCH_X86 && HAVE_MMX_INLINE
if(gCpuCaps.hasMMX)
__asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
#endif
Modified: trunk/libmpcodecs/vf_spp.c
==============================================================================
--- trunk/libmpcodecs/vf_spp.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_spp.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -153,7 +153,7 @@ static void softthresh_c(int16_t dst[64]
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void hardthresh_mmx(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation){
int bias= 0; //FIXME
unsigned int threshold1;
@@ -334,7 +334,7 @@ static void store_slice_c(uint8_t *dst,
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void store_slice_mmx(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale){
int y;
@@ -512,10 +512,10 @@ static int put_image(struct vf_instance
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
@@ -604,7 +604,7 @@ static int vf_open(vf_instance_t *vf, ch
case 1: requantize= softthresh_c; break;
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX){
store_slice= store_slice_mmx;
switch(vf->priv->mode&3){
Modified: trunk/libmpcodecs/vf_tfields.c
==============================================================================
--- trunk/libmpcodecs/vf_tfields.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_tfields.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -71,7 +71,7 @@ static void deint(unsigned char *dest, i
fast_memcpy(dest, src, w);
}
-#if HAVE_AMD3DNOW
+#if HAVE_AMD3DNOW_INLINE
static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
{
int i, j, ssd=ss;
@@ -107,7 +107,7 @@ static void qpel_li_3DNOW(unsigned char
}
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
{
int i, j, ssd=ss;
@@ -144,7 +144,7 @@ static void qpel_li_MMX2(unsigned char *
}
#endif
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
{
int i, j, ssd=ss;
@@ -509,16 +509,16 @@ static int vf_open(vf_instance_t *vf, ch
if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
qpel_li = qpel_li_C;
qpel_4tap = qpel_4tap_C;
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX;
#if HAVE_EBX_AVAILABLE
if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX;
#endif
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2;
#endif
-#if HAVE_AMD3DNOW
+#if HAVE_AMD3DNOW_INLINE
if(gCpuCaps.has3DNow) qpel_li = qpel_li_3DNOW;
#endif
return 1;
Modified: trunk/libmpcodecs/vf_unsharp.c
==============================================================================
--- trunk/libmpcodecs/vf_unsharp.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_unsharp.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -193,11 +193,11 @@ static int put_image( struct vf_instance
vf_clone_mpi_attributes(dmpi, mpi);
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX)
__asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2)
__asm__ volatile ("sfence\n\t");
#endif
Modified: trunk/libmpcodecs/vf_uspp.c
==============================================================================
--- trunk/libmpcodecs/vf_uspp.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_uspp.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -295,10 +295,10 @@ static int put_image(struct vf_instance
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
#endif
-#if HAVE_MMX2
+#if HAVE_MMXEXT_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
#endif
Modified: trunk/libmpcodecs/vf_yadif.c
==============================================================================
--- trunk/libmpcodecs/vf_yadif.c Wed Nov 5 19:42:10 2014 (r37324)
+++ trunk/libmpcodecs/vf_yadif.c Sun Nov 16 17:20:49 2014 (r37325)
@@ -76,7 +76,7 @@ static void store_ref(struct vf_priv_s *
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
#define LOAD4(mem,dst) \
"movd "mem", "#dst" \n\t"\
@@ -289,7 +289,7 @@ static void filter_line_mmx2(struct vf_p
#undef CHECK2
#undef FILTER
-#endif /* HAVE_MMX */
+#endif /* HAVE_MMX_INLINE */
static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity){
int x;
@@ -371,7 +371,7 @@ static void filter(struct vf_priv_s *p,
}
}
}
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory");
#endif
}
@@ -508,7 +508,7 @@ static int vf_open(vf_instance_t *vf, ch
if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
filter_line = filter_line_c;
-#if HAVE_MMX
+#if HAVE_MMX_INLINE
if(gCpuCaps.hasMMX2) filter_line = filter_line_mmx2;
#endif
More information about the MPlayer-cvslog
mailing list