Commit 609d9857 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into 1255-object-editing-broken-in-jbm

parents 2a99a2b6 16eaf905
Loading
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -3922,11 +3922,7 @@ static ivas_error load_hrtf_from_file(
                return error;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_TDrend_HRTF_binary( *hHrtfBinary->hHrtfTD, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_HRTF_binary( *hHrtfBinary->hHrtfTD, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
@@ -4010,11 +4006,7 @@ static ivas_error load_hrtf_from_file(
        }
    }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    if ( hHrtfBinary->hHrtfStatistics == NULL && ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
#else
    if ( hHrtfBinary->hHrtfStatistics == NULL )
#endif
    {
        if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary->hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
+0 −4
Original line number Diff line number Diff line
@@ -957,11 +957,7 @@ int main(
                goto cleanup;
            }

#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
            if ( ( error = load_TDrend_HRTF_binary( *hHrtfTD, args.sampleRate, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_HRTF_binary( *hHrtfTD, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
+73 −99
Original line number Diff line number Diff line
@@ -127,15 +127,22 @@

  <hr />

    <h1 id="sec:graph-wmops_per_op">IVAS FORMAT - Worst Case WMOPS Performance
        per Operating Point</h1>
    <h1 id="sec:graph-wmops_per_op">IVAS FORMAT - Worst Case WMOPS Performance per Operating Point</h1>

      <h2 id="sec:graphs_wmops_per_op_encoder">Encoder</h2>

        <div class="graph-container">
          <div id="wmops_per_op-graph-enc"></div>
        </div>

      <h2 id="sec:graphs_wmops_per_op_decoder">Decoder</h2>

        <div class="graph-container">
  <div id="wmops_per_op-graph"></div>
          <div id="wmops_per_op-graph-dec"></div>
        </div>

        <div class="graph-container" style="clear: both; padding-top: 1em">
    <div id="wmops_per_op-legend"></div>
          <div id="wmops_per_op-legend-enc"></div>
        </div>

  <hr />
@@ -652,65 +659,29 @@ function WMOPS_perOP() {
      var encRefData, decRefData;
      var text = "";

        if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) {
          encData  = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0];
          decData  = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1];

      var x = item.datapoint[0];
      var y = item.datapoint[1];

          var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0);
          var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0);
          var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100;

          text += "<b><u>Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "</u></b><br>";

          text += "Worst case enc: "   + scoreEnc + " WMOPS<br>";
          text += "Worst case dec: "   + scoreDec + " WMOPS<br>";
          text += "Worst case codec: " + scoreCodec + " WMOPS<br><br>";

          var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
          text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>";
      text += "<b><u>Mode: " + graph.runs[x].operatingPoint + "</u></b><br>";
      if (graph.displays.length == 1) {
        var score = Math.max(parseFloat(graph.displays[0].data[x][1]), 0);
        text += "Worst case: "   + score + " WMOPS<br>";
      }
        else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) {
          encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0];
          decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1];

          encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2];
          decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3];

          var x = item.datapoint[0];
          var y = item.datapoint[1];

          var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x];
          var op = run.operatingPoint;
          var codec = op.split(" - ")[1];

          var scoreEnc, scoreDec;

          if (codec == "FLT REF")
          {
            x = (x - 1) / 2;
            scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0);
            scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0);
      else if (graph.displays.length == 2) {
        if ( x % 2 != 0 ) {
          // these indices are for the flt ref bars
          // we need to subtract 1 to get the correct id
          x = x - 1;
        }
          else if (codec == "BASOP") {
            x = x / 2;
            scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0);
            scoreDec = Math.max(parseFloat(decData.data[x][1]), 0);
        x = Math.floor(x / 2);
        var score_basop = Math.max(parseFloat(graph.displays[0].data[x][1]), 0);
        var score_flt_ref = Math.max(parseFloat(graph.displays[1].data[x][1]), 0);
        text += "Worst case BASOP: "   + score_basop + " WMOPS<br>";
        text += "Worst case FLT REF: "   + score_flt_ref + " WMOPS<br>";
      }
      var nEntriesWmopsGraph = graph.runs.length - 1;
      text += "<a href=\"logs/" + graph.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>";

          var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100;

          text += "<b><u>Mode: " + op + "</u></b><br>";

          text += "Worst case enc: "   + scoreEnc + " WMOPS<br>";
          text += "Worst case dec: "   + scoreDec + " WMOPS<br>";
          text += "Worst case codec: " + scoreCodec + " WMOPS<br><br>";

          var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
          text += "<a href=\"logs/" + Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].logFile + "\">Logfile</a><br>";
        }
      showToolTip(item.pageX, item.pageY, text);

       });
@@ -719,21 +690,24 @@ function WMOPS_perOP() {


    $(document).ready(function () {
        // need to get worst case of enc + dec combined, because values are stacked in the graph
        var displays = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays;
        var encData, decData;
        if (displays.length == 2) {
            encData = [displays[0]];
            decData = [displays[1]];
        }
        else if (displays.length == 4) {
            encData = [displays[0], displays[2]];
            decData = [displays[1], displays[3]];
        }
        var max_enc = get_max_y_val_for_plotting(encData, 1);
        var max_dec = get_max_y_val_for_plotting(decData, 1);
        var max = Math.ceil( (max_enc + max_dec ) / 50) * 50;
        drawGraph($("#wmops_per_op-graph"), Graphs_WMOPS_perOP.wmops_worstcase_per_op, max);
        var displays_enc = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.filter(function(elem) {
          return elem["label"].includes("Encoder");
        });
        var displays_dec = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.filter(function(elem) {
          return elem["label"].includes("Decoder");
        });

        var max_enc = Math.ceil(get_max_y_val_for_plotting(displays_enc, 50));
        var max_dec = Math.ceil(get_max_y_val_for_plotting(displays_dec, 50));


        // need to clone object and replace the displays
        var graph_enc = JSON.parse(JSON.stringify(Graphs_WMOPS_perOP.wmops_worstcase_per_op));
        graph_enc.displays = displays_enc;
        var graph_dec = JSON.parse(JSON.stringify(Graphs_WMOPS_perOP.wmops_worstcase_per_op));
        graph_dec.displays = displays_dec;
        drawGraph($("#wmops_per_op-graph-enc"), graph_enc, max_enc);
        drawGraph($("#wmops_per_op-graph-dec"), graph_dec, max_dec);
    });

    var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
@@ -743,7 +717,7 @@ function WMOPS_perOP() {
                Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].fullDate + 
                "</p>";

    document.getElementById("wmops_per_op-legend").innerHTML = legend;
    document.getElementById("wmops_per_op-legend-enc").innerHTML = legend;

}

+9 −1
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ h1 {
 font-weight:700;
 text-align: center;
}
h2 {
  text-align: center;
}
em {
 font-style: normal;
 font-weight: bold;   
@@ -51,7 +54,12 @@ hr {
 width:1600px;
 float:left;
}
#wmops_per_op-graph {
#wmops_per_op-graph-enc {
 height:500px;
 width:2400px;
 float:left;
}
#wmops_per_op-graph-dec {
 height:500px;
 width:2400px;
 float:left;
+0 −4
Original line number Diff line number Diff line
@@ -82,9 +82,7 @@ typedef enum
    IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED,
#endif
    IVAS_ERR_INVALID_HRTF,
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
    IVAS_ERR_INVALID_HRTF_SAMPLING_RATE,
#endif
    IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA,
    IVAS_ERR_INVALID_INPUT_FORMAT,
    IVAS_ERR_INVALID_INDEX,
@@ -269,10 +267,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
#endif
        case IVAS_ERR_INVALID_HRTF:
            return "Unsupported HRTF filter set";
#ifdef FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE
        case IVAS_ERR_INVALID_HRTF_SAMPLING_RATE:
            return "Wrong sampling rate in HRTF binary file";
#endif
        case IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA:
            return "Renderer data missing in HRTF binary file";
        case IVAS_ERR_INVALID_INPUT_FORMAT:
Loading