shun-iwasawa 82a8f5
/*
shun-iwasawa 82a8f5
 * jsimd.h
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB</ossman@cendio.se>
shun-iwasawa 82a8f5
 * Copyright (C) 2011, 2014, D. R. Commander.
shun-iwasawa 82a8f5
 * Copyright (C) 2015-2016, 2018, Matthieu Darbois.
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 * Based on the x86 SIMD extension for IJG JPEG library,
shun-iwasawa 82a8f5
 * Copyright (C) 1999-2006, MIYASAKA Masaru.
shun-iwasawa 82a8f5
 * For conditions of distribution and use, see copyright notice in jsimdext.inc
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 */
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
#include "jchuff.h"             /* Declarations shared with jcphuff.c */
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_rgb_ycc(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_rgb_gray(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_ycc_rgb(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_ycc_rgb565(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_c_can_null_convert(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_rgb_ycc_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
shun-iwasawa 82a8f5
                                   JSAMPIMAGE output_buf,
shun-iwasawa 82a8f5
                                   JDIMENSION output_row, int num_rows);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_rgb_gray_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
shun-iwasawa 82a8f5
                                    JSAMPIMAGE output_buf,
shun-iwasawa 82a8f5
                                    JDIMENSION output_row, int num_rows);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_ycc_rgb_convert(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                   JSAMPIMAGE input_buf, JDIMENSION input_row,
shun-iwasawa 82a8f5
                                   JSAMPARRAY output_buf, int num_rows);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                      JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                                      JDIMENSION input_row,
shun-iwasawa 82a8f5
                                      JSAMPARRAY output_buf, int num_rows);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_c_null_convert(j_compress_ptr cinfo, JSAMPARRAY input_buf,
shun-iwasawa 82a8f5
                                  JSAMPIMAGE output_buf, JDIMENSION output_row,
shun-iwasawa 82a8f5
                                  int num_rows);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v2_downsample(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v1_downsample(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v2_downsample(j_compress_ptr cinfo,
shun-iwasawa 82a8f5
                                   jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                   JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                   JSAMPARRAY output_data);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v2_smooth_downsample(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo,
shun-iwasawa 82a8f5
                                          jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                          JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                          JSAMPARRAY output_data);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v1_downsample(j_compress_ptr cinfo,
shun-iwasawa 82a8f5
                                   jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                   JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                   JSAMPARRAY output_data);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v2_upsample(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v1_upsample(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_int_upsample(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v2_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                 jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                 JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                 JSAMPARRAY *output_data_ptr);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v1_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                 jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                 JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                 JSAMPARRAY *output_data_ptr);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_int_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                JSAMPARRAY *output_data_ptr);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v2_fancy_upsample(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v1_fancy_upsample(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                       jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                       JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                       JSAMPARRAY *output_data_ptr);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                       jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                                       JSAMPARRAY input_data,
shun-iwasawa 82a8f5
                                       JSAMPARRAY *output_data_ptr);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v2_merged_upsample(void);
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_h2v1_merged_upsample(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                        JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                                        JDIMENSION in_row_group_ctr,
shun-iwasawa 82a8f5
                                        JSAMPARRAY output_buf);
shun-iwasawa 82a8f5
EXTERN(void) jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo,
shun-iwasawa 82a8f5
                                        JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                                        JDIMENSION in_row_group_ctr,
shun-iwasawa 82a8f5
                                        JSAMPARRAY output_buf);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_huff_encode_one_block(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(JOCTET *) jsimd_huff_encode_one_block(void *state, JOCTET *buffer,
shun-iwasawa 82a8f5
                                             JCOEFPTR block, int last_dc_val,
shun-iwasawa 82a8f5
                                             c_derived_tbl *dctbl,
shun-iwasawa 82a8f5
                                             c_derived_tbl *actbl);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_encode_mcu_AC_first_prepare(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(void) jsimd_encode_mcu_AC_first_prepare
shun-iwasawa 82a8f5
  (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
shun-iwasawa 82a8f5
   JCOEF *values, size_t *zerobits);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_can_encode_mcu_AC_refine_prepare(void);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
EXTERN(int) jsimd_encode_mcu_AC_refine_prepare
shun-iwasawa 82a8f5
  (const JCOEF *block, const int *jpeg_natural_order_start, int Sl, int Al,
shun-iwasawa 82a8f5
   JCOEF *absvalues, size_t *bits);