tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

jdmerge.h (1664B)


      1 /*
      2 * jdmerge.h
      3 *
      4 * This file was part of the Independent JPEG Group's software:
      5 * Copyright (C) 1994-1996, Thomas G. Lane.
      6 * libjpeg-turbo Modifications:
      7 * Copyright (C) 2020, 2022, D. R. Commander.
      8 * For conditions of distribution and use, see the accompanying README.ijg
      9 * file.
     10 */
     11 
     12 #define JPEG_INTERNALS
     13 #include "jpeglib.h"
     14 #include "jsamplecomp.h"
     15 
     16 #ifdef UPSAMPLE_MERGING_SUPPORTED
     17 
     18 
     19 /* Private subobject */
     20 
     21 typedef struct {
     22  struct jpeg_upsampler pub;    /* public fields */
     23 
     24  /* Pointer to routine to do actual upsampling/conversion of one row group */
     25  void (*upmethod) (j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
     26                    JDIMENSION in_row_group_ctr, _JSAMPARRAY output_buf);
     27 
     28  /* Private state for YCC->RGB conversion */
     29  int *Cr_r_tab;                /* => table for Cr to R conversion */
     30  int *Cb_b_tab;                /* => table for Cb to B conversion */
     31  JLONG *Cr_g_tab;              /* => table for Cr to G conversion */
     32  JLONG *Cb_g_tab;              /* => table for Cb to G conversion */
     33 
     34  /* For 2:1 vertical sampling, we produce two output rows at a time.
     35   * We need a "spare" row buffer to hold the second output row if the
     36   * application provides just a one-row buffer; we also use the spare
     37   * to discard the dummy last row if the image height is odd.
     38   */
     39  _JSAMPROW spare_row;
     40  boolean spare_full;           /* T if spare buffer is occupied */
     41 
     42  JDIMENSION out_row_width;     /* samples per output row */
     43  JDIMENSION rows_to_go;        /* counts rows remaining in image */
     44 } my_merged_upsampler;
     45 
     46 typedef my_merged_upsampler *my_merged_upsample_ptr;
     47 
     48 #endif /* UPSAMPLE_MERGING_SUPPORTED */