in plot-api/src/commonMain/kotlin/org/jetbrains/letsPlot/util/pngj/Deinterlacer.kt [110:120]
fun getTotalRows(): Int {
if (totalRows == 0) { // lazy compute
for (p in 1..7) {
val pp = paramsForPass(p) // dx dy ox oy
val rows = if (imi.rows > pp[3]) (imi.rows + pp[1] - 1 - pp[3]) / pp[1] else 0
val cols = if (imi.cols > pp[2]) (imi.cols + pp[0] - 1 - pp[2]) / pp[0] else 0
if (rows > 0 && cols > 0) totalRows += rows
}
}
return totalRows
}// without filter byte// dx dy ox oy// including the filter byte