diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-09 14:56:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-12 16:13:30 +0300 |
commit | f12204196fb1ee985ab9745cf9c70877601145f9 (patch) | |
tree | 9a0ea8bb9eaa869a9e4b9c74b80f8dd5b86b0394 /extern/libopenjpeg/t1.h | |
parent | 57983012913f98056315dd3fb03552f5d75258d7 (diff) |
OpenJPEG: update to 2.1 from 1.5
Stream handling has changed so this required changes to how files & memory are accessed.
Diffstat (limited to 'extern/libopenjpeg/t1.h')
-rw-r--r-- | extern/libopenjpeg/t1.h | 70 |
1 files changed, 43 insertions, 27 deletions
diff --git a/extern/libopenjpeg/t1.h b/extern/libopenjpeg/t1.h index 572ec88d2f6..e5be70ed5be 100644 --- a/extern/libopenjpeg/t1.h +++ b/extern/libopenjpeg/t1.h @@ -1,9 +1,15 @@ /* - * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium - * Copyright (c) 2002-2007, Professor Benoit Macq + * The copyright in this software is being made available under the 2-clauses + * BSD License, included below. This software may be subject to other third + * party and contributor rights, including patent rights, and no such rights + * are granted under this license. + * + * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium + * Copyright (c) 2002-2014, Professor Benoit Macq * Copyright (c) 2001-2003, David Janssens * Copyright (c) 2002-2003, Yannick Verschueren - * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe + * Copyright (c) 2003-2007, Francois-Olivier Devaux + * Copyright (c) 2003-2014, Antonin Descampe * Copyright (c) 2005, Herve Drolon, FreeImage Team * All rights reserved. * @@ -85,27 +91,25 @@ in T1.C are used by some function in TCD.C. /* ----------------------------------------------------------------------- */ -typedef short flag_t; +typedef OPJ_INT16 opj_flag_t; /** Tier-1 coding (coding of code-block coefficients) */ typedef struct opj_t1 { - /** codec context */ - opj_common_ptr cinfo; /** MQC component */ opj_mqc_t *mqc; /** RAW component */ opj_raw_t *raw; - int *data; - flag_t *flags; - int w; - int h; - int datasize; - int flagssize; - int flags_stride; + OPJ_INT32 *data; + opj_flag_t *flags; + OPJ_UINT32 w; + OPJ_UINT32 h; + OPJ_UINT32 datasize; + OPJ_UINT32 flagssize; + OPJ_UINT32 flags_stride; } opj_t1_t; #define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)] @@ -113,32 +117,44 @@ typedef struct opj_t1 { /** @name Exported functions */ /*@{*/ /* ----------------------------------------------------------------------- */ -/** -Create a new T1 handle -and initialize the look-up tables of the Tier-1 coder/decoder -@return Returns a new T1 handle if successful, returns NULL otherwise -@see t1_init_luts -*/ -opj_t1_t* t1_create(opj_common_ptr cinfo); -/** -Destroy a previously created T1 handle -@param t1 T1 handle to destroy -*/ -void t1_destroy(opj_t1_t *t1); + /** Encode the code-blocks of a tile @param t1 T1 handle @param tile The tile to encode @param tcp Tile coding parameters +@param mct_norms FIXME DOC */ -void t1_encode_cblks(opj_t1_t *t1, opj_tcd_tile_t *tile, opj_tcp_t *tcp); +OPJ_BOOL opj_t1_encode_cblks( opj_t1_t *t1, + opj_tcd_tile_t *tile, + opj_tcp_t *tcp, + const OPJ_FLOAT64 * mct_norms); + /** Decode the code-blocks of a tile @param t1 T1 handle @param tilec The tile to decode @param tccp Tile coding parameters */ -void t1_decode_cblks(opj_t1_t* t1, opj_tcd_tilecomp_t* tilec, opj_tccp_t* tccp); +OPJ_BOOL opj_t1_decode_cblks( opj_t1_t* t1, + opj_tcd_tilecomp_t* tilec, + opj_tccp_t* tccp); + + + +/** + * Creates a new Tier 1 handle + * and initializes the look-up tables of the Tier-1 coder/decoder + * @return a new T1 handle if successful, returns NULL otherwise +*/ +opj_t1_t* opj_t1_create(void); + +/** + * Destroys a previously created T1 handle + * + * @param p_t1 Tier 1 handle to destroy +*/ +void opj_t1_destroy(opj_t1_t *p_t1); /* ----------------------------------------------------------------------- */ /*@}*/ |