FFmpeg
Functions
elbg.h File Reference
#include <stdint.h>
#include "libavutil/lfg.h"

Go to the source code of this file.

Functions

int avpriv_elbg_do (struct ELBGContext **ctx, int *points, int dim, int numpoints, int *codebook, int num_cb, int num_steps, int *closest_cb, AVLFG *rand_state, uintptr_t flags)
 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 . More...
 
void avpriv_elbg_free (struct ELBGContext **ctx)
 Free an ELBGContext and reset the pointer to it. More...
 

Function Documentation

◆ avpriv_elbg_do()

int avpriv_elbg_do ( struct ELBGContext **  ctx,
int points,
int  dim,
int  numpoints,
int codebook,
int  num_cb,
int  num_steps,
int closest_cb,
AVLFG rand_state,
uintptr_t  flags 
)

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
ctxA pointer to a pointer to an already allocated ELBGContext or a pointer to NULL. In the latter case, this function will allocate an ELBGContext and put a pointer to it in *ctx.
pointsInput points.
dimDimension of the points.
numpointsNum of points in **points.
codebookPointer to the output codebook. Must be allocated.
num_cbNumber 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().
flagsCurrently unused; must be set to 0.
Returns
< 0 in case of error, 0 otherwise

Definition at line 462 of file elbg.c.

Referenced by a64multi_encode_frame(), encode_frame(), filter_frame(), generate_codebook(), and quantize().

◆ avpriv_elbg_free()

void avpriv_elbg_free ( struct ELBGContext **  ctx)

Free an ELBGContext and reset the pointer to it.

Definition at line 515 of file elbg.c.

Referenced by a64multi_close_encoder(), cinepak_encode_end(), encode_end(), roq_encode_end(), and uninit().