Blame thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/simd/loongson/jsimd.c

shun-iwasawa 82a8f5
/*
shun-iwasawa 82a8f5
 * jsimd_loongson.c
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 * Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB</ossman@cendio.se>
shun-iwasawa 82a8f5
 * Copyright (C) 2009-2011, 2014, 2016, 2018, D. R. Commander.
shun-iwasawa 82a8f5
 * Copyright (C) 2013-2014, MIPS Technologies, Inc., California.
shun-iwasawa 82a8f5
 * Copyright (C) 2015, 2018, Matthieu Darbois.
shun-iwasawa 82a8f5
 * Copyright (C) 2016-2017, Loongson Technology Corporation Limited, BeiJing.
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
 * This file contains the interface between the "normal" portions
shun-iwasawa 82a8f5
 * of the library and the SIMD implementations when running on a
shun-iwasawa 82a8f5
 * Loongson architecture.
shun-iwasawa 82a8f5
 */
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
#define JPEG_INTERNALS
shun-iwasawa 82a8f5
#include "../../jinclude.h"
shun-iwasawa 82a8f5
#include "../../jpeglib.h"
shun-iwasawa 82a8f5
#include "../../jsimd.h"
shun-iwasawa 82a8f5
#include "../../jdct.h"
shun-iwasawa 82a8f5
#include "../../jsimddct.h"
shun-iwasawa 82a8f5
#include "../jsimd.h"
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
static unsigned int simd_support = ~0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
/*
shun-iwasawa 82a8f5
 * Check what SIMD accelerations are supported.
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 * FIXME: This code is racy under a multi-threaded environment.
shun-iwasawa 82a8f5
 */
shun-iwasawa 82a8f5
LOCAL(void)
shun-iwasawa 82a8f5
init_simd(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
#ifndef NO_GETENV
shun-iwasawa 82a8f5
  char *env = NULL;
shun-iwasawa 82a8f5
#endif
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support != ~0U)
shun-iwasawa 82a8f5
    return;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  simd_support |= JSIMD_MMI;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
#ifndef NO_GETENV
shun-iwasawa 82a8f5
  /* Force different settings through environment variables */
shun-iwasawa 82a8f5
  env = getenv("JSIMD_FORCENONE");
shun-iwasawa 82a8f5
  if ((env != NULL) && (strcmp(env, "1") == 0))
shun-iwasawa 82a8f5
    simd_support = 0;
shun-iwasawa 82a8f5
#endif
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_rgb_ycc(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (BITS_IN_JSAMPLE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JDIMENSION) != 4)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_rgb_gray(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_ycc_rgb(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (BITS_IN_JSAMPLE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JDIMENSION) != 4)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if ((RGB_PIXELSIZE != 3) && (RGB_PIXELSIZE != 4))
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_ycc_rgb565(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_c_can_null_convert(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_rgb_ycc_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
  void (*mmifct) (JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  switch (cinfo->in_color_space) {
shun-iwasawa 82a8f5
  case JCS_EXT_RGB:
shun-iwasawa 82a8f5
    mmifct = jsimd_extrgb_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_RGBX:
shun-iwasawa 82a8f5
  case JCS_EXT_RGBA:
shun-iwasawa 82a8f5
    mmifct = jsimd_extrgbx_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_BGR:
shun-iwasawa 82a8f5
    mmifct = jsimd_extbgr_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_BGRX:
shun-iwasawa 82a8f5
  case JCS_EXT_BGRA:
shun-iwasawa 82a8f5
    mmifct = jsimd_extbgrx_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_XBGR:
shun-iwasawa 82a8f5
  case JCS_EXT_ABGR:
shun-iwasawa 82a8f5
    mmifct = jsimd_extxbgr_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_XRGB:
shun-iwasawa 82a8f5
  case JCS_EXT_ARGB:
shun-iwasawa 82a8f5
    mmifct = jsimd_extxrgb_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  default:
shun-iwasawa 82a8f5
    mmifct = jsimd_rgb_ycc_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  }
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  mmifct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_rgb_gray_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
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_ycc_rgb_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                      JDIMENSION input_row, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                      int num_rows)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  void (*mmifct) (JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  switch (cinfo->out_color_space) {
shun-iwasawa 82a8f5
  case JCS_EXT_RGB:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extrgb_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_RGBX:
shun-iwasawa 82a8f5
  case JCS_EXT_RGBA:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extrgbx_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_BGR:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extbgr_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_BGRX:
shun-iwasawa 82a8f5
  case JCS_EXT_BGRA:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extbgrx_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_XBGR:
shun-iwasawa 82a8f5
  case JCS_EXT_ABGR:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extxbgr_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  case JCS_EXT_XRGB:
shun-iwasawa 82a8f5
  case JCS_EXT_ARGB:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_extxrgb_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  default:
shun-iwasawa 82a8f5
    mmifct = jsimd_ycc_rgb_convert_mmi;
shun-iwasawa 82a8f5
    break;
shun-iwasawa 82a8f5
  }
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  mmifct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_ycc_rgb565_convert(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                         JDIMENSION input_row, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                         int num_rows)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
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
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v2_downsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (BITS_IN_JSAMPLE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JDIMENSION) != 4)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v2_smooth_downsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v1_downsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v2_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                      JSAMPARRAY input_data, JSAMPARRAY output_data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  jsimd_h2v2_downsample_mmi(cinfo->image_width, cinfo->max_v_samp_factor,
shun-iwasawa 82a8f5
                            compptr->v_samp_factor, compptr->width_in_blocks,
shun-iwasawa 82a8f5
                            input_data, output_data);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v2_smooth_downsample(j_compress_ptr cinfo,
shun-iwasawa 82a8f5
                             jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                             JSAMPARRAY input_data, JSAMPARRAY output_data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v1_downsample(j_compress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                      JSAMPARRAY input_data, JSAMPARRAY output_data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v2_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v1_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_int_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v2_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                    JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v1_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                    JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_int_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                   JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v2_fancy_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (BITS_IN_JSAMPLE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JDIMENSION) != 4)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v1_fancy_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v2_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  jsimd_h2v2_fancy_upsample_mmi(cinfo->max_v_samp_factor,
shun-iwasawa 82a8f5
                                compptr->downsampled_width, input_data,
shun-iwasawa 82a8f5
                                output_data_ptr);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v1_fancy_upsample(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                          JSAMPARRAY input_data, JSAMPARRAY *output_data_ptr)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v2_merged_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_h2v1_merged_upsample(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v2_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                           JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_h2v1_merged_upsample(j_decompress_ptr cinfo, JSAMPIMAGE input_buf,
shun-iwasawa 82a8f5
                           JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_convsamp(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_convsamp_float(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_convsamp(JSAMPARRAY sample_data, JDIMENSION start_col,
shun-iwasawa 82a8f5
               DCTELEM *workspace)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_convsamp_float(JSAMPARRAY sample_data, JDIMENSION start_col,
shun-iwasawa 82a8f5
                     FAST_FLOAT *workspace)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_fdct_islow(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (DCTSIZE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(DCTELEM) != 2)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_fdct_ifast(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_fdct_float(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_fdct_islow(DCTELEM *data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  jsimd_fdct_islow_mmi(data);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_fdct_ifast(DCTELEM *data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_fdct_float(FAST_FLOAT *data)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_quantize(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (DCTSIZE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JCOEF) != 2)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(DCTELEM) != 2)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_quantize_float(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_quantize(JCOEFPTR coef_block, DCTELEM *divisors, DCTELEM *workspace)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  jsimd_quantize_mmi(coef_block, divisors, workspace);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_quantize_float(JCOEFPTR coef_block, FAST_FLOAT *divisors,
shun-iwasawa 82a8f5
                     FAST_FLOAT *workspace)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_2x2(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_4x4(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_6x6(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_12x12(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_2x2(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
               JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
               JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_4x4(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
               JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
               JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_6x6(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
               JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
               JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_12x12(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                 JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_islow(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  init_simd();
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  /* The code is optimised for these values only */
shun-iwasawa 82a8f5
  if (DCTSIZE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JCOEF) != 2)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (BITS_IN_JSAMPLE != 8)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(JDIMENSION) != 4)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
  if (sizeof(ISLOW_MULT_TYPE) != 2)
shun-iwasawa 82a8f5
    return 0;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (simd_support & JSIMD_MMI)
shun-iwasawa 82a8f5
    return 1;
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_ifast(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_idct_float(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_islow(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                 JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  jsimd_idct_islow_mmi(compptr->dct_table, coef_block, output_buf, output_col);
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_ifast(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                 JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_idct_float(j_decompress_ptr cinfo, jpeg_component_info *compptr,
shun-iwasawa 82a8f5
                 JCOEFPTR coef_block, JSAMPARRAY output_buf,
shun-iwasawa 82a8f5
                 JDIMENSION output_col)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_huff_encode_one_block(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(JOCTET *)
shun-iwasawa 82a8f5
jsimd_huff_encode_one_block(void *state, JOCTET *buffer, JCOEFPTR block,
shun-iwasawa 82a8f5
                            int last_dc_val, c_derived_tbl *dctbl,
shun-iwasawa 82a8f5
                            c_derived_tbl *actbl)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return NULL;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_encode_mcu_AC_first_prepare(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(void)
shun-iwasawa 82a8f5
jsimd_encode_mcu_AC_first_prepare(const JCOEF *block,
shun-iwasawa 82a8f5
                                  const int *jpeg_natural_order_start, int Sl,
shun-iwasawa 82a8f5
                                  int Al, JCOEF *values, size_t *zerobits)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_can_encode_mcu_AC_refine_prepare(void)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
GLOBAL(int)
shun-iwasawa 82a8f5
jsimd_encode_mcu_AC_refine_prepare(const JCOEF *block,
shun-iwasawa 82a8f5
                                   const int *jpeg_natural_order_start, int Sl,
shun-iwasawa 82a8f5
                                   int Al, JCOEF *absvalues, size_t *bits)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  return 0;
shun-iwasawa 82a8f5
}