summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-31 13:17:18 +0100
committerwm4 <wm4@nowhere>2019-10-31 13:17:18 +0100
commitc10ba5eb8e62d04ed80cad512cf4863dadee07f1 (patch)
tree8cc891e80e09617b577ae6ec92a00ad2e721d202 /video/out
parent7510ed6f684041db643c051cb17b13abf663b3b2 (diff)
downloadmpv-c10ba5eb8e62d04ed80cad512cf4863dadee07f1.tar.bz2
mpv-c10ba5eb8e62d04ed80cad512cf4863dadee07f1.tar.xz
Use mp_log2() instead of av_log2()
Diffstat (limited to 'video/out')
-rw-r--r--video/out/bitmap_packer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/video/out/bitmap_packer.c b/video/out/bitmap_packer.c
index 4f7739f514..a79446d2c2 100644
--- a/video/out/bitmap_packer.c
+++ b/video/out/bitmap_packer.c
@@ -24,8 +24,6 @@
#include <stdio.h>
#include <limits.h>
-#include <libavutil/common.h>
-
#include "mpv_talloc.h"
#include "bitmap_packer.h"
#include "common/common.h"
@@ -51,7 +49,7 @@ void packer_get_bb(struct bitmap_packer *packer, struct pos out_bb[2])
#define HEIGHT_SORT_BITS 4
static int size_index(int s)
{
- int n = av_log2_16bit(s);
+ int n = mp_log2(s);
return (n << HEIGHT_SORT_BITS)
+ ((- 1 - (s << HEIGHT_SORT_BITS >> n)) & ((1 << HEIGHT_SORT_BITS) - 1));
}
@@ -148,9 +146,9 @@ int packer_pack(struct bitmap_packer *packer)
ymax = MPMAX(ymax, in[i].y);
}
if (xmax > packer->w)
- packer->w = 1 << (av_log2(xmax - 1) + 1);
+ packer->w = 1 << (mp_log2(xmax - 1) + 1);
if (ymax > packer->h)
- packer->h = 1 << (av_log2(ymax - 1) + 1);
+ packer->h = 1 << (mp_log2(ymax - 1) + 1);
while (1) {
int used_width = 0;
int y = pack_rectangles(in, packer->result, packer->count,