Ignore:
Timestamp:
Dec 30, 2009, 7:13:45 PM (12 years ago)
Author:
rbri
Message:

PDF plugin: Poppler library updated to version 0.12.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/DCTStream.cc

    r271 r277  
    66//
    77// Copyright 2005 Jeff Muizelaar <jeff@infidigm.net>
    8 // Copyright 2005-2008 Albert Astals Cid <aacid@kde.org>
     8// Copyright 2005-2009 Albert Astals Cid <aacid@kde.org>
    99// Copyright 2009 Ryszard Trojnacki <rysiek@menel.com>
    1010//
     
    8888  src.index = 0;
    8989  src.abort = false;
     90  current = NULL;
     91  limit = NULL;
    9092 
    9193  cinfo.err = &jerr;
    9294  jpeg_create_decompress(&cinfo);
    9395  cinfo.src = (jpeg_source_mgr *)&src;
    94   x = 0;
    9596  row_buffer = NULL;
    9697}
     
    142143  if (src.abort) return;
    143144
    144   jpeg_start_decompress(&cinfo);
     145  if (!jpeg_start_decompress(&cinfo))
     146  {
     147    src.abort = true;
     148    return;
     149  }
    145150
    146151  row_stride = cinfo.output_width * cinfo.output_components;
     
    153158  int c;
    154159
    155   if (x == 0) {
     160  if (current == limit) {
    156161    if (cinfo.output_scanline < cinfo.output_height)
    157162    {
    158163      if (!jpeg_read_scanlines(&cinfo, row_buffer, 1)) return EOF;
     164      current = &row_buffer[0][0];
     165      limit = &row_buffer[0][(cinfo.output_width - 1) * cinfo.output_components] + cinfo.output_components;
    159166    }
    160167    else return EOF;
    161168  }
    162   c = row_buffer[0][x];
    163   x++;
    164   if (x == cinfo.output_width * cinfo.output_components)
    165     x = 0;
     169  c = *current;
     170  ++current;
    166171  return c;
    167172}
     
    170175  if (src.abort) return EOF;
    171176 
    172   int c;
    173   c = row_buffer[0][x];
    174   return c;
     177  return *current;
    175178}
    176179
Note: See TracChangeset for help on using the changeset viewer.