[FFmpeg-cvslog] lavc/elbg: rename ff_ symbols to avpriv_, so they can be used in shared libs
Stefano Sabatini
git at videolan.org
Wed Nov 13 11:32:20 CET 2013
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Nov 12 12:58:21 2013 +0100| [fe55c3197698e60753ed4ba78a588481bb975e20] | committer: Stefano Sabatini
lavc/elbg: rename ff_ symbols to avpriv_, so they can be used in shared libs
In particular, allows the use of elbg in other FFmpeg libraries, required
by the pending elbg filter.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe55c3197698e60753ed4ba78a588481bb975e20
---
libavcodec/a64multienc.c | 4 ++--
libavcodec/elbg.c | 8 ++++----
libavcodec/elbg.h | 8 ++++----
libavcodec/msvideo1enc.c | 12 ++++++------
libavcodec/roqvideoenc.c | 4 ++--
libavcodec/version.h | 2 +-
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index e5c0fa7..e7839f5 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -338,8 +338,8 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
buf = pkt->data;
/* calc optimal new charset + charmaps */
- ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
- ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
+ avpriv_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
+ avpriv_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
/* create colorram map and a c64 readable charset */
render_charset(avctx, charset, colram);
diff --git a/libavcodec/elbg.c b/libavcodec/elbg.c
index 2707599..5c7018b 100644
--- a/libavcodec/elbg.c
+++ b/libavcodec/elbg.c
@@ -324,7 +324,7 @@ static void do_shiftings(elbg_data *elbg)
#define BIG_PRIME 433494437LL
-void ff_init_elbg(int *points, int dim, int numpoints, int *codebook,
+void avpriv_init_elbg(int *points, int dim, int numpoints, int *codebook,
int numCB, int max_steps, int *closest_cb,
AVLFG *rand_state)
{
@@ -339,8 +339,8 @@ void ff_init_elbg(int *points, int dim, int numpoints, int *codebook,
memcpy(temp_points + i*dim, points + k*dim, dim*sizeof(int));
}
- ff_init_elbg(temp_points, dim, numpoints/8, codebook, numCB, 2*max_steps, closest_cb, rand_state);
- ff_do_elbg(temp_points, dim, numpoints/8, codebook, numCB, 2*max_steps, closest_cb, rand_state);
+ avpriv_init_elbg(temp_points, dim, numpoints/8, codebook, numCB, 2*max_steps, closest_cb, rand_state);
+ avpriv_do_elbg(temp_points, dim, numpoints/8, codebook, numCB, 2*max_steps, closest_cb, rand_state);
av_free(temp_points);
@@ -351,7 +351,7 @@ void ff_init_elbg(int *points, int dim, int numpoints, int *codebook,
}
-void ff_do_elbg(int *points, int dim, int numpoints, int *codebook,
+void avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook,
int numCB, int max_steps, int *closest_cb,
AVLFG *rand_state)
{
diff --git a/libavcodec/elbg.h b/libavcodec/elbg.h
index e6f577e..22fb53f 100644
--- a/libavcodec/elbg.h
+++ b/libavcodec/elbg.h
@@ -37,7 +37,7 @@
* @param closest_cb Return the closest codebook to each point. Must be allocated.
* @param rand_state A random number generator state. Should be already initialized by av_lfg_init().
*/
-void ff_do_elbg(int *points, int dim, int numpoints, int *codebook,
+void avpriv_do_elbg(int *points, int dim, int numpoints, int *codebook,
int numCB, int num_steps, int *closest_cb,
AVLFG *rand_state);
@@ -45,10 +45,10 @@ void ff_do_elbg(int *points, int dim, int numpoints, int *codebook,
* 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.
+ * If not, it calls avpriv_do_elbg for a (smaller) random sample of the points in
+ * **points. Get the same parameters as avpriv_do_elbg.
*/
-void ff_init_elbg(int *points, int dim, int numpoints, int *codebook,
+void avpriv_init_elbg(int *points, int dim, int numpoints, int *codebook,
int numCB, int num_steps, int *closest_cb,
AVLFG *rand_state);
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c
index 1da302a..7844d57 100644
--- a/libavcodec/msvideo1enc.c
+++ b/libavcodec/msvideo1enc.c
@@ -118,8 +118,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
// try to find optimal value to fill whole 4x4 block
score = 0;
- ff_init_elbg(c->block, 3, 16, c->avg, 1, 1, c->output, &c->rnd);
- ff_do_elbg (c->block, 3, 16, c->avg, 1, 1, c->output, &c->rnd);
+ avpriv_init_elbg(c->block, 3, 16, c->avg, 1, 1, c->output, &c->rnd);
+ avpriv_do_elbg (c->block, 3, 16, c->avg, 1, 1, c->output, &c->rnd);
if(c->avg[0] == 1) // red component = 1 will be written as skip code
c->avg[0] = 0;
for(j = 0; j < 4; j++){
@@ -138,8 +138,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
// search for optimal filling of 2-color block
score = 0;
- ff_init_elbg(c->block, 3, 16, c->codebook, 2, 1, c->output, &c->rnd);
- ff_do_elbg (c->block, 3, 16, c->codebook, 2, 1, c->output, &c->rnd);
+ avpriv_init_elbg(c->block, 3, 16, c->codebook, 2, 1, c->output, &c->rnd);
+ avpriv_do_elbg (c->block, 3, 16, c->codebook, 2, 1, c->output, &c->rnd);
// last output value should be always 1, swap codebooks if needed
if(!c->output[15]){
for(i = 0; i < 3; i++)
@@ -164,8 +164,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
// search for optimal filling of 2-color 2x2 subblocks
score = 0;
for(i = 0; i < 4; i++){
- ff_init_elbg(c->block2 + i*4*3, 3, 4, c->codebook2 + i*2*3, 2, 1, c->output2 + i*4, &c->rnd);
- ff_do_elbg (c->block2 + i*4*3, 3, 4, c->codebook2 + i*2*3, 2, 1, c->output2 + i*4, &c->rnd);
+ avpriv_init_elbg(c->block2 + i*4*3, 3, 4, c->codebook2 + i*2*3, 2, 1, c->output2 + i*4, &c->rnd);
+ avpriv_do_elbg (c->block2 + i*4*3, 3, 4, c->codebook2 + i*2*3, 2, 1, c->output2 + i*4, &c->rnd);
}
// last value should be always 1, swap codebooks if needed
if(!c->output2[15]){
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index bf0756c..37bd8d5 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -806,8 +806,8 @@ static void generate_codebook(RoqContext *enc, RoqTempdata *tempdata,
else
closest_cb = tempdata->closest_cb2;
- ff_init_elbg(points, 6*c_size, inputCount, codebook, cbsize, 1, closest_cb, &enc->randctx);
- ff_do_elbg(points, 6*c_size, inputCount, codebook, cbsize, 1, closest_cb, &enc->randctx);
+ avpriv_init_elbg(points, 6*c_size, inputCount, codebook, cbsize, 1, closest_cb, &enc->randctx);
+ avpriv_do_elbg(points, 6*c_size, inputCount, codebook, cbsize, 1, closest_cb, &enc->randctx);
if (size == 4)
av_free(closest_cb);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 57d9291..d378130 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 41
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list