Skip to content

Commit

Permalink
Merge pull request FreeRDP#1345 from nfedera/feat-2013-07-10-01
Browse files Browse the repository at this point in the history
codec/rfx: use function pointer for rlgr codec
  • Loading branch information
bmiklautz committed Jul 10, 2013
2 parents 7572be0 + b9c8ac6 commit 780d451
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/freerdp/codec/rfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ struct _RFX_CONTEXT
void (*quantization_encode)(INT16* buffer, const UINT32* quantization_values);
void (*dwt_2d_decode)(INT16* buffer, INT16* dwt_buffer);
void (*dwt_2d_encode)(INT16* buffer, INT16* dwt_buffer);
int (*rlgr_decode)(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size);
int (*rlgr_encode)(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size);

/* private definitions */
RFX_CONTEXT_PRIV* priv;
Expand Down
3 changes: 3 additions & 0 deletions libfreerdp/codec/rfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "rfx_encode.h"
#include "rfx_quantization.h"
#include "rfx_dwt.h"
#include "rfx_rlgr.h"

#include "rfx_sse2.h"
#include "rfx_neon.h"
Expand Down Expand Up @@ -240,6 +241,8 @@ RFX_CONTEXT* rfx_context_new(void)
context->quantization_encode = rfx_quantization_encode;
context->dwt_2d_decode = rfx_dwt_2d_decode;
context->dwt_2d_encode = rfx_dwt_2d_encode;
context->rlgr_decode = rfx_rlgr_decode;
context->rlgr_encode = rfx_rlgr_encode;

RFX_INIT_SIMD(context);

Expand Down
2 changes: 1 addition & 1 deletion libfreerdp/codec/rfx_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static void rfx_decode_component(RFX_CONTEXT* context, const UINT32* quantizatio
PROFILER_ENTER(context->priv->prof_rfx_decode_component);

PROFILER_ENTER(context->priv->prof_rfx_rlgr_decode);
rfx_rlgr_decode(context->mode, data, size, buffer, 4096);
context->rlgr_decode(context->mode, data, size, buffer, 4096);
PROFILER_EXIT(context->priv->prof_rfx_rlgr_decode);

PROFILER_ENTER(context->priv->prof_rfx_differential_decode);
Expand Down
2 changes: 1 addition & 1 deletion libfreerdp/codec/rfx_encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void rfx_encode_component(RFX_CONTEXT* context, const UINT32* quantizatio
PROFILER_EXIT(context->priv->prof_rfx_differential_encode);

PROFILER_ENTER(context->priv->prof_rfx_rlgr_encode);
*size = rfx_rlgr_encode(context->mode, data, 4096, buffer, buffer_size);
*size = context->rlgr_encode(context->mode, data, 4096, buffer, buffer_size);
PROFILER_EXIT(context->priv->prof_rfx_rlgr_encode);

PROFILER_EXIT(context->priv->prof_rfx_encode_component);
Expand Down

0 comments on commit 780d451

Please sign in to comment.