FreeRDP
rfx_encode.c File Reference
#include <freerdp/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/crt.h>
#include <winpr/collections.h>
#include <freerdp/primitives.h>
#include "rfx_types.h"
#include "rfx_rlgr.h"
#include "rfx_differential.h"
#include "rfx_quantization.h"
#include "rfx_dwt.h"
#include "rfx_encode.h"

Macros

#define MINMAX(_v, _l, _h)   ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v)))
 

Functions

static void rfx_encode_format_rgb (const BYTE *rgb_data, int width, int height, int rowstride, UINT32 pixel_format, const BYTE *palette, INT16 *r_buf, INT16 *g_buf, INT16 *b_buf)
 
static void rfx_encode_component (RFX_CONTEXT *context, const UINT32 *quantization_values, INT16 *data, BYTE *buffer, int buffer_size, int *size)
 
void rfx_encode_rgb (RFX_CONTEXT *context, RFX_TILE *tile)
 

Macro Definition Documentation

◆ MINMAX

#define MINMAX (   _v,
  _l,
  _h 
)    ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v)))

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library - Encode

Copyright 2011 Vic Lee Copyright 2011 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.

Function Documentation

◆ rfx_encode_component()

static void rfx_encode_component ( RFX_CONTEXT *  context,
const UINT32 *  quantization_values,
INT16 *  data,
BYTE buffer,
int  buffer_size,
int *  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rfx_encode_format_rgb()

static void rfx_encode_format_rgb ( const BYTE rgb_data,
int  width,
int  height,
int  rowstride,
UINT32  pixel_format,
const BYTE palette,
INT16 *  r_buf,
INT16 *  g_buf,
INT16 *  b_buf 
)
static
Here is the caller graph for this function:

◆ rfx_encode_rgb()

void rfx_encode_rgb ( RFX_CONTEXT *  context,
RFX_TILE tile 
)

FreeRDP: A Remote Desktop Protocol Implementation RemoteFX Codec Library - Encode

Copyright 2011 Vic Lee

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.

We need to clear the buffers as the RLGR encoder expects it to be initialized to zero. This allows simplifying and improving the performance of the encoding process.

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