From c101f8049c23a01fa0d37e0eb586c7dff6c75869 Mon Sep 17 00:00:00 2001
From: Parvatha Elangovan
Date: Fri, 24 Aug 2007 15:11:01 +0000
Subject: [PATCH] The end of main header is calculated after TLM and POC marker
for Dcinema.
---
ChangeLog | 3 +++
libopenjpeg/j2k.c | 13 +++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d3e9760b..0fc696a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
+August 24, 2007
+* [Parvatha] The end of main header is calculated after TLM and POC marker for Dcinema.
+
August 21, 2007
+ [FOD] Added support for Visual Studio 2005
* [FOD] Robustified MJ2 codecs
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c
index f013f79a..c380782f 100644
--- a/libopenjpeg/j2k.c
+++ b/libopenjpeg/j2k.c
@@ -2484,12 +2484,7 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *index)
if (cp->comment != NULL) {
j2k_write_com(j2k);
}
- /* INDEX >> */
- if(image_info && image_info->index_on) {
- image_info->main_head_end = cio_tell(cio) - 1;
- }
- /* << INDEX */
-
+
j2k->totnum_tp = j2k_calculate_tp(cp,image->numcomps,image,j2k);
/* TLM Marker*/
if(cp->cinema){
@@ -2498,6 +2493,12 @@ bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, char *index)
j2k_write_poc(j2k);
}
}
+
+ /* INDEX >> */
+ if(image_info && image_info->index_on) {
+ image_info->main_head_end = cio_tell(cio) - 1;
+ }
+ /* << INDEX */
/**** Main Header ENDS here ***/
/* create the tile encoder */