corrade-vassal – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | vero | 1 | /* |
2 | * CVS identifier: |
||
3 | * |
||
4 | * $Id: CodedCBlk.java,v 1.9 2001/08/17 09:42:13 grosbois Exp $ |
||
5 | * |
||
6 | * Class: CodedCBlk |
||
7 | * |
||
8 | * Description: The generic coded (compressed) code-block |
||
9 | * |
||
10 | * |
||
11 | * |
||
12 | * COPYRIGHT: |
||
13 | * |
||
14 | * This software module was originally developed by Raphaël Grosbois and |
||
15 | * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel |
||
16 | * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David |
||
17 | * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research |
||
18 | * Centre France S.A) in the course of development of the JPEG2000 |
||
19 | * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This |
||
20 | * software module is an implementation of a part of the JPEG 2000 |
||
21 | * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio |
||
22 | * Systems AB and Canon Research Centre France S.A (collectively JJ2000 |
||
23 | * Partners) agree not to assert against ISO/IEC and users of the JPEG |
||
24 | * 2000 Standard (Users) any of their rights under the copyright, not |
||
25 | * including other intellectual property rights, for this software module |
||
26 | * with respect to the usage by ISO/IEC and Users of this software module |
||
27 | * or modifications thereof for use in hardware or software products |
||
28 | * claiming conformance to the JPEG 2000 Standard. Those intending to use |
||
29 | * this software module in hardware or software products are advised that |
||
30 | * their use may infringe existing patents. The original developers of |
||
31 | * this software module, JJ2000 Partners and ISO/IEC assume no liability |
||
32 | * for use of this software module or modifications thereof. No license |
||
33 | * or right to this software module is granted for non JPEG 2000 Standard |
||
34 | * conforming products. JJ2000 Partners have full right to use this |
||
35 | * software module for his/her own purpose, assign or donate this |
||
36 | * software module to any third party and to inhibit third parties from |
||
37 | * using this software module for non JPEG 2000 Standard conforming |
||
38 | * products. This copyright notice must be included in all copies or |
||
39 | * derivative works of this software module. |
||
40 | * |
||
41 | * Copyright (c) 1999/2000 JJ2000 Partners. |
||
42 | * */ |
||
43 | using System; |
||
44 | namespace CSJ2K.j2k.entropy |
||
45 | { |
||
46 | |||
47 | /// <summary> This is the generic class to store coded (compressed) code-block. It stores |
||
48 | /// the compressed data as well as the necessary side-information. |
||
49 | /// |
||
50 | /// <p>This class is normally not used. Instead the EncRDCBlk, EncLyrdCBlk and |
||
51 | /// the DecLyrdCBlk subclasses are used.</p> |
||
52 | /// |
||
53 | /// </summary> |
||
54 | /// <seealso cref="jj2000.j2k.entropy.encoder.CBlkRateDistStats"> |
||
55 | /// </seealso> |
||
56 | /// <seealso cref="jj2000.j2k.entropy.decoder.DecLyrdCBlk"> |
||
57 | /// |
||
58 | /// </seealso> |
||
59 | public class CodedCBlk |
||
60 | { |
||
61 | |||
62 | /// <summary>The horizontal index of the code-block, within the subband. </summary> |
||
63 | public int n; |
||
64 | |||
65 | /// <summary>The vertical index of the code-block, within the subband. </summary> |
||
66 | public int m; |
||
67 | |||
68 | /// <summary>The number of skipped most significant bit-planes. </summary> |
||
69 | public int skipMSBP; |
||
70 | |||
71 | /// <summary>The compressed data </summary> |
||
72 | public byte[] data; |
||
73 | |||
74 | /// <summary> Creates a new CodedCBlk object wit the default values and without |
||
75 | /// allocating any space for its members. |
||
76 | /// |
||
77 | /// </summary> |
||
78 | public CodedCBlk() |
||
79 | { |
||
80 | } |
||
81 | |||
82 | /// <summary> Creates a new CodedCBlk object with the specified values. |
||
83 | /// |
||
84 | /// </summary> |
||
85 | /// <param name="m">The horizontal index of the code-block, within the subband. |
||
86 | /// |
||
87 | /// </param> |
||
88 | /// <param name="n">The vertical index of the code-block, within the subband. |
||
89 | /// |
||
90 | /// </param> |
||
91 | /// <param name="skipMSBP">The number of skipped most significant bit-planes for |
||
92 | /// this code-block. |
||
93 | /// |
||
94 | /// </param> |
||
95 | /// <param name="data">The compressed data. This array is referenced by this |
||
96 | /// object so it should not be modified after. |
||
97 | /// |
||
98 | /// </param> |
||
99 | public CodedCBlk(int m, int n, int skipMSBP, byte[] data) |
||
100 | { |
||
101 | this.m = m; |
||
102 | this.n = n; |
||
103 | this.skipMSBP = skipMSBP; |
||
104 | this.data = data; |
||
105 | } |
||
106 | |||
107 | /// <summary> Returns the contents of the object in a string. The string contains the |
||
108 | /// following data: 'm', 'n', 'skipMSBP' and 'data.length. This is used for |
||
109 | /// debugging. |
||
110 | /// |
||
111 | /// </summary> |
||
112 | /// <returns> A string with the contents of the object |
||
113 | /// |
||
114 | /// </returns> |
||
115 | public override System.String ToString() |
||
116 | { |
||
117 | return "m=" + m + ", n=" + n + ", skipMSBP=" + skipMSBP + ", data.length=" + ((data != null)?"" + data.Length:"(null)"); |
||
118 | } |
||
119 | } |
||
120 | } |