private int MacroBlockAnalysis(int width, int height, Vp8EncIterator it, Span <byte> y, Span <byte> u, Span <byte> v, int yStride, int uvStride, int[] alphas, out int uvAlpha) { int alpha = 0; uvAlpha = 0; if (!it.IsDone()) { do { it.Import(y, u, v, yStride, uvStride, width, height, true); int bestAlpha = this.MbAnalyze(it, alphas, out int bestUvAlpha); // Accumulate for later complexity analysis. alpha += bestAlpha; uvAlpha += bestUvAlpha; }while (it.Next()); } return(alpha); }