Class CBlkInfo

java.lang.Object
jj2000.j2k.codestream.reader.CBlkInfo

public class CBlkInfo extends Object
This class contains location of code-blocks' piece of codewords (there is one piece per layer) and some other information.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The cumulative number of truncation points
    int
    Height of the code-block
    int[]
    Length of each piece of code-block's codewords
    int
    The number of most significant bits which are skipped for this code-block (= Mb-1-bitDepth).
    int[]
    The number of truncation point for each layer
    int[]
    Offset of each piece of code-block's codewords in the file
    int[]
    Index of the packet where each layer has been found
    int[][]
    The length of each segment (used with regular termination or in selective arithmetic bypass coding mode)
    int
    Upper-left x-coordinate of the code-block (relative to the tile)
    int
    Upper-left y-coordinate of the code-block (relative to the tile)
    int
    Width of the code-block
  • Constructor Summary

    Constructors
    Constructor
    Description
    CBlkInfo(int ulx, int uly, int w, int h, int nl)
    Constructs a new instance with specified number of layers and code-block coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addNTP(int l, int newtp)
    Adds the number of new truncation for specified layer.
    Object information in a string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • ulx

      public int ulx
      Upper-left x-coordinate of the code-block (relative to the tile)
    • uly

      public int uly
      Upper-left y-coordinate of the code-block (relative to the tile)
    • w

      public int w
      Width of the code-block
    • h

      public int h
      Height of the code-block
    • msbSkipped

      public int msbSkipped
      The number of most significant bits which are skipped for this code-block (= Mb-1-bitDepth). See VM text
    • len

      public int[] len
      Length of each piece of code-block's codewords
    • off

      public int[] off
      Offset of each piece of code-block's codewords in the file
    • ntp

      public int[] ntp
      The number of truncation point for each layer
    • ctp

      public int ctp
      The cumulative number of truncation points
    • segLen

      public int[][] segLen
      The length of each segment (used with regular termination or in selective arithmetic bypass coding mode)
    • pktIdx

      public int[] pktIdx
      Index of the packet where each layer has been found
  • Constructor Details

    • CBlkInfo

      public CBlkInfo(int ulx, int uly, int w, int h, int nl)
      Constructs a new instance with specified number of layers and code-block coordinates. The number corresponds to the maximum piece of codeword for one code-block.
      Parameters:
      ulx - The uper-left x-coordinate
      uly - The uper-left y-coordinate
      w - Width of the code-block
      h - Height of the code-block
      nl - The number of layers
  • Method Details

    • addNTP

      public void addNTP(int l, int newtp)
      Adds the number of new truncation for specified layer.
      Parameters:
      l - layer index
      newtp - Number of new truncation points
    • toString

      public String toString()
      Object information in a string.
      Overrides:
      toString in class Object
      Returns:
      Object information