From 1419852c42a0b8d8779fa89419cf2824b9eb5866 Mon Sep 17 00:00:00 2001 From: DRC Date: Thu, 15 May 2014 19:45:11 +0000 Subject: [PATCH] Clean up code formatting in the SIMD interface functions git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1305 632fc199-4ca6-4c93-a231-07263d6284db --- jsimd_none.c | 12 ++-- simd/jsimd_arm.c | 61 +++++++++--------- simd/jsimd_arm64.c | 52 +++++++-------- simd/jsimd_i386.c | 133 +++++++++++++++++++-------------------- simd/jsimd_mips.c | 150 +++++++++++++++++++++++++------------------- simd/jsimd_x86_64.c | 65 +++++++++---------- 6 files changed, 242 insertions(+), 231 deletions(-) diff --git a/jsimd_none.c b/jsimd_none.c index ac126e0..bdba693 100644 --- a/jsimd_none.c +++ b/jsimd_none.c @@ -343,22 +343,22 @@ jsimd_can_idct_float (void) GLOBAL(void) jsimd_idct_islow (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) { } GLOBAL(void) jsimd_idct_ifast (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) { } GLOBAL(void) jsimd_idct_float (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) { } diff --git a/simd/jsimd_arm.c b/simd/jsimd_arm.c index 9f9bf5a..aefb1e6 100644 --- a/simd/jsimd_arm.c +++ b/simd/jsimd_arm.c @@ -9,10 +9,8 @@ * For conditions of distribution and use, see copyright notice in jsimdext.inc * * This file contains the interface between the "normal" portions - * of the library and the SIMD implementations when running on - * ARM architecture. - * - * Based on the stubs from 'jsimd_none.c' + * of the library and the SIMD implementations when running on a + * 32-bit ARM architecture. */ #define JPEG_INTERNALS @@ -170,6 +168,7 @@ jsimd_can_ycc_rgb (void) return 0; if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) return 0; + if (simd_support & JSIMD_ARM_NEON) return 1; @@ -183,8 +182,7 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, { void (*neonfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + switch(cinfo->in_color_space) { case JCS_EXT_RGB: neonfct=jsimd_extrgb_ycc_convert_neon; break; @@ -213,8 +211,7 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, } if (simd_support & JSIMD_ARM_NEON) - neonfct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + neonfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); } GLOBAL(void) @@ -231,8 +228,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, { void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: neonfct=jsimd_ycc_extrgb_convert_neon; break; @@ -261,8 +257,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, } if (simd_support & JSIMD_ARM_NEON) - neonfct(cinfo->output_width, input_buf, - input_row, output_buf, num_rows); + neonfct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); } GLOBAL(int) @@ -366,7 +361,8 @@ jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, { if (simd_support & JSIMD_ARM_NEON) jsimd_h2v1_fancy_upsample_neon(cinfo->max_v_samp_factor, - compptr->downsampled_width, input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); } GLOBAL(int) @@ -552,7 +548,7 @@ jsimd_can_idct_2x2 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -575,7 +571,7 @@ jsimd_can_idct_4x4 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -586,8 +582,9 @@ jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - if ((simd_support & JSIMD_ARM_NEON)) - jsimd_idct_2x2_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_2x2_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) @@ -595,8 +592,9 @@ jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - if ((simd_support & JSIMD_ARM_NEON)) - jsimd_idct_4x4_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_4x4_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(int) @@ -641,7 +639,7 @@ jsimd_can_idct_ifast (void) if (IFAST_SCALE_BITS != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -657,26 +655,27 @@ jsimd_can_idct_float (void) GLOBAL(void) jsimd_idct_islow (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_ARM_NEON)) - jsimd_idct_islow_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_islow_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_ifast (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_ARM_NEON)) - jsimd_idct_ifast_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_ifast_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_float (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) { } - diff --git a/simd/jsimd_arm64.c b/simd/jsimd_arm64.c index d217cf6..988023a 100644 --- a/simd/jsimd_arm64.c +++ b/simd/jsimd_arm64.c @@ -9,10 +9,8 @@ * For conditions of distribution and use, see copyright notice in jsimdext.inc * * This file contains the interface between the "normal" portions - * of the library and the SIMD implementations when running on - * ARM architecture. - * - * Based on the stubs from 'jsimd_none.c' + * of the library and the SIMD implementations when running on a + * 64-bit ARM architecture. */ #define JPEG_INTERNALS @@ -159,6 +157,7 @@ jsimd_can_ycc_rgb (void) return 0; if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) return 0; + if (simd_support & JSIMD_ARM_NEON) return 1; @@ -186,8 +185,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, { void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: neonfct=jsimd_ycc_extrgb_convert_neon; break; @@ -216,8 +214,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, } if (simd_support & JSIMD_ARM_NEON) - neonfct(cinfo->output_width, input_buf, - input_row, output_buf, num_rows); + neonfct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); } GLOBAL(int) @@ -456,7 +453,7 @@ jsimd_can_idct_2x2 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -479,7 +476,7 @@ jsimd_can_idct_4x4 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -490,8 +487,9 @@ jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - if ((simd_support & JSIMD_ARM_NEON)) - jsimd_idct_2x2_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_2x2_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) @@ -499,8 +497,9 @@ jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - if ((simd_support & JSIMD_ARM_NEON)) - jsimd_idct_4x4_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_4x4_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(int) @@ -545,7 +544,7 @@ jsimd_can_idct_ifast (void) if (IFAST_SCALE_BITS != 2) return 0; - if ((simd_support & JSIMD_ARM_NEON)) + if (simd_support & JSIMD_ARM_NEON) return 1; return 0; @@ -561,26 +560,27 @@ jsimd_can_idct_float (void) GLOBAL(void) jsimd_idct_islow (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_ARM_NEON)) - jsimd_idct_islow_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_islow_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_ifast (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_ARM_NEON)) - jsimd_idct_ifast_neon(compptr->dct_table, coef_block, output_buf, output_col); + if (simd_support & JSIMD_ARM_NEON) + jsimd_idct_ifast_neon(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_float (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) { } - diff --git a/simd/jsimd_i386.c b/simd/jsimd_i386.c index 1037fd9..c173e74 100644 --- a/simd/jsimd_i386.c +++ b/simd/jsimd_i386.c @@ -138,8 +138,7 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + switch(cinfo->in_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_extrgb_ycc_convert_sse2; mmxfct=jsimd_extrgb_ycc_convert_mmx; @@ -176,11 +175,9 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_rgb_ycc_convert_sse2)) - sse2fct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); else if (simd_support & JSIMD_MMX) - mmxfct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + mmxfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); } GLOBAL(void) @@ -191,8 +188,7 @@ jsimd_rgb_gray_convert (j_compress_ptr cinfo, void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); void (*mmxfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + switch(cinfo->in_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_extrgb_gray_convert_sse2; mmxfct=jsimd_extrgb_gray_convert_mmx; @@ -229,11 +225,9 @@ jsimd_rgb_gray_convert (j_compress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_rgb_gray_convert_sse2)) - sse2fct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + sse2fct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); else if (simd_support & JSIMD_MMX) - mmxfct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + mmxfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows); } GLOBAL(void) @@ -244,8 +238,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); void (*mmxfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_ycc_extrgb_convert_sse2; mmxfct=jsimd_ycc_extrgb_convert_mmx; @@ -282,11 +275,9 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_ycc_rgb_convert_sse2)) - sse2fct(cinfo->output_width, input_buf, - input_row, output_buf, num_rows); + sse2fct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); else if (simd_support & JSIMD_MMX) - mmxfct(cinfo->output_width, input_buf, - input_row, output_buf, num_rows); + mmxfct(cinfo->output_width, input_buf, input_row, output_buf, num_rows); } GLOBAL(int) @@ -333,12 +324,13 @@ jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, { if (simd_support & JSIMD_SSE2) jsimd_h2v2_downsample_sse2(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) 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); } GLOBAL(void) @@ -347,12 +339,13 @@ jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, { if (simd_support & JSIMD_SSE2) jsimd_h2v1_downsample_sse2(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) jsimd_h2v1_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); } GLOBAL(int) @@ -400,11 +393,11 @@ jsimd_h2v2_upsample (j_decompress_ptr cinfo, JSAMPARRAY * output_data_ptr) { if (simd_support & JSIMD_SSE2) - jsimd_h2v2_upsample_sse2(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + jsimd_h2v2_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); else if (simd_support & JSIMD_MMX) - jsimd_h2v2_upsample_mmx(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + jsimd_h2v2_upsample_mmx(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); } GLOBAL(void) @@ -414,11 +407,11 @@ jsimd_h2v1_upsample (j_decompress_ptr cinfo, JSAMPARRAY * output_data_ptr) { if (simd_support & JSIMD_SSE2) - jsimd_h2v1_upsample_sse2(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + jsimd_h2v1_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); else if (simd_support & JSIMD_MMX) - jsimd_h2v1_upsample_mmx(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + jsimd_h2v1_upsample_mmx(cinfo->max_v_samp_factor, cinfo->output_width, + input_data, output_data_ptr); } GLOBAL(int) @@ -470,10 +463,12 @@ jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_fancy_upsample_sse2)) jsimd_h2v2_fancy_upsample_sse2(cinfo->max_v_samp_factor, - compptr->downsampled_width, input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); else if (simd_support & JSIMD_MMX) jsimd_h2v2_fancy_upsample_mmx(cinfo->max_v_samp_factor, - compptr->downsampled_width, input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); } GLOBAL(void) @@ -485,10 +480,12 @@ jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_fancy_upsample_sse2)) jsimd_h2v1_fancy_upsample_sse2(cinfo->max_v_samp_factor, - compptr->downsampled_width, input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); else if (simd_support & JSIMD_MMX) jsimd_h2v1_fancy_upsample_mmx(cinfo->max_v_samp_factor, - compptr->downsampled_width, input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); } GLOBAL(int) @@ -540,8 +537,7 @@ jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); void (*mmxfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_h2v2_extrgb_merged_upsample_sse2; mmxfct=jsimd_h2v2_extrgb_merged_upsample_mmx; @@ -578,11 +574,9 @@ jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_merged_upsample_sse2)) - sse2fct(cinfo->output_width, input_buf, - in_row_group_ctr, output_buf); + sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); else if (simd_support & JSIMD_MMX) - mmxfct(cinfo->output_width, input_buf, - in_row_group_ctr, output_buf); + mmxfct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); } GLOBAL(void) @@ -594,8 +588,7 @@ jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); void (*mmxfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_h2v1_extrgb_merged_upsample_sse2; mmxfct=jsimd_h2v1_extrgb_merged_upsample_mmx; @@ -632,11 +625,9 @@ jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, if ((simd_support & JSIMD_SSE2) && IS_ALIGNED_SSE(jconst_merged_upsample_sse2)) - sse2fct(cinfo->output_width, input_buf, - in_row_group_ctr, output_buf); + sse2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); else if (simd_support & JSIMD_MMX) - mmxfct(cinfo->output_width, input_buf, - in_row_group_ctr, output_buf); + mmxfct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf); } GLOBAL(int) @@ -915,7 +906,8 @@ jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JDIMENSION output_col) { 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); + jsimd_idct_2x2_sse2(compptr->dct_table, coef_block, output_buf, + output_col); else if (simd_support & JSIMD_MMX) jsimd_idct_2x2_mmx(compptr->dct_table, coef_block, output_buf, output_col); } @@ -926,7 +918,8 @@ jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JDIMENSION 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); + jsimd_idct_4x4_sse2(compptr->dct_table, coef_block, output_buf, + output_col); else if (simd_support & JSIMD_MMX) jsimd_idct_4x4_mmx(compptr->dct_table, coef_block, output_buf, output_col); } @@ -1013,39 +1006,43 @@ jsimd_can_idct_float (void) GLOBAL(void) jsimd_idct_islow (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_SSE2) && IS_ALIGNED_SSE(jconst_idct_islow_sse2)) - jsimd_idct_islow_sse2(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_islow_sse2(compptr->dct_table, coef_block, output_buf, + output_col); else if (simd_support & JSIMD_MMX) - jsimd_idct_islow_mmx(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_islow_mmx(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_ifast (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_SSE2) && IS_ALIGNED_SSE(jconst_idct_ifast_sse2)) - jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf, + output_col); else if (simd_support & JSIMD_MMX) - jsimd_idct_ifast_mmx(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_ifast_mmx(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_float (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_SSE2) && IS_ALIGNED_SSE(jconst_idct_float_sse2)) - jsimd_idct_float_sse2(compptr->dct_table, coef_block, - output_buf, output_col); + jsimd_idct_float_sse2(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); + jsimd_idct_float_sse(compptr->dct_table, coef_block, output_buf, + output_col); else if (simd_support & JSIMD_3DNOW) - jsimd_idct_float_3dnow(compptr->dct_table, coef_block, - output_buf, output_col); + jsimd_idct_float_3dnow(compptr->dct_table, coef_block, output_buf, + output_col); } diff --git a/simd/jsimd_mips.c b/simd/jsimd_mips.c index 62244ff..336b2db 100644 --- a/simd/jsimd_mips.c +++ b/simd/jsimd_mips.c @@ -10,10 +10,8 @@ * For conditions of distribution and use, see copyright notice in jsimdext.inc * * This file contains the interface between the "normal" portions - * of the library and the SIMD implementations when running on + * of the library and the SIMD implementations when running on a * MIPS architecture. - * - * Based on the stubs from 'jsimd_none.c' */ #define JPEG_INTERNALS @@ -53,6 +51,7 @@ parse_proc_cpuinfo(const char* search_string) /* Did not find string in the proc file, or not Linux ELF. */ return 0; } + #endif /* @@ -78,6 +77,7 @@ init_simd (void) return; #endif } + static const int mips_idct_ifast_coefs[4] = { 0x45404540, // FIX( 1.082392200 / 2) = 17734 = 0x4546 0x5A805A80, // FIX( 1.414213562 / 2) = 23170 = 0x5A82 @@ -97,6 +97,7 @@ jsimd_can_rgb_ycc (void) return 0; if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -115,6 +116,7 @@ jsimd_can_rgb_gray (void) return 0; if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -133,6 +135,7 @@ jsimd_can_ycc_rgb (void) return 0; if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4)) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -149,6 +152,7 @@ jsimd_c_can_null_convert (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -161,8 +165,8 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, JDIMENSION output_row, int num_rows) { void (*mipsdspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + + switch(cinfo->in_color_space) { case JCS_EXT_RGB: mipsdspr2fct=jsimd_extrgb_ycc_convert_mips_dspr2; break; @@ -192,8 +196,8 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, } if (simd_support & JSIMD_MIPS_DSPR2) - mipsdspr2fct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); + mipsdspr2fct(cinfo->image_width, input_buf, output_buf, output_row, + num_rows); } GLOBAL(void) @@ -202,8 +206,8 @@ jsimd_rgb_gray_convert (j_compress_ptr cinfo, JDIMENSION output_row, int num_rows) { void (*mipsdspr2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + + switch(cinfo->in_color_space) { case JCS_EXT_RGB: mipsdspr2fct=jsimd_extrgb_gray_convert_mips_dspr2; break; @@ -232,9 +236,8 @@ jsimd_rgb_gray_convert (j_compress_ptr cinfo, } if (simd_support & JSIMD_MIPS_DSPR2) - mipsdspr2fct(cinfo->image_width, input_buf, - output_buf, output_row, num_rows); - + mipsdspr2fct(cinfo->image_width, input_buf, output_buf, output_row, + num_rows); } GLOBAL(void) @@ -244,8 +247,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, { void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: mipsdspr2fct=jsimd_ycc_extrgb_convert_mips_dspr2; break; @@ -274,8 +276,8 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, } if (simd_support & JSIMD_MIPS_DSPR2) - mipsdspr2fct(cinfo->output_width, input_buf, - input_row, output_buf, num_rows); + mipsdspr2fct(cinfo->output_width, input_buf, input_row, output_buf, + num_rows); } GLOBAL(void) @@ -284,8 +286,9 @@ jsimd_c_null_convert (j_compress_ptr cinfo, JDIMENSION output_row, int num_rows) { if (simd_support & JSIMD_MIPS_DSPR2) - jsimd_null_convert_compr_mips_dspr2 (cinfo->image_width, input_buf, - output_buf, output_row, num_rows, cinfo->num_components); + jsimd_null_convert_compr_mips_dspr2(cinfo->image_width, input_buf, + output_buf, output_row, num_rows, + cinfo->num_components); } GLOBAL(int) @@ -298,6 +301,7 @@ jsimd_can_h2v2_downsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -316,6 +320,7 @@ jsimd_can_h2v2_smooth_downsample (void) return 0; if(DCTSIZE != 8) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -332,6 +337,7 @@ jsimd_can_h2v1_downsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -344,18 +350,23 @@ jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, { 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); + cinfo->max_v_samp_factor, + compptr->v_samp_factor, + compptr->width_in_blocks, input_data, + output_data); } GLOBAL(void) -jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, +jsimd_h2v2_smooth_downsample (j_compress_ptr cinfo, + 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); + compptr->v_samp_factor, + cinfo->max_v_samp_factor, + cinfo->smoothing_factor, + compptr->width_in_blocks, + cinfo->image_width); } GLOBAL(void) @@ -364,8 +375,10 @@ jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, { 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); + cinfo->max_v_samp_factor, + compptr->v_samp_factor, + compptr->width_in_blocks, + input_data, output_data); } GLOBAL(int) @@ -378,6 +391,7 @@ jsimd_can_h2v2_upsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -394,6 +408,7 @@ jsimd_can_h2v1_upsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -408,7 +423,8 @@ jsimd_h2v2_upsample (j_decompress_ptr cinfo, { if (simd_support & JSIMD_MIPS_DSPR2) jsimd_h2v2_upsample_mips_dspr2(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + cinfo->output_width, input_data, + output_data_ptr); } GLOBAL(void) @@ -419,7 +435,8 @@ jsimd_h2v1_upsample (j_decompress_ptr cinfo, { if (simd_support & JSIMD_MIPS_DSPR2) jsimd_h2v1_upsample_mips_dspr2(cinfo->max_v_samp_factor, - cinfo->output_width, input_data, output_data_ptr); + cinfo->output_width, input_data, + output_data_ptr); } GLOBAL(int) @@ -432,6 +449,7 @@ jsimd_can_h2v2_fancy_upsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -448,6 +466,7 @@ jsimd_can_h2v1_fancy_upsample (void) return 0; if (sizeof(JDIMENSION) != 4) return 0; + if (simd_support & JSIMD_MIPS_DSPR2) return 1; @@ -462,7 +481,8 @@ jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo, { 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); + compptr->downsampled_width, + input_data, output_data_ptr); } GLOBAL(void) @@ -473,7 +493,8 @@ jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, { 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); + compptr->downsampled_width, + input_data, output_data_ptr); } GLOBAL(int) @@ -510,10 +531,10 @@ jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf) { - void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, JSAMPLE *); + void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, + JSAMPLE *); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: mipsdspr2fct=jsimd_h2v2_extrgb_merged_upsample_mips_dspr2; break; @@ -541,8 +562,8 @@ jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, break; } - mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, - output_buf, cinfo->sample_range_limit); + mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf, + cinfo->sample_range_limit); } GLOBAL(void) @@ -551,10 +572,10 @@ jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf) { - void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, JSAMPLE *); + void (*mipsdspr2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, + JSAMPLE *); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: mipsdspr2fct=jsimd_h2v1_extrgb_merged_upsample_mips_dspr2; break; @@ -582,8 +603,8 @@ jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, break; } - mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, - output_buf, cinfo->sample_range_limit); + mipsdspr2fct(cinfo->output_width, input_buf, in_row_group_ctr, output_buf, + cinfo->sample_range_limit); } GLOBAL(int) @@ -624,7 +645,7 @@ jsimd_can_convsamp_float (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -683,6 +704,8 @@ jsimd_can_fdct_ifast (void) GLOBAL(int) jsimd_can_fdct_float (void) { + init_simd(); + return 0; } @@ -741,7 +764,7 @@ jsimd_can_quantize_float (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -759,7 +782,7 @@ GLOBAL(void) jsimd_quantize_float (JCOEFPTR coef_block, FAST_FLOAT * divisors, FAST_FLOAT * workspace) { - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) jsimd_quantize_float_mips_dspr2(coef_block, divisors, workspace); } @@ -780,7 +803,7 @@ jsimd_can_idct_2x2 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -803,7 +826,7 @@ jsimd_can_idct_4x4 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -826,7 +849,7 @@ jsimd_can_idct_6x6 (void) if (sizeof(ISLOW_MULT_TYPE) != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -859,9 +882,9 @@ jsimd_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, 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); + if (simd_support & JSIMD_MIPS_DSPR2) + jsimd_idct_2x2_mips_dspr2(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) @@ -869,11 +892,10 @@ jsimd_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col) { - if ((simd_support & JSIMD_MIPS_DSPR2)) - { + 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); + jsimd_idct_4x4_mips_dspr2(compptr->dct_table, coef_block, output_buf, + output_col, workspace); } } @@ -882,9 +904,9 @@ jsimd_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, 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); + if (simd_support & JSIMD_MIPS_DSPR2) + jsimd_idct_6x6_mips_dspr2(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) @@ -908,8 +930,8 @@ jsimd_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, (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_pass1_mips_dspr2(coef_block, compptr->dct_table, + workspace); jsimd_idct_12x12_pass2_mips_dspr2(workspace, output); } } @@ -956,7 +978,7 @@ jsimd_can_idct_ifast (void) if (IFAST_SCALE_BITS != 2) return 0; - if ((simd_support & JSIMD_MIPS_DSPR2)) + if (simd_support & JSIMD_MIPS_DSPR2) return 1; return 0; @@ -965,13 +987,15 @@ jsimd_can_idct_ifast (void) GLOBAL(int) jsimd_can_idct_float (void) { + init_simd(); + return 0; } GLOBAL(void) jsimd_idct_islow (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 output[8] = { @@ -1019,7 +1043,7 @@ jsimd_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, GLOBAL(void) jsimd_idct_float (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) { } diff --git a/simd/jsimd_x86_64.c b/simd/jsimd_x86_64.c index afaea4b..87c9d56 100644 --- a/simd/jsimd_x86_64.c +++ b/simd/jsimd_x86_64.c @@ -10,7 +10,7 @@ * * This file contains the interface between the "normal" portions * of the library and the SIMD implementations when running on a - * x86_64 architecture. + * 64-bit x86 architecture. */ #define JPEG_INTERNALS @@ -87,8 +87,7 @@ jsimd_rgb_ycc_convert (j_compress_ptr cinfo, { void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + switch(cinfo->in_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_extrgb_ycc_convert_sse2; break; @@ -126,8 +125,7 @@ jsimd_rgb_gray_convert (j_compress_ptr cinfo, { void (*sse2fct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int); - switch(cinfo->in_color_space) - { + switch(cinfo->in_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_extrgb_gray_convert_sse2; break; @@ -165,8 +163,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo, { void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_ycc_extrgb_convert_sse2; break; @@ -225,10 +222,8 @@ GLOBAL(void) jsimd_h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY output_data) { - jsimd_h2v2_downsample_sse2(cinfo->image_width, - cinfo->max_v_samp_factor, - compptr->v_samp_factor, - compptr->width_in_blocks, + jsimd_h2v2_downsample_sse2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, compptr->width_in_blocks, input_data, output_data); } @@ -236,10 +231,8 @@ GLOBAL(void) jsimd_h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, JSAMPARRAY input_data, JSAMPARRAY output_data) { - jsimd_h2v1_downsample_sse2(cinfo->image_width, - cinfo->max_v_samp_factor, - compptr->v_samp_factor, - compptr->width_in_blocks, + jsimd_h2v1_downsample_sse2(cinfo->image_width, cinfo->max_v_samp_factor, + compptr->v_samp_factor, compptr->width_in_blocks, input_data, output_data); } @@ -273,8 +266,7 @@ jsimd_h2v2_upsample (j_decompress_ptr cinfo, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { - jsimd_h2v2_upsample_sse2(cinfo->max_v_samp_factor, - cinfo->output_width, + jsimd_h2v2_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width, input_data, output_data_ptr); } @@ -284,8 +276,7 @@ jsimd_h2v1_upsample (j_decompress_ptr cinfo, JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) { - jsimd_h2v1_upsample_sse2(cinfo->max_v_samp_factor, - cinfo->output_width, + jsimd_h2v1_upsample_sse2(cinfo->max_v_samp_factor, cinfo->output_width, input_data, output_data_ptr); } @@ -326,8 +317,8 @@ jsimd_h2v2_fancy_upsample (j_decompress_ptr cinfo, JSAMPARRAY * output_data_ptr) { jsimd_h2v2_fancy_upsample_sse2(cinfo->max_v_samp_factor, - compptr->downsampled_width, - input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); } GLOBAL(void) @@ -337,8 +328,8 @@ jsimd_h2v1_fancy_upsample (j_decompress_ptr cinfo, JSAMPARRAY * output_data_ptr) { jsimd_h2v1_fancy_upsample_sse2(cinfo->max_v_samp_factor, - compptr->downsampled_width, - input_data, output_data_ptr); + compptr->downsampled_width, input_data, + output_data_ptr); } GLOBAL(int) @@ -379,8 +370,7 @@ jsimd_h2v2_merged_upsample (j_decompress_ptr cinfo, { void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_h2v2_extrgb_merged_upsample_sse2; break; @@ -419,8 +409,7 @@ jsimd_h2v1_merged_upsample (j_decompress_ptr cinfo, { void (*sse2fct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY); - switch(cinfo->out_color_space) - { + switch(cinfo->out_color_space) { case JCS_EXT_RGB: sse2fct=jsimd_h2v1_extrgb_merged_upsample_sse2; break; @@ -728,26 +717,28 @@ jsimd_can_idct_float (void) GLOBAL(void) jsimd_idct_islow (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) { - jsimd_idct_islow_sse2(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_islow_sse2(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_ifast (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) { - jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf, output_col); + jsimd_idct_ifast_sse2(compptr->dct_table, coef_block, output_buf, + output_col); } GLOBAL(void) jsimd_idct_float (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) { - jsimd_idct_float_sse2(compptr->dct_table, coef_block, - output_buf, output_col); + jsimd_idct_float_sse2(compptr->dct_table, coef_block, output_buf, + output_col); } -- 2.40.0