return 0;
}
if (check_feature(buffer, "neon"))
- simd_support |= JSIMD_ARM_NEON;
+ simd_support |= JSIMD_NEON;
}
fclose(fd);
}
simd_support = 0;
#if defined(__ARM_NEON__)
- simd_support |= JSIMD_ARM_NEON;
+ simd_support |= JSIMD_NEON;
#elif defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
/* We still have a chance to use NEON regardless of globally used
* -mcpu/-mfpu options passed to gcc by performing runtime detection via
/* Force different settings through environment variables */
env = getenv("JSIMD_FORCENEON");
if ((env != NULL) && (strcmp(env, "1") == 0))
- simd_support = JSIMD_ARM_NEON;
+ simd_support = JSIMD_NEON;
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_rgb_gray (void)
{
- init_simd();
-
return 0;
}
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_h2v2_downsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_downsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v2_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v2_fancy_upsample (void)
{
- init_simd();
-
return 0;
}
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_h2v2_merged_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_merged_upsample (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_convsamp_float (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_fdct_islow (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_fdct_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_quantize_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (IFAST_SCALE_BITS != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_idct_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(JCOEF) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON && simd_huffman)
+ if (simd_support & JSIMD_NEON && simd_huffman)
return 1;
return 0;
* ARMv7 NEON optimizations for libjpeg-turbo
*
* Copyright (C) 2009-2011, Nokia Corporation and/or its subsidiary(-ies).
- * All Rights Reserved.
- * Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+ * All Rights Reserved.
+ * Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
* Copyright (C) 2014, Siarhei Siamashka. All Rights Reserved.
* Copyright (C) 2014, Linaro Limited. All Rights Reserved.
* Copyright (C) 2015, D. R. Commander. All Rights Reserved.
simd_support = 0;
- simd_support |= JSIMD_ARM_NEON;
+ simd_support |= JSIMD_NEON;
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
while (!parse_proc_cpuinfo(bufsize)) {
bufsize *= 2;
/* Force different settings through environment variables */
env = getenv("JSIMD_FORCENEON");
if ((env != NULL) && (strcmp(env, "1") == 0))
- simd_support = JSIMD_ARM_NEON;
+ simd_support = JSIMD_NEON;
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_rgb_gray (void)
{
- init_simd();
-
return 0;
}
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_h2v2_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v2_fancy_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_fancy_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v2_merged_upsample (void)
{
- init_simd();
-
return 0;
}
GLOBAL(int)
jsimd_can_h2v1_merged_upsample (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_convsamp_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_fdct_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_quantize_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
if (IFAST_SCALE_BITS != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON)
+ if (simd_support & JSIMD_NEON)
return 1;
return 0;
GLOBAL(int)
jsimd_can_idct_float (void)
{
- init_simd();
-
return 0;
}
if (sizeof(JCOEF) != 2)
return 0;
- if (simd_support & JSIMD_ARM_NEON && simd_huffman)
+ if (simd_support & JSIMD_NEON && simd_huffman)
return 1;
return 0;
* ARMv8 NEON optimizations for libjpeg-turbo
*
* Copyright (C) 2009-2011, Nokia Corporation and/or its subsidiary(-ies).
- * All Rights Reserved.
- * Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
+ * All Rights Reserved.
+ * Author: Siarhei Siamashka <siarhei.siamashka@nokia.com>
* Copyright (C) 2013-2014, Linaro Limited. All Rights Reserved.
- * Author: Ragesh Radhakrishnan <ragesh.r@linaro.org>
+ * Author: Ragesh Radhakrishnan <ragesh.r@linaro.org>
* Copyright (C) 2014-2016, D. R. Commander. All Rights Reserved.
* Copyright (C) 2015-2016, 2018, Matthieu Darbois. All Rights Reserved.
* Copyright (C) 2016, Siarhei Siamashka. All Rights Reserved.
* GLOBAL(void)
* jsimd_h2v1_downsample_neon (JDIMENSION image_width, int max_v_samp_factor,
* JDIMENSION v_samp_factor,
- * JDIMENSION width_blocks, JSAMPARRAY input_data,
- * JSAMPARRAY output_data);
+ * JDIMENSION width_in_blocks,
+ * JSAMPARRAY input_data, JSAMPARRAY output_data);
*/
.balign 16
*
* GLOBAL(void)
* jsimd_h2v2_downsample_neon (JDIMENSION image_width, int max_v_samp_factor,
- * JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ * JDIMENSION v_samp_factor,
+ * JDIMENSION width_in_blocks,
* JSAMPARRAY input_data, JSAMPARRAY output_data);
*/
;
; GLOBAL(void)
; jsimd_h2v1_downsample_avx2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v2_downsample_avx2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v1_downsample_mmx (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks, JSAMPARRAY input_data,
+; JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v2_downsample_mmx (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
-; JSAMPARRAY input_data, JSAMPARRAY output_data);
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks, JSAMPARRAY input_data,
+; JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v1_downsample_sse2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v2_downsample_sse2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
%define img_width(b) (b)+8 ; JDIMENSION image_width
%define max_v_samp(b) (b)+12 ; int max_v_samp_factor
%define v_samp(b) (b)+16 ; JDIMENSION v_samp_factor
-%define width_blks(b) (b)+20 ; JDIMENSION width_blocks
+%define width_blks(b) (b)+20 ; JDIMENSION width_in_blocks
%define input_data(b) (b)+24 ; JSAMPARRAY input_data
%define output_data(b) (b)+28 ; JSAMPARRAY output_data
avx2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
else if (simd_support & JSIMD_SSE2)
sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
- else if (simd_support & JSIMD_MMX)
+ else
mmxfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
}
avx2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
else if (simd_support & JSIMD_SSE2)
sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
- else if (simd_support & JSIMD_MMX)
+ else
mmxfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
}
avx2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
else if (simd_support & JSIMD_SSE2)
sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
- else if (simd_support & JSIMD_MMX)
+ else
mmxfct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
}
compptr->v_samp_factor,
compptr->width_in_blocks, input_data,
output_data);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v2_downsample_mmx(cinfo->image_width, cinfo->max_v_samp_factor,
compptr->v_samp_factor, compptr->width_in_blocks,
input_data, output_data);
compptr->v_samp_factor,
compptr->width_in_blocks, input_data,
output_data);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v1_downsample_mmx(cinfo->image_width, cinfo->max_v_samp_factor,
compptr->v_samp_factor, compptr->width_in_blocks,
input_data, output_data);
else if (simd_support & JSIMD_SSE2)
jsimd_h2v2_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width,
input_data, output_data_ptr);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v2_upsample_mmx(cinfo->max_v_samp_factor, cinfo->output_width,
input_data, output_data_ptr);
}
else if (simd_support & JSIMD_SSE2)
jsimd_h2v1_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width,
input_data, output_data_ptr);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v1_upsample_mmx(cinfo->max_v_samp_factor, cinfo->output_width,
input_data, output_data_ptr);
}
jsimd_h2v2_fancy_upsample_sse2(cinfo->max_v_samp_factor,
compptr->downsampled_width, input_data,
output_data_ptr);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v2_fancy_upsample_mmx(cinfo->max_v_samp_factor,
compptr->downsampled_width, input_data,
output_data_ptr);
jsimd_h2v1_fancy_upsample_sse2(cinfo->max_v_samp_factor,
compptr->downsampled_width, input_data,
output_data_ptr);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_h2v1_fancy_upsample_mmx(cinfo->max_v_samp_factor,
compptr->downsampled_width, input_data,
output_data_ptr);
avx2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
else if (simd_support & JSIMD_SSE2)
sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
- else if (simd_support & JSIMD_MMX)
+ else
mmxfct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
}
avx2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
else if (simd_support & JSIMD_SSE2)
sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
- else if (simd_support & JSIMD_MMX)
+ else
mmxfct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf);
}
jsimd_convsamp_avx2(sample_data, start_col, workspace);
else if (simd_support & JSIMD_SSE2)
jsimd_convsamp_sse2(sample_data, start_col, workspace);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_convsamp_mmx(sample_data, start_col, workspace);
}
jsimd_convsamp_float_sse2(sample_data, start_col, workspace);
else if (simd_support & JSIMD_SSE)
jsimd_convsamp_float_sse(sample_data, start_col, workspace);
- else if (simd_support & JSIMD_3DNOW)
+ else
jsimd_convsamp_float_3dnow(sample_data, start_col, workspace);
}
jsimd_fdct_islow_avx2(data);
else if (simd_support & JSIMD_SSE2)
jsimd_fdct_islow_sse2(data);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_fdct_islow_mmx(data);
}
{
if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_fdct_islow_sse2))
jsimd_fdct_ifast_sse2(data);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_fdct_ifast_mmx(data);
}
jsimd_quantize_avx2(coef_block, divisors, workspace);
else if (simd_support & JSIMD_SSE2)
jsimd_quantize_sse2(coef_block, divisors, workspace);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_quantize_mmx(coef_block, divisors, workspace);
}
jsimd_quantize_float_sse2(coef_block, divisors, workspace);
else if (simd_support & JSIMD_SSE)
jsimd_quantize_float_sse(coef_block, divisors, workspace);
- else if (simd_support & JSIMD_3DNOW)
+ else
jsimd_quantize_float_3dnow(coef_block, divisors, workspace);
}
if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_red_sse2))
jsimd_idct_2x2_sse2(compptr->dct_table, coef_block, output_buf,
output_col);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_idct_2x2_mmx(compptr->dct_table, coef_block, output_buf, output_col);
}
if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_red_sse2))
jsimd_idct_4x4_sse2(compptr->dct_table, coef_block, output_buf,
output_col);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_idct_4x4_mmx(compptr->dct_table, coef_block, output_buf, output_col);
}
else if (simd_support & JSIMD_SSE2)
jsimd_idct_islow_sse2(compptr->dct_table, coef_block, output_buf,
output_col);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_idct_islow_mmx(compptr->dct_table, coef_block, output_buf,
output_col);
}
if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_idct_ifast_sse2))
jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf,
output_col);
- else if (simd_support & JSIMD_MMX)
+ else
jsimd_idct_ifast_mmx(compptr->dct_table, coef_block, output_buf,
output_col);
}
else if ((simd_support & JSIMD_SSE) && IS_ALIGNED_SSE(jconst_idct_float_sse))
jsimd_idct_float_sse(compptr->dct_table, coef_block, output_buf,
output_col);
- else if (simd_support & JSIMD_3DNOW)
+ else
jsimd_idct_float_3dnow(compptr->dct_table, coef_block, output_buf,
output_col);
}
/* Bitmask for supported acceleration methods */
-#define JSIMD_NONE 0x00
-#define JSIMD_MMX 0x01
-#define JSIMD_3DNOW 0x02
-#define JSIMD_SSE 0x04
-#define JSIMD_SSE2 0x08
-#define JSIMD_ARM_NEON 0x10
-#define JSIMD_MIPS_DSPR2 0x20
-#define JSIMD_ALTIVEC 0x40
-#define JSIMD_AVX2 0x80
+#define JSIMD_NONE 0x00
+#define JSIMD_MMX 0x01
+#define JSIMD_3DNOW 0x02
+#define JSIMD_SSE 0x04
+#define JSIMD_SSE2 0x08
+#define JSIMD_NEON 0x10
+#define JSIMD_DSPR2 0x20
+#define JSIMD_ALTIVEC 0x40
+#define JSIMD_AVX2 0x80
/* SIMD Ext: retrieve SIMD/CPU information */
EXTERN(unsigned int) jpeg_simd_cpu_support (void);
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_rgb_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_rgb_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extrgb_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extrgb_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extrgbx_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extrgbx_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extbgr_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extbgr_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extbgrx_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extbgrx_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extxbgr_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extxbgr_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extxrgb_ycc_convert_mips_dspr2
+EXTERN(void) jsimd_extxrgb_ycc_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_rgb_gray_convert_mips_dspr2
+EXTERN(void) jsimd_rgb_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extrgb_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extrgb_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extrgbx_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extrgbx_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extbgr_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extbgr_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extbgrx_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extbgrx_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extxbgr_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extxbgr_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
-EXTERN(void) jsimd_extxrgb_gray_convert_mips_dspr2
+EXTERN(void) jsimd_extxrgb_gray_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows);
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_rgb_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_rgb_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extrgb_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extrgb_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extrgbx_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extrgbx_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extbgr_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extbgr_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extbgrx_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extbgrx_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extxbgr_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extxbgr_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
-EXTERN(void) jsimd_ycc_extxrgb_convert_mips_dspr2
+EXTERN(void) jsimd_ycc_extxrgb_convert_dspr2
(JDIMENSION out_width, JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows);
JSAMPARRAY output_buf, int num_rows);
/* NULL Colorspace Conversion */
-EXTERN(void) jsimd_c_null_convert_mips_dspr2
+EXTERN(void) jsimd_c_null_convert_dspr2
(JDIMENSION img_width, JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows, int num_components);
/* h2v1 Downsampling */
EXTERN(void) jsimd_h2v1_downsample_mmx
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v1_downsample_sse2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v1_downsample_avx2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v1_downsample_neon
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
-EXTERN(void) jsimd_h2v1_downsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_downsample_dspr2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v1_downsample_altivec
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
/* h2v2 Downsampling */
EXTERN(void) jsimd_h2v2_downsample_mmx
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v2_downsample_sse2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v2_downsample_avx2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v2_downsample_neon
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
-EXTERN(void) jsimd_h2v2_downsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_downsample_dspr2
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
EXTERN(void) jsimd_h2v2_downsample_altivec
(JDIMENSION image_width, int max_v_samp_factor,
- JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+ JDIMENSION v_samp_factor, JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data);
/* h2v2 Smooth Downsampling */
-EXTERN(void) jsimd_h2v2_smooth_downsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_smooth_downsample_dspr2
(JSAMPARRAY input_data, JSAMPARRAY output_data,
JDIMENSION v_samp_factor, int max_v_samp_factor,
- int smoothing_factor, JDIMENSION width_blocks,
+ int smoothing_factor, JDIMENSION width_in_blocks,
JDIMENSION image_width);
(int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr);
-EXTERN(void) jsimd_h2v1_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_upsample_dspr2
(int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr);
-EXTERN(void) jsimd_h2v2_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_upsample_dspr2
(int max_v_samp_factor, JDIMENSION output_width, JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr);
-EXTERN(void) jsimd_int_upsample_mips_dspr2
+EXTERN(void) jsimd_int_upsample_dspr2
(UINT8 h_expand, UINT8 v_expand, JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr, JDIMENSION output_width,
int max_v_samp_factor);
(int max_v_samp_factor, JDIMENSION downsampled_width,
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
-EXTERN(void) jsimd_h2v1_fancy_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_fancy_upsample_dspr2
(int max_v_samp_factor, JDIMENSION downsampled_width,
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
-EXTERN(void) jsimd_h2v2_fancy_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_fancy_upsample_dspr2
(int max_v_samp_factor, JDIMENSION downsampled_width,
JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr);
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf);
-EXTERN(void) jsimd_h2v1_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extrgb_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extrgbx_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extbgr_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extbgrx_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extxbgr_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v1_extxrgb_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extrgb_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extrgbx_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extbgr_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extbgrx_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extxbgr_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
-EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
+EXTERN(void) jsimd_h2v2_extxrgb_merged_upsample_dspr2
(JDIMENSION output_width, JSAMPIMAGE input_buf,
JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf, JSAMPLE* range);
EXTERN(void) jsimd_convsamp_neon
(JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
-EXTERN(void) jsimd_convsamp_mips_dspr2
+EXTERN(void) jsimd_convsamp_dspr2
(JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace);
EXTERN(void) jsimd_convsamp_altivec
EXTERN(void) jsimd_convsamp_float_sse2
(JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
-EXTERN(void) jsimd_convsamp_float_mips_dspr2
+EXTERN(void) jsimd_convsamp_float_dspr2
(JSAMPARRAY sample_data, JDIMENSION start_col, FAST_FLOAT *workspace);
/* Slow Integer Forward DCT */
EXTERN(void) jsimd_fdct_islow_neon (DCTELEM *data);
-EXTERN(void) jsimd_fdct_islow_mips_dspr2 (DCTELEM *data);
+EXTERN(void) jsimd_fdct_islow_dspr2 (DCTELEM *data);
EXTERN(void) jsimd_fdct_islow_altivec (DCTELEM *data);
EXTERN(void) jsimd_fdct_ifast_neon (DCTELEM *data);
-EXTERN(void) jsimd_fdct_ifast_mips_dspr2 (DCTELEM *data);
+EXTERN(void) jsimd_fdct_ifast_dspr2 (DCTELEM *data);
EXTERN(void) jsimd_fdct_ifast_altivec (DCTELEM *data);
EXTERN(void) jsimd_quantize_neon
(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
-EXTERN(void) jsimd_quantize_mips_dspr2
+EXTERN(void) jsimd_quantize_dspr2
(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace);
EXTERN(void) jsimd_quantize_altivec
EXTERN(void) jsimd_quantize_float_sse2
(JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
-EXTERN(void) jsimd_quantize_float_mips_dspr2
+EXTERN(void) jsimd_quantize_float_dspr2
(JCOEFPTR coef_block, FAST_FLOAT *divisors, FAST_FLOAT *workspace);
/* Scaled Inverse DCT */
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
-EXTERN(void) jsimd_idct_2x2_mips_dspr2
+EXTERN(void) jsimd_idct_2x2_dspr2
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
-EXTERN(void) jsimd_idct_4x4_mips_dspr2
+EXTERN(void) jsimd_idct_4x4_dspr2
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col, int *workspace);
-EXTERN(void) jsimd_idct_6x6_mips_dspr2
+EXTERN(void) jsimd_idct_6x6_dspr2
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
-EXTERN(void) jsimd_idct_12x12_pass1_mips_dspr2
+EXTERN(void) jsimd_idct_12x12_pass1_dspr2
(JCOEFPTR coef_block, void *dct_table, int *workspace);
-EXTERN(void) jsimd_idct_12x12_pass2_mips_dspr2
+EXTERN(void) jsimd_idct_12x12_pass2_dspr2
(int *workspace, int *output);
/* Slow Integer Inverse DCT */
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
-EXTERN(void) jsimd_idct_islow_mips_dspr2
+EXTERN(void) jsimd_idct_islow_dspr2
(void *dct_table, JCOEFPTR coef_block, int *output_buf,
JSAMPLE *output_col);
(void *dct_table, JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col);
-EXTERN(void) jsimd_idct_ifast_cols_mips_dspr2
+EXTERN(void) jsimd_idct_ifast_cols_dspr2
(JCOEF *inptr, IFAST_MULT_TYPE *quantptr, DCTELEM *wsptr,
const int *idct_coefs);
-EXTERN(void) jsimd_idct_ifast_rows_mips_dspr2
+EXTERN(void) jsimd_idct_ifast_rows_dspr2
(DCTELEM *wsptr, JSAMPARRAY output_buf, JDIMENSION output_col,
const int *idct_coefs);
while (fgets(cpuinfo_line, sizeof(cpuinfo_line), f) != NULL) {
if (strstr(cpuinfo_line, search_string) != NULL) {
fclose(f);
- simd_support |= JSIMD_MIPS_DSPR2;
+ simd_support |= JSIMD_DSPR2;
return 1;
}
}
simd_support = 0;
#if defined(__MIPSEL__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
- simd_support |= JSIMD_MIPS_DSPR2;
+ simd_support |= JSIMD_DSPR2;
#elif defined(__linux__)
/* We still have a chance to use MIPS DSPR2 regardless of globally used
* -mdspr2 options passed to gcc by performing runtime detection via
/* Force different settings through environment variables */
env = getenv("JSIMD_FORCEDSPR2");
if ((env != NULL) && (strcmp(env, "1") == 0))
- simd_support = JSIMD_MIPS_DSPR2;
+ simd_support = JSIMD_DSPR2;
env = getenv("JSIMD_FORCENONE");
if ((env != NULL) && (strcmp(env, "1") == 0))
simd_support = 0;
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows)
{
- void (*mipsdspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
+ void (*dspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
switch(cinfo->in_color_space) {
case JCS_EXT_RGB:
- mipsdspr2fct=jsimd_extrgb_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgb_ycc_convert_dspr2;
break;
case JCS_EXT_RGBX:
case JCS_EXT_RGBA:
- mipsdspr2fct=jsimd_extrgbx_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgbx_ycc_convert_dspr2;
break;
case JCS_EXT_BGR:
- mipsdspr2fct=jsimd_extbgr_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extbgr_ycc_convert_dspr2;
break;
case JCS_EXT_BGRX:
case JCS_EXT_BGRA:
- mipsdspr2fct=jsimd_extbgrx_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extbgrx_ycc_convert_dspr2;
break;
case JCS_EXT_XBGR:
case JCS_EXT_ABGR:
- mipsdspr2fct=jsimd_extxbgr_ycc_convert_mips_dspr2;
-
+ dspr2fct=jsimd_extxbgr_ycc_convert_dspr2;
break;
case JCS_EXT_XRGB:
case JCS_EXT_ARGB:
- mipsdspr2fct=jsimd_extxrgb_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extxrgb_ycc_convert_dspr2;
break;
default:
- mipsdspr2fct=jsimd_extrgb_ycc_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgb_ycc_convert_dspr2;
break;
}
- if (simd_support & JSIMD_MIPS_DSPR2)
- mipsdspr2fct(cinfo->image_width, input_buf, output_buf, output_row,
- num_rows);
+ dspr2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
}
GLOBAL(void)
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows)
{
- void (*mipsdspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
+ void (*dspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
switch(cinfo->in_color_space) {
case JCS_EXT_RGB:
- mipsdspr2fct=jsimd_extrgb_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgb_gray_convert_dspr2;
break;
case JCS_EXT_RGBX:
case JCS_EXT_RGBA:
- mipsdspr2fct=jsimd_extrgbx_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgbx_gray_convert_dspr2;
break;
case JCS_EXT_BGR:
- mipsdspr2fct=jsimd_extbgr_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extbgr_gray_convert_dspr2;
break;
case JCS_EXT_BGRX:
case JCS_EXT_BGRA:
- mipsdspr2fct=jsimd_extbgrx_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extbgrx_gray_convert_dspr2;
break;
case JCS_EXT_XBGR:
case JCS_EXT_ABGR:
- mipsdspr2fct=jsimd_extxbgr_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extxbgr_gray_convert_dspr2;
break;
case JCS_EXT_XRGB:
case JCS_EXT_ARGB:
- mipsdspr2fct=jsimd_extxrgb_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extxrgb_gray_convert_dspr2;
break;
default:
- mipsdspr2fct=jsimd_extrgb_gray_convert_mips_dspr2;
+ dspr2fct=jsimd_extrgb_gray_convert_dspr2;
break;
}
- if (simd_support & JSIMD_MIPS_DSPR2)
- mipsdspr2fct(cinfo->image_width, input_buf, output_buf, output_row,
- num_rows);
+ dspr2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
}
GLOBAL(void)
JSAMPIMAGE input_buf, JDIMENSION input_row,
JSAMPARRAY output_buf, int num_rows)
{
- void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
+ void (*dspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
switch(cinfo->out_color_space) {
case JCS_EXT_RGB:
- mipsdspr2fct=jsimd_ycc_extrgb_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extrgb_convert_dspr2;
break;
case JCS_EXT_RGBX:
case JCS_EXT_RGBA:
- mipsdspr2fct=jsimd_ycc_extrgbx_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extrgbx_convert_dspr2;
break;
case JCS_EXT_BGR:
- mipsdspr2fct=jsimd_ycc_extbgr_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extbgr_convert_dspr2;
break;
case JCS_EXT_BGRX:
case JCS_EXT_BGRA:
- mipsdspr2fct=jsimd_ycc_extbgrx_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extbgrx_convert_dspr2;
break;
case JCS_EXT_XBGR:
case JCS_EXT_ABGR:
- mipsdspr2fct=jsimd_ycc_extxbgr_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extxbgr_convert_dspr2;
break;
case JCS_EXT_XRGB:
case JCS_EXT_ARGB:
- mipsdspr2fct=jsimd_ycc_extxrgb_convert_mips_dspr2;
+ dspr2fct=jsimd_ycc_extxrgb_convert_dspr2;
break;
- default:
- mipsdspr2fct=jsimd_ycc_extrgb_convert_mips_dspr2;
+ default:
+ dspr2fct=jsimd_ycc_extrgb_convert_dspr2;
break;
}
- if (simd_support & JSIMD_MIPS_DSPR2)
- mipsdspr2fct(cinfo->output_width, input_buf, input_row, output_buf,
- num_rows);
+ dspr2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
}
GLOBAL(void)
JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
JDIMENSION output_row, int num_rows)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_c_null_convert_mips_dspr2(cinfo->image_width, input_buf,
- output_buf, output_row, num_rows,
- cinfo->num_components);
+ jsimd_c_null_convert_dspr2(cinfo->image_width, input_buf, output_buf,
+ output_row, num_rows, cinfo->num_components);
}
GLOBAL(int)
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if(DCTSIZE != 8)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v2_downsample_mips_dspr2(cinfo->image_width,
- cinfo->max_v_samp_factor,
- compptr->v_samp_factor,
- compptr->width_in_blocks, input_data,
- output_data);
+ jsimd_h2v2_downsample_dspr2(cinfo->image_width, cinfo->max_v_samp_factor,
+ compptr->v_samp_factor, compptr->width_in_blocks,
+ input_data, output_data);
}
GLOBAL(void)
jpeg_component_info *compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
- jsimd_h2v2_smooth_downsample_mips_dspr2(input_data, output_data,
- compptr->v_samp_factor,
- cinfo->max_v_samp_factor,
- cinfo->smoothing_factor,
- compptr->width_in_blocks,
- cinfo->image_width);
+ jsimd_h2v2_smooth_downsample_dspr2(input_data, output_data,
+ compptr->v_samp_factor,
+ cinfo->max_v_samp_factor,
+ cinfo->smoothing_factor,
+ compptr->width_in_blocks,
+ cinfo->image_width);
}
GLOBAL(void)
jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v1_downsample_mips_dspr2(cinfo->image_width,
- cinfo->max_v_samp_factor,
- compptr->v_samp_factor,
- compptr->width_in_blocks,
- input_data, output_data);
+ jsimd_h2v1_downsample_dspr2(cinfo->image_width, cinfo->max_v_samp_factor,
+ compptr->v_samp_factor, compptr->width_in_blocks,
+ input_data, output_data);
}
GLOBAL(int)
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v2_upsample_mips_dspr2(cinfo->max_v_samp_factor,
- cinfo->output_width, input_data,
- output_data_ptr);
+ jsimd_h2v2_upsample_dspr2(cinfo->max_v_samp_factor, cinfo->output_width,
+ input_data, output_data_ptr);
}
GLOBAL(void)
JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v1_upsample_mips_dspr2(cinfo->max_v_samp_factor,
- cinfo->output_width, input_data,
- output_data_ptr);
+ jsimd_h2v1_upsample_dspr2(cinfo->max_v_samp_factor, cinfo->output_width,
+ input_data, output_data_ptr);
}
GLOBAL(void)
{
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
- jsimd_int_upsample_mips_dspr2(upsample->h_expand[compptr->component_index],
- upsample->v_expand[compptr->component_index],
- input_data, output_data_ptr,
- cinfo->output_width,
- cinfo->max_v_samp_factor);
+ jsimd_int_upsample_dspr2(upsample->h_expand[compptr->component_index],
+ upsample->v_expand[compptr->component_index],
+ input_data, output_data_ptr, cinfo->output_width,
+ cinfo->max_v_samp_factor);
}
GLOBAL(int)
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v2_fancy_upsample_mips_dspr2(cinfo->max_v_samp_factor,
- compptr->downsampled_width,
- input_data, output_data_ptr);
+ jsimd_h2v2_fancy_upsample_dspr2(cinfo->max_v_samp_factor,
+ compptr->downsampled_width, input_data,
+ output_data_ptr);
}
GLOBAL(void)
JSAMPARRAY input_data,
JSAMPARRAY *output_data_ptr)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_h2v1_fancy_upsample_mips_dspr2(cinfo->max_v_samp_factor,
- compptr->downsampled_width,
- input_data, output_data_ptr);
+ jsimd_h2v1_fancy_upsample_dspr2(cinfo->max_v_samp_factor,
+ compptr->downsampled_width, input_data,
+ output_data_ptr);
}
GLOBAL(int)
{
init_simd();
+ /* The code is optimised for these values only */
if (BITS_IN_JSAMPLE != 8)
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
{
init_simd();
+ /* The code is optimised for these values only */
if (BITS_IN_JSAMPLE != 8)
return 0;
if (sizeof(JDIMENSION) != 4)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
JDIMENSION in_row_group_ctr,
JSAMPARRAY output_buf)
{
- void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY,
- JSAMPLE *);
+ void (*dspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, JSAMPLE *);
switch(cinfo->out_color_space) {
case JCS_EXT_RGB:
- mipsdspr2fct=jsimd_h2v2_extrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extrgb_merged_upsample_dspr2;
break;
case JCS_EXT_RGBX:
case JCS_EXT_RGBA:
- mipsdspr2fct=jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extrgbx_merged_upsample_dspr2;
break;
case JCS_EXT_BGR:
- mipsdspr2fct=jsimd_h2v2_extbgr_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extbgr_merged_upsample_dspr2;
break;
case JCS_EXT_BGRX:
case JCS_EXT_BGRA:
- mipsdspr2fct=jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extbgrx_merged_upsample_dspr2;
break;
case JCS_EXT_XBGR:
case JCS_EXT_ABGR:
- mipsdspr2fct=jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extxbgr_merged_upsample_dspr2;
break;
case JCS_EXT_XRGB:
case JCS_EXT_ARGB:
- mipsdspr2fct=jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extxrgb_merged_upsample_dspr2;
break;
default:
- mipsdspr2fct=jsimd_h2v2_extrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v2_extrgb_merged_upsample_dspr2;
break;
}
- mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf,
- cinfo->sample_range_limit);
+ dspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf,
+ cinfo->sample_range_limit);
}
GLOBAL(void)
JDIMENSION in_row_group_ctr,
JSAMPARRAY output_buf)
{
- void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY,
- JSAMPLE *);
+ void (*dspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, JSAMPLE *);
switch(cinfo->out_color_space) {
case JCS_EXT_RGB:
- mipsdspr2fct=jsimd_h2v1_extrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extrgb_merged_upsample_dspr2;
break;
case JCS_EXT_RGBX:
case JCS_EXT_RGBA:
- mipsdspr2fct=jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extrgbx_merged_upsample_dspr2;
break;
case JCS_EXT_BGR:
- mipsdspr2fct=jsimd_h2v1_extbgr_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extbgr_merged_upsample_dspr2;
break;
case JCS_EXT_BGRX:
case JCS_EXT_BGRA:
- mipsdspr2fct=jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extbgrx_merged_upsample_dspr2;
break;
case JCS_EXT_XBGR:
case JCS_EXT_ABGR:
- mipsdspr2fct=jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extxbgr_merged_upsample_dspr2;
break;
case JCS_EXT_XRGB:
case JCS_EXT_ARGB:
- mipsdspr2fct=jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extxrgb_merged_upsample_dspr2;
break;
default:
- mipsdspr2fct=jsimd_h2v1_extrgb_merged_upsample_mips_dspr2;
+ dspr2fct=jsimd_h2v1_extrgb_merged_upsample_dspr2;
break;
}
- mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf,
- cinfo->sample_range_limit);
+ dspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf,
+ cinfo->sample_range_limit);
}
GLOBAL(int)
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
jsimd_convsamp (JSAMPARRAY sample_data, JDIMENSION start_col,
DCTELEM *workspace)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_convsamp_mips_dspr2(sample_data, start_col, workspace);
+ jsimd_convsamp_dspr2(sample_data, start_col, workspace);
}
GLOBAL(void)
jsimd_convsamp_float (JSAMPARRAY sample_data, JDIMENSION start_col,
FAST_FLOAT *workspace)
{
- if ((simd_support & JSIMD_MIPS_DSPR2))
- jsimd_convsamp_float_mips_dspr2(sample_data, start_col, workspace);
+ jsimd_convsamp_float_dspr2(sample_data, start_col, workspace);
}
GLOBAL(int)
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
GLOBAL(int)
jsimd_can_fdct_float (void)
{
- init_simd();
-
return 0;
}
GLOBAL(void)
jsimd_fdct_islow (DCTELEM *data)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_fdct_islow_mips_dspr2(data);
+ jsimd_fdct_islow_dspr2(data);
}
GLOBAL(void)
jsimd_fdct_ifast (DCTELEM *data)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_fdct_ifast_mips_dspr2(data);
+ jsimd_fdct_ifast_dspr2(data);
}
GLOBAL(void)
if (sizeof(DCTELEM) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
jsimd_quantize (JCOEFPTR coef_block, DCTELEM *divisors,
DCTELEM *workspace)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_quantize_mips_dspr2(coef_block, divisors, workspace);
+ jsimd_quantize_dspr2(coef_block, divisors, workspace);
}
GLOBAL(void)
jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT *divisors,
FAST_FLOAT *workspace)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_quantize_float_mips_dspr2(coef_block, divisors, workspace);
+ jsimd_quantize_float_dspr2(coef_block, divisors, workspace);
}
GLOBAL(int)
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_idct_2x2_mips_dspr2(compptr->dct_table, coef_block, output_buf,
- output_col);
+ jsimd_idct_2x2_dspr2(compptr->dct_table, coef_block, output_buf, output_col);
}
GLOBAL(void)
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2) {
- int workspace[DCTSIZE*4]; /* buffers data between passes */
- jsimd_idct_4x4_mips_dspr2(compptr->dct_table, coef_block, output_buf,
- output_col, workspace);
- }
+ int workspace[DCTSIZE*4]; /* buffers data between passes */
+
+ jsimd_idct_4x4_dspr2(compptr->dct_table, coef_block, output_buf, output_col,
+ workspace);
}
GLOBAL(void)
jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
- JCOEFPTR coef_block, JSAMPARRAY output_buf,
- JDIMENSION output_col)
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2)
- jsimd_idct_6x6_mips_dspr2(compptr->dct_table, coef_block, output_buf,
- output_col);
+ jsimd_idct_6x6_dspr2(compptr->dct_table, coef_block, output_buf, output_col);
}
GLOBAL(void)
jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info *compptr,
- JCOEFPTR coef_block,
- JSAMPARRAY output_buf, JDIMENSION output_col)
+ JCOEFPTR coef_block, JSAMPARRAY output_buf,
+ JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2) {
- int workspace[96];
- int output[12] = {
- (int)(output_buf[0] + output_col),
- (int)(output_buf[1] + output_col),
- (int)(output_buf[2] + output_col),
- (int)(output_buf[3] + output_col),
- (int)(output_buf[4] + output_col),
- (int)(output_buf[5] + output_col),
- (int)(output_buf[6] + output_col),
- (int)(output_buf[7] + output_col),
- (int)(output_buf[8] + output_col),
- (int)(output_buf[9] + output_col),
- (int)(output_buf[10] + output_col),
- (int)(output_buf[11] + output_col),
- };
- jsimd_idct_12x12_pass1_mips_dspr2(coef_block, compptr->dct_table,
- workspace);
- jsimd_idct_12x12_pass2_mips_dspr2(workspace, output);
- }
+ int workspace[96];
+ int output[12] = {
+ (int)(output_buf[0] + output_col),
+ (int)(output_buf[1] + output_col),
+ (int)(output_buf[2] + output_col),
+ (int)(output_buf[3] + output_col),
+ (int)(output_buf[4] + output_col),
+ (int)(output_buf[5] + output_col),
+ (int)(output_buf[6] + output_col),
+ (int)(output_buf[7] + output_col),
+ (int)(output_buf[8] + output_col),
+ (int)(output_buf[9] + output_col),
+ (int)(output_buf[10] + output_col),
+ (int)(output_buf[11] + output_col)
+ };
+
+ jsimd_idct_12x12_pass1_dspr2(coef_block, compptr->dct_table, workspace);
+ jsimd_idct_12x12_pass2_dspr2(workspace, output);
}
GLOBAL(int)
if (sizeof(ISLOW_MULT_TYPE) != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
if (IFAST_SCALE_BITS != 2)
return 0;
- if (simd_support & JSIMD_MIPS_DSPR2)
+ if (simd_support & JSIMD_DSPR2)
return 1;
return 0;
GLOBAL(int)
jsimd_can_idct_float (void)
{
- init_simd();
-
return 0;
}
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2) {
- int output[8] = {
- (int)(output_buf[0] + output_col),
- (int)(output_buf[1] + output_col),
- (int)(output_buf[2] + output_col),
- (int)(output_buf[3] + output_col),
- (int)(output_buf[4] + output_col),
- (int)(output_buf[5] + output_col),
- (int)(output_buf[6] + output_col),
- (int)(output_buf[7] + output_col),
- };
-
- jsimd_idct_islow_mips_dspr2(coef_block, compptr->dct_table,
- output, IDCT_range_limit(cinfo));
- }
+ int output[8] = {
+ (int)(output_buf[0] + output_col),
+ (int)(output_buf[1] + output_col),
+ (int)(output_buf[2] + output_col),
+ (int)(output_buf[3] + output_col),
+ (int)(output_buf[4] + output_col),
+ (int)(output_buf[5] + output_col),
+ (int)(output_buf[6] + output_col),
+ (int)(output_buf[7] + output_col)
+ };
+
+ jsimd_idct_islow_dspr2(coef_block, compptr->dct_table, output,
+ IDCT_range_limit(cinfo));
}
GLOBAL(void)
JCOEFPTR coef_block, JSAMPARRAY output_buf,
JDIMENSION output_col)
{
- if (simd_support & JSIMD_MIPS_DSPR2) {
- JCOEFPTR inptr;
- IFAST_MULT_TYPE *quantptr;
- DCTELEM workspace[DCTSIZE2]; /* buffers data between passes */
+ JCOEFPTR inptr;
+ IFAST_MULT_TYPE *quantptr;
+ DCTELEM workspace[DCTSIZE2]; /* buffers data between passes */
- /* Pass 1: process columns from input, store into work array. */
+ /* Pass 1: process columns from input, store into work array. */
- inptr = coef_block;
- quantptr = (IFAST_MULT_TYPE *) compptr->dct_table;
+ inptr = coef_block;
+ quantptr = (IFAST_MULT_TYPE *) compptr->dct_table;
- jsimd_idct_ifast_cols_mips_dspr2(inptr, quantptr,
- workspace, mips_idct_ifast_coefs);
+ jsimd_idct_ifast_cols_dspr2(inptr, quantptr, workspace,
+ mips_idct_ifast_coefs);
- /* Pass 2: process rows from work array, store into output array. */
- /* Note that we must descale the results by a factor of 8 == 2**3, */
- /* and also undo the PASS1_BITS scaling. */
+ /* Pass 2: process rows from work array, store into output array. */
+ /* Note that we must descale the results by a factor of 8 == 2**3, */
+ /* and also undo the PASS1_BITS scaling. */
- jsimd_idct_ifast_rows_mips_dspr2(workspace, output_buf,
- output_col, mips_idct_ifast_coefs);
- }
+ jsimd_idct_ifast_rows_dspr2(workspace, output_buf, output_col,
+ mips_idct_ifast_coefs);
}
GLOBAL(void)
* MIPS DSPr2 optimizations for libjpeg-turbo
*
* Copyright (C) 2013-2014, MIPS Technologies, Inc., California.
- * All Rights Reserved.
- * Authors: Teodora Novkovic (teodora.novkovic@imgtec.com)
- * Darko Laus (darko.laus@imgtec.com)
+ * All Rights Reserved.
+ * Authors: Teodora Novkovic <teodora.novkovic@imgtec.com>
+ * Darko Laus <darko.laus@imgtec.com>
* Copyright (C) 2015, D. R. Commander. All Rights Reserved.
+ *
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
#include "jsimd_dspr2_asm.h"
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_c_null_convert_mips_dspr2)
+LEAF_DSPR2(jsimd_c_null_convert_dspr2)
/*
* a0 - cinfo->image_width
* a1 - input_buf
j ra
nop
-END(jsimd_c_null_convert_mips_dspr2)
+END(jsimd_c_null_convert_dspr2)
/*****************************************************************************/
/*
- * jsimd_extrgb_ycc_convert_mips_dspr2
- * jsimd_extbgr_ycc_convert_mips_dspr2
- * jsimd_extrgbx_ycc_convert_mips_dspr2
- * jsimd_extbgrx_ycc_convert_mips_dspr2
- * jsimd_extxbgr_ycc_convert_mips_dspr2
- * jsimd_extxrgb_ycc_convert_mips_dspr2
+ * jsimd_extrgb_ycc_convert_dspr2
+ * jsimd_extbgr_ycc_convert_dspr2
+ * jsimd_extrgbx_ycc_convert_dspr2
+ * jsimd_extbgrx_ycc_convert_dspr2
+ * jsimd_extxbgr_ycc_convert_dspr2
+ * jsimd_extxrgb_ycc_convert_dspr2
*
* Colorspace conversion RGB -> YCbCr
*/
-.macro GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs
+.macro GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs
.macro DO_RGB_TO_YCC r, \
g, \
addiu \inptr, \pixel_size
.endm
-LEAF_MIPS_DSPR2(jsimd_\colorid\()_ycc_convert_mips_dspr2)
+LEAF_DSPR2(jsimd_\colorid\()_ycc_convert_dspr2)
/*
* a0 - cinfo->image_width
* a1 - input_buf
j ra
nop
-END(jsimd_\colorid\()_ycc_convert_mips_dspr2)
+END(jsimd_\colorid\()_ycc_convert_dspr2)
.purgem DO_RGB_TO_YCC
.endm
-/*------------------------------------------id -- pix R G B */
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extrgb, 3, 0, 1, 2
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extbgr, 3, 2, 1, 0
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extrgbx, 4, 0, 1, 2
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extbgrx, 4, 2, 1, 0
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extxbgr, 4, 3, 2, 1
-GENERATE_JSIMD_RGB_YCC_CONVERT_MIPS_DSPR2 extxrgb, 4, 1, 2, 3
+/*-------------------------------------id -- pix R G B */
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extrgb, 3, 0, 1, 2
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extbgr, 3, 2, 1, 0
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extrgbx, 4, 0, 1, 2
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extbgrx, 4, 2, 1, 0
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extxbgr, 4, 3, 2, 1
+GENERATE_JSIMD_RGB_YCC_CONVERT_DSPR2 extxrgb, 4, 1, 2, 3
/*****************************************************************************/
/*
- * jsimd_ycc_extrgb_convert_mips_dspr2
- * jsimd_ycc_extbgr_convert_mips_dspr2
- * jsimd_ycc_extrgbx_convert_mips_dspr2
- * jsimd_ycc_extbgrx_convert_mips_dspr2
- * jsimd_ycc_extxbgr_convert_mips_dspr2
- * jsimd_ycc_extxrgb_convert_mips_dspr2
+ * jsimd_ycc_extrgb_convert_dspr2
+ * jsimd_ycc_extbgr_convert_dspr2
+ * jsimd_ycc_extrgbx_convert_dspr2
+ * jsimd_ycc_extbgrx_convert_dspr2
+ * jsimd_ycc_extxbgr_convert_dspr2
+ * jsimd_ycc_extxrgb_convert_dspr2
*
* Colorspace conversion YCbCr -> RGB
*/
-.macro GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs, a_offs
+.macro GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs, a_offs
.macro STORE_YCC_TO_RGB scratch0 \
scratch1 \
addiu \outptr, \pixel_size
.endm
-LEAF_MIPS_DSPR2(jsimd_ycc_\colorid\()_convert_mips_dspr2)
+LEAF_DSPR2(jsimd_ycc_\colorid\()_convert_dspr2)
/*
* a0 - cinfo->image_width
* a1 - input_buf
j ra
nop
-END(jsimd_ycc_\colorid\()_convert_mips_dspr2)
+END(jsimd_ycc_\colorid\()_convert_dspr2)
.purgem STORE_YCC_TO_RGB
.endm
-/*------------------------------------------id -- pix R G B A */
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extrgb, 3, 0, 1, 2, 3
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extbgr, 3, 2, 1, 0, 3
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extrgbx, 4, 0, 1, 2, 3
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extbgrx, 4, 2, 1, 0, 3
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extxbgr, 4, 3, 2, 1, 0
-GENERATE_JSIMD_YCC_RGB_CONVERT_MIPS_DSPR2 extxrgb, 4, 1, 2, 3, 0
+/*-------------------------------------id -- pix R G B A */
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extrgb, 3, 0, 1, 2, 3
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extbgr, 3, 2, 1, 0, 3
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extrgbx, 4, 0, 1, 2, 3
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extbgrx, 4, 2, 1, 0, 3
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extxbgr, 4, 3, 2, 1, 0
+GENERATE_JSIMD_YCC_RGB_CONVERT_DSPR2 extxrgb, 4, 1, 2, 3, 0
/*****************************************************************************/
/*
- * jsimd_extrgb_gray_convert_mips_dspr2
- * jsimd_extbgr_gray_convert_mips_dspr2
- * jsimd_extrgbx_gray_convert_mips_dspr2
- * jsimd_extbgrx_gray_convert_mips_dspr2
- * jsimd_extxbgr_gray_convert_mips_dspr2
- * jsimd_extxrgb_gray_convert_mips_dspr2
+ * jsimd_extrgb_gray_convert_dspr2
+ * jsimd_extbgr_gray_convert_dspr2
+ * jsimd_extrgbx_gray_convert_dspr2
+ * jsimd_extbgrx_gray_convert_dspr2
+ * jsimd_extxbgr_gray_convert_dspr2
+ * jsimd_extxrgb_gray_convert_dspr2
*
* Colorspace conversion RGB -> GRAY
*/
-.macro GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs
+.macro GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 colorid, pixel_size, r_offs, g_offs, b_offs
.macro DO_RGB_TO_GRAY r, \
g, \
addiu \inptr, \pixel_size
.endm
-LEAF_MIPS_DSPR2(jsimd_\colorid\()_gray_convert_mips_dspr2)
+LEAF_DSPR2(jsimd_\colorid\()_gray_convert_dspr2)
/*
* a0 - cinfo->image_width
* a1 - input_buf
j ra
nop
-END(jsimd_\colorid\()_gray_convert_mips_dspr2)
+END(jsimd_\colorid\()_gray_convert_dspr2)
.purgem DO_RGB_TO_GRAY
.endm
-/*------------------------------------------id -- pix R G B */
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extrgb, 3, 0, 1, 2
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extbgr, 3, 2, 1, 0
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extrgbx, 4, 0, 1, 2
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extbgrx, 4, 2, 1, 0
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extxbgr, 4, 3, 2, 1
-GENERATE_JSIMD_RGB_GRAY_CONVERT_MIPS_DSPR2 extxrgb, 4, 1, 2, 3
+/*-------------------------------------id -- pix R G B */
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extrgb, 3, 0, 1, 2
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extbgr, 3, 2, 1, 0
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extrgbx, 4, 0, 1, 2
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extbgrx, 4, 2, 1, 0
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extxbgr, 4, 3, 2, 1
+GENERATE_JSIMD_RGB_GRAY_CONVERT_DSPR2 extxrgb, 4, 1, 2, 3
/*****************************************************************************/
/*
- * jsimd_h2v2_merged_upsample_mips_dspr2
- * jsimd_h2v2_extrgb_merged_upsample_mips_dspr2
- * jsimd_h2v2_extrgbx_merged_upsample_mips_dspr2
- * jsimd_h2v2_extbgr_merged_upsample_mips_dspr2
- * jsimd_h2v2_extbgrx_merged_upsample_mips_dspr2
- * jsimd_h2v2_extxbgr_merged_upsample_mips_dspr2
- * jsimd_h2v2_extxrgb_merged_upsample_mips_dspr2
+ * jsimd_h2v2_merged_upsample_dspr2
+ * jsimd_h2v2_extrgb_merged_upsample_dspr2
+ * jsimd_h2v2_extrgbx_merged_upsample_dspr2
+ * jsimd_h2v2_extbgr_merged_upsample_dspr2
+ * jsimd_h2v2_extbgrx_merged_upsample_dspr2
+ * jsimd_h2v2_extxbgr_merged_upsample_dspr2
+ * jsimd_h2v2_extxrgb_merged_upsample_dspr2
*
* Merged h2v2 upsample routines
*/
-.macro GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 colorid, \
- pixel_size, \
- r1_offs, \
- g1_offs, \
- b1_offs, \
- a1_offs, \
- r2_offs, \
- g2_offs, \
- b2_offs, \
- a2_offs
+.macro GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 colorid, \
+ pixel_size, \
+ r1_offs, \
+ g1_offs, \
+ b1_offs, \
+ a1_offs, \
+ r2_offs, \
+ g2_offs, \
+ b2_offs, \
+ a2_offs
.macro STORE_H2V2_2_PIXELS scratch0 \
scratch1 \
.endif
.endm
-LEAF_MIPS_DSPR2(jsimd_h2v2_\colorid\()_merged_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v2_\colorid\()_merged_upsample_dspr2)
/*
* a0 - cinfo->output_width
* a1 - input_buf
j ra
nop
-END(jsimd_h2v2_\colorid\()_merged_upsample_mips_dspr2)
+END(jsimd_h2v2_\colorid\()_merged_upsample_dspr2)
.purgem STORE_H2V2_1_PIXEL
.purgem STORE_H2V2_2_PIXELS
.endm
-/*-----------------------------------------id -- pix R1 G1 B1 A1 R2 G2 B2 A2 */
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extrgb, 6, 0, 1, 2, 6, 3, 4, 5, 6
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extbgr, 6, 2, 1, 0, 3, 5, 4, 3, 6
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extrgbx, 8, 0, 1, 2, 3, 4, 5, 6, 7
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extbgrx, 8, 2, 1, 0, 3, 6, 5, 4, 7
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extxbgr, 8, 3, 2, 1, 0, 7, 6, 5, 4
-GENERATE_H2V2_MERGED_UPSAMPLE_MIPS_DSPR2 extxrgb, 8, 1, 2, 3, 0, 5, 6, 7, 4
+/*------------------------------------id -- pix R1 G1 B1 A1 R2 G2 B2 A2 */
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extrgb, 6, 0, 1, 2, 6, 3, 4, 5, 6
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extbgr, 6, 2, 1, 0, 3, 5, 4, 3, 6
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extrgbx, 8, 0, 1, 2, 3, 4, 5, 6, 7
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extbgrx, 8, 2, 1, 0, 3, 6, 5, 4, 7
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extxbgr, 8, 3, 2, 1, 0, 7, 6, 5, 4
+GENERATE_H2V2_MERGED_UPSAMPLE_DSPR2 extxrgb, 8, 1, 2, 3, 0, 5, 6, 7, 4
/*****************************************************************************/
/*
- * jsimd_h2v1_merged_upsample_mips_dspr2
- * jsimd_h2v1_extrgb_merged_upsample_mips_dspr2
- * jsimd_h2v1_extrgbx_merged_upsample_mips_dspr2
- * jsimd_h2v1_extbgr_merged_upsample_mips_dspr2
- * jsimd_h2v1_extbgrx_merged_upsample_mips_dspr2
- * jsimd_h2v1_extxbgr_merged_upsample_mips_dspr2
- * jsimd_h2v1_extxrgb_merged_upsample_mips_dspr2
+ * jsimd_h2v1_merged_upsample_dspr2
+ * jsimd_h2v1_extrgb_merged_upsample_dspr2
+ * jsimd_h2v1_extrgbx_merged_upsample_dspr2
+ * jsimd_h2v1_extbgr_merged_upsample_dspr2
+ * jsimd_h2v1_extbgrx_merged_upsample_dspr2
+ * jsimd_h2v1_extxbgr_merged_upsample_dspr2
+ * jsimd_h2v1_extxrgb_merged_upsample_dspr2
*
* Merged h2v1 upsample routines
*/
-.macro GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 colorid, \
- pixel_size, \
- r1_offs, \
- g1_offs, \
- b1_offs, \
- a1_offs, \
- r2_offs, \
- g2_offs, \
- b2_offs, \
- a2_offs
+.macro GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 colorid, \
+ pixel_size, \
+ r1_offs, \
+ g1_offs, \
+ b1_offs, \
+ a1_offs, \
+ r2_offs, \
+ g2_offs, \
+ b2_offs, \
+ a2_offs
.macro STORE_H2V1_2_PIXELS scratch0 \
scratch1 \
.endif
.endm
-LEAF_MIPS_DSPR2(jsimd_h2v1_\colorid\()_merged_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v1_\colorid\()_merged_upsample_dspr2)
/*
* a0 - cinfo->output_width
* a1 - input_buf
j ra
nop
-END(jsimd_h2v1_\colorid\()_merged_upsample_mips_dspr2)
+END(jsimd_h2v1_\colorid\()_merged_upsample_dspr2)
.purgem STORE_H2V1_1_PIXEL
.purgem STORE_H2V1_2_PIXELS
.endm
-/*-----------------------------------------id -- pix R1 G1 B1 A1 R2 G2 B2 A2 */
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extrgb, 6, 0, 1, 2, 6, 3, 4, 5, 6
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extbgr, 6, 2, 1, 0, 3, 5, 4, 3, 6
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extrgbx, 8, 0, 1, 2, 3, 4, 5, 6, 7
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extbgrx, 8, 2, 1, 0, 3, 6, 5, 4, 7
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extxbgr, 8, 3, 2, 1, 0, 7, 6, 5, 4
-GENERATE_H2V1_MERGED_UPSAMPLE_MIPS_DSPR2 extxrgb, 8, 1, 2, 3, 0, 5, 6, 7, 4
+/*------------------------------------id -- pix R1 G1 B1 A1 R2 G2 B2 A2 */
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extrgb, 6, 0, 1, 2, 6, 3, 4, 5, 6
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extbgr, 6, 2, 1, 0, 3, 5, 4, 3, 6
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extrgbx, 8, 0, 1, 2, 3, 4, 5, 6, 7
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extbgrx, 8, 2, 1, 0, 3, 6, 5, 4, 7
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extxbgr, 8, 3, 2, 1, 0, 7, 6, 5, 4
+GENERATE_H2V1_MERGED_UPSAMPLE_DSPR2 extxrgb, 8, 1, 2, 3, 0, 5, 6, 7, 4
/*****************************************************************************/
/*
- * jsimd_h2v2_fancy_upsample_mips_dspr2
+ * jsimd_h2v2_fancy_upsample_dspr2
*
* Fancy processing for the common case of 2:1 horizontal and 2:1 vertical.
*/
-LEAF_MIPS_DSPR2(jsimd_h2v2_fancy_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v2_fancy_upsample_dspr2)
/*
* a0 - cinfo->max_v_samp_factor
* a1 - downsampled_width
j ra
nop
-END(jsimd_h2v2_fancy_upsample_mips_dspr2)
+END(jsimd_h2v2_fancy_upsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v1_fancy_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v1_fancy_upsample_dspr2)
/*
* a0 - cinfo->max_v_samp_factor
* a1 - downsampled_width
j ra
nop
-END(jsimd_h2v1_fancy_upsample_mips_dspr2)
+END(jsimd_h2v1_fancy_upsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v1_downsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v1_downsample_dspr2)
/*
* a0 - cinfo->image_width
* a1 - cinfo->max_v_samp_factor
j ra
nop
-END(jsimd_h2v1_downsample_mips_dspr2)
+END(jsimd_h2v1_downsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v2_downsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v2_downsample_dspr2)
/*
* a0 - cinfo->image_width
j ra
nop
-END(jsimd_h2v2_downsample_mips_dspr2)
+END(jsimd_h2v2_downsample_dspr2)
+
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v2_smooth_downsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v2_smooth_downsample_dspr2)
/*
* a0 - input_data
* a1 - output_data
j ra
nop
-END(jsimd_h2v2_smooth_downsample_mips_dspr2)
+END(jsimd_h2v2_smooth_downsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_int_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_int_upsample_dspr2)
/*
* a0 - upsample->h_expand[compptr->component_index]
* a1 - upsample->v_expand[compptr->component_index]
j ra
nop
-END(jsimd_int_upsample_mips_dspr2)
+END(jsimd_int_upsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v1_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v1_upsample_dspr2)
/*
* a0 - cinfo->max_v_samp_factor
* a1 - cinfo->output_width
4:
j ra
nop
-END(jsimd_h2v1_upsample_mips_dspr2)
+END(jsimd_h2v1_upsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_h2v2_upsample_mips_dspr2)
+LEAF_DSPR2(jsimd_h2v2_upsample_dspr2)
/*
* a0 - cinfo->max_v_samp_factor
* a1 - cinfo->output_width
7:
j ra
nop
-END(jsimd_h2v2_upsample_mips_dspr2)
+END(jsimd_h2v2_upsample_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_islow_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_islow_dspr2)
/*
* a0 - coef_block
* a1 - compptr->dcttable
j ra
nop
-END(jsimd_idct_islow_mips_dspr2)
+END(jsimd_idct_islow_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_ifast_cols_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_ifast_cols_dspr2)
/*
* a0 - inptr
* a1 - quantptr
j ra
nop
-END(jsimd_idct_ifast_cols_mips_dspr2)
+END(jsimd_idct_ifast_cols_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_ifast_rows_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_ifast_rows_dspr2)
/*
* a0 - wsptr
* a1 - output_buf
j ra
nop
-END(jsimd_idct_ifast_rows_mips_dspr2)
+END(jsimd_idct_ifast_rows_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_fdct_islow_mips_dspr2)
+LEAF_DSPR2(jsimd_fdct_islow_dspr2)
/*
* a0 - data
*/
jr ra
nop
-END(jsimd_fdct_islow_mips_dspr2)
+END(jsimd_fdct_islow_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_fdct_ifast_mips_dspr2)
+LEAF_DSPR2(jsimd_fdct_ifast_dspr2)
/*
* a0 - data
*/
j ra
nop
-END(jsimd_fdct_ifast_mips_dspr2)
+END(jsimd_fdct_ifast_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_quantize_mips_dspr2)
+LEAF_DSPR2(jsimd_quantize_dspr2)
/*
* a0 - coef_block
* a1 - divisors
j ra
nop
-END(jsimd_quantize_mips_dspr2)
+END(jsimd_quantize_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_quantize_float_mips_dspr2)
+LEAF_DSPR2(jsimd_quantize_float_dspr2)
/*
* a0 - coef_block
* a1 - divisors
j ra
nop
-END(jsimd_quantize_float_mips_dspr2)
+END(jsimd_quantize_float_dspr2)
+
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_2x2_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_2x2_dspr2)
/*
* a0 - compptr->dct_table
* a1 - coef_block
j ra
nop
-END(jsimd_idct_2x2_mips_dspr2)
+END(jsimd_idct_2x2_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_4x4_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_4x4_dspr2)
/*
* a0 - compptr->dct_table
* a1 - coef_block
j ra
nop
-END(jsimd_idct_4x4_mips_dspr2)
+END(jsimd_idct_4x4_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_6x6_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_6x6_dspr2)
/*
* a0 - compptr->dct_table
* a1 - coef_block
j ra
nop
-END(jsimd_idct_6x6_mips_dspr2)
+END(jsimd_idct_6x6_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_12x12_pass1_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_12x12_pass1_dspr2)
/*
* a0 - compptr->dct_table
* a1 - coef_block
j ra
nop
-END(jsimd_idct_12x12_pass1_mips_dspr2)
+END(jsimd_idct_12x12_pass1_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_idct_12x12_pass2_mips_dspr2)
+LEAF_DSPR2(jsimd_idct_12x12_pass2_dspr2)
/*
* a0 - workspace
* a1 - output
jr ra
nop
-END(jsimd_idct_12x12_pass2_mips_dspr2)
+END(jsimd_idct_12x12_pass2_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_convsamp_mips_dspr2)
+LEAF_DSPR2(jsimd_convsamp_dspr2)
/*
* a0 - sample_data
* a1 - start_col
j ra
nop
-END(jsimd_convsamp_mips_dspr2)
+END(jsimd_convsamp_dspr2)
/*****************************************************************************/
-LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
+LEAF_DSPR2(jsimd_convsamp_float_dspr2)
/*
* a0 - sample_data
* a1 - start_col
j ra
nop
-END(jsimd_convsamp_float_mips_dspr2)
+END(jsimd_convsamp_float_dspr2)
/*****************************************************************************/
.set noat;
/*
- * LEAF_MIPS_DSPR2 - declare leaf routine for MIPS DSPr2
+ * LEAF_DSPR2 - declare leaf routine for MIPS DSPr2
*/
-#define LEAF_MIPS_DSPR2(symbol) \
+#define LEAF_DSPR2(symbol) \
LEAF_MIPS32R2(symbol) \
.set dspr2;
/* This file is included by jccolor-altivec.c */
-void jsimd_rgb_ycc_convert_altivec (JDIMENSION img_width, JSAMPARRAY input_buf,
- JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows)
+void
+jsimd_rgb_ycc_convert_altivec (JDIMENSION img_width, JSAMPARRAY input_buf,
+ JSAMPIMAGE output_buf, JDIMENSION output_row,
+ int num_rows)
{
JSAMPROW inptr, outptr0, outptr1, outptr2;
int pitch = img_width * RGB_PIXELSIZE, num_cols;
/* This file is included by jcgray-altivec.c */
-void jsimd_rgb_gray_convert_altivec (JDIMENSION img_width,
- JSAMPARRAY input_buf,
- JSAMPIMAGE output_buf,
- JDIMENSION output_row, int num_rows)
+void
+jsimd_rgb_gray_convert_altivec (JDIMENSION img_width, JSAMPARRAY input_buf,
+ JSAMPIMAGE output_buf, JDIMENSION output_row,
+ int num_rows)
{
JSAMPROW inptr, outptr;
int pitch = img_width * RGB_PIXELSIZE, num_cols;
void
jsimd_h2v1_downsample_altivec (JDIMENSION image_width, int max_v_samp_factor,
JDIMENSION v_samp_factor,
- JDIMENSION width_blocks,
+ JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
int outrow, outcol;
- JDIMENSION output_cols = width_blocks * DCTSIZE;
+ JDIMENSION output_cols = width_in_blocks * DCTSIZE;
JSAMPROW inptr, outptr;
__vector unsigned char this0, next0, out;
void
jsimd_h2v2_downsample_altivec (JDIMENSION image_width, int max_v_samp_factor,
JDIMENSION v_samp_factor,
- JDIMENSION width_blocks,
+ JDIMENSION width_in_blocks,
JSAMPARRAY input_data, JSAMPARRAY output_data)
{
int inrow, outrow, outcol;
- JDIMENSION output_cols = width_blocks * DCTSIZE;
+ JDIMENSION output_cols = width_in_blocks * DCTSIZE;
JSAMPROW inptr0, inptr1, outptr;
__vector unsigned char this0, next0, this1, next1, out;
/* This file is included by jdcolor-altivec.c */
-void jsimd_ycc_rgb_convert_altivec (JDIMENSION out_width, JSAMPIMAGE input_buf,
- JDIMENSION input_row,
- JSAMPARRAY output_buf, int num_rows)
+void
+jsimd_ycc_rgb_convert_altivec (JDIMENSION out_width, JSAMPIMAGE input_buf,
+ JDIMENSION input_row, JSAMPARRAY output_buf,
+ int num_rows)
{
JSAMPROW outptr, inptr0, inptr1, inptr2;
int pitch = out_width * RGB_PIXELSIZE, num_cols;
/* This file is included by jdmerge-altivec.c */
-void jsimd_h2v1_merged_upsample_altivec (JDIMENSION output_width,
- JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr,
- JSAMPARRAY output_buf)
+void
+jsimd_h2v1_merged_upsample_altivec (JDIMENSION output_width,
+ JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf)
{
JSAMPROW outptr, inptr0, inptr1, inptr2;
int pitch = output_width * RGB_PIXELSIZE, num_cols, yloop;
}
-void jsimd_h2v2_merged_upsample_altivec (JDIMENSION output_width,
- JSAMPIMAGE input_buf,
- JDIMENSION in_row_group_ctr,
- JSAMPARRAY output_buf)
+void
+jsimd_h2v2_merged_upsample_altivec (JDIMENSION output_width,
+ JSAMPIMAGE input_buf,
+ JDIMENSION in_row_group_ctr,
+ JSAMPARRAY output_buf)
{
JSAMPROW inptr, outptr;
;
; GLOBAL(void)
; jsimd_h2v1_downsample_avx2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
; r10d = JDIMENSION image_width
; r11 = int max_v_samp_factor
; r12d = JDIMENSION v_samp_factor
-; r13d = JDIMENSION width_blocks
+; r13d = JDIMENSION width_in_blocks
; r14 = JSAMPARRAY input_data
; r15 = JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v2_downsample_avx2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
; r10d = JDIMENSION image_width
; r11 = int max_v_samp_factor
; r12d = JDIMENSION v_samp_factor
-; r13d = JDIMENSION width_blocks
+; r13d = JDIMENSION width_in_blocks
; r14 = JSAMPARRAY input_data
; r15 = JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v1_downsample_sse2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
; r10d = JDIMENSION image_width
; r11 = int max_v_samp_factor
; r12d = JDIMENSION v_samp_factor
-; r13d = JDIMENSION width_blocks
+; r13d = JDIMENSION width_in_blocks
; r14 = JSAMPARRAY input_data
; r15 = JSAMPARRAY output_data
;
; GLOBAL(void)
; jsimd_h2v2_downsample_sse2 (JDIMENSION image_width, int max_v_samp_factor,
-; JDIMENSION v_samp_factor, JDIMENSION width_blocks,
+; JDIMENSION v_samp_factor,
+; JDIMENSION width_in_blocks,
; JSAMPARRAY input_data, JSAMPARRAY output_data);
;
; r10d = JDIMENSION image_width
; r11 = int max_v_samp_factor
; r12d = JDIMENSION v_samp_factor
-; r13d = JDIMENSION width_blocks
+; r13d = JDIMENSION width_in_blocks
; r14 = JSAMPARRAY input_data
; r15 = JSAMPARRAY output_data