Mercurial > libavcodec.hg
annotate elbg.h @ 12197:fbf4d5b1b664 libavcodec
Remove FF_MM_SSE2/3 flags for CPUs where this is generally not faster than
regular MMX code. Examples of this are the Core1 CPU. Instead, set a new flag,
FF_MM_SSE2/3SLOW, which can be checked for particular SSE2/3 functions that
have been checked specifically on such CPUs and are actually faster than
their MMX counterparts.
In addition, use this flag to enable particular VP8 and LPC SSE2 functions
that are faster than their MMX counterparts.
Based on a patch by Loren Merritt <lorenm AT u washington edu>.
author | rbultje |
---|---|
date | Mon, 19 Jul 2010 22:38:23 +0000 |
parents | cb62e27e2c07 |
children |
rev | line source |
---|---|
5095 | 1 /* |
5219 | 2 * Copyright (C) 2007 Vitor Sessak <vitor1001@gmail.com> |
5095 | 3 * |
4 * This file is part of FFmpeg. | |
5 * | |
6 * FFmpeg is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU Lesser General Public | |
8 * License as published by the Free Software Foundation; either | |
9 * version 2.1 of the License, or (at your option) any later version. | |
10 * | |
11 * FFmpeg is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * Lesser General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU Lesser General Public | |
17 * License along with FFmpeg; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
19 */ | |
20 | |
7760 | 21 #ifndef AVCODEC_ELBG_H |
22 #define AVCODEC_ELBG_H | |
5163 | 23 |
9195 | 24 #include "libavutil/lfg.h" |
5095 | 25 |
26 /** | |
27 * Implementation of the Enhanced LBG Algorithm | |
28 * Based on the paper "Neural Networks 14:1219-1237" that can be found in | |
29 * http://citeseer.ist.psu.edu/patan01enhanced.html . | |
30 * | |
31 * @param points Input points. | |
32 * @param dim Dimension of the points. | |
33 * @param numpoints Num of points in **points. | |
34 * @param codebook Pointer to the output codebook. Must be allocated. | |
35 * @param numCB Number of points in the codebook. | |
36 * @param num_steps The maximum number of steps. One step is already a good compromise between time and quality. | |
37 * @param closest_cb Return the closest codebook to each point. Must be allocated. | |
9220
cb62e27e2c07
Fix reference to av_random_init where av_lfg_init was meant.
diego
parents:
9195
diff
changeset
|
38 * @param rand_state A random number generator state. Should be already initialized by av_lfg_init(). |
5095 | 39 */ |
40 void ff_do_elbg(int *points, int dim, int numpoints, int *codebook, | |
41 int numCB, int num_steps, int *closest_cb, | |
9154
aa459306ee59
Use FLG pseudo-random number generator in RoQ and ELBG
vitor
parents:
8628
diff
changeset
|
42 AVLFG *rand_state); |
5095 | 43 |
44 /** | |
45 * Initialize the **codebook vector for the elbg algorithm. If you have already | |
46 * a codebook and you want to refine it, you shouldn't call this function. | |
47 * If numpoints < 8*numCB this function fills **codebook with random numbers. | |
48 * If not, it calls ff_do_elbg for a (smaller) random sample of the points in | |
49 * **points. Get the same parameters as ff_do_elbg. | |
50 */ | |
51 void ff_init_elbg(int *points, int dim, int numpoints, int *codebook, | |
52 int numCB, int num_steps, int *closest_cb, | |
9154
aa459306ee59
Use FLG pseudo-random number generator in RoQ and ELBG
vitor
parents:
8628
diff
changeset
|
53 AVLFG *rand_state); |
5163 | 54 |
7760 | 55 #endif /* AVCODEC_ELBG_H */ |