kimted9 / openjpeg

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

compression: strange precinct dimensions #466

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 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

GoogleCodeExporter commented 8 years ago
Bump.  

According to DCI spec:

Precinct sizes at all resolutions are set to be
256x256, except for the lowest frequency subband,
where a precinct size of 128x128 is used.

However, in OpenJPEG, all precincts are set to 128x128, as can be seen by code 
above.  

Original comment by boxe...@gmail.com on 1 Jun 2015 at 4:33

GoogleCodeExporter commented 8 years ago
ok, my bad.  These are the dimensions for the band precincts, which are half 
the dimension of the resolution precincts.   So, this is correct.

You may close this issue please.

Original comment by boxe...@gmail.com on 1 Jun 2015 at 12:05

GoogleCodeExporter commented 8 years ago
Marking as invalid as per Aaron comment.

Original comment by m.darb...@gmail.com on 1 Jun 2015 at 4:03