aboutsummaryrefslogtreecommitdiff
path: root/jdsample.c
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2014-05-18 20:04:47 +0000
committerDRC <dcommander@users.sourceforge.net>2014-05-18 20:04:47 +0000
commit5ef463056ae22f24c3915ba7ab03eefd5bb6fde7 (patch)
treebec371ec084eec9777196852bbf6ae95d31e38c7 /jdsample.c
parentc728cfd8f236929808cf081232e0702f3382d80b (diff)
downloadlibjpeg-turbo-5ef463056ae22f24c3915ba7ab03eefd5bb6fde7.tar.gz
SIMD-accelerated int upsample routine for MIPS DSPr2
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1315 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jdsample.c')
-rw-r--r--jdsample.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/jdsample.c b/jdsample.c
index 66f2c04a..27529667 100644
--- a/jdsample.c
+++ b/jdsample.c
@@ -6,6 +6,7 @@
* libjpeg-turbo Modifications:
* Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
* Copyright (C) 2010, D. R. Commander.
+ * Copyright (C) 2014, MIPS Technologies, Inc., California
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains upsampling routines.
@@ -482,7 +483,12 @@ jinit_upsampler (j_decompress_ptr cinfo)
} else if ((h_out_group % h_in_group) == 0 &&
(v_out_group % v_in_group) == 0) {
/* Generic integral-factors upsampling method */
- upsample->methods[ci] = int_upsample;
+#if defined(__mips__)
+ if (jsimd_can_int_upsample())
+ upsample->methods[ci] = jsimd_int_upsample;
+ else
+#endif
+ upsample->methods[ci] = int_upsample;
upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group);
upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group);
} else