FreeRDP
rfx.c File Reference
#include <freerdp/config.h>
#include <winpr/assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/tchar.h>
#include <winpr/sysinfo.h>
#include <winpr/registry.h>
#include <freerdp/log.h>
#include <freerdp/settings.h>
#include <freerdp/codec/rfx.h>
#include <freerdp/constants.h>
#include <freerdp/primitives.h>
#include <freerdp/codec/region.h>
#include <freerdp/build-config.h>
#include "rfx_constants.h"
#include "rfx_types.h"
#include "rfx_decode.h"
#include "rfx_encode.h"
#include "rfx_quantization.h"
#include "rfx_dwt.h"
#include "rfx_rlgr.h"
#include "sse/rfx_sse2.h"
#include "neon/rfx_neon.h"

Macros

#define TAG   FREERDP_TAG("codec")
 
#define RFX_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\RemoteFX"
 
#define TILE_NO(v)   ((v) / 64)
 

Functions

static INLINE BOOL rfx_write_progressive_tile_simple (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s, const RFX_TILE *WINPR_RESTRICT tile)
 
static INLINE void rfx_profiler_create (RFX_CONTEXT *WINPR_RESTRICT context)
 
static INLINE void rfx_profiler_free (RFX_CONTEXT *WINPR_RESTRICT context)
 
static INLINE void rfx_profiler_print (RFX_CONTEXT *WINPR_RESTRICT context)
 
static INLINE void rfx_tile_init (void *obj)
 
static INLINE void * rfx_decoder_tile_new (const void *val)
 
static INLINE void rfx_decoder_tile_free (void *obj)
 
static INLINE void * rfx_encoder_tile_new (const void *val)
 
static INLINE void rfx_encoder_tile_free (void *obj)
 
RFX_CONTEXT * rfx_context_new (BOOL encoder)
 
RFX_CONTEXT * rfx_context_new_ex (BOOL encoder, UINT32 ThreadingFlags)
 
void rfx_context_free (RFX_CONTEXT *context)
 
static INLINE RFX_TILErfx_message_get_tile (RFX_MESSAGE *WINPR_RESTRICT message, UINT32 index)
 
static INLINE const RFX_RECTrfx_message_get_rect_const (const RFX_MESSAGE *WINPR_RESTRICT message, UINT32 index)
 
static INLINE RFX_RECTrfx_message_get_rect (RFX_MESSAGE *WINPR_RESTRICT message, UINT32 index)
 
void rfx_context_set_pixel_format (RFX_CONTEXT *WINPR_RESTRICT context, UINT32 pixel_format)
 
UINT32 rfx_context_get_pixel_format (RFX_CONTEXT *WINPR_RESTRICT context)
 
void rfx_context_set_palette (RFX_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT palette)
 
const BYTErfx_context_get_palette (RFX_CONTEXT *WINPR_RESTRICT context)
 
BOOL rfx_context_reset (RFX_CONTEXT *WINPR_RESTRICT context, UINT32 width, UINT32 height)
 
static INLINE BOOL rfx_process_message_sync (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_process_message_codec_versions (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_process_message_channels (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_process_message_context (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_process_message_frame_begin (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message, wStream *WINPR_RESTRICT s, UINT16 *WINPR_RESTRICT pExpectedBlockType)
 
static INLINE BOOL rfx_process_message_frame_end (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message, wStream *WINPR_RESTRICT s, UINT16 *WINPR_RESTRICT pExpectedBlockType)
 
static INLINE BOOL rfx_resize_rects (RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE BOOL rfx_process_message_region (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message, wStream *WINPR_RESTRICT s, UINT16 *WINPR_RESTRICT pExpectedBlockType)
 
static INLINE void CALLBACK rfx_process_message_tile_work_callback (PTP_CALLBACK_INSTANCE instance, void *context, PTP_WORK work)
 
static INLINE BOOL rfx_allocate_tiles (RFX_MESSAGE *WINPR_RESTRICT message, size_t count, BOOL allocOnly)
 
static INLINE BOOL rfx_process_message_tileset (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message, wStream *WINPR_RESTRICT s, UINT16 *WINPR_RESTRICT pExpectedBlockType)
 
BOOL rfx_process_message (RFX_CONTEXT *WINPR_RESTRICT context, const BYTE *WINPR_RESTRICT data, UINT32 length, UINT32 left, UINT32 top, BYTE *WINPR_RESTRICT dst, UINT32 dstFormat, UINT32 dstStride, UINT32 dstHeight, REGION16 *WINPR_RESTRICT invalidRegion)
 
const UINT32 * rfx_message_get_quants (const RFX_MESSAGE *WINPR_RESTRICT message, UINT16 *WINPR_RESTRICT numQuantVals)
 
const RFX_TILE ** rfx_message_get_tiles (const RFX_MESSAGE *WINPR_RESTRICT message, UINT16 *WINPR_RESTRICT numTiles)
 
UINT16 rfx_message_get_tile_count (const RFX_MESSAGE *WINPR_RESTRICT message)
 
const RFX_RECTrfx_message_get_rects (const RFX_MESSAGE *WINPR_RESTRICT message, UINT16 *WINPR_RESTRICT numRects)
 
UINT16 rfx_message_get_rect_count (const RFX_MESSAGE *WINPR_RESTRICT message)
 
void rfx_message_free (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE void rfx_update_context_properties (RFX_CONTEXT *WINPR_RESTRICT context)
 
static INLINE void rfx_write_message_sync (const RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE void rfx_write_message_codec_versions (const RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE void rfx_write_message_channels (const RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE void rfx_write_message_context (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_compose_message_header (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s)
 
static INLINE size_t rfx_tile_length (const RFX_TILE *WINPR_RESTRICT tile)
 
static INLINE BOOL rfx_write_tile (wStream *WINPR_RESTRICT s, const RFX_TILE *WINPR_RESTRICT tile)
 
static INLINE void CALLBACK rfx_compose_message_tile_work_callback (PTP_CALLBACK_INSTANCE instance, void *context, PTP_WORK work)
 
static INLINE BOOL computeRegion (const RFX_RECT *WINPR_RESTRICT rects, size_t numRects, REGION16 *WINPR_RESTRICT region, size_t width, size_t height)
 
static INLINE BOOL setupWorkers (RFX_CONTEXT *WINPR_RESTRICT context, size_t nbTiles)
 
static INLINE BOOL rfx_ensure_tiles (RFX_MESSAGE *WINPR_RESTRICT message, size_t count)
 
RFX_MESSAGE * rfx_encode_message (RFX_CONTEXT *WINPR_RESTRICT context, const RFX_RECT *WINPR_RESTRICT rects, size_t numRects, const BYTE *WINPR_RESTRICT data, UINT32 w, UINT32 h, size_t s)
 
static INLINE BOOL rfx_clone_rects (RFX_MESSAGE *WINPR_RESTRICT dst, const RFX_MESSAGE *WINPR_RESTRICT src)
 
static INLINE BOOL rfx_clone_quants (RFX_MESSAGE *WINPR_RESTRICT dst, const RFX_MESSAGE *WINPR_RESTRICT src)
 
static INLINE RFX_MESSAGE * rfx_split_message (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT message, size_t *WINPR_RESTRICT numMessages, size_t maxDataSize)
 
const RFX_MESSAGE * rfx_message_list_get (const RFX_MESSAGE_LIST *WINPR_RESTRICT messages, size_t idx)
 
void rfx_message_list_free (RFX_MESSAGE_LIST *messages)
 
static INLINE RFX_MESSAGE_LIST * rfx_message_list_new (RFX_CONTEXT *WINPR_RESTRICT context, RFX_MESSAGE *WINPR_RESTRICT messages, size_t count)
 
RFX_MESSAGE_LIST * rfx_encode_messages (RFX_CONTEXT *WINPR_RESTRICT context, const RFX_RECT *WINPR_RESTRICT rects, size_t numRects, const BYTE *WINPR_RESTRICT data, UINT32 width, UINT32 height, UINT32 scanline, size_t *WINPR_RESTRICT numMessages, size_t maxDataSize)
 
static INLINE BOOL rfx_write_message_tileset (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE BOOL rfx_write_message_frame_begin (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE BOOL rfx_write_message_region (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE BOOL rfx_write_message_frame_end (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT message)
 
BOOL rfx_write_message (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT message)
 
BOOL rfx_compose_message (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_RECT *WINPR_RESTRICT rects, size_t numRects, const BYTE *WINPR_RESTRICT data, UINT32 width, UINT32 height, UINT32 scanline)
 
BOOL rfx_context_set_mode (RFX_CONTEXT *WINPR_RESTRICT context, RLGR_MODE mode)
 
RLGR_MODE rfx_context_get_mode (RFX_CONTEXT *WINPR_RESTRICT context)
 
UINT32 rfx_context_get_frame_idx (const RFX_CONTEXT *WINPR_RESTRICT context)
 
UINT32 rfx_message_get_frame_idx (const RFX_MESSAGE *WINPR_RESTRICT message)
 
static INLINE BOOL rfx_write_progressive_wb_sync (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_write_progressive_wb_context (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s)
 
static INLINE BOOL rfx_write_progressive_region (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT msg)
 
static INLINE BOOL rfx_write_progressive_frame_begin (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT msg)
 
static INLINE BOOL rfx_write_progressive_frame_end (RFX_CONTEXT *WINPR_RESTRICT rfx, wStream *WINPR_RESTRICT s)
 
const char * rfx_get_progressive_block_type_string (UINT16 blockType)
 
BOOL rfx_write_message_progressive_simple (RFX_CONTEXT *WINPR_RESTRICT context, wStream *WINPR_RESTRICT s, const RFX_MESSAGE *WINPR_RESTRICT msg)
 

Variables

static const UINT32 rfx_default_quantization_values [] = { 6, 6, 6, 6, 7, 7, 8, 8, 8, 9 }
 

Macro Definition Documentation

◆ RFX_KEY

#define RFX_KEY   "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\RemoteFX"

◆ TAG

#define TAG   FREERDP_TAG("codec")

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library

Copyright 2011 Vic Lee Copyright 2015 Thincast Technologies GmbH Copyright 2015 Norbert Federa norbe.nosp@m.rt.f.nosp@m.edera.nosp@m.@thi.nosp@m.ncast.nosp@m..com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

◆ TILE_NO

#define TILE_NO (   v)    ((v) / 64)

Function Documentation

◆ computeRegion()

static INLINE BOOL computeRegion ( const RFX_RECT *WINPR_RESTRICT  rects,
size_t  numRects,
REGION16 *WINPR_RESTRICT  region,
size_t  width,
size_t  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_allocate_tiles()

static INLINE BOOL rfx_allocate_tiles ( RFX_MESSAGE *WINPR_RESTRICT  message,
size_t  count,
BOOL  allocOnly 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_clone_quants()

static INLINE BOOL rfx_clone_quants ( RFX_MESSAGE *WINPR_RESTRICT  dst,
const RFX_MESSAGE *WINPR_RESTRICT  src 
)
static
Here is the caller graph for this function:

◆ rfx_clone_rects()

static INLINE BOOL rfx_clone_rects ( RFX_MESSAGE *WINPR_RESTRICT  dst,
const RFX_MESSAGE *WINPR_RESTRICT  src 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_compose_message()

BOOL rfx_compose_message ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_RECT *WINPR_RESTRICT  rects,
size_t  numRects,
const BYTE *WINPR_RESTRICT  data,
UINT32  width,
UINT32  height,
UINT32  scanline 
)
Here is the call graph for this function:

◆ rfx_compose_message_header()

static INLINE BOOL rfx_compose_message_header ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_compose_message_tile_work_callback()

static INLINE void CALLBACK rfx_compose_message_tile_work_callback ( PTP_CALLBACK_INSTANCE  instance,
void *  context,
PTP_WORK  work 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_context_free()

void rfx_context_free ( RFX_CONTEXT *  context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_context_get_frame_idx()

UINT32 rfx_context_get_frame_idx ( const RFX_CONTEXT *WINPR_RESTRICT  context)

◆ rfx_context_get_mode()

RLGR_MODE rfx_context_get_mode ( RFX_CONTEXT *WINPR_RESTRICT  context)

◆ rfx_context_get_palette()

const BYTE* rfx_context_get_palette ( RFX_CONTEXT *WINPR_RESTRICT  context)

◆ rfx_context_get_pixel_format()

UINT32 rfx_context_get_pixel_format ( RFX_CONTEXT *WINPR_RESTRICT  context)

◆ rfx_context_new()

RFX_CONTEXT* rfx_context_new ( BOOL  encoder)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_context_new_ex()

RFX_CONTEXT* rfx_context_new_ex ( BOOL  encoder,
UINT32  ThreadingFlags 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_context_reset()

BOOL rfx_context_reset ( RFX_CONTEXT *WINPR_RESTRICT  context,
UINT32  width,
UINT32  height 
)

◆ rfx_context_set_mode()

BOOL rfx_context_set_mode ( RFX_CONTEXT *WINPR_RESTRICT  context,
RLGR_MODE  mode 
)

◆ rfx_context_set_palette()

void rfx_context_set_palette ( RFX_CONTEXT *WINPR_RESTRICT  context,
const BYTE *WINPR_RESTRICT  palette 
)

◆ rfx_context_set_pixel_format()

void rfx_context_set_pixel_format ( RFX_CONTEXT *WINPR_RESTRICT  context,
UINT32  pixel_format 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_decoder_tile_free()

static INLINE void rfx_decoder_tile_free ( void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_decoder_tile_new()

static INLINE void* rfx_decoder_tile_new ( const void *  val)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_encode_message()

RFX_MESSAGE* rfx_encode_message ( RFX_CONTEXT *WINPR_RESTRICT  context,
const RFX_RECT *WINPR_RESTRICT  rects,
size_t  numRects,
const BYTE *WINPR_RESTRICT  data,
UINT32  w,
UINT32  h,
size_t  s 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_encode_messages()

RFX_MESSAGE_LIST* rfx_encode_messages ( RFX_CONTEXT *WINPR_RESTRICT  context,
const RFX_RECT *WINPR_RESTRICT  rects,
size_t  numRects,
const BYTE *WINPR_RESTRICT  data,
UINT32  width,
UINT32  height,
UINT32  scanline,
size_t *WINPR_RESTRICT  numMessages,
size_t  maxDataSize 
)
Here is the call graph for this function:

◆ rfx_encoder_tile_free()

static INLINE void rfx_encoder_tile_free ( void *  obj)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_encoder_tile_new()

static INLINE void* rfx_encoder_tile_new ( const void *  val)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_ensure_tiles()

static INLINE BOOL rfx_ensure_tiles ( RFX_MESSAGE *WINPR_RESTRICT  message,
size_t  count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_get_progressive_block_type_string()

const char* rfx_get_progressive_block_type_string ( UINT16  blockType)
Here is the caller graph for this function:

◆ rfx_message_free()

void rfx_message_free ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_message_get_frame_idx()

UINT32 rfx_message_get_frame_idx ( const RFX_MESSAGE *WINPR_RESTRICT  message)

◆ rfx_message_get_quants()

const UINT32* rfx_message_get_quants ( const RFX_MESSAGE *WINPR_RESTRICT  message,
UINT16 *WINPR_RESTRICT  numQuantVals 
)

◆ rfx_message_get_rect()

static INLINE RFX_RECT* rfx_message_get_rect ( RFX_MESSAGE *WINPR_RESTRICT  message,
UINT32  index 
)
static
Here is the caller graph for this function:

◆ rfx_message_get_rect_const()

static INLINE const RFX_RECT* rfx_message_get_rect_const ( const RFX_MESSAGE *WINPR_RESTRICT  message,
UINT32  index 
)
static
Here is the caller graph for this function:

◆ rfx_message_get_rect_count()

UINT16 rfx_message_get_rect_count ( const RFX_MESSAGE *WINPR_RESTRICT  message)

◆ rfx_message_get_rects()

const RFX_RECT* rfx_message_get_rects ( const RFX_MESSAGE *WINPR_RESTRICT  message,
UINT16 *WINPR_RESTRICT  numRects 
)

◆ rfx_message_get_tile()

static INLINE RFX_TILE* rfx_message_get_tile ( RFX_MESSAGE *WINPR_RESTRICT  message,
UINT32  index 
)
static
Here is the caller graph for this function:

◆ rfx_message_get_tile_count()

UINT16 rfx_message_get_tile_count ( const RFX_MESSAGE *WINPR_RESTRICT  message)

◆ rfx_message_get_tiles()

const RFX_TILE** rfx_message_get_tiles ( const RFX_MESSAGE *WINPR_RESTRICT  message,
UINT16 *WINPR_RESTRICT  numTiles 
)

◆ rfx_message_list_free()

void rfx_message_list_free ( RFX_MESSAGE_LIST *  messages)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_message_list_get()

const RFX_MESSAGE* rfx_message_list_get ( const RFX_MESSAGE_LIST *WINPR_RESTRICT  messages,
size_t  idx 
)

◆ rfx_message_list_new()

static INLINE RFX_MESSAGE_LIST* rfx_message_list_new ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  messages,
size_t  count 
)
static
Here is the caller graph for this function:

◆ rfx_process_message()

BOOL rfx_process_message ( RFX_CONTEXT *WINPR_RESTRICT  context,
const BYTE *WINPR_RESTRICT  data,
UINT32  length,
UINT32  left,
UINT32  top,
BYTE *WINPR_RESTRICT  dst,
UINT32  dstFormat,
UINT32  dstStride,
UINT32  dstHeight,
REGION16 *WINPR_RESTRICT  invalidRegion 
)
Here is the call graph for this function:

◆ rfx_process_message_channels()

static INLINE BOOL rfx_process_message_channels ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_process_message_codec_versions()

static INLINE BOOL rfx_process_message_codec_versions ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the caller graph for this function:

◆ rfx_process_message_context()

static INLINE BOOL rfx_process_message_context ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the caller graph for this function:

◆ rfx_process_message_frame_begin()

static INLINE BOOL rfx_process_message_frame_begin ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message,
wStream *WINPR_RESTRICT  s,
UINT16 *WINPR_RESTRICT  pExpectedBlockType 
)
static
Here is the caller graph for this function:

◆ rfx_process_message_frame_end()

static INLINE BOOL rfx_process_message_frame_end ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message,
wStream *WINPR_RESTRICT  s,
UINT16 *WINPR_RESTRICT  pExpectedBlockType 
)
static
Here is the caller graph for this function:

◆ rfx_process_message_region()

static INLINE BOOL rfx_process_message_region ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message,
wStream *WINPR_RESTRICT  s,
UINT16 *WINPR_RESTRICT  pExpectedBlockType 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_process_message_sync()

static INLINE BOOL rfx_process_message_sync ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the caller graph for this function:

◆ rfx_process_message_tile_work_callback()

static INLINE void CALLBACK rfx_process_message_tile_work_callback ( PTP_CALLBACK_INSTANCE  instance,
void *  context,
PTP_WORK  work 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_process_message_tileset()

static INLINE BOOL rfx_process_message_tileset ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message,
wStream *WINPR_RESTRICT  s,
UINT16 *WINPR_RESTRICT  pExpectedBlockType 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_profiler_create()

static INLINE void rfx_profiler_create ( RFX_CONTEXT *WINPR_RESTRICT  context)
static
Here is the caller graph for this function:

◆ rfx_profiler_free()

static INLINE void rfx_profiler_free ( RFX_CONTEXT *WINPR_RESTRICT  context)
static
Here is the caller graph for this function:

◆ rfx_profiler_print()

static INLINE void rfx_profiler_print ( RFX_CONTEXT *WINPR_RESTRICT  context)
static
Here is the caller graph for this function:

◆ rfx_resize_rects()

static INLINE BOOL rfx_resize_rects ( RFX_MESSAGE *WINPR_RESTRICT  message)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_split_message()

static INLINE RFX_MESSAGE* rfx_split_message ( RFX_CONTEXT *WINPR_RESTRICT  context,
RFX_MESSAGE *WINPR_RESTRICT  message,
size_t *WINPR_RESTRICT  numMessages,
size_t  maxDataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_tile_init()

static INLINE void rfx_tile_init ( void *  obj)
static
Here is the caller graph for this function:

◆ rfx_tile_length()

static INLINE size_t rfx_tile_length ( const RFX_TILE *WINPR_RESTRICT  tile)
static
Here is the caller graph for this function:

◆ rfx_update_context_properties()

static INLINE void rfx_update_context_properties ( RFX_CONTEXT *WINPR_RESTRICT  context)
static
Here is the caller graph for this function:

◆ rfx_write_message()

BOOL rfx_write_message ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  message 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_channels()

static INLINE void rfx_write_message_channels ( const RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_codec_versions()

static INLINE void rfx_write_message_codec_versions ( const RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_context()

static INLINE void rfx_write_message_context ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_frame_begin()

static INLINE BOOL rfx_write_message_frame_begin ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_frame_end()

static INLINE BOOL rfx_write_message_frame_end ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_progressive_simple()

BOOL rfx_write_message_progressive_simple ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  msg 
)
Here is the call graph for this function:

◆ rfx_write_message_region()

static INLINE BOOL rfx_write_message_region ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_sync()

static INLINE void rfx_write_message_sync ( const RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_message_tileset()

static INLINE BOOL rfx_write_message_tileset ( RFX_CONTEXT *WINPR_RESTRICT  context,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  message 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_frame_begin()

static INLINE BOOL rfx_write_progressive_frame_begin ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  msg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_frame_end()

static INLINE BOOL rfx_write_progressive_frame_end ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_region()

static INLINE BOOL rfx_write_progressive_region ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s,
const RFX_MESSAGE *WINPR_RESTRICT  msg 
)
static

Note: The RFX_COMPONENT_CODEC_QUANT structure differs from the TS_RFX_CODEC_QUANT ([MS-RDPRFX] section 2.2.2.1.5) structure with respect to the order of the bands. 0 1 2 3 4 5 6 7 8 9 RDPRFX: LL3, LH3, HL3, HH3, LH2, HL2, HH2, LH1, HL1, HH1 RDPEGFX: LL3, HL3, LH3, HH3, HL2, LH2, HH2, HL1, LH1, HH1

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_tile_simple()

static INLINE BOOL rfx_write_progressive_tile_simple ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s,
const RFX_TILE *WINPR_RESTRICT  tile 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_wb_context()

static INLINE BOOL rfx_write_progressive_wb_context ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_progressive_wb_sync()

static INLINE BOOL rfx_write_progressive_wb_sync ( RFX_CONTEXT *WINPR_RESTRICT  rfx,
wStream *WINPR_RESTRICT  s 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_write_tile()

static INLINE BOOL rfx_write_tile ( wStream *WINPR_RESTRICT  s,
const RFX_TILE *WINPR_RESTRICT  tile 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupWorkers()

static INLINE BOOL setupWorkers ( RFX_CONTEXT *WINPR_RESTRICT  context,
size_t  nbTiles 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ rfx_default_quantization_values

const UINT32 rfx_default_quantization_values[] = { 6, 6, 6, 6, 7, 7, 8, 8, 8, 9 }
static

The quantization values control the compression rate and quality. The value range is between 6 and 15. The higher value, the higher compression rate and lower quality.

This is the default values being use by the MS RDP server, and we will also use it as our default values for the encoder. It can be overrided by setting the context->num_quants and context->quants member.

The order of the values are: LL3, LH3, HL3, HH3, LH2, HL2, HH2, LH1, HL1, HH1