public override Tile DoAction(Tile input)
        {
            this.Input = new[] { input };

            Triplet <byte[, ]>  triplet       = input.GetMatrices <byte>();
            Triplet <short[, ]> resultTriplet = RFXEncoderWrapper.RGBToYUV(triplet.X, triplet.Y, triplet.Z);
            Tile output = Tile.FromMatrices <short>(resultTriplet);

            this.Result = new[] { output };
            return(output);
        }
        public sealed override Tile DoAction(Tile input)
        {
            short[,] x, y, z;

            this.Input = new[] { input };
            Triplet <short[, ]> triplet = input.GetMatrices <short>();

            RFXEncoderWrapper.Quantization(triplet.X, QuantArray.quants[0], out x);
            RFXEncoderWrapper.Quantization(triplet.Y, QuantArray.quants[1], out y);
            RFXEncoderWrapper.Quantization(triplet.Z, QuantArray.quants[2], out z);

            var  resultTriplet = new Triplet <short[, ]>(x, y, z);
            Tile output        = Tile.FromMatrices <short>(resultTriplet);

            this.Result = new[] { output };
            return(output);
        }
        public override Tile DoAction(Tile input)
        {
            short[,] x, y, z;

            this.Input = new[] { input };
            Triplet <short[, ]> triplet = input.GetMatrices <short>();

            RFXEncoderWrapper.DWT(triplet.X, out x);
            RFXEncoderWrapper.DWT(triplet.Y, out y);
            RFXEncoderWrapper.DWT(triplet.Z, out z);

            var  resultTriplet = new Triplet <short[, ]>(x, y, z);
            Tile output        = Tile.FromMatrices <short>(resultTriplet);

            this.Result = new[] { output };
            return(output);
        }
        public override Tile DoAction(Tile input)
        {
            byte[] x, y, z;

            this.Input = new[] { input };
            Triplet <short[]> triplet = input.GetArrays <short>();

            //// better use foreach, instead of repeating the code..
            RFXEncoderWrapper.RLGREncode(triplet.X, this.Mode, out x);
            RFXEncoderWrapper.RLGREncode(triplet.Y, this.Mode, out y);
            RFXEncoderWrapper.RLGREncode(triplet.Z, this.Mode, out z);

            var  resultTriplet = new Triplet <byte[]>(x, y, z);
            Tile output        = Tile.FromArrays <byte>(resultTriplet);

            this.Result = new[] { output };
            return(output);
        }