summaryrefslogtreecommitdiff
path: root/libopenjpeg/j2k.h
diff options
context:
space:
mode:
authorParvatha Elangovan <p.elangovan@intopix.com>2007-03-20 17:15:18 +0000
committerParvatha Elangovan <p.elangovan@intopix.com>2007-03-20 17:15:18 +0000
commit694a173adb14a7724a37f942a9183fccd2766657 (patch)
tree738aaad0db62dc8a2c3db3660a4b11d26f25ede5 /libopenjpeg/j2k.h
parent8bc6da2ffad5f98481fbc86e672b6ffcdbd99b85 (diff)
Added feature for generation of tile parts. Modifications in image_to_j2k.c, openjpeg.c, j2k.c, pi.c
Added function j2k_write_tlm(),to generate TLM marker for a Digital cinema compliant codestream. Modifications in j2k.c.
Diffstat (limited to 'libopenjpeg/j2k.h')
-rw-r--r--libopenjpeg/j2k.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libopenjpeg/j2k.h b/libopenjpeg/j2k.h
index 5f8e0824..639fbcef 100644
--- a/libopenjpeg/j2k.h
+++ b/libopenjpeg/j2k.h
@@ -5,6 +5,7 @@
* Copyright (c) 2002-2003, Yannick Verschueren
* Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
* Copyright (c) 2005, Herve Drolon, FreeImage Team
+ * Copyright (c) 2006-2007, Parvatha Elangovan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -193,6 +194,12 @@ typedef struct opj_cp {
int img_size;
/** Rsiz*/
OPJ_RSIZ_CAPABILITIES rsiz;
+ /** Enabling Tile part generation*/
+ char tp_on;
+ /** Flag determining tile part generation*/
+ char tp_flag;
+ /** Position of tile part flag in progression order*/
+ int tp_pos;
/** allocation by rate/distortion */
int disto_alloc;
/** allocation by fixed layer */
@@ -384,6 +391,18 @@ typedef struct opj_j2k {
int state;
/** number of the tile curently concern by coding/decoding */
int curtileno;
+ /** Tilepart number currently coding*/
+ int cur_tp_num;
+ /** Total number of tileparts of the current tile*/
+ int cur_totnum_tp;
+ /**
+ locate the start position of the TLM marker
+ after encoding the tilepart, a jump (in j2k_write_sod) is done to the TLM marker to store the value of its length.
+ */
+ int tlm_start;
+ /** Total num of tile parts in whole image = num tiles* num tileparts in each tile*/
+ /** used in TLMmarker*/
+ int totnum_tp;
/**
locate the position of the end of the tile in the codestream,
used to detect a truncated codestream (in j2k_read_sod)
@@ -474,6 +493,14 @@ Coding parameters are returned in j2k->cp.
*/
void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image);
/**
+Converts an enum type progression order to string type
+*/
+char *convert_progression_order(OPJ_PROG_ORDER prg_order);
+/**
+Generates the number of tile parts for the current tile
+*/
+int j2k_get_num_tp(opj_cp_t *cp,int pino,int tileno);
+/**
Encode an image into a JPEG-2000 codestream
@param j2k J2K compressor handle
@param cio Output buffer stream