Example #1
0
  private void vorbis_encode_psyset_setup(
      float s, int[] nn_start, int[] nn_partition, float[] nn_thresh, int block) {

    codec_setup_info ci = vi.codec_setup;
    highlevel_encode_setup hi = ci.hi;
    int is = new Float(s).intValue();

    if (block >= ci.psys) ci.psys = block + 1;

    ci.psy_param[block] =
        new vorbis_info_psy(

            // static vorbis_info_psy _psy_info_template = {
            -1,
            -140.f,
            -140.f,

            // tonemask att boost/decay,suppr,curves
            new float[] {0.f, 0.f, 0.f},
            0.f,
            0.f,
            -40.f,
            new float[] {0.f},

            // noisemaskp,supp, low/high window, low/hi guard, minimum
            1,
            -0.f,
            .5f,
            .5f,
            0,
            0,
            0,
            new float[][] {{-1}, {-1}, {-1}},
            new float[] {-1},
            105.f,
            0,
            0,
            -1,
            -1,
            0.0f);

    vorbis_info_psy p = ci.psy_param[block];

    p.blockflag = block >> 1;

    if (hi.noise_normalize_p != 0) {
      p.normal_channel_p = 1;
      p.normal_point_p = 1;
      p.normal_start = nn_start[is];
      p.normal_partition = nn_partition[is];
      p.normal_thresh = nn_thresh[is];
    }
  }