Stefan Schuermans
add support for monochrome distributors
Stefan Schuermans commited 6d5ec0e at 2018-08-14 19:31:25
/*
* EtherPix library
*
* Copyright 2010-2017 Stefan Schuermans <stefan schuermans info>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ETP_TYPES_H
#define ETP_TYPES_H
#include <etherpix/types.h>
#include "constants.h"
#include "net.h"
#include "thread.h"
/** mapping information
*
* values of channels are mapped according to following formula:
* <display value> := <base> + <factor> * <original value> ^ (1 / <gamma>)
*/
typedef struct etp_mapping_s {
double base; /**< base constant for brightness correction */
double factor; /**< factor for contrast modification */
double gamma; /**< gamma correction factor, must be > 0.0 */
etp_u8_t table[256]; /**< precalculated mapping table,
* index: source image value
* value: display value */
} etp_mapping_t;
/** information about a pixel */
typedef struct etp_pixel_s {
int x, y; /**< coordinates of pixel in movie (-1 if unknown yet) */
} etp_pixel_t;
/** information about a distributor */
typedef struct etp_distri_s {
unsigned int distri; /**< number of this distributor */
unsigned int output_cnt; /**< number of outputs of this distributor */
unsigned int pixel_cnt; /**< number of pixels connected to each output */
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX