Home | History | Annotate | Download | only in simd
      1 /*
      2  * jcsample.h
      3  *
      4  * This file was part of the Independent JPEG Group's software:
      5  * Copyright (C) 1991-1996, Thomas G. Lane.
      6  * For conditions of distribution and use, see the accompanying README.ijg
      7  * file.
      8  */
      9 
     10 LOCAL(void)
     11 expand_right_edge (JSAMPARRAY image_data, int num_rows,
     12                    JDIMENSION input_cols, JDIMENSION output_cols)
     13 {
     14   register JSAMPROW ptr;
     15   register JSAMPLE pixval;
     16   register int count;
     17   int row;
     18   int numcols = (int) (output_cols - input_cols);
     19 
     20   if (numcols > 0) {
     21     for (row = 0; row < num_rows; row++) {
     22       ptr = image_data[row] + input_cols;
     23       pixval = ptr[-1];         /* don't need GETJSAMPLE() here */
     24       for (count = numcols; count > 0; count--)
     25         *ptr++ = pixval;
     26     }
     27   }
     28 }
     29