View | Details | Raw Unified
Collapse All | Expand All

(-) ClanLib-0.6.5/Sources/SmallJPEG/jpgd/jpegdecoder.cpp.64bit-fixes (-3 / +4 lines)
 Lines 19-24    Link Here 
// License along with this library; if not, write to the Free Software
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
#include <stdint.h>
#include "jpegdecoder.h"
#include "jpegdecoder.h"
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Coefficients are stored in this sequence in the data stream.
// Coefficients are stored in this sequence in the data stream.
 Lines 102-108   void *jpeg_decoder::alloc(int n) Link Here 
  blocks[i] = q;
  blocks[i] = q;
  // Round to qword boundry, to avoid misaligned accesses with MMX code
  // Round to qword boundry, to avoid misaligned accesses with MMX code
  return ((void *)(((uint)q + 7) & ~7));
  return ((void *)(((uintptr_t)q + 7) & ~7));
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Clear buffer to word values.
// Clear buffer to word values.
 Lines 1870-1876   void jpeg_decoder::init_frame(void) Link Here 
  q = (uchar *)alloc(max_blocks_per_row * 64 * sizeof(BLOCK_TYPE) + 8);
  q = (uchar *)alloc(max_blocks_per_row * 64 * sizeof(BLOCK_TYPE) + 8);
  // Align to 8-byte boundry, for MMX code
  // Align to 8-byte boundry, for MMX code
  q = (uchar *)(((uint)q + 7) & ~7);
  q = (uchar *)(((uintptr_t)q + 7) & ~7);
  // The block_seg[] array's name dates back to the
  // The block_seg[] array's name dates back to the
  // 16-bit assembler implementation. "seg" stood for "segment".
  // 16-bit assembler implementation. "seg" stood for "segment".
 Lines 1880-1886   void jpeg_decoder::init_frame(void) Link Here 
  for (i = 0; i < max_blocks_per_row; i++)
  for (i = 0; i < max_blocks_per_row; i++)
    block_max_zag_set[i] = 64;
    block_max_zag_set[i] = 64;
  Psample_buf = (uchar *)(((uint)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
  Psample_buf = (uchar *)(((uintptr_t)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
  total_lines_left = image_y_size;
  total_lines_left = image_y_size;