FreeRDP
prim_colors.c File Reference
#include <freerdp/config.h>
#include <freerdp/types.h>
#include <freerdp/primitives.h>
#include <freerdp/codec/color.h>
#include "prim_internal.h"

Macros

#define MINMAX(_v_, _l_, _h_)   ((_v_) < (_l_) ? (_l_) : ((_v_) > (_h_) ? (_h_) : (_v_)))
 

Typedefs

typedef void(* fkt_writeScanline) (BYTE *, DWORD, UINT32, const INT16 *, const INT16 *, const INT16 *, DWORD)
 

Functions

static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_yCbCrToRGB_16s16s_P3P3 (const INT16 *const WINPR_RESTRICT pSrc[3], INT32 srcStep, INT16 *WINPR_RESTRICT pDst[3], INT32 dstStep, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_RGBToYCbCr_16s16s_P3P3 (const INT16 *const WINPR_RESTRICT pSrc[3], INT32 srcStep, INT16 *WINPR_RESTRICT pDst[3], INT32 dstStep, const prim_size_t *WINPR_RESTRICT roi)
 
static INLINE void writeScanlineGeneric (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineRGB (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineBGR (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineBGRX (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineRGBX (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineXBGR (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE void writeScanlineXRGB (BYTE *dst, DWORD formatSize, UINT32 DstFormat, const INT16 *r, const INT16 *g, const INT16 *b, DWORD width)
 
static INLINE fkt_writeScanline getScanlineWriteFunction (DWORD format)
 
static pstatus_t general_RGBToRGB_16s8u_P3AC4R_general (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_RGBToRGB_16s8u_P3AC4R_BGRX (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
static pstatus_t general_RGBToRGB_16s8u_P3AC4R (const INT16 *const WINPR_RESTRICT pSrc[3], UINT32 srcStep, BYTE *WINPR_RESTRICT pDst, UINT32 dstStep, UINT32 DstFormat, const prim_size_t *WINPR_RESTRICT roi)
 
void primitives_init_colors (primitives_t *prims)
 

Macro Definition Documentation

◆ MINMAX

#define MINMAX (   _v_,
  _l_,
  _h_ 
)    ((_v_) < (_l_) ? (_l_) : ((_v_) > (_h_) ? (_h_) : (_v_)))

Typedef Documentation

◆ fkt_writeScanline

typedef void(* fkt_writeScanline) (BYTE *, DWORD, UINT32, const INT16 *, const INT16 *, const INT16 *, DWORD)

Function Documentation

◆ general_RGBToRGB_16s8u_P3AC4R()

static pstatus_t general_RGBToRGB_16s8u_P3AC4R ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_RGBToRGB_16s8u_P3AC4R_BGRX()

static pstatus_t general_RGBToRGB_16s8u_P3AC4R_BGRX ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_RGBToRGB_16s8u_P3AC4R_general()

static pstatus_t general_RGBToRGB_16s8u_P3AC4R_general ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_RGBToYCbCr_16s16s_P3P3()

static pstatus_t general_RGBToYCbCr_16s16s_P3P3 ( const INT16 *const WINPR_RESTRICT  pSrc[3],
INT32  srcStep,
INT16 *WINPR_RESTRICT  pDst[3],
INT32  dstStep,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the caller graph for this function:

◆ general_yCbCrToRGB_16s16s_P3P3()

static pstatus_t general_yCbCrToRGB_16s16s_P3P3 ( const INT16 *const WINPR_RESTRICT  pSrc[3],
INT32  srcStep,
INT16 *WINPR_RESTRICT  pDst[3],
INT32  dstStep,
const prim_size_t *WINPR_RESTRICT  roi 
)
static

The decoded YCbCr coeffectients are represented as 11.5 fixed-point numbers:

1 sign bit + 10 integer bits + 5 fractional bits

However only 7 integer bits will be actually used since the value range is [-128.0, 127.0]. In other words, the decoded coefficients are scaled by << 5 when interpreted as INT16. It was scaled in the quantization phase, so we must scale it back here.

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

◆ general_yCbCrToRGB_16s8u_P3AC4R()

static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_yCbCrToRGB_16s8u_P3AC4R_BGRX()

static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_yCbCrToRGB_16s8u_P3AC4R_general()

static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general ( const INT16 *const WINPR_RESTRICT  pSrc[3],
UINT32  srcStep,
BYTE *WINPR_RESTRICT  pDst,
UINT32  dstStep,
UINT32  DstFormat,
const prim_size_t *WINPR_RESTRICT  roi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getScanlineWriteFunction()

static INLINE fkt_writeScanline getScanlineWriteFunction ( DWORD  format)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ primitives_init_colors()

void primitives_init_colors ( primitives_t prims)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineBGR()

static INLINE void writeScanlineBGR ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineBGRX()

static INLINE void writeScanlineBGRX ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineGeneric()

static INLINE void writeScanlineGeneric ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineRGB()

static INLINE void writeScanlineRGB ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineRGBX()

static INLINE void writeScanlineRGBX ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineXBGR()

static INLINE void writeScanlineXBGR ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeScanlineXRGB()

static INLINE void writeScanlineXRGB ( BYTE dst,
DWORD  formatSize,
UINT32  DstFormat,
const INT16 *  r,
const INT16 *  g,
const INT16 *  b,
DWORD  width 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: