w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pixman-bits-image.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pixman-private.h"
#include "pixman-combine32.h"
#include "pixman-inlines.h"
#include "dither/blue-noise-64x64.h"
Include dependency graph for pixman-bits-image.c:

Go to the source code of this file.

Classes

struct  fetcher_info_t
 

Typedefs

typedef void(* get_pixel_t) (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)
 
typedef void(* accumulate_pixel_t) (unsigned int *satot, unsigned int *srtot, unsigned int *sgtot, unsigned int *sbtot, const void *pixel, pixman_fixed_t f)
 
typedef void(* reduce_pixel_t) (unsigned int satot, unsigned int srtot, unsigned int sgtot, unsigned int sbtot, void *out)
 
typedef float(* dither_factor_t) (int x, int y)
 

Functions

static void fetch_pixel_no_alpha_32 (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)
 
static void fetch_pixel_no_alpha_float (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)
 
static void bits_image_fetch_pixel_nearest (bits_image_t *image, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out)
 
static void bits_image_fetch_pixel_bilinear_32 (bits_image_t *image, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out)
 
static void bits_image_fetch_pixel_bilinear_float (bits_image_t *image, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out)
 
static void accum_32 (unsigned int *satot, unsigned int *srtot, unsigned int *sgtot, unsigned int *sbtot, const void *p, pixman_fixed_t f)
 
static void reduce_32 (unsigned int satot, unsigned int srtot, unsigned int sgtot, unsigned int sbtot, void *p)
 
static void accum_float (unsigned int *satot, unsigned int *srtot, unsigned int *sgtot, unsigned int *sbtot, const void *p, pixman_fixed_t f)
 
static void reduce_float (unsigned int satot, unsigned int srtot, unsigned int sgtot, unsigned int sbtot, void *p)
 
static void bits_image_fetch_pixel_convolution (bits_image_t *image, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out, accumulate_pixel_t accum, reduce_pixel_t reduce)
 
static void bits_image_fetch_pixel_separable_convolution (bits_image_t *image, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out, accumulate_pixel_t accum, reduce_pixel_t reduce)
 
static void bits_image_fetch_pixel_filtered (bits_image_t *image, pixman_bool_t wide, pixman_fixed_t x, pixman_fixed_t y, get_pixel_t get_pixel, void *out)
 
static uint32_t__bits_image_fetch_affine_no_alpha (pixman_iter_t *iter, pixman_bool_t wide, const uint32_t *mask)
 
static uint32_tbits_image_fetch_affine_no_alpha_32 (pixman_iter_t *iter, const uint32_t *mask)
 
static uint32_tbits_image_fetch_affine_no_alpha_float (pixman_iter_t *iter, const uint32_t *mask)
 
static void fetch_pixel_general_32 (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)
 
static void fetch_pixel_general_float (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)
 
static uint32_t__bits_image_fetch_general (pixman_iter_t *iter, pixman_bool_t wide, const uint32_t *mask)
 
static uint32_tbits_image_fetch_general_32 (pixman_iter_t *iter, const uint32_t *mask)
 
static uint32_tbits_image_fetch_general_float (pixman_iter_t *iter, const uint32_t *mask)
 
static void replicate_pixel_32 (bits_image_t *bits, int x, int y, int width, uint32_t *buffer)
 
static void replicate_pixel_float (bits_image_t *bits, int x, int y, int width, uint32_t *b)
 
static void bits_image_fetch_untransformed_repeat_none (bits_image_t *image, pixman_bool_t wide, int x, int y, int width, uint32_t *buffer)
 
static void bits_image_fetch_untransformed_repeat_normal (bits_image_t *image, pixman_bool_t wide, int x, int y, int width, uint32_t *buffer)
 
static uint32_tbits_image_fetch_untransformed_32 (pixman_iter_t *iter, const uint32_t *mask)
 
static uint32_tbits_image_fetch_untransformed_float (pixman_iter_t *iter, const uint32_t *mask)
 
static void bits_image_property_changed (pixman_image_t *image)
 
void _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter)
 
static uint32_tdest_get_scanline_narrow (pixman_iter_t *iter, const uint32_t *mask)
 
static uint32_tdest_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask)
 
static void dest_write_back_narrow (pixman_iter_t *iter)
 
static const float dither_factor_blue_noise_64 (int x, int y)
 
static const float dither_factor_bayer_8 (int x, int y)
 
static float dither_apply_channel (float f, float d, float s)
 
static float dither_compute_scale (int n_bits)
 
static const uint32_tdither_apply_ordered (pixman_iter_t *iter, dither_factor_t factor)
 
static void dest_write_back_wide (pixman_iter_t *iter)
 
void _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter)
 
static uint32_tcreate_bits (pixman_format_code_t format, int width, int height, int *rowstride_bytes, pixman_bool_t clear)
 
pixman_bool_t _pixman_bits_image_init (pixman_image_t *image, pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride, pixman_bool_t clear)
 
static pixman_image_tcreate_bits_image_internal (pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride_bytes, pixman_bool_t clear)
 
pixman_image_tpixman_image_create_bits (pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride_bytes)
 
pixman_image_tpixman_image_create_bits_no_clear (pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride_bytes)
 

Variables

static const fetcher_info_t fetcher_info []
 

Typedef Documentation

◆ accumulate_pixel_t

typedef void(* accumulate_pixel_t) (unsigned int *satot, unsigned int *srtot, unsigned int *sgtot, unsigned int *sbtot, const void *pixel, pixman_fixed_t f)

Definition at line 249 of file pixman-bits-image.c.

◆ dither_factor_t

typedef float(* dither_factor_t) (int x, int y)

Definition at line 1082 of file pixman-bits-image.c.

◆ get_pixel_t

typedef void(* get_pixel_t) (bits_image_t *image, int x, int y, pixman_bool_t check_bounds, void *out)

Definition at line 70 of file pixman-bits-image.c.

◆ reduce_pixel_t

typedef void(* reduce_pixel_t) (unsigned int satot, unsigned int srtot, unsigned int sgtot, unsigned int sbtot, void *out)

Definition at line 253 of file pixman-bits-image.c.

Function Documentation

◆ __bits_image_fetch_affine_no_alpha()

◆ __bits_image_fetch_general()

◆ _pixman_bits_image_dest_iter_init()

◆ _pixman_bits_image_init()

◆ _pixman_bits_image_src_iter_init()

void _pixman_bits_image_src_iter_init ( pixman_image_t image,
pixman_iter_t iter 
)

◆ accum_32()

static void accum_32 ( unsigned int satot,
unsigned int srtot,
unsigned int sgtot,
unsigned int sbtot,
const void p,
pixman_fixed_t  f 
)
inlinestatic

Definition at line 194 of file pixman-bits-image.c.

References ALPHA_8, BLUE_8, f, GREEN_8, int(), p, and RED_8.

Referenced by bits_image_fetch_pixel_filtered().

◆ accum_float()

static void accum_float ( unsigned int satot,
unsigned int srtot,
unsigned int sgtot,
unsigned int sbtot,
const void p,
pixman_fixed_t  f 
)
inlinestatic

Definition at line 225 of file pixman-bits-image.c.

References pixel::b, f, pixel::g, p, and pixel::r.

Referenced by bits_image_fetch_pixel_filtered().

◆ bits_image_fetch_affine_no_alpha_32()

static uint32_t* bits_image_fetch_affine_no_alpha_32 ( pixman_iter_t iter,
const uint32_t mask 
)
static

Definition at line 531 of file pixman-bits-image.c.

References __bits_image_fetch_affine_no_alpha(), FALSE, and mask.

◆ bits_image_fetch_affine_no_alpha_float()

static uint32_t* bits_image_fetch_affine_no_alpha_float ( pixman_iter_t iter,
const uint32_t mask 
)
static

Definition at line 538 of file pixman-bits-image.c.

References __bits_image_fetch_affine_no_alpha(), mask, and TRUE.

◆ bits_image_fetch_general_32()

static uint32_t* bits_image_fetch_general_32 ( pixman_iter_t iter,
const uint32_t mask 
)
static

Definition at line 700 of file pixman-bits-image.c.

References __bits_image_fetch_general(), FALSE, and mask.

◆ bits_image_fetch_general_float()

static uint32_t* bits_image_fetch_general_float ( pixman_iter_t iter,
const uint32_t mask 
)
static

Definition at line 707 of file pixman-bits-image.c.

References __bits_image_fetch_general(), mask, and TRUE.

◆ bits_image_fetch_pixel_bilinear_32()

static void bits_image_fetch_pixel_bilinear_32 ( bits_image_t image,
pixman_fixed_t  x,
pixman_fixed_t  y,
get_pixel_t  get_pixel,
void out 
)
inlinestatic

◆ bits_image_fetch_pixel_bilinear_float()

static void bits_image_fetch_pixel_bilinear_float ( bits_image_t image,
pixman_fixed_t  x,
pixman_fixed_t  y,
get_pixel_t  get_pixel,
void out 
)
inlinestatic

◆ bits_image_fetch_pixel_convolution()

static void bits_image_fetch_pixel_convolution ( bits_image_t image,
pixman_fixed_t  x,
pixman_fixed_t  y,
get_pixel_t  get_pixel,
void out,
accumulate_pixel_t  accum,
reduce_pixel_t  reduce 
)
inlinestatic

◆ bits_image_fetch_pixel_filtered()

◆ bits_image_fetch_pixel_nearest()

static void bits_image_fetch_pixel_nearest ( bits_image_t image,
pixman_fixed_t  x,
pixman_fixed_t  y,
get_pixel_t  get_pixel,
void out 
)
inlinestatic

◆ bits_image_fetch_pixel_separable_convolution()

static void bits_image_fetch_pixel_separable_convolution ( bits_image_t image,
pixman_fixed_t  x,
pixman_fixed_t  y,
get_pixel_t  get_pixel,
void out,
accumulate_pixel_t  accum,
reduce_pixel_t  reduce 
)
static

◆ bits_image_fetch_untransformed_32()

◆ bits_image_fetch_untransformed_float()

◆ bits_image_fetch_untransformed_repeat_none()

static void bits_image_fetch_untransformed_repeat_none ( bits_image_t image,
pixman_bool_t  wide,
int  x,
int  y,
int  width,
uint32_t buffer 
)
static

◆ bits_image_fetch_untransformed_repeat_normal()

static void bits_image_fetch_untransformed_repeat_normal ( bits_image_t image,
pixman_bool_t  wide,
int  x,
int  y,
int  width,
uint32_t buffer 
)
static

◆ bits_image_property_changed()

static void bits_image_property_changed ( pixman_image_t image)
static

Definition at line 926 of file pixman-bits-image.c.

References _pixman_bits_image_setup_accessors().

Referenced by _pixman_bits_image_init().

◆ create_bits()

◆ create_bits_image_internal()

static pixman_image_t* create_bits_image_internal ( pixman_format_code_t  format,
int  width,
int  height,
uint32_t bits,
int  rowstride_bytes,
pixman_bool_t  clear 
)
static

◆ dest_get_scanline_narrow()

static uint32_t* dest_get_scanline_narrow ( pixman_iter_t iter,
const uint32_t mask 
)
static

◆ dest_get_scanline_wide()

◆ dest_write_back_narrow()

◆ dest_write_back_wide()

◆ dither_apply_channel()

static float dither_apply_channel ( float  f,
float  d,
float  s 
)
inlinestatic

Definition at line 1085 of file pixman-bits-image.c.

References d, f, and s.

Referenced by dither_apply_ordered().

◆ dither_apply_ordered()

◆ dither_compute_scale()

static float dither_compute_scale ( int  n_bits)
inlinestatic

Definition at line 1120 of file pixman-bits-image.c.

References n_bits.

Referenced by dither_apply_ordered().

◆ dither_factor_bayer_8()

static const float dither_factor_bayer_8 ( int  x,
int  y 
)
static

Definition at line 1062 of file pixman-bits-image.c.

References m, cordic::x, and y.

Referenced by dest_write_back_wide().

◆ dither_factor_blue_noise_64()

static const float dither_factor_blue_noise_64 ( int  x,
int  y 
)
static

Definition at line 1055 of file pixman-bits-image.c.

References dither_blue_noise_64x64, m, cordic::x, and y.

Referenced by dest_write_back_wide().

◆ fetch_pixel_general_32()

static void fetch_pixel_general_32 ( bits_image_t image,
int  x,
int  y,
pixman_bool_t  check_bounds,
void out 
)
inlinestatic

Definition at line 546 of file pixman-bits-image.c.

References ALPHA_8, out, ret, cordic::x, and y.

Referenced by __bits_image_fetch_general().

◆ fetch_pixel_general_float()

static void fetch_pixel_general_float ( bits_image_t image,
int  x,
int  y,
pixman_bool_t  check_bounds,
void out 
)
inlinestatic

Definition at line 589 of file pixman-bits-image.c.

References alpha, out, ret, cordic::x, and y.

Referenced by __bits_image_fetch_general().

◆ fetch_pixel_no_alpha_32()

static void fetch_pixel_no_alpha_32 ( bits_image_t image,
int  x,
int  y,
pixman_bool_t  check_bounds,
void out 
)
inlinestatic

Definition at line 43 of file pixman-bits-image.c.

References out, ret, cordic::x, and y.

Referenced by __bits_image_fetch_affine_no_alpha().

◆ fetch_pixel_no_alpha_float()

static void fetch_pixel_no_alpha_float ( bits_image_t image,
int  x,
int  y,
pixman_bool_t  check_bounds,
void out 
)
inlinestatic

Definition at line 57 of file pixman-bits-image.c.

References out, ret, cordic::x, and y.

Referenced by __bits_image_fetch_affine_no_alpha().

◆ pixman_image_create_bits()

◆ pixman_image_create_bits_no_clear()

pixman_image_t* pixman_image_create_bits_no_clear ( pixman_format_code_t  format,
int  width,
int  height,
uint32_t bits,
int  rowstride_bytes 
)

Definition at line 1371 of file pixman-bits-image.c.

References create_bits_image_internal(), FALSE, format, height, and width.

◆ reduce_32()

static void reduce_32 ( unsigned int  satot,
unsigned int  srtot,
unsigned int  sgtot,
unsigned int  sbtot,
void p 
)
inlinestatic

Definition at line 206 of file pixman-bits-image.c.

References CLIP, p, and ret.

Referenced by bits_image_fetch_pixel_filtered().

◆ reduce_float()

static void reduce_float ( unsigned int  satot,
unsigned int  srtot,
unsigned int  sgtot,
unsigned int  sbtot,
void p 
)
inlinestatic

Definition at line 237 of file pixman-bits-image.c.

References CLIP, p, and ret.

Referenced by bits_image_fetch_pixel_filtered().

◆ replicate_pixel_32()

static void replicate_pixel_32 ( bits_image_t bits,
int  x,
int  y,
int  width,
uint32_t buffer 
)
static

Definition at line 714 of file pixman-bits-image.c.

References end, width, cordic::x, and y.

Referenced by bits_image_fetch_untransformed_repeat_normal().

◆ replicate_pixel_float()

static void replicate_pixel_float ( bits_image_t bits,
int  x,
int  y,
int  width,
uint32_t b 
)
static

Definition at line 731 of file pixman-bits-image.c.

References b, end, width, cordic::x, and y.

Referenced by bits_image_fetch_untransformed_repeat_normal().

Variable Documentation

◆ fetcher_info

const fetcher_info_t fetcher_info[]
static
Initial value:
=
{
{ ((( 0 ) << 24) | (( 5 ) << 16) | (( 0 ) << 12) | (( 0 ) << 8) | (( 0 ) << 4) | (( 0 ))) ,
( (1 << 1) |
(1 << 0) |
(1 << 2) |
(1 << 3) |
(1 << 4) ),
},
{ ((( 0 ) << 24) | (( 5 ) << 16) | (( 0 ) << 12) | (( 0 ) << 8) | (( 0 ) << 4) | (( 0 ))) ,
( (1 << 1) | (1 << 12) | (1 << 17) ),
},
{ ((( 0 ) << 24) | (( 5 ) << 16) | (( 0 ) << 12) | (( 0 ) << 8) | (( 0 ) << 4) | (( 0 ))) ,
0,
},
{ ((( 0 ) << 24) | (( 0 ) << 16) | (( 0 ) << 12) | (( 0 ) << 8) | (( 0 ) << 4) | (( 0 ))) },
}
static uint32_t * bits_image_fetch_affine_no_alpha_32(pixman_iter_t *iter, const uint32_t *mask)
static uint32_t * bits_image_fetch_general_float(pixman_iter_t *iter, const uint32_t *mask)
static uint32_t * bits_image_fetch_affine_no_alpha_float(pixman_iter_t *iter, const uint32_t *mask)
static uint32_t * bits_image_fetch_untransformed_32(pixman_iter_t *iter, const uint32_t *mask)
static uint32_t * bits_image_fetch_untransformed_float(pixman_iter_t *iter, const uint32_t *mask)
static uint32_t * bits_image_fetch_general_32(pixman_iter_t *iter, const uint32_t *mask)

Definition at line 896 of file pixman-bits-image.c.

Referenced by _pixman_bits_image_src_iter_init().