Пример #1
0
  GLOBAL(void)jcopy_sample_rows(JSAMPARRAY input_array, int source_row,
    JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
  /* Copy some rows of samples from one place to another.
   * num_rows rows are copied from input_array[source_row++]
   * to output_array[dest_row++]; these areas may overlap for duplication.
   * The source and destination arrays must be at least as wide as num_cols.
   */
  {
    register JSAMPROW inptr, outptr;
    #ifdef FMEMCOPY
      register unsigned int count = (unsigned int)(num_cols *SIZEOF(JSAMPLE));
    #else 
      register JDIMENSION count;
    #endif 
    register int row;

    input_array += source_row;
    output_array += dest_row;

    for (row = num_rows; row > 0; row--)
    {
      inptr =  *input_array++;
      outptr =  *output_array++;
      #ifdef FMEMCOPY
        FMEMCOPY(outptr, inptr, count);
      #else 
        for (count = num_cols; count > 0; count--)
          *outptr++ =  *inptr++;
         /* needn't bother with GETJSAMPLE() here */
      #endif 
    }
  }
Пример #2
0
jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
		 JDIMENSION num_blocks)
/* Copy a row of coefficient blocks from one place to another. */
{
#ifdef FMEMCOPY
  FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
#else
  register JCOEFPTR inptr, outptr;
  register long count;

  inptr = (JCOEFPTR) input_row;
  outptr = (JCOEFPTR) output_row;
  for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {
    *outptr++ = *inptr++;
  }
#endif
}