summaryrefslogtreecommitdiff
path: root/libavcodec/msvideo1enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-15 22:38:28 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 04:09:22 +0200
commit05ccfcb7b0ea326a112b1f769588c07bf0e467be (patch)
tree574ffd4e010c57d6e81cb1ed0a026419bfdbbd5e /libavcodec/msvideo1enc.c
parentd046e76515d8f30e2960e4888478002852bf0209 (diff)
downloadffmpeg-05ccfcb7b0ea326a112b1f769588c07bf0e467be.tar.gz
avcodec/elbg: Merge avpriv_init_elbg() into avpriv_do_elbg()
These functions are always called directly after another with the exact same arguments. This avoids exporting a symbol; it also avoids having to perform two calls for every caller. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/msvideo1enc.c')
-rw-r--r--libavcodec/msvideo1enc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c
index df621a6f48..fa65a2fbc4 100644
--- a/libavcodec/msvideo1enc.c
+++ b/libavcodec/msvideo1enc.c
@@ -117,7 +117,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
// try to find optimal value to fill whole 4x4 block
score = 0;
- 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;
@@ -137,7 +136,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
// search for optimal filling of 2-color block
score = 0;
- 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]){
@@ -163,7 +161,6 @@ 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++){
- 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