Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compression: strange precinct dimensions #466

Closed
gcode-importer opened this issue Dec 25, 2014 · 3 comments
Closed

compression: strange precinct dimensions #466

gcode-importer opened this issue Dec 25, 2014 · 3 comments
Assignees

Comments

@gcode-importer
Copy link

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

@gcode-importer
Copy link
Author

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.

Reported by boxerab on 2015-06-01 04:33:57

  • Labels added: Priority-High
  • Labels removed: Priority-Medium

@gcode-importer
Copy link
Author

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.

Reported by boxerab on 2015-06-01 12:05:30

@gcode-importer
Copy link
Author

Marking as invalid as per Aaron comment.

Reported by mayeut on 2015-06-01 16:03:45

  • Status changed: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant