scanline.c File Reference

#include "config.h"
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdarg.h>
#include "afterbase.h"
#include "scanline.h"

Go to the source code of this file.

Defines

#define LOCAL_DEBUG
#define ASIM_ChooseInterpolationGradient(g1, g2)   ((g1/16)*(g1/16)>(g2/16)*(g2/16)?(g1):(g2))

Typedefs

typedef void(*) ASIMDiagInterpolationFunc (CARD32 *dst, CARD32 **channs, int width, int offset)

Functions

ASScanlineprepare_scanline (unsigned int width, unsigned int shift, ASScanline *reusable_memory, Bool BGR_mode)
void free_scanline (ASScanline *sl, Bool reusable)
void destroy_asim_strip (ASIMStrip **pstrip)
ASIMStripcreate_asim_strip (unsigned int size, unsigned int width, int shift, int bgr)
void advance_asim_strip (ASIMStrip *strip)
int load_asim_strip (ASIMStrip *strip, CARD8 *data, int data_size, int data_start_line, int data_row_size, ASIMStripLoader *line_loaders, int line_loaders_num)
static int decode_12_be (CARD32 *c1, CARD32 *c2, CARD8 *data, int width, int data_size)
void decode_BG_12_be (ASScanline *scl, CARD8 *data, int data_size)
void decode_GR_12_be (ASScanline *scl, CARD8 *data, int data_size)
void decode_RG_12_be (ASScanline *scl, CARD8 *data, int data_size)
void decode_GB_12_be (ASScanline *scl, CARD8 *data, int data_size)
void interpolate_channel_v_15x51 (CARD32 *dst, CARD32 **channs, int width, int offset)
void interpolate_channel_v_checkered_15x51 (CARD32 *dst, CARD32 **channs, int width, int offset)
void smooth_channel_v_15x51 (CARD32 *dst, CARD32 **channs, int width, int offset)
void interpolate_channel_h_105x501 (CARD32 *chan, int width)
void interpolate_channel_h_grad3 (CARD32 *c1, CARD32 *c2, int width)
void print_16bit_chan (CARD32 *chan, int width)
Bool interpolate_asim_strip_gradients (ASIMStrip *strip, int line, int chan_from, int chan_to, int offset, ASIMDiagInterpolationFunc func)
static int * checkalloc_diff_aux_data (ASIMStrip *strip, int line)
void interpolate_channel_hv_adaptive_1x1 (CARD32 *above, CARD32 *dst, CARD32 *below, int width, int offset)
Bool calculate_green_diff (ASIMStrip *strip, int line, int chan, int offset)
Bool interpolate_green_diff (ASIMStrip *strip, int line, int chan, int offset)
Bool interpolate_from_green_diff (ASIMStrip *strip, int line, int chan, int offset)
void interpolate_asim_strip_custom_rggb2 (ASIMStrip *strip, ASFlagType filter, Bool force_all)


Define Documentation

#define ASIM_ChooseInterpolationGradient ( g1,
g2   )     ((g1/16)*(g1/16)>(g2/16)*(g2/16)?(g1):(g2))

Definition at line 315 of file scanline.c.

#define LOCAL_DEBUG

Definition at line 25 of file scanline.c.


Typedef Documentation

typedef void(*) ASIMDiagInterpolationFunc(CARD32 *dst, CARD32 **channs, int width, int offset)

Definition at line 313 of file scanline.c.


Function Documentation

void advance_asim_strip ( ASIMStrip strip  ) 

Definition at line 182 of file scanline.c.

References ASIMStrip::aux_data, ASScanline::flags, i, ASIMStrip::lines, ASIMStrip::size, and ASIMStrip::start_line.

Referenced by tiff2ASImage().

Bool calculate_green_diff ( ASIMStrip strip,
int  line,
int  chan,
int  offset 
)

Definition at line 533 of file scanline.c.

References ARGB32_BLUE_CHAN, ASScanline::channels, checkalloc_diff_aux_data(), False, green, ASScanline::green, int, ASIMStrip::lines, NULL, True, ASScanline::width, width, and x.

static int* checkalloc_diff_aux_data ( ASIMStrip strip,
int  line 
) [inline, static]

Definition at line 489 of file scanline.c.

References ASIMStrip::aux_data, ASIMStrip::lines, NULL, safemalloc, and ASScanline::width.

Referenced by calculate_green_diff(), and interpolate_green_diff().

ASIMStrip* create_asim_strip ( unsigned int  size,
unsigned int  width,
int  shift,
int  bgr 
)

Definition at line 144 of file scanline.c.

References ASIMStrip::aux_data, destroy_asim_strip(), free(), i, int, ASIMStrip::lines, NULL, prepare_scanline(), safecalloc, ASIMStrip::size, ASIMStrip::start_line, and ASIMStrip::width.

Referenced by tiff2ASImage().

static int decode_12_be ( CARD32 *  c1,
CARD32 *  c2,
CARD8 *  data,
int  width,
int  data_size 
) [static]

Definition at line 236 of file scanline.c.

References ASIM_SCL_MissingValue, fprintf(), and x.

Referenced by decode_BG_12_be(), decode_GB_12_be(), decode_GR_12_be(), and decode_RG_12_be().

void decode_BG_12_be ( ASScanline scl,
CARD8 *  data,
int  data_size 
)

Definition at line 288 of file scanline.c.

References ASScanline::blue, decode_12_be(), ASScanline::flags, ASScanline::green, SCL_DO_BLUE, SCL_DO_GREEN, set_flags, and ASScanline::width.

Referenced by tiff2ASImage().

void decode_GB_12_be ( ASScanline scl,
CARD8 *  data,
int  data_size 
)

Definition at line 306 of file scanline.c.

References ASScanline::blue, decode_12_be(), ASScanline::flags, ASScanline::green, SCL_DO_BLUE, SCL_DO_GREEN, set_flags, and ASScanline::width.

Referenced by tiff2ASImage().

void decode_GR_12_be ( ASScanline scl,
CARD8 *  data,
int  data_size 
)

Definition at line 294 of file scanline.c.

References decode_12_be(), ASScanline::flags, ASScanline::green, ASScanline::red, SCL_DO_GREEN, SCL_DO_RED, set_flags, and ASScanline::width.

Referenced by tiff2ASImage().

void decode_RG_12_be ( ASScanline scl,
CARD8 *  data,
int  data_size 
)

Definition at line 300 of file scanline.c.

References decode_12_be(), ASScanline::flags, ASScanline::green, ASScanline::red, SCL_DO_GREEN, SCL_DO_RED, set_flags, and ASScanline::width.

Referenced by tiff2ASImage().

void destroy_asim_strip ( ASIMStrip **  pstrip  ) 

Definition at line 116 of file scanline.c.

References ASIMStrip::aux_data, False, for(), free(), free_scanline(), i, ASIMStrip::lines, NULL, and ASIMStrip::size.

Referenced by create_asim_strip(), and tiff2ASImage().

void free_scanline ( ASScanline sl,
Bool  reusable 
)

Definition at line 103 of file scanline.c.

References ASScanline::buffer, and free().

Referenced by asimage2alpha_ximage(), asimage2ximage_ext(), bitmap2asimage(), bmp2ASImage(), close_xpm_file(), convert_argb2ASImage(), destroy_asim_strip(), DIB2ASImage(), flip_asimage(), free_xcf_image(), ico2ASImage(), jpeg2ASImage(), make_gradient(), make_gradient_diag_height(), make_gradient_top2bottom(), mirror_asimage(), pad_asimage(), pixelize_asimage(), png2ASImage_int(), ppm2ASImage(), read_xcf_hierarchy(), scale_image_down(), scale_image_up(), scale_image_up_dumb(), slice_asimage2(), stop_image_decoding(), stop_image_output(), subimage2ximage(), and tga2ASImage().

void interpolate_asim_strip_custom_rggb2 ( ASIMStrip strip,
ASFlagType  filter,
Bool  force_all 
)

Definition at line 642 of file scanline.c.

References ASIM_SCL_InterpolatedH, ASIM_SCL_InterpolatedV, ASScanline::channels, copy_component(), ASScanline::flags, get_flags, IC_NUM_CHANNELS, interpolate_channel_h_105x501(), line, ASIMStrip::lines, set_flags, ASScanline::width, and x01.

Referenced by tiff2ASImage().

Bool interpolate_asim_strip_gradients ( ASIMStrip strip,
int  line,
int  chan_from,
int  chan_to,
int  offset,
ASIMDiagInterpolationFunc  func 
)

Definition at line 437 of file scanline.c.

References ASScanline::channels, False, ASScanline::flags, fprintf(), func(), get_flags, i, ASIMStrip::lines, NULL, print_16bit_chan(), size, ASIMStrip::start_line, True, ASScanline::width, and x01.

void interpolate_channel_h_105x501 ( CARD32 *  chan,
int  width 
)

Definition at line 356 of file scanline.c.

References ASIM_IsMissingValue, int, and x.

Referenced by interpolate_asim_strip_custom_rggb2().

void interpolate_channel_h_grad3 ( CARD32 *  c1,
CARD32 *  c2,
int  width 
)

Definition at line 398 of file scanline.c.

References ASIM_IsMissingValue, int, and x.

void interpolate_channel_hv_adaptive_1x1 ( CARD32 *  above,
CARD32 *  dst,
CARD32 *  below,
int  width,
int  offset 
)

Definition at line 497 of file scanline.c.

References b, l, t, and x.

void interpolate_channel_v_15x51 ( CARD32 *  dst,
CARD32 **  channs,
int  width,
int  offset 
)

Definition at line 318 of file scanline.c.

References x.

void interpolate_channel_v_checkered_15x51 ( CARD32 *  dst,
CARD32 **  channs,
int  width,
int  offset 
)

Definition at line 330 of file scanline.c.

References x.

Bool interpolate_from_green_diff ( ASIMStrip strip,
int  line,
int  chan,
int  offset 
)

Definition at line 616 of file scanline.c.

References ARGB32_BLUE_CHAN, ASIMStrip::aux_data, ASScanline::channels, False, green, ASScanline::green, ASIMStrip::lines, NULL, True, ASScanline::width, width, and x.

Bool interpolate_green_diff ( ASIMStrip strip,
int  line,
int  chan,
int  offset 
)

Definition at line 584 of file scanline.c.

References ARGB32_BLUE_CHAN, ARGB32_RED_CHAN, ASIM_SCL_BGDiffCalculated, ASIM_SCL_RGDiffCalculated, ASIMStrip::aux_data, checkalloc_diff_aux_data(), False, flag, ASScanline::flags, get_flags, ASIMStrip::lines, NULL, size, True, ASScanline::width, and x.

int load_asim_strip ( ASIMStrip strip,
CARD8 *  data,
int  data_size,
int  data_start_line,
int  data_row_size,
ASIMStripLoader line_loaders,
int  line_loaders_num 
)

Definition at line 205 of file scanline.c.

References ASIM_IsStripLineLoaded, line, ASIMStrip::lines, NULL, size, and ASIMStrip::start_line.

Referenced by tiff2ASImage().

ASScanline* prepare_scanline ( unsigned int  width,
unsigned int  shift,
ASScanline reusable_memory,
Bool  BGR_mode 
)

Definition at line 47 of file scanline.c.

References ASScanline::alpha, ARGB32_DEFAULT_BACK_COLOR, ASScanline::back_color, ASScanline::blue, ASScanline::buffer, ASScanline::channels, free(), ASScanline::green, IC_ALPHA, IC_BLUE, IC_GREEN, IC_RED, NULL, ptr, ASScanline::red, safecalloc, ASScanline::shift, size_t, ASScanline::width, ASScanline::xc1, ASScanline::xc2, and ASScanline::xc3.

Referenced by asimage2alpha_ximage(), asimage2ximage_ext(), bitmap2asimage(), blur_asimage_gauss(), check_asimage_alpha(), colorize_asimage_vector(), convert_argb2ASImage(), create_asim_strip(), DIB2ASImage(), flip_asimage(), TASImage::Gray(), jpeg2ASImage(), make_gradient(), make_gradient_diag_height(), make_gradient_top2bottom(), merge_layers(), mirror_asimage(), open_xpm_data(), open_xpm_file(), open_xpm_raw_data(), pad_asimage(), picture_ximage2asimage(), pixelize_asimage(), png2ASImage_int(), ppm2ASImage(), read_bmp_image(), read_xcf_hierarchy(), read_xcf_image(), scale_image_down(), scale_image_up(), scale_image_up_dumb(), slice_asimage2(), start_image_decoding(), start_image_output(), subimage2ximage(), and tga2ASImage().

void print_16bit_chan ( CARD32 *  chan,
int  width 
)

Definition at line 425 of file scanline.c.

References fprintf(), and x.

Referenced by interpolate_asim_strip_gradients().

void smooth_channel_v_15x51 ( CARD32 *  dst,
CARD32 **  channs,
int  width,
int  offset 
)

Definition at line 343 of file scanline.c.

References x.


Generated on Tue Jul 5 15:58:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1