jcdctmgr.c
/*
 * Load data into workspace, applying unsigned->signed conversion.
 */
Load data into workspace, applying unsigned->signed conversion.
Load data into workspace applying unsigned - > signed conversion .
METHODDEF(void)
convsamp (JSAMPARRAY sample_data, JDIMENSION start_col, DCTELEM *workspace)
{
  register DCTELEM *workspaceptr;
  register JSAMPROW elemptr;
  register int elemr;
  workspaceptr = workspace;
  for (elemr = 0; elemr < DCTSIZE; elemr++) {
    elemptr = sample_data[elemr] + start_col;
#if DCTSIZE == 8                
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
#else
    {
      register int elemc;
      for (elemc = DCTSIZE; elemc > 0; elemc--)
        *workspaceptr++ = (*elemptr++) - CENTERJSAMPLE;
    }
#endif
  }
}
METHODDEF ( void ) convsamp ( JSAMPARRAY sample_data , JDIMENSION start_col , DCTELEM * workspace ) { register DCTELEM * workspaceptr ; register JSAMPROW elemptr ; register int elemr ; workspaceptr = workspace ; for ( elemr = 0 ; elemr < DCTSIZE ; elemr ++ ) { elemptr = sample_data [ elemr ] + start_col ; #if DCTSIZE == 8 * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; #else { register int elemc ; for ( elemc = DCTSIZE ; elemc > 0 ; elemc -- ) * workspaceptr ++ = ( * elemptr ++ ) - CENTERJSAMPLE ; } #endif } }
Load data into workspace, applying unsigned->signed conversion.
Load data into workspace applying unsigned - > signed conversion .
/* unroll the inner loop */