2.2.4.2.1.5 RFX_PROGRESSIVE_REGION

The RFX_PROGRESSIVE_REGION structure contains the compressed data for a set of tiles from the frame. All RFX_PROGRESSIVE_REGION blocks SHOULD be present between the RFX_PROGRESSIVE_FRAME_BEGIN (section 2.2.4.2.1.2) and RFX_PROGRESSIVE_FRAME_END (section 2.2.4.2.1.3) blocks. If a block is not present between the RFX_PROGRESSIVE_FRAME_BEGIN and RFX_PROGRESSIVE_FRAME_END blocks, the decoder MUST ignore it.

Note that RFX_PROGRESSIVE_REGION entries that are part of the same frame can share the tiles defined in the tiles field of each entry. In this scenario, tiles are not repeated in successive RFX_PROGRESSIVE_REGION entries. Across all of the RFX_PROGRESSIVE_REGION entries of a frame, the rectangles (defined in the rects field of each entry) MUST be distinct, and the region defined by these rectangles MUST be completely covered by all of the tiles defined in the RFX_PROGRESSIVE_REGION entries of the frames. Note that in this context, the frame is bracketed between the RDPGFX_START_FRAME_PDU and the RDPGFX_END_FRAME_PDU, and can span multiple RFX_PROGRESSIVE_FRAME_BEGIN and RFX_PROGRESSIVE_FRAME_END blocks.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

blockType

blockLen

...

tileSize

numRects

...

numQuant

numProgQuant

flags

numTiles

tileDataSize

...

rects (variable)

...

...

quantVals (variable)

...

...

quantProgVals (variable)

...

...

tiles (variable)

...

...

blockType (2 bytes):  A 16-bit unsigned integer that specifies the block type. This field MUST be set to WBT_REGION (0xCCC4).

blockLen (4 bytes):  A 32-bit unsigned integer that specifies the size, in bytes, of the variable-length RFX_PROGRESSIVE_REGION block.

tileSize (1 byte):  An 8-bit unsigned integer that indicates the width and height of a square tile. This field MUST be set to 0x40.

numRects (2 bytes):  A 16-bit unsigned integer that specifies the number of TS_RFX_RECT ([MS-RDPRFX] section 2.2.2.1.6) structures in the rects field. The value of this field MUST be greater than zero.

numQuant (1 byte):  An 8-bit unsigned integer that specifies the number of RFX_COMPONENT_CODEC_QUANT (section 2.2.4.2.1.5.2) structures in the quantVals field. The value of this field MUST be in the range 0 to 7 (inclusive).

numProgQuant (1 byte):  An 8-bit unsigned integer that specifies the number of RFX_PROGRESSIVE_CODEC_QUANT (section 2.2.4.2.1.5.1) structures in the quantProgVals field.

flags (1 byte):  An 8-bit unsigned integer that contains region flags.

Flag

Meaning

RFX_DWT_REDUCE_EXTRAPOLATE

0x01

Indicates that the discrete wavelet transform (DWT) uses the "Reduce-Extrapolate" method.

numTiles (2 bytes):  A 16-bit unsigned integer that specifies the number of elements in the tiles field.

tileDataSize (4 bytes):  A 32-bit unsigned integer that specifies the size, in bytes, of the tiles field.

rects (variable):  A variable-length array of TS_RFX_RECT structures that specifies the encoded region (the number of rectangles in this field is specified by the numRects field). This region MUST be completely covered by the tiles enumerated in the tiles field of this RFX_PROGRESSIVE_REGION entry and by tiles that were specified in RFX_PROGRESSIVE_REGION entries that previously appeared within the current frame. Note that because regions are not necessarily tile-aligned, it is valid for tiles to carry compressed information for pixels outside of the region.

quantVals (variable): A variable-length array of RFX_COMPONENT_CODEC_QUANT structures (the number of quantization tables in this field is specified by the numQuant field).

quantProgVals (variable):  A variable-length array of RFX_PROGRESSIVE_CODEC_QUANT structures (the number of quantization tables in this field is specified by the numProgQuant field).

tiles (variable):  A variable-length array of RFX_PROGRESSIVE_DATABLOCK (section 2.2.4.2.1) structures. The value of the blockType field of each block present in the array MUST be WBT_TILE_SIMPLE (0xCCC5), WBT_TILE_PROGRESSIVE_FIRST (0xCCC6), or WBT_TILE_PROGRESSIVE_UPGRADE (0xCCC7).