public void CalculateIwtSizes(VideoFormat format) { int[] size = new int[]{0,0}; format.GetPictureLumaSize(ref size); iwtLumaSize = new Dimension(Util.RoundUpPow2(size[0], transformDepth), Util.RoundUpPow2(size[1], transformDepth)); format.GetPictureChromaSize(ref size); iwtChromaSize = new Dimension(Util.RoundUpPow2(size[0], transformDepth), Util.RoundUpPow2(size[1], transformDepth)); }