FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
elbg.h File Reference
#include "libavutil/lfg.h"

Go to the source code of this file.

Functions

void ff_do_elbg (int *points, int dim, int numpoints, int *codebook, int numCB, int num_steps, int *closest_cb, AVLFG *rand_state)
 Implementation of the Enhanced LBG Algorithm Based on the paper "Neural Networks 14:1219-1237" that can be found in http://citeseer.ist.psu.edu/patan01enhanced.html .
 
void ff_init_elbg (int *points, int dim, int numpoints, int *codebook, int numCB, int num_steps, int *closest_cb, AVLFG *rand_state)
 Initialize the **codebook vector for the elbg algorithm.
 

Function Documentation

void ff_do_elbg ( int *  points,
int  dim,
int  numpoints,
int *  codebook,
int  numCB,
int  num_steps,
int *  closest_cb,
AVLFG rand_state 
)

Implementation of the Enhanced LBG Algorithm Based on the paper "Neural Networks 14:1219-1237" that can be found in http://citeseer.ist.psu.edu/patan01enhanced.html .

Parameters
pointsInput points.
dimDimension of the points.
numpointsNum of points in **points.
codebookPointer to the output codebook. Must be allocated.
numCBNumber of points in the codebook.
num_stepsThe maximum number of steps. One step is already a good compromise between time and quality.
closest_cbReturn the closest codebook to each point. Must be allocated.
rand_stateA random number generator state. Should be already initialized by av_lfg_init().

Definition at line 354 of file elbg.c.

Referenced by a64multi_encode_frame(), encode_frame(), ff_init_elbg(), and generate_codebook().

void ff_init_elbg ( int *  points,
int  dim,
int  numpoints,
int *  codebook,
int  numCB,
int  num_steps,
int *  closest_cb,
AVLFG rand_state 
)

Initialize the **codebook vector for the elbg algorithm.

If you have already a codebook and you want to refine it, you shouldn't call this function. If numpoints < 8*numCB this function fills **codebook with random numbers. If not, it calls ff_do_elbg for a (smaller) random sample of the points in **points. Get the same parameters as ff_do_elbg.

Definition at line 327 of file elbg.c.

Referenced by a64multi_encode_frame(), encode_frame(), ff_init_elbg(), and generate_codebook().