MythTV  master
Macros | Functions
quickselect.c File Reference
#include "quickselect.h"
Include dependency graph for quickselect.c:

Go to the source code of this file.

Macros

#define ELEM_SWAP(a, b)   { register unsigned char t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register unsigned short t=(a);(a)=(b);(b)=t; }
 
#define ELEM_SWAP(a, b)   { register float t=(a);(a)=(b);(b)=t; }
 

Functions

unsigned char quick_select (unsigned char *arr, int nelems, int select)
 
unsigned char quick_select_median (unsigned char *arr, int nelems)
 
unsigned short quick_select_ushort (unsigned short *arr, int nelems, int select)
 
unsigned short quick_select_median_ushort (unsigned short *arr, int nelems)
 
float quick_select_float (float *arr, int nelems, int select)
 
float quick_select_median_float (float *arr, int nelems)
 

Macro Definition Documentation

◆ ELEM_SWAP [1/3]

#define ELEM_SWAP (   a,
 
)    { register unsigned char t=(a);(a)=(b);(b)=t; }

Definition at line 130 of file quickselect.c.

◆ ELEM_SWAP [2/3]

#define ELEM_SWAP (   a,
 
)    { register unsigned short t=(a);(a)=(b);(b)=t; }

Definition at line 130 of file quickselect.c.

◆ ELEM_SWAP [3/3]

#define ELEM_SWAP (   a,
 
)    { register float t=(a);(a)=(b);(b)=t; }

Definition at line 130 of file quickselect.c.

Function Documentation

◆ quick_select()

unsigned char quick_select ( unsigned char *  arr,
int  nelems,
int  select 
)

Definition at line 15 of file quickselect.c.

Referenced by quick_select_median().

◆ quick_select_median()

unsigned char quick_select_median ( unsigned char *  arr,
int  nelems 
)

Definition at line 66 of file quickselect.c.

Referenced by HistogramAnalyzer::analyzeFrame().

◆ quick_select_ushort()

unsigned short quick_select_ushort ( unsigned short *  arr,
int  nelems,
int  select 
)

Definition at line 74 of file quickselect.c.

Referenced by SceneChangeDetector::finished(), and quick_select_median_ushort().

◆ quick_select_median_ushort()

unsigned short quick_select_median_ushort ( unsigned short *  arr,
int  nelems 
)

Definition at line 125 of file quickselect.c.

◆ quick_select_float()

float quick_select_float ( float *  arr,
int  nelems,
int  select 
)

Definition at line 133 of file quickselect.c.

Referenced by quick_select_median_float().

◆ quick_select_median_float()

float quick_select_median_float ( float *  arr,
int  nelems 
)

Definition at line 182 of file quickselect.c.