summaryrefslogtreecommitdiff
path: root/libopenjpeg/tcd.c
diff options
context:
space:
mode:
authorParvatha Elangovan <p.elangovan@intopix.com>2007-04-04 13:40:32 +0000
committerParvatha Elangovan <p.elangovan@intopix.com>2007-04-04 13:40:32 +0000
commitdd18811600365adc935a5f72d985bac43a01377f (patch)
treed271c8840c7fbc73a1bd5149ff1b1e03350b1a4d /libopenjpeg/tcd.c
parent24146a96cfafddb9f5fff0983a7a9602dd5040bd (diff)
Digital cinema compliance for 4K chosen by "-cinema4K" option. Modification in image_to_j2k.c.
Bit rate limitation for each color component. Modification in image_to_j2k.c, t2.c. Modified and tested Progression order change "-POC" option. Modification in image_to_j2k.c, j2k.c, pi.c. Function j2k_check_poc_val() to check for possible loss of packets in case of wrong POC declaration. Modification in j2k.c. Structure T2_MODE. This tells if the t2_encode_packets() is called during Threshold calculation or in Final pass. Modification in j2k.h, tcd.c
Diffstat (limited to 'libopenjpeg/tcd.c')
-rw-r--r--libopenjpeg/tcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c
index af789588..06f021b3 100644
--- a/libopenjpeg/tcd.c
+++ b/libopenjpeg/tcd.c
@@ -1043,7 +1043,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
if (cp->fixed_quality) { /* fixed_quality */
if(cp->cinema){
- l = t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,0);
+ l = t2_encode_packets(t2,tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC);
if (l == -999) {
lo = thresh;
continue;
@@ -1069,7 +1069,7 @@ bool tcd_rateallocate(opj_tcd_t *tcd, unsigned char *dest, int len, opj_image_in
lo = thresh;
}
} else {
- l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,0);
+ l = t2_encode_packets(t2, tcd->tcd_tileno, tcd_tile, layno + 1, dest, maxlen, image_info,tcd->cur_tp_num,tcd->tp_pos,tcd->cur_pino,THRESH_CALC);
/* TODO: what to do with l ??? seek / tell ??? */
/* opj_event_msg(tcd->cinfo, EVT_INFO, "rate alloc: len=%d, max=%d\n", l, maxlen); */
if (l == -999) {
@@ -1233,7 +1233,7 @@ int tcd_encode_tile(opj_tcd_t *tcd, int tileno, unsigned char *dest, int len, op
}
t2 = t2_create(tcd->cinfo, image, cp);
- l = t2_encode_packets(t2,tileno, tile, tcd_tcp->numlayers, dest, len, image_info,tcd->tp_num,tcd->tp_pos,tcd->cur_pino,1);
+ l = t2_encode_packets(t2,tileno, tile, tcd_tcp->numlayers, dest, len, image_info,tcd->tp_num,tcd->tp_pos,tcd->cur_pino,FINAL_PASS);
t2_destroy(t2);
/*---------------CLEAN-------------------*/