From 2deee532cd7bae8d848dc87209e693e75056d3fc Mon Sep 17 00:00:00 2001
From: Jan Kiene
- IVAS FORMAT - Worst Case WMOPS Performance
- per Operating Point
+ IVAS stereo to stereo - Worst Case WMOPS Performance per Operating Point
- Encoder
- Decoder
+
+
@@ -629,111 +636,140 @@ function WMOPS_perOP() {
$.plot(elt, graph.displays, options);
- elt.bind("plothover", function (event, pos, item) {
- if (!item) {
- // only remove if not in tooltip anymore
- if ($('#tooltip:hover').length == 0) {
- $("#tooltip").remove();
- }
- previousPoint = null;
- return;
- }
-
- if (previousPoint &&
- (previousPoint[0] == item.datapoint[0]) &&
- (previousPoint[1] == item.datapoint[1])) {
- return;
+ elt.bind("plothover", function (event, pos, item) {
+ if (!item) {
+ // only remove if not in tooltip anymore
+ if ($('#tooltip:hover').length == 0) {
+ $("#tooltip").remove();
}
+ previousPoint = null;
+ return;
+ }
- previousPoint = item.datapoint;
- $("#tooltip").remove();
-
- var encData, decData;
- 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];
+ if (previousPoint &&
+ (previousPoint[0] == item.datapoint[0]) &&
+ (previousPoint[1] == item.datapoint[1])) {
+ return;
+ }
- 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;
+ previousPoint = item.datapoint;
+ $("#tooltip").remove();
- text += "Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "
";
+ var encData, decData;
+ var encRefData, decRefData;
+ var text = "";
- text += "Worst case enc: " + scoreEnc + " WMOPS
";
- text += "Worst case dec: " + scoreDec + " WMOPS
";
- text += "Worst case codec: " + scoreCodec + " WMOPS
";
+ var x = item.datapoint[0];
+ var y = item.datapoint[1];
- var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
- text += "Logfile
";
+ text += "Mode: " + graph.runs[x].operatingPoint + "
";
+ if (graph.displays.length == 1) {
+ var score = Math.max(parseFloat(graph.displays[0].data[x][1]), 0);
+ text += "Worst case: " + score + " WMOPS
";
+ }
+ 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;
}
- 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;
+ 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
";
+ text += "Worst case FLT REF: " + score_flt_ref + " WMOPS
";
+ }
+ var nEntriesWmopsGraph = graph.runs.length - 1;
+ text += "Logfile
";
+
+ // 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 += "Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "
";
+ //
+ // text += "Worst case enc: " + scoreEnc + " WMOPS
";
+ // text += "Worst case dec: " + scoreDec + " WMOPS
";
+ // text += "Worst case codec: " + scoreCodec + " WMOPS
";
+ //
+ // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
+ // text += "Logfile
";
+ // }
+ // 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 += "Mode: " + op + "
";
+ //
+ // text += "Worst case enc: " + scoreEnc + " WMOPS
";
+ // text += "Worst case dec: " + scoreDec + " WMOPS
";
+ // text += "Worst case codec: " + scoreCodec + " WMOPS
";
+ //
+ // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
+ // text += "Logfile
";
+ // }
+ showToolTip(item.pageX, item.pageY, text);
- text += "Mode: " + op + "
";
+ });
- text += "Worst case enc: " + scoreEnc + " WMOPS
";
- text += "Worst case dec: " + scoreDec + " WMOPS
";
- text += "Worst case codec: " + scoreCodec + " WMOPS
";
+ }
- var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1;
- text += "Logfile
";
- }
- 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 +
"