/// <summary> /// Apply floating point IDCT transformation into dest, using a temporary block 'temp' provided by the caller (optimization) /// </summary> /// <param name="src">Source</param> /// <param name="dest">Destination</param> /// <param name="temp">Temporary block provided by the caller</param> public static void TransformIDCT(ref Block8x8F src, ref Block8x8F dest, ref Block8x8F temp) { src.TransposeInto(ref temp); IDCT8x4_LeftPart(ref temp, ref dest); IDCT8x4_RightPart(ref temp, ref dest); dest.TransposeInto(ref temp); IDCT8x4_LeftPart(ref temp, ref dest); IDCT8x4_RightPart(ref temp, ref dest); dest.MultiplyAllInplace(C_0_125); }
/// <summary> /// Apply floating point IDCT transformation into dest, using a temporary block 'temp' provided by the caller (optimization) /// </summary> /// <param name="src">Source</param> /// <param name="dest">Destination</param> /// <param name="temp">Temporary block provided by the caller</param> /// <param name="offsetSourceByNeg128">If true, a constant -128.0 offset is applied for all values before FDCT </param> public static void TransformFDCT( ref Block8x8F src, ref Block8x8F dest, ref Block8x8F temp, bool offsetSourceByNeg128 = true) { src.TransposeInto(ref temp); if (offsetSourceByNeg128) { temp.AddToAllInplace(new Vector4(-128)); } FDCT8x4_LeftPart(ref temp, ref dest); FDCT8x4_RightPart(ref temp, ref dest); dest.TransposeInto(ref temp); FDCT8x4_LeftPart(ref temp, ref dest); FDCT8x4_RightPart(ref temp, ref dest); dest.MultiplyAllInplace(C_0_125); }