Class FileJPEG2000


  • public class FileJPEG2000
    extends FileBase
    • Constructor Detail

      • FileJPEG2000

        public FileJPEG2000​(java.lang.String inputImageDirectory,
                            java.lang.String outputFormatExtension,
                            java.lang.String compressedFile,
                            java.lang.String decompressedFile,
                            int reduceFactor,
                            int qualityLayers,
                            java.lang.String indexName,
                            boolean decodingArea,
                            int x0,
                            int y0,
                            int x1,
                            int y1,
                            int tileIndex,
                            int component0Precision,
                            int mode0,
                            int component1Precision,
                            int mode1,
                            int component2Precision,
                            int mode2,
                            boolean forceRGB,
                            boolean upsample,
                            boolean splitPNM,
                            boolean useJPWL,
                            boolean JPWLCorrection,
                            int JPWLNumComponents,
                            int JPWLMaximumTiles,
                            boolean JPWLAssume,
                            boolean OPJ_DISABLE_TPSOT_FIX,
                            boolean MQC_PERF_OPT,
                            boolean useMJ2,
                            boolean OPJ_HAVE_LIBLCMS1,
                            boolean OPJ_HAVE_LIBLCMS2)
      • FileJPEG2000

        public FileJPEG2000()
    • Method Detail

      • selfTest

        public void selfTest()
      • opj_decompress_main

        public boolean opj_decompress_main()
        OPJ_DECOMPRESS MAIN
      • opj_j2k_decode_tiles

        private boolean opj_j2k_decode_tiles​(FileJPEG2000.opj_j2k_t p_j2k,
                                             java.io.RandomAccessFile p_stream)
      • opj_stream_get_number_byte_left

        private long opj_stream_get_number_byte_left​(java.io.RandomAccessFile p_stream)
      • opj_j2k_read_tile_header

        private boolean opj_j2k_read_tile_header​(FileJPEG2000.opj_j2k_t p_j2k,
                                                 int[] p_tile_index,
                                                 int[] p_data_size,
                                                 int[] p_tile_x0,
                                                 int[] p_tile_y0,
                                                 int[] p_tile_x1,
                                                 int[] p_tile_y1,
                                                 int[] p_nb_comps,
                                                 boolean[] p_go_on,
                                                 java.io.RandomAccessFile p_stream)
      • opj_j2k_decode_tile

        private boolean opj_j2k_decode_tile​(FileJPEG2000.opj_j2k_t p_j2k,
                                            int p_tile_index,
                                            byte[] p_data,
                                            int[] p_data_ptr,
                                            int p_data_size,
                                            java.io.RandomAccessFile p_stream)
      • opj_j2k_read_sod

        private boolean opj_j2k_read_sod​(FileJPEG2000.opj_j2k_t p_j2k,
                                         java.io.RandomAccessFile p_stream)
      • opj_j2k_need_nb_tile_parts_correction

        private boolean opj_j2k_need_nb_tile_parts_correction​(java.io.RandomAccessFile p_stream,
                                                              int tile_no,
                                                              boolean[] p_correction_needed)
      • opj_j2k_merge_ppt

        private boolean opj_j2k_merge_ppt​(FileJPEG2000.opj_tcp_t p_tcp)
        Merges all PPT markers read (Packed packet headers, tile-part header)
        Parameters:
        p_tcp - the tile.
      • opj_tcd_init_decode_tile

        private boolean opj_tcd_init_decode_tile​(FileJPEG2000.opj_tcd_t p_tcd,
                                                 int p_tile_no)
      • opj_tcd_init_tile

        private boolean opj_tcd_init_tile​(FileJPEG2000.opj_tcd_t p_tcd,
                                          int p_tile_no,
                                          boolean isEncoder,
                                          float fraction)
      • opj_dwt_decode_1_

        private void opj_dwt_decode_1_​(int[] a,
                                       int dn,
                                       int sn,
                                       int cas)
      • OPJ_S_

        private int OPJ_S_​(int[] a,
                           int i,
                           int sn)
      • OPJ_D_

        private int OPJ_D_​(int[] a,
                           int i,
                           int dn)
      • OPJ_SS_

        private int OPJ_SS_​(int[] a,
                            int i,
                            int dn)
      • OPJ_DD_

        private int OPJ_DD_​(int[] a,
                            int i,
                            int sn)
      • opj_dwt_interleave_h

        private void opj_dwt_interleave_h​(FileJPEG2000.opj_dwt_t h,
                                          int[] a,
                                          int a_index)
      • opj_dwt_interleave_v

        private void opj_dwt_interleave_v​(FileJPEG2000.opj_dwt_t v,
                                          int[] a,
                                          int a_index,
                                          int x)
      • opj_v4dwt_interleave_v

        private void opj_v4dwt_interleave_v​(FileJPEG2000.opj_v4dwt_t v,
                                            float[] a,
                                            int a_index,
                                            int x,
                                            int nb_elts_read)
      • opj_v4dwt_decode_step1

        private void opj_v4dwt_decode_step1​(FileJPEG2000.opj_v4_t[] w,
                                            int w_index,
                                            int count,
                                            float c)
      • opj_v4dwt_interleave_h

        private void opj_v4dwt_interleave_h​(FileJPEG2000.opj_v4dwt_t w,
                                            float[] a,
                                            int a_index,
                                            int x,
                                            int size)
      • opj_mct_decode_real

        void opj_mct_decode_real​(int[] c0,
                                 int[] c1,
                                 int[] c2,
                                 int n)
      • opj_mct_decode

        private void opj_mct_decode​(int[] c0,
                                    int[] c1,
                                    int[] c2,
                                    int n)
      • opj_mct_decode_custom

        private boolean opj_mct_decode_custom​(float[] pDecodingData,
                                              int n,
                                              byte[][] pData,
                                              int pNbComp,
                                              int isSigned)
      • opj_tcd_dc_level_shift_decode

        private boolean opj_tcd_dc_level_shift_decode​(FileJPEG2000.opj_tcd_t p_tcd)
      • opj_lrintf

        private long opj_lrintf​(float f)
      • opj_int_clamp

        private int opj_int_clamp​(int a,
                                  int min,
                                  int max)
        Clamp an integer inside an interval
        Returns:
        • Returns a if (min < a < max)
        • Returns max if (a > max)
        • Returns min if (a < min)
      • opj_tcd_update_tile_data

        private boolean opj_tcd_update_tile_data​(FileJPEG2000.opj_tcd_t p_tcd,
                                                 byte[] p_dest,
                                                 int[] l_dest_ptr,
                                                 int p_dest_length)
      • opj_tgt_init

        private FileJPEG2000.opj_tgt_tree_t opj_tgt_init​(FileJPEG2000.opj_tgt_tree_t p_tree,
                                                         int p_num_leafs_h,
                                                         int p_num_leafs_v)
        Reinitialises a tag-tree from an existing one.
        Parameters:
        p_tree - the tree to reinitialize.
        p_num_leafs_h - the width of the array of leafs of the tree
        p_num_leafs_v - the height of the array of leafs of the tree
        Returns:
        a new tag-tree if successful, NULL otherwise
      • opj_tcd_code_block_dec_allocate

        private boolean opj_tcd_code_block_dec_allocate​(FileJPEG2000.opj_tcd_cblk_dec_t p_code_block)
        Allocates memory for a decoding code block.
      • opj_uint_floorlog2

        private int opj_uint_floorlog2​(int a)
        Get logarithm of an integer and round downwards
        Returns:
        Returns log2(a)
      • opj_bio_init_dec

        private void opj_bio_init_dec​(FileJPEG2000.opj_bio_t bio,
                                      byte[] bp,
                                      int start,
                                      int len)
      • opj_get_all_encoding_parameters

        private void opj_get_all_encoding_parameters​(FileJPEG2000.opj_image_t p_image,
                                                     FileJPEG2000.opj_cp_t p_cp,
                                                     int tileno,
                                                     int[] p_tx0,
                                                     int[] p_tx1,
                                                     int[] p_ty0,
                                                     int[] p_ty1,
                                                     int[] p_dx_min,
                                                     int[] p_dy_min,
                                                     int[] p_max_prec,
                                                     int[] p_max_res,
                                                     int[][] p_resolutions)
        Gets the encoding parameters needed to update the coding parameters and all the pocs. The precinct widths, heights, dx and dy for each component at each resolution will be stored as well. the last parameter of the function should be an array of pointers of size nb components, each pointer leading to an area of size 4 * max_res. The data is stored inside this area with the following pattern : dx_compi_res0 , dy_compi_res0 , w_compi_res0, h_compi_res0 , dx_compi_res1 , dy_compi_res1 , w_compi_res1, h_compi_res1 , ...
        Parameters:
        p_image - the image being encoded.
        p_cp - the coding parameters.
        tileno - the tile index of the tile being encoded.
        p_tx0 - pointer that will hold the X0 parameter for the tile
        p_tx1 - pointer that will hold the X1 parameter for the tile
        p_ty0 - pointer that will hold the Y0 parameter for the tile
        p_ty1 - pointer that will hold the Y1 parameter for the tile
        p_max_prec - pointer that will hold the the maximum precision for all the bands of the tile
        p_max_res - pointer that will hold the the maximum number of resolutions for all the poc inside the tile.
        p_dx_min - pointer that will hold the the minimum dx of all the components of all the resolutions for the tile.
        p_dy_min - pointer that will hold the the minimum dy of all the components of all the resolutions for the tile.
        p_resolutions - pointer to an area corresponding to the one described above.
      • opj_t1_create

        private FileJPEG2000.opj_t1_t opj_t1_create​(boolean isEncoder)
        Creates a new Tier 1 handle and initializes the look-up tables of the Tier-1 coder/decoder
        Returns:
        a new T1 handle if successful, returns NULL otherwise
      • opj_t1_dec_clnpass

        private void opj_t1_dec_clnpass​(FileJPEG2000.opj_t1_t t1,
                                        int bpno,
                                        int orient,
                                        int cblksty)
      • opj_t1_dec_clnpass_step

        private void opj_t1_dec_clnpass_step​(FileJPEG2000.opj_t1_t t1,
                                             short[] flagsp,
                                             int flagsp_index,
                                             int[] datap,
                                             int datap_index,
                                             int orient,
                                             int oneplushalf)
      • opj_t1_updateflags

        private void opj_t1_updateflags​(short[] flagsp,
                                        int flagsp_index,
                                        int s,
                                        int stride)
      • opj_t1_getspb

        private byte opj_t1_getspb​(int f)
      • opj_t1_getctxno_sc

        private byte opj_t1_getctxno_sc​(int f)
      • opj_t1_getctxno_zc

        private byte opj_t1_getctxno_zc​(int f,
                                        int orient)
      • opj_t1_dec_clnpass_step_partial

        private void opj_t1_dec_clnpass_step_partial​(FileJPEG2000.opj_t1_t t1,
                                                     short[] flagsp,
                                                     int flagsp_index,
                                                     int[] datap,
                                                     int datap_index,
                                                     int orient,
                                                     int oneplushalf)
      • opj_t1_dec_clnpass_step_vsc

        private void opj_t1_dec_clnpass_step_vsc​(FileJPEG2000.opj_t1_t t1,
                                                 short[] flagsp,
                                                 int flagsp_index,
                                                 int[] datap,
                                                 int datap_index,
                                                 int orient,
                                                 int oneplushalf,
                                                 boolean partial,
                                                 int vsc)
      • opj_mqc_setcurctx

        private void opj_mqc_setcurctx​(FileJPEG2000.opj_mqc_t mqc,
                                       int ctxno)
        Set the current context used for coding/decoding
        Parameters:
        mqc - MQC handle
        ctxno - Number that identifies the context
      • opj_t1_dec_refpass_step_mqc

        private void opj_t1_dec_refpass_step_mqc​(FileJPEG2000.opj_t1_t t1,
                                                 short[] flagsp,
                                                 int flagsp_index,
                                                 int[] datap,
                                                 int datap_index,
                                                 int poshalf,
                                                 int neghalf)
      • opj_t1_getctxno_mag

        private int opj_t1_getctxno_mag​(int f)
      • opj_t1_dec_refpass_mqc_vsc

        private void opj_t1_dec_refpass_mqc_vsc​(FileJPEG2000.opj_t1_t t1,
                                                int bpno)
      • opj_t1_dec_refpass_step_mqc_vsc

        private void opj_t1_dec_refpass_step_mqc_vsc​(FileJPEG2000.opj_t1_t t1,
                                                     short[] flagsp,
                                                     int flagsp_index,
                                                     int[] datap,
                                                     int datap_index,
                                                     int poshalf,
                                                     int neghalf,
                                                     int vsc)
      • opj_t1_dec_refpass_raw

        private void opj_t1_dec_refpass_raw​(FileJPEG2000.opj_t1_t t1,
                                            int bpno,
                                            int cblksty)
      • opj_t1_dec_refpass_step_raw

        private void opj_t1_dec_refpass_step_raw​(FileJPEG2000.opj_t1_t t1,
                                                 short[] flagsp,
                                                 int flagsp_index,
                                                 int[] datap,
                                                 int datap_index,
                                                 int poshalf,
                                                 int neghalf,
                                                 int vsc)
      • opj_t1_dec_sigpass_mqc

        private void opj_t1_dec_sigpass_mqc​(FileJPEG2000.opj_t1_t t1,
                                            int bpno,
                                            int orient)
      • opj_t1_dec_sigpass_step_mqc

        private void opj_t1_dec_sigpass_step_mqc​(FileJPEG2000.opj_t1_t t1,
                                                 short[] flagsp,
                                                 int flagsp_index,
                                                 int[] datap,
                                                 int datap_index,
                                                 int orient,
                                                 int oneplushalf)
      • opj_t1_dec_sigpass_mqc_vsc

        private void opj_t1_dec_sigpass_mqc_vsc​(FileJPEG2000.opj_t1_t t1,
                                                int bpno,
                                                int orient)
      • opj_t1_dec_sigpass_step_mqc_vsc

        private void opj_t1_dec_sigpass_step_mqc_vsc​(FileJPEG2000.opj_t1_t t1,
                                                     short[] flagsp,
                                                     int flagsp_index,
                                                     int[] datap,
                                                     int datap_index,
                                                     int orient,
                                                     int oneplushalf,
                                                     int vsc)
      • opj_t1_dec_sigpass_raw

        private void opj_t1_dec_sigpass_raw​(FileJPEG2000.opj_t1_t t1,
                                            int bpno,
                                            int orient,
                                            int cblksty)
      • opj_t1_dec_sigpass_step_raw

        void opj_t1_dec_sigpass_step_raw​(FileJPEG2000.opj_t1_t t1,
                                         short[] flagsp,
                                         int flagsp_index,
                                         int[] datap,
                                         int datap_index,
                                         int orient,
                                         int oneplushalf,
                                         int vsc)
      • opj_t1_allocate_buffers

        private boolean opj_t1_allocate_buffers​(FileJPEG2000.opj_t1_t t1,
                                                int w,
                                                int h)
      • opj_mqc_setstate

        private void opj_mqc_setstate​(FileJPEG2000.opj_mqc_t mqc,
                                      int ctxno,
                                      int msb,
                                      int prob)
      • opj_mqc_init_dec

        private boolean opj_mqc_init_dec​(FileJPEG2000.opj_mqc_t mqc,
                                         byte[] buff,
                                         int start,
                                         int len)
      • opj_raw_init_dec

        private void opj_raw_init_dec​(FileJPEG2000.opj_raw_t raw,
                                      byte[] buffer,
                                      int start,
                                      int len)
      • opj_t1_destroy

        private void opj_t1_destroy​(FileJPEG2000.opj_t1_t p_t1)
        Destroys a previously created T1 handle
        Parameters:
        p_t1 - Tier 1 handle to destroy
      • opj_dwt_getgain

        private int opj_dwt_getgain​(int orient)
      • opj_dwt_getgain_real

        private int opj_dwt_getgain_real​(int orient)
      • opj_j2k_allocate_tile_element_cstr_index

        private boolean opj_j2k_allocate_tile_element_cstr_index​(FileJPEG2000.opj_j2k_t p_j2k)
      • opj_copy_image_header

        private void opj_copy_image_header​(FileJPEG2000.opj_image_t p_image_src,
                                           FileJPEG2000.opj_image_t p_image_dest)
        Copy only header of image and its component header (no data are copied) if dest image have data, they will be freed
        Parameters:
        p_image_src - the src image
        p_image_dest - the dest image
      • opj_j2k_copy_default_tcp_and_create_tcd

        private boolean opj_j2k_copy_default_tcp_and_create_tcd​(FileJPEG2000.opj_j2k_t p_j2k,
                                                                java.io.RandomAccessFile p_stream)
      • opj_tcd_create

        private FileJPEG2000.opj_tcd_t opj_tcd_create​(boolean p_is_decoder)
        Create a new TCD handle
      • opj_j2k_read_header_procedure

        private boolean opj_j2k_read_header_procedure​(FileJPEG2000.opj_j2k_t l_j2k,
                                                      java.io.RandomAccessFile l_stream)
      • opj_j2k_merge_ppm

        private boolean opj_j2k_merge_ppm​(FileJPEG2000.opj_cp_t p_cp)
        Merges all PPM markers read (Packed headers, main header)
        Parameters:
        p_cp - main coding parameters.
      • readMarkerHandler

        private boolean readMarkerHandler​(int handler,
                                          FileJPEG2000.opj_j2k_t p_j2k,
                                          byte[] p_header_data,
                                          int p_header_size)
      • opj_j2k_read_mco

        private boolean opj_j2k_read_mco​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a MCO marker (Multiple Component Transform Ordering)
        Parameters:
        p_header_data - the data contained in the MCO box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the MCO marker.
      • opj_j2k_read_int16_to_float

        private void opj_j2k_read_int16_to_float​(byte[] p_src_data,
                                                 float[] p_dest_data,
                                                 int p_nb_elem)
      • opj_j2k_read_int32_to_float

        private void opj_j2k_read_int32_to_float​(byte[] p_src_data,
                                                 float[] p_dest_data,
                                                 int p_nb_elem)
      • opj_j2k_read_float32_to_float

        private void opj_j2k_read_float32_to_float​(byte[] p_src_data,
                                                   float[] p_dest_data,
                                                   int p_nb_elem)
      • opj_j2k_read_float64_to_float

        private void opj_j2k_read_float64_to_float​(byte[] p_src_data,
                                                   float[] p_dest_data,
                                                   int p_nb_elem)
      • opj_j2k_read_int16_to_int32

        private void opj_j2k_read_int16_to_int32​(byte[] p_src_data,
                                                 int[] p_dest_data,
                                                 int p_nb_elem)
      • opj_j2k_read_int32_to_int32

        private void opj_j2k_read_int32_to_int32​(byte[] p_src_data,
                                                 int[] p_dest_data,
                                                 int p_nb_elem)
      • opj_j2k_read_float32_to_int32

        private void opj_j2k_read_float32_to_int32​(byte[] p_src_data,
                                                   int[] p_dest_data,
                                                   int p_nb_elem)
      • opj_j2k_read_float64_to_int32

        private void opj_j2k_read_float64_to_int32​(byte[] p_src_data,
                                                   int[] p_dest_data,
                                                   int p_nb_elem)
      • opj_j2k_read_mcc

        private boolean opj_j2k_read_mcc​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a MCC marker (Multiple Component Collection)
        Parameters:
        p_header_data - the data contained in the MCC box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the MCC marker.
      • getBuffer3Bytes

        public final int getBuffer3Bytes​(byte[] buffer,
                                         int index,
                                         boolean bigEndian)
        Converts byte data to int data.
        Parameters:
        buffer - Array of byte data.
        index - Index into array data.
        bigEndian - true indicates big endian byte order, false indicates little endian.
        Returns:
        Integer value extracted from byte array.
      • opj_j2k_read_cbd

        private boolean opj_j2k_read_cbd​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a CBD marker (Component bit depth definition)
        Parameters:
        p_header_data - the data contained in the CBD box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the CBD marker.
      • opj_j2k_read_mct

        private boolean opj_j2k_read_mct​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a MCT marker (Multiple Component Transform)
        Parameters:
        p_header_data - the data contained in the MCT box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the MCT marker.
      • opj_j2k_read_com

        private boolean opj_j2k_read_com​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a COM marker (comments)
        Parameters:
        p_j2k - the jpeg2000 file codec.
        p_header_data - the data contained in the COM box.
        p_header_size - the size of the data contained in the COM marker.
      • opj_j2k_read_crg

        private boolean opj_j2k_read_crg​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a CRG marker (Component registration)
        Parameters:
        p_header_data - the data contained in the CRG box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the CRG marker.
      • opj_j2k_read_ppt

        private boolean opj_j2k_read_ppt​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a PPT marker (Packed packet headers, tile-part header)
        Parameters:
        p_header_data - the data contained in the PPT box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the PPT marker.
      • opj_j2k_read_ppm

        private boolean opj_j2k_read_ppm​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a PPM marker (Packed packet headers, main header)
        Parameters:
        p_header_data - the data contained in the PPM box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the PPM marker.
      • opj_j2k_read_plt

        private boolean opj_j2k_read_plt​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a PLT marker (Packet length, tile-part header)
        Parameters:
        p_header_data - the data contained in the PLT box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the PLT marker.
      • opj_j2k_read_plm

        private boolean opj_j2k_read_plm​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a PLM marker (Packet length, main header marker)
        Parameters:
        p_header_data - the data contained in the PLM box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the PLM marker.
      • opj_j2k_read_tlm

        private boolean opj_j2k_read_tlm​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a TLM marker (Tile Length Marker)
        Parameters:
        p_header_data - the data contained in the TLM box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the TLM marker.
      • opj_j2k_read_siz

        private boolean opj_j2k_read_siz​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a SIZ marker (image and tile size)
        Parameters:
        p_j2k - the jpeg2000 file codec.
        p_header_data - the data contained in the SIZ box.
        p_header_size - the size of the data contained in the SIZ marker.
      • opj_image_comp_header_update

        private void opj_image_comp_header_update​(FileJPEG2000.opj_image_t p_image_header,
                                                  FileJPEG2000.opj_cp_t p_cp)
        Updates the components characteristics of the image from the coding parameters.
        Parameters:
        p_image_header - the image header to update.
        p_cp - the coding parameters from which to update the image.
      • opj_j2k_read_poc

        private boolean opj_j2k_read_poc​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a POC marker (Progression Order Change)
        Parameters:
        p_header_data - the data contained in the POC box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the POC marker.
      • opj_j2k_read_qcc

        private boolean opj_j2k_read_qcc​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a QCC marker (Quantization component)
        Parameters:
        p_header_data - the data contained in the QCC box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the QCC marker.
      • opj_j2k_read_qcd

        private boolean opj_j2k_read_qcd​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a QCD marker (Quantization defaults)
        Parameters:
        p_header_data - the data contained in the QCD box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the QCD marker.
      • opj_j2k_copy_tile_quantization_parameters

        private void opj_j2k_copy_tile_quantization_parameters​(FileJPEG2000.opj_j2k_t p_j2k)
      • opj_j2k_read_SQcd_SQcc

        private boolean opj_j2k_read_SQcd_SQcc​(FileJPEG2000.opj_j2k_t p_j2k,
                                               int p_comp_no,
                                               byte[] p_header_data,
                                               int p_header_offset,
                                               int[] p_header_size)
        Reads a SQcd or SQcc element, i.e. the quantization values of a band in the QCD or QCC.
        Parameters:
        p_j2k - J2K codec.
        compno - the component number to output.
        p_header_data - the data buffer.
        p_header_offset -
        p_header_size - pointer to the size of the data buffer, it is changed by the function.
      • opj_j2k_read_rgn

        private boolean opj_j2k_read_rgn​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a RGN marker (Region Of Interest)
        Parameters:
        p_header_data - the data contained in the POC box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the POC marker.
      • opj_j2k_read_coc

        private boolean opj_j2k_read_coc​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a COC marker (Coding Style Component)
        Parameters:
        p_header_data - the data contained in the COC box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the COC marker.
      • opj_j2k_read_cod

        private boolean opj_j2k_read_cod​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
        Reads a COD marker (Coding Styke defaults)
        Parameters:
        p_header_data - the data contained in the COD box.
        p_j2k - the jpeg2000 codec.
        p_header_size - the size of the data contained in the COD marker..
      • opj_j2k_copy_tile_component_parameters

        private void opj_j2k_copy_tile_component_parameters​(FileJPEG2000.opj_j2k_t p_j2k)
      • opj_j2k_read_SPCod_SPCoc

        private boolean opj_j2k_read_SPCod_SPCoc​(FileJPEG2000.opj_j2k_t p_j2k,
                                                 int compno,
                                                 byte[] p_header_data,
                                                 int p_header_offset,
                                                 int[] p_header_size)
      • opj_j2k_read_sot

        private boolean opj_j2k_read_sot​(FileJPEG2000.opj_j2k_t p_j2k,
                                         byte[] p_header_data,
                                         int p_header_size)
      • opj_j2k_get_sot_values

        private boolean opj_j2k_get_sot_values​(byte[] p_header_data,
                                               int p_header_size,
                                               int[] p_tile_no,
                                               int[] p_tot_len,
                                               int[] p_current_part,
                                               int[] p_num_parts)
      • opj_j2k_read_unk

        private boolean opj_j2k_read_unk​(FileJPEG2000.opj_j2k_t p_j2k,
                                         java.io.RandomAccessFile p_stream,
                                         int[] output_marker)
      • opj_j2k_read_soc

        private boolean opj_j2k_read_soc​(FileJPEG2000.opj_j2k_t p_j2k,
                                         java.io.RandomAccessFile p_stream)
        Reads a SOC marker (Start of Codestream)
        Parameters:
        p_j2k - the jpeg2000 file codec.
        p_stream - FIXME DOC
      • get_num_images

        private int get_num_images​(java.lang.String imgdirpath)
      • get_file_format

        int get_file_format​(java.lang.String filename)
      • infile_format

        private int infile_format​(java.lang.String fname)
      • opj_stream_create_default_file_stream

        private java.io.RandomAccessFile opj_stream_create_default_file_stream​(java.lang.String fname,
                                                                               boolean p_is_read_stream)
      • hex

        public java.lang.String hex​(int n)
      • opj_j2k_decode_one_tile

        private boolean opj_j2k_decode_one_tile​(FileJPEG2000.opj_j2k_t p_j2k,
                                                java.io.RandomAccessFile p_stream)
      • sycc_to_rgb

        private void sycc_to_rgb​(int offset,
                                 int upb,
                                 int[] y,
                                 int y_ptr,
                                 int[] cb,
                                 int cb_ptr,
                                 int[] cr,
                                 int cr_ptr,
                                 int[] out_r,
                                 int out_r_ptr,
                                 int[] out_g,
                                 int out_g_ptr,
                                 int[] out_b,
                                 int out_b_ptr)
      • imagetoraw_common

        private boolean imagetoraw_common​(FileJPEG2000.opj_image_t image,
                                          java.lang.String outfile,
                                          boolean big_endian)
      • imagetopnm

        private boolean imagetopnm​(FileJPEG2000.opj_image_t image,
                                   java.lang.String outfile,
                                   boolean force_split)
      • tga_writeheader

        private boolean tga_writeheader​(java.io.RandomAccessFile raFile,
                                        int bits_per_pixel,
                                        int width,
                                        int height,
                                        boolean flip_image,
                                        boolean bigEndian)
      • CLAMP

        private int CLAMP​(int x,
                          int a,
                          int b)
      • clamp

        private int clamp​(int value,
                          int prec,
                          int sgnd)
      • JavaStrToCStr

        private byte[] JavaStrToCStr​(java.lang.String str)
      • opj_version

        private java.lang.String opj_version()