C# Класс BitMiracle.LibJpeg.Classic.Internal.my_upsampler

Наследование: jpeg_upsampler
Показать файл Открыть проект

Открытые методы

Метод Описание
my_upsampler ( jpeg_decompress_struct cinfo )
start_pass ( ) : void

Initialize for an upsampling pass.

upsample ( ComponentBuffer input_buf, int &in_row_group_ctr, int in_row_groups_avail, byte output_buf, int &out_row_ctr, int out_rows_avail ) : void

Control routine to do upsampling (and color conversion). In this version we upsample each component independently. We upsample one row group into the conversion buffer, then apply color conversion a row at a time.

Приватные методы

Метод Описание
fullsize_upsample ( ComponentBuffer &input_data ) : void

For full-size components, we just make color_buf[ci] point at the input buffer, and thus avoid copying any data. Note that this is safe only because sep_upsample doesn't declare the input row group "consumed" until we are done color converting and emitting it.

h2v1_upsample ( ComponentBuffer &input_data ) : void

Fast processing for the common case of 2:1 horizontal and 1:1 vertical. It's still a box filter.

h2v2_upsample ( ComponentBuffer &input_data ) : void

Fast processing for the common case of 2:1 horizontal and 2:1 vertical. It's still a box filter.

int_upsample ( ComponentBuffer &input_data ) : void

This version handles any integral sampling ratios. This is not used for typical JPEG files, so it need not be fast. Nor, for that matter, is it particularly accurate: the algorithm is simple replication of the input pixel onto the corresponding output pixels. The hi-falutin sampling literature refers to this as a "box filter". A box filter tends to introduce visible artifacts, so if you are actually going to use 3:1 or 4:1 sampling ratios you would be well advised to improve this code.

noop_upsample ( ) : void

This is a no-op version used for "uninteresting" components. These components will not be referenced by color conversion.

upsampleComponent ( ComponentBuffer &input_data ) : void

Описание методов

my_upsampler() публичный Метод

public my_upsampler ( jpeg_decompress_struct cinfo )
cinfo jpeg_decompress_struct

start_pass() публичный Метод

Initialize for an upsampling pass.
public start_pass ( ) : void
Результат void

upsample() публичный Метод

Control routine to do upsampling (and color conversion). In this version we upsample each component independently. We upsample one row group into the conversion buffer, then apply color conversion a row at a time.
public upsample ( ComponentBuffer input_buf, int &in_row_group_ctr, int in_row_groups_avail, byte output_buf, int &out_row_ctr, int out_rows_avail ) : void
input_buf ComponentBuffer
in_row_group_ctr int
in_row_groups_avail int
output_buf byte
out_row_ctr int
out_rows_avail int
Результат void