corrade-vassal – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 1 /*
2 * CVS identifier:
3 *
4 * $Id: StdEntropyCoderOptions.java,v 1.10 2001/03/27 09:57:20 grosbois Exp $
5 *
6 * Class: StdEntropyCoderOptions
7 *
8 * Description: Entropy coding engine of stripes in
9 * code-blocks options
10 *
11 *
12 *
13 * COPYRIGHT:
14 *
15 * This software module was originally developed by Raphaël Grosbois and
16 * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel
17 * Askelöf (Ericsson Radio Systems AB); and Bertrand Berthelot, David
18 * Bouchard, Félix Henry, Gerard Mozelle and Patrice Onno (Canon Research
19 * Centre France S.A) in the course of development of the JPEG2000
20 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This
21 * software module is an implementation of a part of the JPEG 2000
22 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio
23 * Systems AB and Canon Research Centre France S.A (collectively JJ2000
24 * Partners) agree not to assert against ISO/IEC and users of the JPEG
25 * 2000 Standard (Users) any of their rights under the copyright, not
26 * including other intellectual property rights, for this software module
27 * with respect to the usage by ISO/IEC and Users of this software module
28 * or modifications thereof for use in hardware or software products
29 * claiming conformance to the JPEG 2000 Standard. Those intending to use
30 * this software module in hardware or software products are advised that
31 * their use may infringe existing patents. The original developers of
32 * this software module, JJ2000 Partners and ISO/IEC assume no liability
33 * for use of this software module or modifications thereof. No license
34 * or right to this software module is granted for non JPEG 2000 Standard
35 * conforming products. JJ2000 Partners have full right to use this
36 * software module for his/her own purpose, assign or donate this
37 * software module to any third party and to inhibit third parties from
38 * using this software module for non JPEG 2000 Standard conforming
39 * products. This copyright notice must be included in all copies or
40 * derivative works of this software module.
41 *
42 * Copyright (c) 1999/2000 JJ2000 Partners.
43 * */
44 using System;
45 namespace CSJ2K.j2k.entropy
46 {
47  
48 /// <summary> This interface define the constants that identify the possible options for
49 /// the entropy coder, as well some fixed parameters of the JPEG 2000 entropy
50 /// coder.
51 ///
52 /// </summary>
53 public struct StdEntropyCoderOptions{
54 /// <summary>The flag bit to indicate that selective arithmetic coding bypass
55 /// should be used. In this mode, the significance propagation and
56 /// magnitude refinement passes bypass the arithmetic encoder in the fourth
57 /// bit-plane and latter ones (but not the cleanup pass). Note that the
58 /// transition between raw and AC segments needs terminations (whether or
59 /// not OPT_TERM_PASS is used).
60 /// </summary>
61 public readonly static int OPT_BYPASS = 1;
62 /// <summary>The flag bit to indicate that the MQ states for all contexts should be
63 /// reset at the end of each (non-bypassed) coding pass.
64 /// </summary>
65 public readonly static int OPT_RESET_MQ = 1 << 1;
66 /// <summary>The flag bit to indicate that a termination should be performed after
67 /// each coding pass. Note that terminations are applied to both * *
68 /// arithmetically coded and bypassed (i.e. raw) passes .
69 /// </summary>
70 public readonly static int OPT_TERM_PASS = 1 << 2;
71 /// <summary>The flag bit to indicate the vertically stripe-causal context
72 /// formation should be used.
73 /// </summary>
74 public readonly static int OPT_VERT_STR_CAUSAL = 1 << 3;
75 /// <summary>The flag bit to indicate that error resilience info is embedded on MQ
76 /// termination. This corresponds to the predictable termination described
77 /// in Annex D.4.2 of the FDIS
78 /// </summary>
79 public readonly static int OPT_PRED_TERM = 1 << 4;
80 /// <summary>The flag bit to indicate that an error resilience segmentation symbol
81 /// is to be inserted at the end of each cleanup coding pass. The
82 /// segmentation symbol is the four symbol sequence 1010 that are sent
83 /// through the MQ coder using the UNIFORM context (as explained in annex
84 /// D.5 of FDIS).
85 /// </summary>
86 public readonly static int OPT_SEG_SYMBOLS = 1 << 5;
87 /// <summary>The minimum code-block dimension. The nominal width or height of a
88 /// code-block must never be less than this. It is 4.
89 /// </summary>
90 public readonly static int MIN_CB_DIM = 4;
91 /// <summary>The maximum code-block dimension. No code-block should be larger,
92 /// either in width or height, than this value. It is 1024.
93 /// </summary>
94 public readonly static int MAX_CB_DIM = 1024;
95 /// <summary>The maximum code-block area (width x height). The surface covered by
96 /// a nominal size block should never be larger than this. It is 4096
97 /// </summary>
98 public readonly static int MAX_CB_AREA = 4096;
99 /// <summary>The stripe height. This is the nominal value of the stripe height. It
100 /// is 4.
101 /// </summary>
102 public readonly static int STRIPE_HEIGHT = 4;
103 /// <summary>The number of coding passes per bit-plane. This is the number of
104 /// passes per bit-plane. It is 3.
105 /// </summary>
106 public readonly static int NUM_PASSES = 3;
107 /// <summary>The number of most significant bit-planes where bypass mode is not to
108 /// be used, even if bypass mode is on: 4.
109 /// </summary>
110 public readonly static int NUM_NON_BYPASS_MS_BP = 4;
111 /// <summary>The number of empty passes in the most significant bit-plane. It is
112 /// 2.
113 /// </summary>
114 public readonly static int NUM_EMPTY_PASSES_IN_MS_BP = 2;
115 /// <summary>The index of the first "raw" pass, if bypass mode is on. </summary>
116 public readonly static int FIRST_BYPASS_PASS_IDX;
117 static StdEntropyCoderOptions()
118 {
119 FIRST_BYPASS_PASS_IDX = CSJ2K.j2k.entropy.StdEntropyCoderOptions.NUM_PASSES * CSJ2K.j2k.entropy.StdEntropyCoderOptions.NUM_NON_BYPASS_MS_BP - CSJ2K.j2k.entropy.StdEntropyCoderOptions.NUM_EMPTY_PASSES_IN_MS_BP;
120 }
121 }
122 }