public void setOutSamples(DataBlob.Samples samples) { outSamples = samples; properties["outSamples"].nValue = (int)samples; setExtra(options[(int)samples] + " to " + options[(int)outSamples]); soil(); }
public static Size getPaddedCbCrSize(Size ySize, DataBlob.Samples mode) { switch (mode) { case DataBlob.Samples.s444: break; case DataBlob.Samples.s422: ySize.Width = (ySize.Width + 1) / 2; break; case DataBlob.Samples.s420: ySize.Width = (ySize.Width + 1) / 2; ySize.Height = (ySize.Height + 1) / 2; break; case DataBlob.Samples.s411: ySize.Width = (ySize.Width + 3) / 4; break; } if (ySize.Width % 8 != 0) { ySize.Width += 8 - (ySize.Width % 8); } if (ySize.Height % 8 != 0) { ySize.Height += 8 - (ySize.Height % 8); } return(ySize); }