Blame thirdparty/libjpeg-turbo/libjpeg-turbo-2.0.6/simd/powerpc/jcsample.h

shun-iwasawa 82a8f5
/*
shun-iwasawa 82a8f5
 * jcsample.h
shun-iwasawa 82a8f5
 *
shun-iwasawa 82a8f5
 * This file was part of the Independent JPEG Group's software:
shun-iwasawa 82a8f5
 * Copyright (C) 1991-1996, Thomas G. Lane.
shun-iwasawa 82a8f5
 * For conditions of distribution and use, see the accompanying README.ijg
shun-iwasawa 82a8f5
 * file.
shun-iwasawa 82a8f5
 */
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
LOCAL(void)
shun-iwasawa 82a8f5
expand_right_edge(JSAMPARRAY image_data, int num_rows, JDIMENSION input_cols,
shun-iwasawa 82a8f5
                  JDIMENSION output_cols)
shun-iwasawa 82a8f5
{
shun-iwasawa 82a8f5
  register JSAMPROW ptr;
shun-iwasawa 82a8f5
  register JSAMPLE pixval;
shun-iwasawa 82a8f5
  register int count;
shun-iwasawa 82a8f5
  int row;
shun-iwasawa 82a8f5
  int numcols = (int)(output_cols - input_cols);
shun-iwasawa 82a8f5
shun-iwasawa 82a8f5
  if (numcols > 0) {
shun-iwasawa 82a8f5
    for (row = 0; row < num_rows; row++) {
shun-iwasawa 82a8f5
      ptr = image_data[row] + input_cols;
shun-iwasawa 82a8f5
      pixval = ptr[-1];         /* don't need GETJSAMPLE() here */
shun-iwasawa 82a8f5
      for (count = numcols; count > 0; count--)
shun-iwasawa 82a8f5
        *ptr++ = pixval;
shun-iwasawa 82a8f5
    }
shun-iwasawa 82a8f5
  }
shun-iwasawa 82a8f5
}