Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/elbg.h')
-rw-r--r--libavcodec/elbg.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/libavcodec/elbg.h b/libavcodec/elbg.h
index a9a19aa5e4..abeeb4ff44 100644
--- a/libavcodec/elbg.h
+++ b/libavcodec/elbg.h
@@ -23,11 +23,16 @@
#include "libavutil/lfg.h"
+struct ELBGContext;
+
/**
* 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 .
*
+ * @param ctx A 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`.
* @param points Input points.
* @param dim Dimension of the points.
* @param numpoints Num of points in **points.
@@ -38,8 +43,13 @@
* @param rand_state A random number generator state. Should be already initialized by av_lfg_init().
* @return < 0 in case of error, 0 otherwise
*/
-int avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook,
- int num_cb, int num_steps, int *closest_cb,
- AVLFG *rand_state);
+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);
+
+/**
+ * Free an ELBGContext and reset the pointer to it.
+ */
+void avpriv_elbg_free(struct ELBGContext **ctx);
#endif /* AVCODEC_ELBG_H */