# CSJ2K.j2k.entropy.encoder.LayersInfo

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_entropy_encoder_LayersInfo" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo" class="text-break">LayersInfo Class
</h1>
  <div class="markdown level0 summary"><p>This class stores the specification of a layer distribution in the bit
stream. The specification is made of optimization points and a number of
extra layers to add between the optimization points. Each optimization
point creates a layer which is optimized by the rate allocator to the
specified target bitrate. The extra layers are added by the rate allocator
between the optimized layers, with the difference that they are not
optimized (i.e. they have no precise target bitrate).</p>
<pre><code>       &lt;p&gt;The overall target bitrate for the bit stream is always added as the
       last optimization point without any extra layers after it. If there are
       some optimization points whose target bitrate is larger than the overall
       target bitrate, the overall target bitrate will still appear as the last
       optimization point, even though it does not follow the increasing target
       bitrate order of the other optimization points. The rate allocator is
       responsible for eliminating layers that have target bitrates larger than
       the overall target bitrate.&lt;/p&gt;&lt;p&gt;Optimization points can be added with the addOptPoint() method. It takes
       the target bitrate for the optimized layer and the number of extra layers
       to add after it.&lt;/p&gt;&lt;p&gt;Information about the total number of layers, total number of
       optimization points, target bitrates, etc. can be obtained with the other
       methods.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">LayersInfo</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.entropy.encoder.html">CSJ2K.j2k.entropy.encoder</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_entropy_encoder_LayersInfo_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class LayersInfo</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class LayersInfo</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo__ctor_System_Single_" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.#ctor(System.Single)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.-ctor.html#CSJ2K_j2k_entropy_encoder_LayersInfo__ctor_System_Single_">LayersInfo(float)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a new LayersInfo object. The overall target bitrate 'brate' is
always an extra optimization point, with no extra layers are after
it. Note that any optimization points that are added with addOptPoint()
are always added before the overall target bitrate.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_NOptPoints" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.NOptPoints">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.NOptPoints.html#CSJ2K_j2k_entropy_encoder_LayersInfo_NOptPoints">NOptPoints</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of layers to optimize, or optimization points, as
specified by this object.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_TotBitrate" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.TotBitrate">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.TotBitrate.html#CSJ2K_j2k_entropy_encoder_LayersInfo_TotBitrate">TotBitrate</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the overall target bitrate for the entire bit stream.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_TotNumLayers" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.TotNumLayers">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.TotNumLayers.html#CSJ2K_j2k_entropy_encoder_LayersInfo_TotNumLayers">TotNumLayers</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the total number of layers, according to the layer
specification of this object and the overall target bitrate.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_addOptPoint_System_Single_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.addOptPoint(System.Single,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.addOptPoint.html#CSJ2K_j2k_entropy_encoder_LayersInfo_addOptPoint_System_Single_System_Int32_">addOptPoint(float, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Adds a new optimization point, with target bitrate 'brate' and with
'elyrs' (unoptimized) extra layers after it. The target bitrate 'brate'
must be larger than the previous optimization point. The arguments are
checked and IllegalArgumentException is thrown if they are not correct.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_getExtraLayers_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.getExtraLayers(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.getExtraLayers.html#CSJ2K_j2k_entropy_encoder_LayersInfo_getExtraLayers_System_Int32_">getExtraLayers(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of extra layers to add after the optimization point
'n', but before optimization point 'n+1'. If there is no optimization
point 'n+1' then they should be added before the overall target
bitrate.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_LayersInfo_getTargetBitrate_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.LayersInfo.getTargetBitrate(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.LayersInfo.getTargetBitrate.html#CSJ2K_j2k_entropy_encoder_LayersInfo_getTargetBitrate_System_Int32_">getTargetBitrate(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the target bitrate of the optmimization point 'n'.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
