amitkumar3968 / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

compression: strange precinct dimensions #466

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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;
}

Original issue reported on code.google.com by boxe...@gmail.com on 25 Dec 2014 at 2:46