spandsp
0.0.6
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * private/t4_t6_encode.h - definitions for T.4/T.6 fax compression 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2003 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 */ 00025 00026 #if !defined(_SPANDSP_PRIVATE_T4_T6_ENCODE_H_) 00027 #define _SPANDSP_PRIVATE_T4_T6_ENCODE_H_ 00028 00029 /*! 00030 T.4 1D, T4 2D and T6 compressor state. 00031 */ 00032 struct t4_t6_encode_state_s 00033 { 00034 /*! \brief The minimum number of encoded bits per row. This is a timing thing 00035 for hardware FAX machines. */ 00036 int min_bits_per_row; 00037 /*! \brief The current maximum contiguous rows that may be 2D encoded. */ 00038 int max_rows_to_next_1d_row; 00039 00040 /*! \brief Number of rows left that can be 2D encoded, before a 1D encoded row 00041 must be used. */ 00042 int rows_to_next_1d_row; 00043 00044 /*! \brief The number of runs currently in the reference row. */ 00045 int ref_steps; 00046 00047 /*! \brief Pointer to the byte containing the next image bit to transmit. */ 00048 int bit_pos; 00049 /*! \brief Pointer to the bit within the byte containing the next image bit to transmit. */ 00050 int bit_ptr; 00051 00052 /*! \brief Callback function to read a row of pixels from the image source. */ 00053 t4_row_read_handler_t row_read_handler; 00054 /*! \brief Opaque pointer passed to row_read_handler. */ 00055 void *row_read_user_data; 00056 }; 00057 00058 #endif 00059 /*- End of file ------------------------------------------------------------*/