LCOV - code coverage report
Current view: directory - frmts/gtiff/libtiff - tif_jpeg_12.c (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 27 27 100.0 %
Date: 2010-01-09 Functions: 1 1 100.0 %

       1                 : 
       2                 : #include "tiffiop.h"
       3                 : 
       4                 : #if defined(JPEG_DUAL_MODE_8_12)
       5                 : 
       6                 : #  define TIFFInitJPEG TIFFInitJPEG_12
       7                 : 
       8                 : #  include LIBJPEG_12_PATH
       9                 : 
      10                 : #  include "tif_jpeg.c"
      11                 : 
      12               4 : int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode )
      13                 : 
      14                 : {
      15                 :     JPEGState* sp;
      16                 : 
      17               4 :     assert(scheme == COMPRESSION_JPEG);
      18                 : 
      19               4 :     sp = JState(tif);
      20               4 :     sp->tif = tif;       /* back link */
      21                 : 
      22                 :     /*
      23                 :      * Override parent get/set field methods.
      24                 :      */
      25               4 :     tif->tif_tagmethods.vgetfield = JPEGVGetField; /* hook for codec tags */
      26               4 :     tif->tif_tagmethods.vsetfield = JPEGVSetField; /* hook for codec tags */
      27               4 :     tif->tif_tagmethods.printdir = JPEGPrintDir;   /* hook for codec tags */
      28                 : 
      29                 :     /*
      30                 :      * Install codec methods.
      31                 :      */
      32               4 :     tif->tif_fixuptags = JPEGFixupTags;
      33               4 :     tif->tif_setupdecode = JPEGSetupDecode;
      34               4 :     tif->tif_predecode = JPEGPreDecode;
      35               4 :     tif->tif_decoderow = JPEGDecode;
      36               4 :     tif->tif_decodestrip = JPEGDecode;
      37               4 :     tif->tif_decodetile = JPEGDecode;
      38               4 :     tif->tif_setupencode = JPEGSetupEncode;
      39               4 :     tif->tif_preencode = JPEGPreEncode;
      40               4 :     tif->tif_postencode = JPEGPostEncode;
      41               4 :     tif->tif_encoderow = JPEGEncode;
      42               4 :     tif->tif_encodestrip = JPEGEncode;
      43               4 :     tif->tif_encodetile = JPEGEncode;  
      44               4 :     tif->tif_cleanup = JPEGCleanup;
      45               4 :     tif->tif_defstripsize = JPEGDefaultStripSize;
      46               4 :     tif->tif_deftilesize = JPEGDefaultTileSize;
      47               4 :     tif->tif_flags |= TIFF_NOBITREV; /* no bit reversal, please */
      48                 : 
      49               4 :     sp->cinfo_initialized = FALSE;
      50                 : 
      51               4 :     if( is_encode )
      52               1 :         return JPEGSetupEncode(tif);
      53                 :     else
      54               3 :         return JPEGSetupDecode(tif);
      55                 : }
      56                 : 
      57                 : #endif /* defined(JPEG_DUAL_MODE_8_12) */
      58                 : 

Generated by: LCOV version 1.7