Path: blob/master/3rdparty/libjpeg-turbo/src/jdsample.h
16337 views
/*1* jdsample.h2*3* This file was part of the Independent JPEG Group's software:4* Copyright (C) 1991-1996, Thomas G. Lane.5* For conditions of distribution and use, see the accompanying README.ijg6* file.7*/89#define JPEG_INTERNALS10#include "jpeglib.h"111213/* Pointer to routine to upsample a single component */14typedef void (*upsample1_ptr) (j_decompress_ptr cinfo,15jpeg_component_info *compptr,16JSAMPARRAY input_data,17JSAMPARRAY *output_data_ptr);1819/* Private subobject */2021typedef struct {22struct jpeg_upsampler pub; /* public fields */2324/* Color conversion buffer. When using separate upsampling and color25* conversion steps, this buffer holds one upsampled row group until it26* has been color converted and output.27* Note: we do not allocate any storage for component(s) which are full-size,28* ie do not need rescaling. The corresponding entry of color_buf[] is29* simply set to point to the input data array, thereby avoiding copying.30*/31JSAMPARRAY color_buf[MAX_COMPONENTS];3233/* Per-component upsampling method pointers */34upsample1_ptr methods[MAX_COMPONENTS];3536int next_row_out; /* counts rows emitted from color_buf */37JDIMENSION rows_to_go; /* counts rows remaining in image */3839/* Height of an input row group for each component. */40int rowgroup_height[MAX_COMPONENTS];4142/* These arrays save pixel expansion factors so that int_expand need not43* recompute them each time. They are unused for other upsampling methods.44*/45UINT8 h_expand[MAX_COMPONENTS];46UINT8 v_expand[MAX_COMPONENTS];47} my_upsampler;4849typedef my_upsampler *my_upsample_ptr;505152