FreeRDP
TestFreeRDPCodecPlanar.c File Reference
#include <math.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/crypto.h>
#include <freerdp/freerdp.h>
#include <freerdp/codec/color.h>
#include <freerdp/codec/bitmap.h>
#include <freerdp/codec/planar.h>

Functions

static BOOL CompareBitmap (const BYTE *srcA, UINT32 srcAFormat, const BYTE *srcB, UINT32 srcBFormat, UINT32 width, UINT32 height)
 
static BOOL RunTestPlanar (BITMAP_PLANAR_CONTEXT *planar, const BYTE *srcBitmap, const UINT32 srcFormat, const UINT32 dstFormat, const UINT32 width, const UINT32 height)
 
static BOOL RunTestPlanarSingleColor (BITMAP_PLANAR_CONTEXT *planar, const UINT32 srcFormat, const UINT32 dstFormat)
 
static BOOL TestPlanar (const UINT32 format)
 
static UINT32 prand (UINT32 max)
 
static BOOL FuzzPlanar (void)
 
int TestFreeRDPCodecPlanar (int argc, char *argv[])
 

Variables

static const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_01 [16384]
 
static const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_02 [16384]
 
static const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_03 [16384]
 
static const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_03_RLE [11160]
 
static const BYTE TEST_64X64_RED_PLANE [4096]
 
static const BYTE TEST_64X64_RED_PLANE_RLE [3739]
 
static const BYTE TEST_64X64_GREEN_PLANE [4096]
 
static const BYTE TEST_64X64_GREEN_PLANE_RLE [3696]
 
static const BYTE TEST_64X64_BLUE_PLANE [4096]
 
static const BYTE TEST_64X64_BLUE_PLANE_RLE [3724]
 
static const BYTE TEST_RLE_UNCOMPRESSED_BITMAP_16BPP [2048]
 
static const UINT32 colorFormatList []
 
static const UINT32 colorFormatCount = sizeof(colorFormatList) / sizeof(colorFormatList[0])
 

Function Documentation

◆ CompareBitmap()

static BOOL CompareBitmap ( const BYTE srcA,
UINT32  srcAFormat,
const BYTE srcB,
UINT32  srcBFormat,
UINT32  width,
UINT32  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FuzzPlanar()

static BOOL FuzzPlanar ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prand()

static UINT32 prand ( UINT32  max)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunTestPlanar()

static BOOL RunTestPlanar ( BITMAP_PLANAR_CONTEXT *  planar,
const BYTE srcBitmap,
const UINT32  srcFormat,
const UINT32  dstFormat,
const UINT32  width,
const UINT32  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunTestPlanarSingleColor()

static BOOL RunTestPlanarSingleColor ( BITMAP_PLANAR_CONTEXT *  planar,
const UINT32  srcFormat,
const UINT32  dstFormat 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecPlanar()

int TestFreeRDPCodecPlanar ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

◆ TestPlanar()

static BOOL TestPlanar ( const UINT32  format)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ colorFormatCount

const UINT32 colorFormatCount = sizeof(colorFormatList) / sizeof(colorFormatList[0])
static

◆ colorFormatList

◆ TEST_64X64_BLUE_PLANE

const BYTE TEST_64X64_BLUE_PLANE[4096]
static

◆ TEST_64X64_BLUE_PLANE_RLE

const BYTE TEST_64X64_BLUE_PLANE_RLE[3724]
static

◆ TEST_64X64_GREEN_PLANE

const BYTE TEST_64X64_GREEN_PLANE[4096]
static

◆ TEST_64X64_GREEN_PLANE_RLE

const BYTE TEST_64X64_GREEN_PLANE_RLE[3696]
static

◆ TEST_64X64_RED_PLANE

const BYTE TEST_64X64_RED_PLANE[4096]
static

◆ TEST_64X64_RED_PLANE_RLE

const BYTE TEST_64X64_RED_PLANE_RLE[3739]
static

◆ TEST_RLE_BITMAP_EXPERIMENTAL_01

const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_01[16384]
static

Experimental Case 01: 64x64 (32bpp)

◆ TEST_RLE_BITMAP_EXPERIMENTAL_02

const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_02[16384]
static

Experimental Case 02: 64x64 (32bpp)

◆ TEST_RLE_BITMAP_EXPERIMENTAL_03

const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_03[16384]
static

Experimental Case 03: 64x64 (32bpp)

◆ TEST_RLE_BITMAP_EXPERIMENTAL_03_RLE

const BYTE TEST_RLE_BITMAP_EXPERIMENTAL_03_RLE[11160]
static

◆ TEST_RLE_UNCOMPRESSED_BITMAP_16BPP

const BYTE TEST_RLE_UNCOMPRESSED_BITMAP_16BPP[2048]
static

[MS-RDPEGDI] Test Bitmap 32x32 (16bpp)

PIXEL_FORMAT_XRGB32
#define PIXEL_FORMAT_XRGB32
Definition: color.h:64
PIXEL_FORMAT_ARGB32
#define PIXEL_FORMAT_ARGB32
Definition: color.h:63
PIXEL_FORMAT_BGR16
#define PIXEL_FORMAT_BGR16
Definition: color.h:78
PIXEL_FORMAT_RGB24
#define PIXEL_FORMAT_RGB24
Definition: color.h:73
PIXEL_FORMAT_ABGR32
#define PIXEL_FORMAT_ABGR32
Definition: color.h:65
PIXEL_FORMAT_RGB16
#define PIXEL_FORMAT_RGB16
Definition: color.h:77
PIXEL_FORMAT_XBGR32
#define PIXEL_FORMAT_XBGR32
Definition: color.h:66
PIXEL_FORMAT_BGR24
#define PIXEL_FORMAT_BGR24
Definition: color.h:74
PIXEL_FORMAT_BGRX32
#define PIXEL_FORMAT_BGRX32
Definition: color.h:68
PIXEL_FORMAT_RGB15
#define PIXEL_FORMAT_RGB15
Definition: color.h:80
PIXEL_FORMAT_RGBX32
#define PIXEL_FORMAT_RGBX32
Definition: color.h:70
PIXEL_FORMAT_BGR15
#define PIXEL_FORMAT_BGR15
Definition: color.h:82