<commit_before>/*****************************************************************************
 * This file is part of gfxprim library.                                     *
 *                                                                           *
 * Gfxprim is free software; you can redistribute it and/or                  *
 * modify it under the terms of the GNU Lesser General Public                *
 * License as published by the Free Software Foundation; either              *
 * version 2.1 of the License, or (at your option) any later version.        *
 *                                                                           *
 * Gfxprim 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         *
 * Lesser General Public License for more details.                           *
 *                                                                           *
 * You should have received a copy of the GNU Lesser General Public          *
 * License along with gfxprim; if not, write to the Free Software            *
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,                        *
 * Boston, MA  02110-1301  USA                                               *
 *                                                                           *
 * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos                            *
 *                         <<EMAIL>>                  *
 *                                                                           *
 * Copyright (C) 2009-2011 <NAME> <<EMAIL>>                       *
 *                                                                           *
 * Copyright (C) 2011      <NAME> <<EMAIL>>                  *
 *                                                                           *
 *****************************************************************************/

#ifndef GP_PIXEL_H
#define GP_PIXEL_H

#include <stdbool.h>
#include <stdint.h>

#include "GP_Common.h"
#include "GP_RetCode.h"
#include "GP_FnPerBpp.h"

struct GP_Context;

/*
 *  GP_PixelType  is typedef enum of PixelTypes, 
 * 
 * each named GP_PIXEL_<TYPENAME>, such as GP_PIXEL_RGB888
 * see the beginning of GP_Pixel.gen.h for a complete list
 *
 * The type always contains GP_PIXEL_UNKNOWN = 0 and
 * GP_PIXEL_MAX as the last value (also the number of valid types)
 * The types are numbered to use the entire range 0 .. GP_PIXEL_MAX-1
 */

/*
 * GP_Pixel is just uint32_t
 */
typedef uint32_t GP_Pixel;
#define GP_PIXEL_BITS (sizeof(GP_Pixel) * 8)

/* Generated header */
#include "GP_Pixel.gen.h"

/*
 * Information about ordering of pixels in byte for 1, 2 and 4 bpp 
 * used in a one bit variable in GP_Context 
 */

typedef enum { 	
	/* less significant bits contain pixels with lower indices */ 
	GP_BIT_ENDIAN_LE = 0,
	/* more significant bits contain pixels with lower indices */ 
	GP_BIT_ENDIAN_BE,     
} GP_BIT_ENDIAN; 

/*
 * Description of one channel
 * Assumes all the channel names to be at most 7 chars long
 *
 * The common channel names are:
 *  R, G, B  - as usual
 *  V        - value, for grayscale
 *  A        - opacity (0=transparent)<commit_msg>Add note about "no bit-endian" value<commit_after>/*****************************************************************************
 * This file is part of gfxprim library.                                     *
 *                                                                           *
 * Gfxprim is free software; you can redistribute it and/or                  *
 * modify it under the terms of the GNU Lesser General Public                *
 * License as published by the Free Software Foundation; either              *
 * version 2.1 of the License, or (at your option) any later version.        *
 *                                                                           *
 * Gfxprim 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         *
 * Lesser General Public License for more details.                           *
 *                                                                           *
 * You should have received a copy of the GNU Lesser General Public          *
 * License along with gfxprim; if not, write to the Free Software            *
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,                        *
 * Boston, MA  02110-1301  USA                                               *
 *                                                                           *
 * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos                            *
 *                         <<EMAIL>>                  *
 *                                                                           *
 * Copyright (C) 2009-2011 <NAME> <<EMAIL>>                       *
 *                                                                           *
 * Copyright (C) 2011      <NAME> <<EMAIL>>                  *
 *                                                                           *
 *****************************************************************************/

#ifndef GP_PIXEL_H
#define GP_PIXEL_H

#include <stdbool.h>
#include <stdint.h>

#include "GP_Common.h"
#include "GP_RetCode.h"
#include "GP_FnPerBpp.h"

struct GP_Context;

/*
 *  GP_PixelType  is typedef enum of PixelTypes, 
 * 
 * each named GP_PIXEL_<TYPENAME>, such as GP_PIXEL_RGB888
 * see the beginning of GP_Pixel.gen.h for a complete list
 *
 * The type always contains GP_PIXEL_UNKNOWN = 0 and
 * GP_PIXEL_MAX as the last value (also the number of valid types)
 * The types are numbered to use the entire range 0 .. GP_PIXEL_MAX-1
 */

/*
 * GP_Pixel is just uint32_t
 */
typedef uint32_t GP_Pixel;
#define GP_PIXEL_BITS (sizeof(GP_Pixel) * 8)

/* Generated header */
#include "GP_Pixel.gen.h"

/*
 * Information about ordering of pixels in byte for 1, 2 and 4 bpp 
 * used in a one bit variable in GP_Context 
 */

typedef enum {
	/* less significant bits contain pixels with lower indices */
	/* also used for irrelevant bit-endian */
	GP_BIT_ENDIAN_LE = 0,
	/* more significant bits contain pixels with lower indices */
	GP_BIT_ENDIAN_BE,
} GP_BIT_ENDIAN;

/*
 * Description of one channel
 * Assumes all the channel names to be at most 7 chars long
 *
 * The common channel names are:
 *  R, G, B  - as usual
 *  V        - value, for grayscale
 *  A        - opacity (0=transparent)
{'fraction_non_alphanumeric': 0.11034275405892964, 'fraction_numerical': 0.01503307276007216, 'mean_word_length': 1.3914450035945363, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3358931', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1523, 'n_words': 599}