Alien-FreeImage

 view release on metacpan or  search on metacpan

src/Source/FreeImage/ZLibInterface.cpp  view on Meta::CPAN

        }
    }
    if (zerr != Z_OK && zerr != Z_STREAM_END) {
        FreeImage_OutputMessageProc(FIF_UNKNOWN, "Zlib error : %s", zError(zerr));
        return 0;
    }
    return dest_len;
}

/**
Update a running crc from source and return the updated crc, using the ZLib library.
If source is NULL, this function returns the required initial value for the crc.

@param crc Running crc value
@param source Source buffer
@param source_size Size of the source buffer, in bytes
@return Returns the new crc value
*/
DWORD DLL_CALLCONV 
FreeImage_ZLibCRC32(DWORD crc, BYTE *source, DWORD source_size) {

src/Source/LibJPEG/change.log  view on Meta::CPAN

has been removed altogether.  We're not happy about it either, but there
seems to be no good alternative.

The configure script now supports building libjpeg as a shared library
on many flavors of Unix (all the ones that GNU libtool knows how to
build shared libraries for).  Use "./configure --enable-shared" to
try this out.

New jconfig file and makefiles for Microsoft Visual C++ and Developer Studio.
Also, a jconfig file and a build script for Metrowerks CodeWarrior
on Apple Macintosh.  makefile.dj has been updated for DJGPP v2, and there
are miscellaneous other minor improvements in the makefiles.

jmemmac.c now knows how to create temporary files following Mac System 7
conventions.

djpeg's -map switch is now able to read raw-format PPM files reliably.

cjpeg -progressive -restart no longer generates any unnecessary DRI markers.

Multiple calls to jpeg_simple_progression for a single JPEG object

src/Source/LibJPEG/djpeg.c  view on Meta::CPAN


  /* Process data */
  while (cinfo.output_scanline < cinfo.output_height) {
    num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
					dest_mgr->buffer_height);
    (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
  }

#ifdef PROGRESS_REPORT
  /* Hack: count final pass as done in case finish_output does an extra pass.
   * The library won't have updated completed_passes.
   */
  progress.pub.completed_passes = progress.pub.total_passes;
#endif

  /* Finish decompression and release memory.
   * I must do it in this order because output module has allocated memory
   * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
   */
  (*dest_mgr->finish_output) (&cinfo, dest_mgr);
  (void) jpeg_finish_decompress(&cinfo);

src/Source/LibJPEG/install.txt  view on Meta::CPAN

the Mac by means of the ccommand() library routine provided by Metrowerks
CodeWarrior or Think C.  This is only appropriate for testing the library,
however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want
to develop a Mac-style user interface.  There isn't a complete example
available at the moment, but there are some helpful starting points:
1. Sam Bushell's free "To JPEG" applet provides drag-and-drop conversion to
JPEG under System 7 and later.  This only illustrates how to use the
compression half of the library, but it does a very nice job of that part.
The CodeWarrior source code is available from http://www.pobox.com/~jsam.
2. Jim Brunner prepared a Mac-style user interface for both compression and
decompression.  Unfortunately, it hasn't been updated since IJG v4, and
the library's API has changed considerably since then.  Still it may be of
some help, particularly as a guide to compiling the IJG code under Think C.
Jim's code is available from the Info-Mac archives, at sumex-aim.stanford.edu
or mirrors thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx.

jmemmac.c is the recommended memory manager back end for Macintosh.  It uses
NewPtr/DisposePtr instead of malloc/free, and has a Mac-specific
implementation of jpeg_mem_available().  It also creates temporary files that
follow Mac conventions.  (That part of the code relies on System-7-or-later OS
functions.  See the comments in jmemmac.c if you need to run it on System 6.)

src/Source/LibJPEG/install.txt  view on Meta::CPAN

recommend building the applications so that you can run the self-test.)

To use:
1. Open the command prompt, change to the main directory and execute the
   command line
	NMAKE /f makefile.vc  setup-vc6
   This will move jconfig.vc to jconfig.h and makefiles to project files.
   (Note that the renaming is critical!)
2. Open the workspace file jpeg.dsw, build the library project.
   (If you are using DevStudio more recent than 6.0, you'll probably
   get a message saying that the project files are being updated.)
3. Open the workspace file apps.dsw, build the application projects.
4. To perform the self-test, execute the command line
	NMAKE /f makefile.vc  test-build
5. Move the application .exe files from `app`\Release to an
   appropriate location on your path.


Microsoft Windows, Microsoft Visual C++ 2010 Developer Studio (v10):

We include makefiles that should work as project files in Visual Studio

src/Source/LibJPEG/install.txt  view on Meta::CPAN

self-test.)

To use:
1. Open the command prompt, change to the main directory and execute the
   command line
	NMAKE /f makefile.vc  setup-v10
   This will move jconfig.vc to jconfig.h and makefiles to project files.
   (Note that the renaming is critical!)
2. Open the solution file jpeg.sln, build the library project.
   (If you are using Visual Studio more recent than 2010 (v10), you'll
   probably get a message saying that the project files are being updated.)
3. Open the solution file apps.sln, build the application projects.
4. To perform the self-test, execute the command line
	NMAKE /f makefile.vc  test-build
5. Move the application .exe files from `app`\Release to an
   appropriate location on your path.

Note:
There seems to be an optimization bug in the compiler which causes the
self-test to fail with the color quantization option.
We have disabled optimization for the file jquant2.c in the library

src/Source/LibJPEG/jchuff.c  view on Meta::CPAN

typedef struct {
  unsigned int ehufco[256];	/* code for each symbol */
  char ehufsi[256];		/* length of code for each symbol */
  /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */
} c_derived_tbl;


/* Expanded entropy encoder object for Huffman encoding.
 *
 * The savable_state subrecord contains fields that change within an MCU,
 * but must not be updated permanently until we complete the MCU.
 */

typedef struct {
  INT32 put_buffer;		/* current bit-accumulation buffer */
  int put_bits;			/* # of bits now in it */
  int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */
} savable_state;

/* This macro is to work around compilers with missing or broken
 * structure assignment.  You'll need to fix this code if you have

src/Source/LibJPEG/jchuff.c  view on Meta::CPAN

  if (! flush_bits_s(state))
    return FALSE;

  emit_byte_s(state, 0xFF, return FALSE);
  emit_byte_s(state, JPEG_RST0 + restart_num, return FALSE);

  /* Re-initialize DC predictions to 0 */
  for (ci = 0; ci < state->cinfo->comps_in_scan; ci++)
    state->cur.last_dc_val[ci] = 0;

  /* The restart counter is not updated until we successfully write the MCU. */

  return TRUE;
}


LOCAL(void)
emit_restart_e (huff_entropy_ptr entropy, int restart_num)
{
  int ci;

src/Source/LibJPEG/jchuff.c  view on Meta::CPAN

  p = 0;
  for (i = 1; i <= MAX_CLEN; i++) {
    for (j = 0; j <= 255; j++) {
      if (codesize[j] == i) {
	htbl->huffval[p] = (UINT8) j;
	p++;
      }
    }
  }

  /* Set sent_table FALSE so updated table will be written to JPEG file. */
  htbl->sent_table = FALSE;
}


/*
 * Finish up a statistics-gathering pass and create the new Huffman tables.
 */

METHODDEF(void)
finish_pass_gather (j_compress_ptr cinfo)

src/Source/LibJPEG/jdhuff.c  view on Meta::CPAN

	{ failaction; } \
    get_buffer = state.get_buffer; bits_left = state.bits_left; \
  } \
}


/*
 * Expanded entropy decoder object for Huffman decoding.
 *
 * The savable_state subrecord contains fields that change within an MCU,
 * but must not be updated permanently until we complete the MCU.
 */

typedef struct {
  unsigned int EOBRUN;			/* remaining EOBs in EOBRUN */
  int last_dc_val[MAX_COMPS_IN_SCAN];	/* last DC coef for each component */
} savable_state;

/* This macro is to work around compilers with missing or broken
 * structure assignment.  You'll need to fix this code if you have
 * such a compiler and you change MAX_COMPS_IN_SCAN.

src/Source/LibJPEG/jdmarker.c  view on Meta::CPAN

		  V += GETJOCTET(*next_input_byte++); )


/*
 * Routines to process JPEG markers.
 *
 * Entry condition: JPEG marker itself has been read and its code saved
 *   in cinfo->unread_marker; input restart point is just after the marker.
 *
 * Exit: if return TRUE, have read and processed any parameters, and have
 *   updated the restart point to point after the parameters.
 *   If return FALSE, was forced to suspend before reaching end of
 *   marker parameters; restart point has not been moved.  Same routine
 *   will be called again after application supplies more input data.
 *
 * This approach to suspension assumes that all of a marker's parameters
 * can fit into a single input bufferload.  This should hold for "normal"
 * markers.  Some COM/APPn markers might have large parameter segments
 * that might not fit.  If we are simply dropping such a marker, we use
 * skip_input_data to get past it, and thereby put the problem on the
 * source manager's shoulders.  If we are saving the marker's contents

src/Source/LibJPEG/structure.txt  view on Meta::CPAN

straightforward: we make the controller call interfaces include "progress
counters" which indicate the number of data chunks successfully processed, and
we require callers to test the counter rather than just assume all of the data
was processed.

Rather than trying to restart at an arbitrary point, the current Huffman
codecs are designed to restart at the beginning of the current MCU after a
suspension due to buffer overflow/underrun.  At the start of each call, the
codec's internal state is loaded from permanent storage (in the JPEG object
structures) into local variables.  On successful completion of the MCU, the
permanent state is updated.  (This copying is not very expensive, and may even
lead to *improved* performance if the local variables can be registerized.)
If a suspension occurs, the codec simply returns without updating the state,
thus effectively reverting to the start of the MCU.  Note that this implies
leaving some data unprocessed in the source/destination buffer (ie, the
compressed partial MCU).  The data source/destination module interfaces are
specified so as to make this possible.  This also implies that the data buffer
must be large enough to hold a worst-case compressed MCU; a couple thousand
bytes should be enough.

In a successive-approximation AC refinement scan, the progressive Huffman

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN

 * @param       p_j2k                   the jpeg2000 codec.
 * @param       p_header_size   the size of the data contained in the TLM marker.
 * @param       p_manager               the user event manager.
*/
static OPJ_BOOL opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
                                    OPJ_BYTE * p_header_data,
                                    OPJ_UINT32 p_header_size,
                                    opj_event_mgr_t * p_manager);

/**
 * Writes the updated tlm.
 *
 * @param       p_stream                the stream to write data to.
 * @param       p_j2k                   J2K codec.
 * @param       p_manager               the user event manager.
*/
static OPJ_BOOL opj_j2k_write_updated_tlm(      opj_j2k_t *p_j2k,
                                            opj_stream_private_t *p_stream,
                                            opj_event_mgr_t * p_manager );

/**
 * Reads a PLM marker (Packet length, main header marker)
 *
 * @param       p_header_data   the data contained in the TLM box.
 * @param       p_j2k                   the jpeg2000 codec.
 * @param       p_header_size   the size of the data contained in the TLM marker.
 * @param       p_manager               the user event manager.

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN

                 * TODO: If this was consistant, we could simplify the code to only use realloc(), as realloc(0,...) default to malloc(0,...).
                 */
                *l_current_data = (OPJ_BYTE*) opj_malloc(p_j2k->m_specific_param.m_decoder.m_sot_length);
            }
            else {
                OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(*l_current_data, *l_tile_len + p_j2k->m_specific_param.m_decoder.m_sot_length);
                if (! l_new_current_data) {
                        opj_free(*l_current_data);
                        /*nothing more is done as l_current_data will be set to null, and just
                          afterward we enter in the error path
                          and the actual tile_len is updated (committed) at the end of the
                          function. */
                }
                *l_current_data = l_new_current_data;
            }
            
            if (*l_current_data == 00) {
                opj_event_msg(p_manager, EVT_ERROR, "Not enough memory to decode tile\n");
                return OPJ_FALSE;
            }
        }

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN

                        opj_free(l_current_data);
                        opj_event_msg(p_manager, EVT_ERROR, "Failed to decode tile %d/%d\n", l_current_tile_no +1, p_j2k->m_cp.th * p_j2k->m_cp.tw);
                        return OPJ_FALSE;
                }
                opj_event_msg(p_manager, EVT_INFO, "Tile %d/%d has been decoded.\n", l_current_tile_no +1, p_j2k->m_cp.th * p_j2k->m_cp.tw);

                if (! opj_j2k_update_image_data(p_j2k->m_tcd,l_current_data, p_j2k->m_output_image)) {
                        opj_free(l_current_data);
                        return OPJ_FALSE;
                }
                opj_event_msg(p_manager, EVT_INFO, "Image data has been updated with tile %d.\n\n", l_current_tile_no + 1);
                
                if(opj_stream_get_number_byte_left(p_stream) == 0  
                    && p_j2k->m_specific_param.m_decoder.m_state == J2K_STATE_NEOC)
                    break;
                if(++nr_tiles ==  p_j2k->m_cp.th * p_j2k->m_cp.tw) 
                    break;
        }

        opj_free(l_current_data);

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN

                if (! opj_j2k_decode_tile(p_j2k,l_current_tile_no,l_current_data,l_data_size,p_stream,p_manager)) {
                        opj_free(l_current_data);
                        return OPJ_FALSE;
                }
                opj_event_msg(p_manager, EVT_INFO, "Tile %d/%d has been decoded.\n", l_current_tile_no, (p_j2k->m_cp.th * p_j2k->m_cp.tw) - 1);

                if (! opj_j2k_update_image_data(p_j2k->m_tcd,l_current_data, p_j2k->m_output_image)) {
                        opj_free(l_current_data);
                        return OPJ_FALSE;
                }
                opj_event_msg(p_manager, EVT_INFO, "Image data has been updated with tile %d.\n\n", l_current_tile_no);

                if(l_current_tile_no == l_tile_no_to_dec)
                {
                        /* move into the codestream to the the first SOT (FIXME or not move?)*/
                        if (!(opj_stream_read_seek(p_stream, p_j2k->cstr_index->main_head_end + 2, p_manager) ) ) {
                                opj_event_msg(p_manager, EVT_ERROR, "Problem with seek function\n");
                                return OPJ_FALSE;
                        }
                        break;
                }
                else {
                        opj_event_msg(p_manager, EVT_WARNING, "Tile read, decode and updated is not the desired (%d vs %d).\n", l_current_tile_no, l_tile_no_to_dec);
                }

        }

        opj_free(l_current_data);

        return OPJ_TRUE;
}

/**

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN


void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k)
{
        /* preconditions */
        assert(p_j2k != 00);

        /* DEVELOPER CORNER, insert your custom procedures */
        opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_eoc );

        if (p_j2k->m_cp.m_specific_param.m_enc.m_cinema) {
                opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_updated_tlm);
        }

        opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_write_epc );
        opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_end_encoding );
        opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_destroy_header_memory);
}

void opj_j2k_setup_encoding_validation (opj_j2k_t *p_j2k)
{
        /* preconditions */

src/Source/LibOpenJPEG/j2k.c  view on Meta::CPAN


                        ++p_j2k->m_specific_param.m_encoder.m_current_tile_part_number;
                }
        }

        *p_data_written = l_nb_bytes_written;

        return OPJ_TRUE;
}

OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
                                                                    struct opj_stream_private *p_stream,
                                                                    struct opj_event_mgr * p_manager )
{
        OPJ_UINT32 l_tlm_size;
        OPJ_OFF_T l_tlm_position, l_current_position;

        /* preconditions */
        assert(p_j2k != 00);
        assert(p_manager != 00);
        assert(p_stream != 00);

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

                                            OPJ_INT32 p_ty1,
                                            OPJ_UINT32 p_max_prec,
                                            OPJ_UINT32 p_max_res,
                                            OPJ_UINT32 p_dx_min,
                                            OPJ_UINT32 p_dy_min)
{
	/* loop*/
	OPJ_UINT32 pino;
	/* tile coding parameter*/
	opj_tcp_t *l_tcp = 00;
	/* current poc being updated*/
	opj_poc_t * l_current_poc = 00;

	/* number of pocs*/
	OPJ_UINT32 l_poc_bound;

    OPJ_ARG_NOT_USED(p_max_res);

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

src/Source/LibOpenJPEG/pi.c  view on Meta::CPAN

                                    OPJ_INT32 p_ty1,
                                    OPJ_UINT32 p_max_prec,
                                    OPJ_UINT32 p_max_res,
                                    OPJ_UINT32 p_dx_min,
                                    OPJ_UINT32 p_dy_min)
{
	/* loop*/
	OPJ_UINT32 pino;
	/* tile coding parameter*/
	opj_tcp_t *l_tcp = 00;
	/* current poc being updated*/
	opj_poc_t * l_current_poc = 00;
	/* number of pocs*/
	OPJ_UINT32 l_poc_bound;

	/* preconditions in debug*/
	assert(p_cp != 00);
	assert(p_tileno < p_cp->tw * p_cp->th);

	/* initializations*/
	l_tcp = &p_cp->tcps [p_tileno];

src/Source/LibOpenJPEG/t2.c  view on Meta::CPAN

        if (tcp->csty & J2K_CP_CSTY_EPH) {
                c[0] = 255;
                c[1] = 146;
                c += 2;
                length -= 2;
        }
        /* </EPH> */

        /* << INDEX */
        /* End of packet header position. Currently only represents the distance to start of packet
           Will be updated later by incrementing with packet start value*/
        if(cstr_info && cstr_info->index_write) {
                opj_packet_info_t *info_PK = &cstr_info->tile[tileno].packet[cstr_info->packno];
                info_PK->end_ph_pos = (OPJ_INT32)(c - dest);
        }
        /* INDEX >> */

        /* Writing the packet body */
        band = res->bands;
        for (bandno = 0; bandno < res->numbands; bandno++) {
                opj_tcd_precinct_t *prc = &band->precincts[precno];

src/Source/LibOpenJPEG/t2.c  view on Meta::CPAN

                                l_header_data += 2;
                        }
                }

                l_header_length = (OPJ_UINT32)(l_header_data - *l_header_data_start);
                *l_modified_length_ptr -= l_header_length;
                *l_header_data_start += l_header_length;

                /* << INDEX */
                /* End of packet header position. Currently only represents the distance to start of packet
                   Will be updated later by incrementing with packet start value */
                if (p_pack_info) {
                        p_pack_info->end_ph_pos = (OPJ_INT32)(l_current_data - p_src_data);
                }
                /* INDEX >> */

                * p_is_data_present = OPJ_FALSE;
                *p_data_read = (OPJ_UINT32)(l_current_data - p_src_data);
                return OPJ_TRUE;
        }

src/Source/LibOpenJPEG/t2.c  view on Meta::CPAN

        }

        l_header_length = (OPJ_UINT32)(l_header_data - *l_header_data_start);
        JAS_FPRINTF( stderr, "hdrlen=%d \n", l_header_length );
        JAS_FPRINTF( stderr, "packet body\n");
        *l_modified_length_ptr -= l_header_length;
        *l_header_data_start += l_header_length;

        /* << INDEX */
        /* End of packet header position. Currently only represents the distance to start of packet
         Will be updated later by incrementing with packet start value */
        if (p_pack_info) {
                p_pack_info->end_ph_pos = (OPJ_INT32)(l_current_data - p_src_data);
        }
        /* INDEX >> */

        *p_is_data_present = OPJ_TRUE;
        *p_data_read = (OPJ_UINT32)(l_current_data - p_src_data);

        return OPJ_TRUE;
}

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Removed "beta" language from documentation.

Version 0.99h [March 6, 1998, evening]
  Minor changes to previous minor changes to pngtest.c
  Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED
    and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro
  Added user transform capability

Version 1.00 [March 7, 1998]
  Changed several typedefs in pngrutil.c
  Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik)
  Replaced "while(1)" with "for(;;)"
  Added PNGARG() to prototypes in pngtest.c and removed some prototypes
  Updated some of the makefiles (Tom Lane)
  Changed some typedefs (s_start, etc.) in pngrutil.c
  Fixed dimensions of "short_months" array in pngwrite.c
  Replaced ansi2knr.c with the one from jpeg-v6

Version 1.0.0 [March 8, 1998]
  Changed name from 1.00 to 1.0.0 (Adam Costello)
  Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    (new in version 1.0.2), rgb_to_gray (new in 1.0.5), iCCP, sCAL, sPLT,
    the high-level interface, and unknown chunks support (all new in 1.0.6).
    This was necessary because of old applications that allocate the structs
    directly as authors were instructed to do in libpng-0.88 and earlier,
    instead of using png_create_*().
  Added modes PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT which
    can be used to detect codes that directly allocate the structs, and
    code to check these modes in png_read_init() and png_write_init() and
    generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED
    was not defined.
  Added makefile.intel and updated makefile.watcom (Pawel Mrochen)

Version 1.0.6j [May 3, 2000]
  Overloaded png_read_init() and png_write_init() with macros that convert
    calls to png_read_init_2() or png_write_init_2() that check the version
    and structure sizes.

Version 1.0.7beta11 [May 7, 2000]
  Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes
    which are no longer used.
  Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is

src/Source/LibPNG/CHANGES  view on Meta::CPAN


Version 1.0.8 [July 24, 2000]
  Added png_flush() in pngwrite.c, after png_write_IEND().
  Updated makefile.hpux to build a shared library.

Version 1.0.9beta1 [November 10, 2000]
  Fixed typo in scripts/makefile.hpux
  Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
  Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
  Changed "cdrom.com" in documentation to "libpng.org"
  Revised pnggccrd.c to get it all working, and updated makefile.gcmmx (Greg).
  Changed type of "params" from voidp to png_voidp in png_read|write_png().
  Make sure PNGAPI and PNG_IMPEXP are defined in pngconf.h.
  Revised the 3 instances of WRITEFILE in pngtest.c.
  Relocated "msvc" and "wince" project subdirectories into "dll" subdirectory.
  Updated png.rc in dll/msvc project
  Revised makefile.dec to define and use LIBPATH and INCPATH
  Increased size of global png_libpng_ver[] array from 12 to 18 chars.
  Made global png_libpng_ver[], png_sig[] and png_pass_*[] arrays const.
  Removed duplicate png_crc_finish() from png_handle_bKGD() function.
  Added a warning when application calls png_read_update_info() multiple times.

src/Source/LibPNG/CHANGES  view on Meta::CPAN


Version 1.2.9 [April 14, 2006]
  Revised makefile.beos and added "none" selector in ltmain.sh

Version 1.2.10beta1 [April 15, 2006]
  Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
    -DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h
    to include png_conf.h only when PNG_BUILDING_LIBPNG is defined.

Version 1.2.10beta2 [April 15, 2006]
  Manually updated Makefile.in and configure.  Changed png_conf.h.in
    back to config.h.

Version 1.2.10beta3 [April 15, 2006]
  Change png_conf.h back to config.h in pngconf.h.

Version 1.2.10beta4 [April 16, 2006]
  Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*.

Version 1.2.10beta5 [April 16, 2006]
  Added a configure check for compiling assembler code in pnggccrd.c

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    png_set_compression_buffer_size() to work with png_size_t instead of
    png_uint_32 (Cosmin).
  Removed png_memcpy_check() and png_memset_check() (Cosmin).
  Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin).
  Clarified that png_zalloc() does not clear the allocated memory,
    and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin).
  Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in
    pngconf.h, and used it in all memory allocation functions (Cosmin).
  Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file
    mentioning that the symbols declared in that file are private, and
    updated the scripts and the Visual C++ projects accordingly (Cosmin).
  Removed circular references between pngconf.h and pngconf.h.in in
    scripts/makefile.vc*win32 (Cosmin).
  Removing trailing '.' from the warning and error messages (Cosmin).
  Added pngdefs.h that is built by makefile or configure, instead of
    pngconf.h.in (Glenn).
  Detect and fix attempt to write wrong iCCP profile length.

Version 1.4.0beta12 [October 19, 2006]
  Changed "logical" to "bitwise" in the documentation.
  Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h

src/Source/LibPNG/CHANGES  view on Meta::CPAN

Version 1.4.0beta93 [November 7, 2009]
  Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
    PNG_ALLOCATED macros to detect deprecated direct access to the
    png_struct or info_struct members and other deprecated usage in
    applications (John Bowler).
  Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS,
    to prevent warnings about direct access to png structs by libpng
    functions while building libpng.  They need to be tested, especially
    those using compilers other than gcc.
  Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
    They should work but still need to be updated to remove
    references to pnggccrd.c or pngvcrd.c and ASM building.
  Added README.txt to the beos, cbuilder5, netware, and xcode projects warning
    that they need to be updated, to remove references to pnggccrd.c and
    pngvcrd.c and to depend on pngpriv.h
  Removed three direct references to read_info_ptr members in pngtest.c
    that were detected by the new PNG_DEPSTRUCT macro.
  Moved the png_debug macro definitions and the png_read_destroy(),
    png_write_destroy() and png_far_to_near() prototypes from png.h
    to pngpriv.h (John Bowler)
  Moved the synopsis lines for png_read_destroy(), png_write_destroy()
    png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.

Version 1.4.0beta94 [November 9, 2009]

src/Source/LibPNG/CHANGES  view on Meta::CPAN


Version 1.5.0beta04 [February 9, 2010]
  Removed malformed "incomplete struct declaration" of png_info from png.h

Version 1.5.0beta05 [February 12, 2010]
  Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the
    linewrapping that it entailed.
  Revised comments in pngstruct.h and pnginfo.h and added pointers to
    the libpng license.
  Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES
  Removed the cbuilder5 project, which has not been updated to 1.4.0.

Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010]
  Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke
    Nishikawa)

Version 1.5.0beta07 [omitted]

Version 1.5.0beta08 [February 19, 2010]
  Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED
    wherever png_snprintf() is used to construct error and warning messages.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks),
    and appropriate changes made to all files.  Cygwin builds re-hinged to
    allow procedure call standard changes and to remove the need for the DEF
    file (fixes build on Cygwin).
  Enabled 'attribute' warnings that are relevant to library APIs and callbacks.
  Changed rules for generation of the various symbol files and added a new
    rule for a DEF file (which is also added to the distribution).
  Updated the symbol file generation to stop it adding spurious spaces
    to EOL (coming from preprocessor macro expansion).  Added a facility
    to join tokens in the output and rewrite *.dfn to use this.
  Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71
    and removed scripts/makefile.cygwin.
  Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built.
  Removed the include of sys/types.h - apparently unnecessary now on the
    platforms on which it happened (all but Mac OS and RISC OS).
  Moved the Mac OS test into pngpriv.h (the only place it is used.)

Version 1.5.0beta15 [March 17, 2010]
  Added symbols.chk target to Makefile.am to validate the symbols in png.h
    against the new DEF file scripts/symbols.def.
  Changed the default DEF file back to pngwin.def.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Freeze build-time only configuration in the build.
    In all prior versions of libpng most configuration options
    controlled by compiler #defines had to be repeated by the
    application code that used libpng.  This patch changes this
    so that compilation options that can only be changed at build
    time are frozen in the build.  Options that are compiler
    dependent (and those that are system dependent) are evaluated
    each time - pngconf.h holds these.  Options that can be changed
    per-file in the application are in png.h.  Frozen options are
    in the new installed header file pnglibconf.h (John Bowler)
  Removed the xcode project because it has not been updated to work
    with libpng-1.5.0.
  Removed the ability to include optional pngusr.h

Version 1.5.0beta18 [April 17, 2010]
  Restored the ability to include optional pngusr.h
  Moved replacements for png_error() and png_warning() from the
    contrib/pngminim project to pngerror.c, for use when warnings or
    errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid
    storing unneeded error/warning text.
  Updated contrib/pngminim project to work with the new pnglibconf.h

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    The type was self-evidently incorrect but only causes problems on 64-bit
    architectures.
  Added transform tests to pngvalid and simplified the arguments.

Version 1.5.1rc01 [January 29, 2011]
  No changes.

Version 1.5.1rc02 [January 31, 2011]
  Added a request in the manual that applications do not use "png_" or
    "PNG_" to begin any of their own symbols.
  Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h

Version 1.5.1 [February 3, 2011]
  No changes.

Version 1.5.2beta01 [February 13, 2011]
  More -Wshadow fixes for older gcc compilers.  Older gcc versions apparently
    check formal parameters names in function declarations (as well as
    definitions) to see if they match a name in the global namespace.
  Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the
    old VisualC++ preprocessor.

src/Source/LibPNG/CHANGES  view on Meta::CPAN

  Updated manual with description of the simplified API (copied from png.h)
  Fix bug in pngerror.c: some long warnings were being improperly truncated
    (CVE-2011-3464, bug introduced in libpng-1.5.3beta05).

Version 1.6.0beta06 [January 24, 2012]
  Added palette support to the simplified APIs. This commit
    changes some of the macro definitions in png.h, app code
    may need corresponding changes.
  Increased the formatted warning buffer to 192 bytes.
  Added color-map support to simplified API. This is an initial version for
    review; the documentation has not yet been updated.
  Fixed Min/GW uninstall to remove libpng.dll.a

Version 1.6.0beta07 [January 28, 2012]
  Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived)
    compiler issues slightly different warnings from those issued by the
    current vesions of GCC. This eliminates those warnings by
    adding/removing casts and small code rewrites.
  Updated configure.ac from autoupdate: added --enable-werror option.
    Also some layout regularization and removal of introduced tab characters
    (replaced with 3-character indentation).  Obsolete macros identified by

src/Source/LibPNG/CHANGES  view on Meta::CPAN

    elements of the png_icc_matrix and png_icc_vector types. The accidental
    (harmless) 'const' previously applied to the parameters of two of the
    functions have also been removed.
  Added a work around for GCC 4.2 optimization bug.
  Marked the broken (bad white point) original HP sRGB profiles correctly and
    correct comments.
  Added -DZ_SOLO to contrib/pngminim/*/makefile to work with zlib-1.2.7
  Use /MDd for vstudio debug builds. Also added pngunkown to the vstudio
    builds, fixed build errors and corrected a minor exit code error in
    pngvalid if the 'touch' file name is invalid.
  Add updated WARNING file to projects/vstudio from libpng 1.5/vstudio
  Fixed build when using #define PNG_NO_READ_GAMMA in png_do_compose() in
    pngrtran.c (Domani Hannes).

Version 1.6.0beta31 [November 1, 2012]
  Undid the erroneous change to vstudio/pngvalid build in libpng-1.6.0beta30.
  Made pngvalid so that it will build outside the libpng source tree.
  Made builds -DPNG_NO_READ_GAMMA compile (the unit tests still fail).
  Made PNG_NO_READ_GAMMA switch off interfaces that depend on READ_GAMMA.
    Prior to 1.6.0 switching off READ_GAMMA did unpredictable things to the
    interfaces that use it (specifically, png_do_background in 1.4 would

src/Source/LibPNG/png.c  view on Meta::CPAN

      if (png_colorspace_check_gamma(png_ptr, colorspace, gAMA,
          1/*from gAMA*/) != 0)
      {
         /* Store this gamma value. */
         colorspace->gamma = gAMA;
         colorspace->flags |=
            (PNG_COLORSPACE_HAVE_GAMMA | PNG_COLORSPACE_FROM_gAMA);
      }

      /* At present if the check_gamma test fails the gamma of the colorspace is
       * not updated however the colorspace is not invalidated.  This
       * corresponds to the case where the existing gamma comes from an sRGB
       * chunk or profile.  An error message has already been output.
       */
      return;
   }

   /* Error exit - errmsg has been set. */
   colorspace->flags |= PNG_COLORSPACE_INVALID;
   png_chunk_report(png_ptr, errmsg, PNG_CHUNK_WRITE_ERROR);
}

src/Source/LibPNG/png.h  view on Meta::CPAN

    *    PNG_FORMAT_FLAG_ALPHA set.
    * 2) The format set by the application does not.
    * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and
    *    PNG_FORMAT_FLAG_LINEAR *not* set.
    *
    * For linear output removing the alpha channel is always done by compositing
    * on black and background is ignored.
    *
    * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set.  It must
    * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE.
    * image->colormap_entries will be updated to the actual number of entries
    * written to the colormap; this may be less than the original value.
    */

PNG_EXPORT(238, void, png_image_free, (png_imagep image));
   /* Free any data allocated by libpng in image->opaque, setting the pointer to
    * NULL.  May be called at any time after the structure is initialized.
    */
#endif /* SIMPLIFIED_READ */

#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED

src/Source/LibPNG/pngrtran.c  view on Meta::CPAN


   /* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations
    * can be performed directly on the palette, and some (such as rgb to gray)
    * can be optimized inside the palette.  This is particularly true of the
    * composite (background and alpha) stuff, which can be pretty much all done
    * in the palette even if the result is expanded to RGB or gray afterward.
    *
    * NOTE: this is Not Yet Implemented, the code behaves as in 1.5.1 and
    * earlier and the palette stuff is actually handled on the first row.  This
    * leads to the reported bug that the palette returned by png_get_PLTE is not
    * updated.
    */
   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
      png_init_palette_transformations(png_ptr);

   else
      png_init_rgb_transformations(png_ptr);

#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
   defined(PNG_READ_EXPAND_16_SUPPORTED)
   if ((png_ptr->transformations & PNG_EXPAND_16) != 0 &&

src/Source/LibPNG/pngrtran.c  view on Meta::CPAN

            int component = png_ptr->palette[i].blue;

            component >>= shift;
            png_ptr->palette[i].blue = (png_byte)component;
         }
   }
#endif  /* READ_SHIFT */
}

/* Modify the info structure to reflect the transformations.  The
 * info should be updated so a PNG file could be written with it,
 * assuming the transformations result in valid PNG data.
 */
void /* PRIVATE */
png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
{
   png_debug(1, "in png_read_transform_info");

#ifdef PNG_READ_EXPAND_SUPPORTED
   if ((png_ptr->transformations & PNG_EXPAND) != 0)
   {

src/Source/LibPNG/pngrutil.c  view on Meta::CPAN

#endif
}

#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED
/* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to
 * allow the caller to do multiple calls if required.  If the 'finish' flag is
 * set Z_FINISH will be passed to the final inflate() call and Z_STREAM_END must
 * be returned or there has been a problem, otherwise Z_SYNC_FLUSH is used and
 * Z_OK or Z_STREAM_END will be returned on success.
 *
 * The input and output sizes are updated to the actual amounts of data consumed
 * or written, not the amount available (as in a z_stream).  The data pointers
 * are not changed, so the next input is (data+input_size) and the next
 * available output is (output+output_size).
 */
static int
png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish,
    /* INPUT: */ png_const_bytep input, png_uint_32p input_size_ptr,
    /* OUTPUT: */ png_bytep output, png_alloc_size_t *output_size_ptr)
{
   if (png_ptr->zowner == owner) /* Else not claimed */

src/Source/LibPNG/pngrutil.c  view on Meta::CPAN

      } while (ret == Z_OK);

      /* For safety kill the local buffer pointer now */
      if (output == NULL)
         png_ptr->zstream.next_out = NULL;

      /* Claw back the 'size' and 'remaining_space' byte counts. */
      avail_in += png_ptr->zstream.avail_in;
      avail_out += png_ptr->zstream.avail_out;

      /* Update the input and output sizes; the updated values are the amount
       * consumed or written, effectively the inverse of what zlib uses.
       */
      if (avail_out > 0)
         *output_size_ptr -= avail_out;

      if (avail_in > 0)
         *input_size_ptr -= avail_in;

      /* Ensure png_ptr->zstream.msg is set (even in the success case!) */
      png_zstream_error(png_ptr, ret);

src/Source/LibPNG/pngset.c  view on Meta::CPAN

         memcpy(new_list, png_ptr->chunk_list, 5*old_num_chunks);
   }

   else if (old_num_chunks > 0)
      new_list = png_ptr->chunk_list;

   else
      new_list = NULL;

   /* Add the new chunks together with each one's handling code.  If the chunk
    * already exists the code is updated, otherwise the chunk is added to the
    * end.  (In libpng 1.6.0 order no longer matters because this code enforces
    * the earlier convention that the last setting is the one that is used.)
    */
   if (new_list != NULL)
   {
      png_const_bytep inlist;
      png_bytep outlist;
      unsigned int i;

      for (i=0; i<num_chunks; ++i)

src/Source/LibPNG/pngstruct.h  view on Meta::CPAN

                               */
   png_bytep row_buf;         /* buffer to save current (unfiltered) row.
                               * This is a pointer into big_row_buf
                               */
#ifdef PNG_WRITE_SUPPORTED
   png_bytep sub_row;         /* buffer to save "sub" row when filtering */
   png_bytep up_row;          /* buffer to save "up" row when filtering */
   png_bytep avg_row;         /* buffer to save "avg" row when filtering */
   png_bytep paeth_row;       /* buffer to save "Paeth" row when filtering */
#endif
   png_size_t info_rowbytes;  /* Added in 1.5.4: cache of updated row bytes */

   png_uint_32 idat_size;     /* current IDAT size for read */
   png_uint_32 crc;           /* current chunk CRC value */
   png_colorp palette;        /* palette from the input file */
   png_uint_16 num_palette;   /* number of color entries in palette */

/* Added at libpng-1.5.10 */
#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
   int num_palette_max;       /* maximum palette index found in IDAT */
#endif

src/Source/LibRawLite/Changelog.txt  view on Meta::CPAN

     Fujifilm F900EXR 
     Kodak 12MP
     Matrix 4608x3288
     Nokia 1200x1600
     Olympus E-PL6
     Panasonic DMC-FZ7

2014-01-17 Alex Tutubalin <lexa@lexa.ru>
  * Camera support:
     Added: Fujifilm XE2, XQ1
     Color data updated: Nikon D4 1 AW1/J3, Fuji X-M2
     Fixes: Nikon D610 visible image area, Canon A3300 bayer 
     pattern
  * RawSpeed support: enabled processing for cameras,
    unknown to RawSpeed
  * Fixed error in LibRaw::unpack_thumb()
  * little improve performance in my_strcasestr
  * Fix compiler errors for VS2012/OpenMP
  * Fixed typo which prevents to use Demosaic Pack GPL2
  * LibRaw 0.16.0-Release

2013-11-15 Alex Tutubalin <lexa@lexa.ru>
  * New cameras supported
     Leica C, X VARIO
     Nikon D5300, D610, Df, 1 AW1
     Nokia Lumia 1020, 1520
     Olympus STYLUS1
     Pentax K-3
     Sony RX10, A3000 (ILCE-3000), 
  * Color data updated:
     Canon S120
     Nikon P7800, 1 J3
     Olympus E-M1
  * Corrected image visible area sizes
    Canon G16
    Sigma pre-Merrill cameras: small and medium-sized RAWs

  * Better EXIF parsing:
     - ISO values for new Nikon cameras (D4, D800)
     - black level extraction for Nikon D5300

src/Source/LibRawLite/Changelog.txt  view on Meta::CPAN


  * Better Visual Studio compatibility (esp. old versions)
  * Cmake build: added ws2_32 library for MinGW builds
  * LibRaw 0.16.0-Beta1

2013-10-22 Alex Tutubalin <lexa@lexa.ru>
  * Support for new cameras:
    Sony A7, A7R
    Panasonic GM1

  * Sony RX1R and RX100M2 color data updated.

  * Sony cameras model name is set by SonyModelID EXIF tag
  
  * Sony ARW2: black level and color matrix extracted from EXIF data

  * Samsung: black level and color matrix extracted from EXIF; 
    Camera multipliers are now extracted correctly even if black is not 0

  * Better source compatibility with Mac OS X compilation

src/Source/LibRawLite/Changelog.txt  view on Meta::CPAN

        * Fixed possible read-after-buffer in Sony ARW2 decoder
        * Fixed mingw32 errors when compiling LibRaw_windows_datastream
        * Makefile.msvc: support of OpenMP and LCMS (uncomment to use)
        * Fixed decoding of some Leaf Aptus II files
        * LibRaw 0.14.6-Release

2011-12-24 Alex Tutubalin <lexa@lexa.ru>
        * Fixed bug (uninitialized variable) in SMAL format decoding.

        * Imported new dcraw 9.12 (1.446): support for Leica V-LUX 3, 
          updated color data for Canon S100, Fujifilm X10, Nikon 1 J1/V1,
          Panasonic GX1, Samsung NX200, Sony NEX-7

        * LibRaw 0.14.5-Release

2011-12-12 Alex Tutubalin <lexa@lexa.ru>

        * Fixes to Panasonic/Leica file parser to prevent crash
          on broken jpegs.

        * Fixes to include order in src/libraw_datastream.cpp to

src/Source/LibRawLite/Changelog.txt  view on Meta::CPAN

          due to wavelet filtering or aberration correction.

        * fixed open_file()/adjust_sizes_info_only() code path

        * Removed imgdata.sizes.bottom_margin and right_margin data fields
          use imgdata.sizes.raw_width - width - left_margin to get right one,
          the same with bottom_margin.

        * minor ./configure cleanup
        
        * Qmake files and Visual Studio Project files are updated.

        * New version check macros:
          For use at runtime checks:
           LIBRAW_RUNTIME_CHECK_VERSION_EXACT() - checks  that runtime 
            major/minor version numbers are same with compile-time values.

           LIBRAW_RUNTIME_CHECK_VERSION_NOTLESS() - checks that runtime
            version is not less that compile-time one.

          For use at compile-time in preprocessor directives:

src/Source/LibRawLite/Changelog.txt  view on Meta::CPAN

	* Leica D-LUX 4: fixed typo in camera name in colordata

2011-02-15 Alex Tutubalin <lexa@lexa.ru>
	* New -mem option for dcraw_emu: I/O via allocated buffer
	* Removed debug printf from LibRaw_memory_buffer code
	* Preliminary shared library support

2011-02-12 Alex Tutubalin <lexa@lexa.ru>
	* Added qmake .pro and Visual Studio 2008 sln/vcproj project files
2011-02-07 Alex Tutubalin <lexa@lexa.ru>
        * dcraw_emu documentation updated
        * ./configure stuff changed for correct linking on some systems        
        * FBDD denoising is disabled for full-color images and 4-color bayer
          data (including forced 4-color via four_color_rgb option)
        * LibRaw 0.13.1-Release

2011-02-05 Alex Tutubalin <lexa@lexa.ru>
        * ./configure fixes for PACKAGE_REQUIRES
        * Makefile.msvc: correct compiler flags for demosaic packs
        * dcraw.c 9.06/1.440 imported:
          + New camera support: Canon S95, Casio EX-Z1080, Panasonic GF2 

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN


	* add html/v4.0.4beta.html under version control
	* HOWTO-RELEASE: write that cvs add html/vX.X.html must be used

2015-01-26  Even Rouault  <even.rouault@spatialys.com>

	* libtiff 4.0.4beta released

2015-01-26  Even Rouault  <even.rouault@spatialys.com>

	* automake: updated to 1.15
	* libtool: updated to 2.4.5

2015-01-22  Even Rouault  <even.rouault@spatialys.com>

	* tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013)

2015-01-05  Frank Warmerdam  <warmerdam@pobox.com>

	* html/bugs.html: remove note about needing to email the tiff mailing
	list administrator about being approved for membership, this appears
	not to be true.

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	* tools/tiffcrop.c: fix segfault if bad value passed to -Z option
	(bug #2459) and add missing va_end in dump_info (#2459)

	* tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451)

2014-11-20  Even Rouault  <even.rouault@spatialys.com>
	* libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on
	corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471)

2014-11-20  Even Rouault  <even.rouault@spatialys.com>
	* automake: updated to 1.14.1
	* libtool: updated to 2.4.3
	* HOWTO-RELEASE: small update about autotools building order

2014-10-20  Olivier Paquet  <olivier.paquet@gmail.com>
	* tools/tiff2pdf.c: Preserve input file directory order when pages
	are tagged with the same page number.

2014-08-31  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect
	count for tag should be a warning rather than an error since

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED.  Not exactly clear
	why this is needed.

2008-05-09  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* Makefile.am (ACLOCAL_AMFLAGS): Libtool 2.2.4 does not like
	"ACLOCAL_AMFLAGS=-I ./m4".  It wants "ACLOCAL_AMFLAGS=-I m4".

2008-04-15  Andrey Kiselev  <dron@ak4719.spb.edu>

	* test/: Test suite updated. Everything is passed now.

	* libtiff/tif_dirinfo.c: Fixed description of the
	TIFFTAG_NUMBEROFINKS tag.

2008-04-14  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/{tif_dirread.c, tif_dirwrite.c, tiffiop.h}:
	Get rid of some of "dereferencing type-punned" warnings by converting
	tdir_offset field of TIFFDirEntry structure into union.

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	http://bugzilla.remotesensing.org/show_bug.cgi?id=1029
	http://bugzilla.remotesensing.org/show_bug.cgi?id=1034

	* libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of
	_TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug

	http://bugzilla.remotesensing.org/show_bug.cgi?id=1026.

2006-01-23  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtool related stuff updated from the 2.1a branch.

2006-01-11  Frank Warmerdam  <warmerdam@pobox.com>

	* tools/bmp2tiff,pal2rgb,ppm2tiff,ras2tiff,raw2tiff,sgi2tiff,
	tiff2bw,tiffcp: Fixed jpeg option processing so -c jpeg:r:50 works
	properly as per bug:
	http://bugzilla.remotesensing.org/show_bug.cgi?id=1025

2006-01-09  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	* libtiff/{tiffio.hxx, tiffio.h}: C++ stream interface moved to new
	file tiffio.hxx. We don't have any C++ in tiffio.h, those who want to
	use C++ streams should #include <tiffio.hxx>.

2004-11-13  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/tiff.h: Added Adobe DNG tags.

	* libtiff/tif_win32.c: Typo fixed.

	* libtiff/{tif_stream.cxx, tiffio.h}: C++ stream interface updated to
	be compliant with the latest standard. Appropriate additions in
	makefiles now completed.

2004-11-11  Andrey Kiselev  <dron@ak4719.spb.edu>

	* tools/tiffset.c, libtiff/tif_dirinfo.c: Properly handle the
	different tag types. As per bug

	http://bugzilla.remotesensing.org/show_bug.cgi?id=600

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	bug http://bugzilla.remotesensing.org/show_bug.cgi?id=586

2004-08-01  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/{tif_config.h.in, tif_config.h.vc}: config.h.in and
	config.h.vc files renamed in the tif_config.h.in and tif_config.h.vc.

2004-07-24  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/tif_lzw.c: LZW compression code is merged back from the
	separate package. All libtiff tools are updated to not advertise an
	abcence of LZW support.

2004-07-12  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/tiffio.h: Revert thandle_t back to void* type.

2004-07-11  Andrey Kiselev  <dron@ak4719.spb.edu>

	* libtiff/{tif_read.c, tif_tile.c, tif_strip.c}: Fixes in error
	messages, as suggested by Bernd Herd.

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	* libtiff/mkversion.c: Fix output of TIFF_VERSION to be
	YYYYMMDD so that it is increasing over time.

	* Makefile.in: Ensure that tiffvers.h is regenerated in the
	make release target.

	* Makefile.in: added libtiff/tiffvers.h to the release file list.

2001-11-23  Frank Warmerdam  <warmerdam@pobox.com>

	* added html/v3.5.7.html, updated html/index.html.

	* Makefile.in: added contrib/addtiffo/tif_ovrcache.{c,h}.

2001-11-15  Frank Warmerdam  <warmerdam@pobox.com>

	* configure: fixed test for -lm.

2001-11-02  Frank Warmerdam  <warmerdam@pobox.com>

	* Added PHOTOMETRIC_ITULAB as per bug 90.

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

	* libtiff/tiff.h: Applied hac to try and resolve the problem
	with the inttypes.h include file on AIX.

	See http://bugzilla.remotesensing.org/show_bug.cgi?id=39

	* VERSION: update to 3.5.7 beta in preparation for release.

	* configure/config.site: modified to check if -lm is needed for
	MACHDEPLIBS if not supplied by config.site.  Needed for Darwin.

	* config.guess: updated wholesale to an FSF version apparently
	from 1998 (as opposed to 1994).  This is mainly inspired by
	providing for MacOS X support.

2001-03-29  Frank Warmerdam  <warmerdam@pobox.com>

	* configure, Makefile.in, etc: added support for OPTIMIZER being
	set from config.site.

2001-03-28  Frank Warmerdam  <warmerdam@pobox.com>

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN


	* tif_getimage.c: Added support for 16bit minisblack/miniswhite
	images in RGBA interface.

2001-03-02  Frank Warmerdam  <warmerdam@pobox.com>

	* Added TIFFTAG_COPYRIGHT support.

2001-02-19  Frank Warmerdam  <warmerdam@pobox.com>

	* Brent Roman contributed updated tiffcp utility (and tiffcp.1)
	with support for extracting subimages with the ,n syntax, and also
	adding the -b bias removal flag.

2001-02-16  Frank Warmerdam  <warmerdam@pobox.com>

	* libtiff/libtiff.def: Brent Roman submitted new version adding
	serveral missing entry points.

	* libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS.
	Some sort of weird VMS thing.

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN


2000-12-28  Frank Warmerdam  <warmerdam@pobox.com>

	* Added RELEASE-DATE file to release file list.

	* Fixed libtiff/makefile.vc to make tiffvers.h not version.h.

2000-12-22  Mike Welles <mike@bangstate.com>
        * added link to CVS mirror from index.html

	* updated html/internals.html to note that LZW compression is
	  not supported by default.

2000-12-22  Frank Warmerdam  <warmerdam@pobox.com>

	* updated html/libtiff.html to not point at Niles' old JPL web site
	for the man pages, point at www.libtiff.org.

2000-12-21  Frank Warmerdam  <warmerdam@pobox.com>

	* libtiff/tif_apple.c: Applied "Carbon" support patches supplied by
	Leonard Rosenthol <leonardr@lazerware.com>.  May interfere
	with correct building on older systems.  If so, please let me know.

2000-12-19 Mike Welles <mike@bangsate.com>

	* Took out LZW Encoding from tif_lzw.c

	* Created HOWTO-RELEASE

	* Created html/v3.5.6.html

	* updated index.html

2000-12-01  Frank Warmerdam  <warmerdam@pobox.com>

	* Added patches for EOFB support in tif_fax3.c and tif_fax3.h.
	Patches supplied by Frank Cringle <fdc@cliwe.ping.de>
	Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif

2000-11-24  Frank Warmerdam  <warmerdam@pobox.com>

	* libtiff/Makefile.in: Added an installPrivateHdrs and install-private

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN

2000-11-22  Frank Warmerdam  <warmerdam@pobox.com>

	* I have applied a patch from Steffen Moeller <moeller@ebi.ac.uk> to
	the configure script so that it now accepts the --prefix, and
	--exec-prefix directives.

2000-11-13  Frank Warmerdam  <warmerda@cs46980-c>

	* I have made a variety of modifications in an effort to ensure the
	TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE
	file which seems to be updated regularly.

	 o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in
	   version include file.
	 o renamed version.h to tiffvers.h because we now have to install it
	   with the public libtiff include files.
	 o include tiffvers.h in tiffio.h.
	 o updated tif_version.c to use tiffvers.h.
	 o Updated Makefile.in accordingly.

	* As per http://bugzilla.remotesensing.org/show_bug.cgi?id=25
	I have updated the win32 detection rules in tiffcomp.h.

2000-10-20  Frank Warmerdam  <warmerda@cs46980-c>

	* tif_getimage.c: Fixed RGBA translation for YCbCr images for which
	the strip/tile width and height aren't multiples of the sampling size.
	See http://bugzilla.remotesensing.org/show_bug.cgi?id=20
	Some patches from Rick LaMont of Dot C Software.

	* Modified tif_packbits.c encoder to avoid compressing more
	data than provided if rowsize doesn't factor into provided data

src/Source/LibTIFF4/ChangeLog  view on Meta::CPAN


	* added release.stamp target, which tags cvs tree, and updates
	  "RELEASE-DATE"

	* added releasediff target, which diffs tree with source as of
	  date in "RELEASE-DATE"

	* Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving
	  away from alpha/non-alpha distinctions).

	* updated html to reflect release

1999-09-23    <warmerda@CS46980-B>

	* Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.

	* Added CYGWIN case in configure.

Fri Sep 17 00:13:51 CEST 1999  Mike Welles <mike@onshore.com>

	* Applied Francois Dagand's patch to handle fax decompression bug.

src/Source/LibTIFF4/tif_dir.c  view on Meta::CPAN

		return (0);
	}
	return (1);
}

/*
 * Record the value of a field in the
 * internal directory structure.  The
 * field will be written to the file
 * when/if the directory structure is
 * updated.
 */
int
TIFFSetField(TIFF* tif, uint32 tag, ...)
{
	va_list ap;
	int status;

	va_start(ap, tag);
	status = TIFFVSetField(tif, tag, ap);
	va_end(ap);

src/Source/LibTIFF4/tif_pixarlog.c  view on Meta::CPAN

static int
PixarLogPreDecode(TIFF* tif, uint16 s)
{
	static const char module[] = "PixarLogPreDecode";
	PixarLogState* sp = DecoderState(tif);

	(void) s;
	assert(sp != NULL);
	sp->stream.next_in = tif->tif_rawdata;
	assert(sizeof(sp->stream.avail_in)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_in = (uInt) tif->tif_rawcc;
	if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	return (inflateReset(&sp->stream) == Z_OK);
}

src/Source/LibTIFF4/tif_pixarlog.c  view on Meta::CPAN

			td->td_bitspersample);
		return 0;
	}

	llen = sp->stride * td->td_imagewidth;

	(void) s;
	assert(sp != NULL);
	sp->stream.next_out = (unsigned char *) sp->tbuf;
	assert(sizeof(sp->stream.avail_out)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_out = (uInt) (nsamples * sizeof(uint16));
	if (sp->stream.avail_out != nsamples * sizeof(uint16))
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	do {
		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);

src/Source/LibTIFF4/tif_pixarlog.c  view on Meta::CPAN

static int
PixarLogPreEncode(TIFF* tif, uint16 s)
{
	static const char module[] = "PixarLogPreEncode";
	PixarLogState *sp = EncoderState(tif);

	(void) s;
	assert(sp != NULL);
	sp->stream.next_out = tif->tif_rawdata;
	assert(sizeof(sp->stream.avail_out)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_out = tif->tif_rawdatasize;
	if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	return (deflateReset(&sp->stream) == Z_OK);
}

src/Source/LibTIFF4/tif_pixarlog.c  view on Meta::CPAN

		default:
			TIFFErrorExt(tif->tif_clientdata, module,
				"%d bit input not supported in PixarLog",
				td->td_bitspersample);
			return 0;
		}
	}
 
	sp->stream.next_in = (unsigned char *) sp->tbuf;
	assert(sizeof(sp->stream.avail_in)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_in = (uInt) (n * sizeof(uint16));
	if ((sp->stream.avail_in / sizeof(uint16)) != (uInt) n)
	{
		TIFFErrorExt(tif->tif_clientdata, module,
			     "ZLib cannot deal with buffers this size");
		return (0);
	}

src/Source/LibTIFF4/tif_vms.c  view on Meta::CPAN

#include <math.h>
#endif

#ifdef VAXC
#define	NOSHARE	noshare
#else
#define	NOSHARE
#endif

COMPILATION SHOULD FAIL
This file is not yet updated to reflect changes in LibTiff 4.0. If you have
the opportunity to update and test this file, please contact LibTiff folks
for all assistance you may require and contribute the results

#ifdef __alpha
/* Dummy entry point for backwards compatibility */
void TIFFModeCCITTFax3(void){}
#endif

static tsize_t
_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)

src/Source/LibTIFF4/tif_wince.c  view on Meta::CPAN

# error "Only Windows CE target is supported!"
#endif

#include "tiffiop.h"
#include <windows.h>

/* Turn off console support on Windows CE. */
#undef TIF_PLATFORM_CONSOLE

COMPILATION SHOULD FAIL
This file is not yet updated to reflect changes in LibTiff 4.0. If you have
the opportunity to update and test this file, please contact LibTiff folks
for all assistance you may require and contribute the results


/*
 * Open a TIFF file for read/writing.
 */
TIFF*
TIFFOpen(const char* name, const char* mode)
{

src/Source/LibTIFF4/tif_zip.c  view on Meta::CPAN

	ZIPState* sp = DecoderState(tif);

	(void) s;
	assert(sp != NULL);

	if( (sp->state & ZSTATE_INIT_DECODE) == 0 )
            tif->tif_setupdecode( tif );

	sp->stream.next_in = tif->tif_rawdata;
	assert(sizeof(sp->stream.avail_in)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_in = (uInt) tif->tif_rawcc;
	if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	return (inflateReset(&sp->stream) == Z_OK);
}

src/Source/LibTIFF4/tif_zip.c  view on Meta::CPAN


	(void) s;
	assert(sp != NULL);
	assert(sp->state == ZSTATE_INIT_DECODE);

        sp->stream.next_in = tif->tif_rawcp;
	sp->stream.avail_in = (uInt) tif->tif_rawcc;
        
	sp->stream.next_out = op;
	assert(sizeof(sp->stream.avail_out)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_out = (uInt) occ;
	if ((tmsize_t)sp->stream.avail_out != occ)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	do {
		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);

src/Source/LibTIFF4/tif_zip.c  view on Meta::CPAN

	static const char module[] = "ZIPPreEncode";
	ZIPState *sp = EncoderState(tif);

	(void) s;
	assert(sp != NULL);
	if( sp->state != ZSTATE_INIT_ENCODE )
            tif->tif_setupencode( tif );

	sp->stream.next_out = tif->tif_rawdata;
	assert(sizeof(sp->stream.avail_out)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_out = tif->tif_rawdatasize;
	if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	return (deflateReset(&sp->stream) == Z_OK);
}

src/Source/LibTIFF4/tif_zip.c  view on Meta::CPAN

{
	static const char module[] = "ZIPEncode";
	ZIPState *sp = EncoderState(tif);

	assert(sp != NULL);
	assert(sp->state == ZSTATE_INIT_ENCODE);

	(void) s;
	sp->stream.next_in = bp;
	assert(sizeof(sp->stream.avail_in)==4);  /* if this assert gets raised,
	    we need to simplify this code to reflect a ZLib that is likely updated
	    to deal with 8byte memory sizes, though this code will respond
	    apropriately even before we simplify it */
	sp->stream.avail_in = (uInt) cc;
	if ((tmsize_t)sp->stream.avail_in != cc)
	{
		TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
		return (0);
	}
	do {
		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {

src/Source/LibWebP/src/dec/vp8li.h  view on Meta::CPAN

int VP8LDecodeAlphaImageStream(struct ALPHDecoder* const alph_dec,
                               int last_row);

// Allocates and initialize a new lossless decoder instance.
VP8LDecoder* VP8LNew(void);

// Decodes the image header. Returns false in case of error.
int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io);

// Decodes an image. It's required to decode the lossless header before calling
// this function. Returns false in case of error, with updated dec->status_.
int VP8LDecodeImage(VP8LDecoder* const dec);

// Resets the decoder in its initial state, reclaiming memory.
// Preserves the dec->status_ value.
void VP8LClear(VP8LDecoder* const dec);

// Clears and deallocate a lossless decoder instance.
void VP8LDelete(VP8LDecoder* const dec);

//------------------------------------------------------------------------------

src/Source/LibWebP/src/dec/webpi.h  view on Meta::CPAN

  size_t compressed_size;      // VP8/VP8L compressed data size
  size_t riff_size;            // size of the riff payload (or 0 if absent)
  int is_lossless;             // true if a VP8L chunk is present
} WebPHeaderStructure;

// Skips over all valid chunks prior to the first VP8/VP8L frame header.
// Returns: VP8_STATUS_OK, VP8_STATUS_BITSTREAM_ERROR (invalid header/chunk),
// VP8_STATUS_NOT_ENOUGH_DATA (partial input) or VP8_STATUS_UNSUPPORTED_FEATURE
// in the case of non-decodable features (animation for instance).
// In 'headers', compressed_size, offset, alpha_data, alpha_size, and lossless
// fields are updated appropriately upon success.
VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers);

//------------------------------------------------------------------------------
// Misc utils

// Initializes VP8Io with custom setup, io and teardown functions. The default
// hooks will use the supplied 'params' as io->opaque handle.
void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io);

// Setup crop_xxx fields, mb_w and mb_h in io. 'src_colorspace' refers

src/Source/LibWebP/src/enc/enc.iterator.c  view on Meta::CPAN

}

void VP8SetSegment(const VP8EncIterator* const it, int segment) {
  it->mb_->segment_ = segment;
}

//------------------------------------------------------------------------------
// Intra4x4 sub-blocks iteration
//
//  We store and update the boundary samples into an array of 37 pixels. They
//  are updated as we iterate and reconstructs each intra4x4 blocks in turn.
//  The position of the samples has the following snake pattern:
//
// 16|17 18 19 20|21 22 23 24|25 26 27 28|29 30 31 32|33 34 35 36  <- Top-right
// --+-----------+-----------+-----------+-----------+
// 15|         19|         23|         27|         31|
// 14|         18|         22|         26|         30|
// 13|         17|         21|         25|         29|
// 12|13 14 15 16|17 18 19 20|21 22 23 24|25 26 27 28|
// --+-----------+-----------+-----------+-----------+
// 11|         15|         19|         23|         27|

src/Source/LibWebP/src/mux/mux.muxedit.c  view on Meta::CPAN

  const WebPMuxImage* images = NULL;

  assert(mux != NULL);
  images = mux->images_;  // First image.
  if (images == NULL || images->img_ == NULL ||
      images->img_->data_.bytes == NULL) {
    return WEBP_MUX_INVALID_ARGUMENT;
  }

  // If VP8X chunk(s) is(are) already present, remove them (and later add new
  // VP8X chunk with updated flags).
  err = MuxDeleteAllNamedData(mux, kChunks[IDX_VP8X].tag);
  if (err != WEBP_MUX_OK && err != WEBP_MUX_NOT_FOUND) return err;

  // Set flags.
  if (mux->iccp_ != NULL && mux->iccp_->data_.bytes != NULL) {
    flags |= ICCP_FLAG;
  }
  if (mux->exif_ != NULL && mux->exif_->data_.bytes != NULL) {
    flags |= EXIF_FLAG;
  }

src/Source/LibWebP/src/utils/bit_reader.h  view on Meta::CPAN

#endif
#include "../webp/types.h"

#ifdef __cplusplus
extern "C" {
#endif

// The Boolean decoder needs to maintain infinite precision on the value_ field.
// However, since range_ is only 8bit, we only need an active window of 8 bits
// for value_. Left bits (MSB) gets zeroed and shifted away when value_ falls
// below 128, range_ is updated, and fresh bits read from the bitstream are
// brought in as LSB. To avoid reading the fresh bits one by one (slow), we
// cache BITS of them ahead. The total of (BITS + 8) bits must fit into a
// natural register (with type bit_t). To fetch BITS bits from bitstream we
// use a type lbit_t.
//
// BITS can be any multiple of 8 from 8 to 56 (inclusive).
// Pick values that fit natural register size.

#if defined(__i386__) || defined(_M_IX86)      // x86 32bit
#define BITS 24



( run in 0.587 second using v1.01-cache-2.11-cpan-05444aca049 )