Commit 2deee532 authored by Jan Kiene's avatar Jan Kiene
Browse files

split bar graph between encoder and decoder

parent 22c333a4
Loading
Loading
Loading
Loading
Loading
+136 −100
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 stereo to stereo - 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,88 +659,117 @@ 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>";
        }
        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];
      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 (graph.displays.length == 2) {
          console.log(graph.displays);
          console.log(x);
        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;
        }
        x = Math.floor(x / 2);
        console.log(x);
        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>";

      // 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>";
      // }
      // 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 (codec == "BASOP") {
      //     x = x / 2;
      //     scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0);
      //     scoreDec = Math.max(parseFloat(decData.data[x][1]), 0);
      //   }
      //
      //   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);

          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 (codec == "BASOP") {
            x = x / 2;
            scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0);
            scoreDec = Math.max(parseFloat(decData.data[x][1]), 0);
    }

          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);

    $(document).ready(function () {
        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));


    $(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);
        // 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 +779,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;