Méthode | Description | |
---|---|---|
my_upsampler ( jpeg_decompress_struct cinfo ) | ||
start_pass ( ) : void |
Initialize for an upsampling pass.
|
|
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.
|
Méthode | Description | |
---|---|---|
fullsize_upsample ( |
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 ( |
Fast processing for the common case of 2:1 horizontal and 1:1 vertical. It's still a box filter.
|
|
h2v2_upsample ( |
Fast processing for the common case of 2:1 horizontal and 2:1 vertical. It's still a box filter.
|
|
int_upsample ( |
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 ( |
public my_upsampler ( jpeg_decompress_struct cinfo ) | ||
cinfo | jpeg_decompress_struct |
public upsample ( |
||
input_buf | ||
in_row_group_ctr | int | |
in_row_groups_avail | int | |
output_buf | byte | |
out_row_ctr | int | |
out_rows_avail | int | |
Résultat | void |