Skip to content

compression: strange precinct dimensions #466

Closed
@gcode-importer

Description

Originally reported on Google Code with ID 466

When compressing, precinct width and height for all resolutions except highest resolution
are set to half the value specified in command line.

This seems quite strange to me, particularly when certain specs such as DCP require
fixed precinct size of 256x256.

See this code in tcd.c :

if (resno == 0) {
    tlcbgxstart = l_tl_prc_x_start;
    tlcbgystart = l_tl_prc_y_start;
    /*brcbgxend = l_br_prc_x_end;*/
    /* brcbgyend = l_br_prc_y_end;*/
    cbgwidthexpn = l_pdx;
    cbgheightexpn = l_pdy;
    l_res->numbands = 1;
}
else {
    tlcbgxstart = opj_int_ceildivpow2(l_tl_prc_x_start, 1);
    tlcbgystart = opj_int_ceildivpow2(l_tl_prc_y_start, 1);
    /*brcbgxend = opj_int_ceildivpow2(l_br_prc_x_end, 1);*/
    /*brcbgyend = opj_int_ceildivpow2(l_br_prc_y_end, 1);*/
    cbgwidthexpn = l_pdx - 1;
    cbgheightexpn = l_pdy - 1;
    l_res->numbands = 3;
}

Reported by boxerab on 2014-12-25 14:46:50

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions