Пример #1
0
jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
                       JSAMPIMAGE input_buf, JDIMENSION input_row,
                       JSAMPARRAY output_buf, int num_rows)
{
  void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);

  switch(cinfo->out_color_space)
  {
    case JCS_EXT_RGB:
      neonfct=jsimd_ycc_extrgb_convert_neon;
      break;
    case JCS_EXT_RGBX:
      neonfct=jsimd_ycc_extrgbx_convert_neon;
      break;
    case JCS_EXT_BGR:
      neonfct=jsimd_ycc_extbgr_convert_neon;
      break;
    case JCS_EXT_BGRX:
      neonfct=jsimd_ycc_extbgrx_convert_neon;
      break;
    case JCS_EXT_XBGR:
      neonfct=jsimd_ycc_extxbgr_convert_neon;
      break;
    case JCS_EXT_XRGB:
      neonfct=jsimd_ycc_extxrgb_convert_neon;
      break;
  default:
      neonfct=jsimd_ycc_extrgb_convert_neon;
      break;
  }

  if (simd_support & JSIMD_ARM_NEON)
    neonfct(cinfo->output_width, input_buf,
        input_row, output_buf, num_rows);
}
jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
                       JSAMPIMAGE input_buf, JDIMENSION input_row,
                       JSAMPARRAY output_buf, int num_rows)
{
    void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);

    neonfct=jsimd_ycc_rgb565_convert_neon;

    neonfct(cinfo->output_width, input_buf,
        input_row, output_buf, num_rows);
}
Пример #3
0
jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
                       JSAMPIMAGE input_buf, JDIMENSION input_row,
                       JSAMPARRAY output_buf, int num_rows)
{
  void (*neonfct)(JDIMENSION, JSAMPIMAGE, JDIMENSION, JSAMPARRAY, int);

  switch(cinfo->out_color_space) {
    case JCS_EXT_RGB:
      if (simd_features & JSIMD_FASTST3)
        neonfct=jsimd_ycc_extrgb_convert_neon;
      else
        neonfct=jsimd_ycc_extrgb_convert_neon_slowst3;
      break;
    case JCS_EXT_RGBX:
    case JCS_EXT_RGBA:
      neonfct=jsimd_ycc_extrgbx_convert_neon;
      break;
    case JCS_EXT_BGR:
      if (simd_features & JSIMD_FASTST3)
        neonfct=jsimd_ycc_extbgr_convert_neon;
      else
        neonfct=jsimd_ycc_extbgr_convert_neon_slowst3;
      break;
    case JCS_EXT_BGRX:
    case JCS_EXT_BGRA:
      neonfct=jsimd_ycc_extbgrx_convert_neon;
      break;
    case JCS_EXT_XBGR:
    case JCS_EXT_ABGR:
      neonfct=jsimd_ycc_extxbgr_convert_neon;
      break;
    case JCS_EXT_XRGB:
    case JCS_EXT_ARGB:
      neonfct=jsimd_ycc_extxrgb_convert_neon;
      break;
    default:
      if (simd_features & JSIMD_FASTST3)
        neonfct=jsimd_ycc_extrgb_convert_neon;
      else
        neonfct=jsimd_ycc_extrgb_convert_neon_slowst3;
      break;
  }

  neonfct(cinfo->output_width, input_buf, input_row, output_buf, num_rows);
}
Пример #4
0
jsimd_rgb_ycc_convert (j_compress_ptr cinfo,
                       JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
                       JDIMENSION output_row, int num_rows)
{
  void (*neonfct)(JDIMENSION, JSAMPARRAY, JSAMPIMAGE, JDIMENSION, int);

  switch(cinfo->in_color_space) {
    case JCS_EXT_RGB:
      if (simd_features & JSIMD_FASTLD3)
        neonfct=jsimd_extrgb_ycc_convert_neon;
      else
        neonfct=jsimd_extrgb_ycc_convert_neon_slowld3;
      break;
    case JCS_EXT_RGBX:
    case JCS_EXT_RGBA:
      neonfct=jsimd_extrgbx_ycc_convert_neon;
      break;
    case JCS_EXT_BGR:
      if (simd_features & JSIMD_FASTLD3)
        neonfct=jsimd_extbgr_ycc_convert_neon;
      else
        neonfct=jsimd_extbgr_ycc_convert_neon_slowld3;
      break;
    case JCS_EXT_BGRX:
    case JCS_EXT_BGRA:
      neonfct=jsimd_extbgrx_ycc_convert_neon;
      break;
    case JCS_EXT_XBGR:
    case JCS_EXT_ABGR:
      neonfct=jsimd_extxbgr_ycc_convert_neon;
      break;
    case JCS_EXT_XRGB:
    case JCS_EXT_ARGB:
      neonfct=jsimd_extxrgb_ycc_convert_neon;
      break;
    default:
      if (simd_features & JSIMD_FASTLD3)
        neonfct=jsimd_extrgb_ycc_convert_neon;
      else
        neonfct=jsimd_extrgb_ycc_convert_neon_slowld3;
      break;
  }

  neonfct(cinfo->image_width, input_buf, output_buf, output_row, num_rows);
}