1: //------------------------------------------------------------------------------
2: // Copyright (c) Microsoft Corporation. All rights reserved.
3: //------------------------------------------------------------------------------
4:
5:
6: using System;
7: using System.Collections.Generic;
8: using Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdprfx;
9:
10: namespace Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpegfx
11: {
12: /// <summary>
13: /// The RemoteFX Progressive Codec Context class
14: /// </summary>
15: public class RfxProgressiveCodecContext : RemoteFXCodecContext
16: {
17: /// <summary>
18: /// Indicates if the Discrete Wavelet Transform (DWT) uses the "Reduce Extrapolate" method.
19: /// </summary>
20: public bool UseReduceExtrapolate;
21:
22: /// <summary>
23: /// Indicates if use progressive techniques.
24: /// </summary>
25: public bool UseProgressive;
26:
27: /// <summary>
28: /// Indicates if allow to send difference tile
29: /// </summary>
30: public bool UseDifferenceTile;
31:
32: //Data already sent
33: public DwtTile DAS;
34:
35: //Data remaining to be sent
36: public DwtTile DRS;
37:
38: //Data to be sent
39: public DwtTile DTS;
40:
41: //Data to be sent after progressive quantantian
42: public DwtTile ProgQ;
43:
44: //The tri-state
45: public DwtTile TriSignState;
46:
47: //the last chunk for progressive encoding
48: public RFX_PROGRESSIVE_CODEC_QUANT prevProgQuant;
49:
50: /// <summary>
51: /// Consturctor
52: /// </summary>
53: /// <param name="tsRfxCodecQuantVals">Codec quantity values array</param>
54: /// <param name="quantIdxY">Index of Y component in quantity array</param>
55: /// <param name="quantIdxCb">Index of Cb component in quantity array</param>
56: /// <param name="quantIdxCr">Index of Cr component in quantity array</param>
57: /// <param name="bProgressive">indicates if use progressive codec</param>
58: /// <param name="bTileDiff">indicates if sub-diffing</param>
59: /// <param name="bReduceExtrapolate">Indicates if use Reduce-Extrapolate method in DWT</param>
60: public RfxProgressiveCodecContext(
61: TS_RFX_CODEC_QUANT[] tsRfxCodecQuantVals,
62: byte quantIdxY,
63: byte quantIdxCb,
64: byte quantIdxCr,
65: bool bProgressive = false,
66: bool bTileDiff = true,
67: bool bReduceExtrapolate = true)
68: : base(tsRfxCodecQuantVals, quantIdxY, quantIdxCb, quantIdxCr, EntropyAlgorithm.CLW_ENTROPY_RLGR1)
69: {
70: UseProgressive = bProgressive;
71: UseDifferenceTile = bTileDiff;
72: UseReduceExtrapolate = bReduceExtrapolate;
73: prevProgQuant = RdpegfxTileUtils.GetProgCodecQuant(ProgressiveChunk_Values.kChunk_None);
74: }
75:
76: /// <summary>
77: /// Consturctor
78: /// </summary>
79: /// <param name="tsRfxCodecQuantVals">Codec quantity values array</param>
80: /// <param name="quantIdxY">Index of Y component in quantity array</param>
81: /// <param name="quantIdxCb">Index of Cb component in quantity array</param>
82: /// <param name="quantIdxCr">Index of Cr component in quantity array</param>
83: /// <param name="useReduceExtrapolate">Indicates if used Reduce-Extrapolate method in DWT</param>
84: public RfxProgressiveCodecContext(
85: TS_RFX_CODEC_QUANT[] tsRfxCodecQuantVals,
86: byte quantIdxY,
87: byte quantIdxCb,
88: byte quantIdxCr,
89: bool useReduceExtrapolate = true)
90: : base(tsRfxCodecQuantVals, quantIdxY, quantIdxCb, quantIdxCr, EntropyAlgorithm.CLW_ENTROPY_RLGR1)
91: {
92: UseReduceExtrapolate = useReduceExtrapolate;
93: }
94: }
95: }