summaryrefslogtreecommitdiffstats
path: root/libass/mputils.h
blob: a68f8a4b7d40ce69f2e712853b3c82c40787e5e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __MPUTILS_H__
#define __MPUTILS_H__

#include "help_mp.h"

unsigned utf8_get_char(char **str);

void my_mp_msg(int lvl, char *lvl_str, char *fmt, ...);

#ifdef __VISUALC__
static void mp_msg(int mod, int level, const char *fmt, ...)
{
    // MSVC doesn't like the # used all around for mp_msg, so it breaks va_arg
}
#else
#define mp_msg(mod, level, args...) my_mp_msg(level, #level, args)
#endif

#define MSGT_ASS 43

#define MSGL_FATAL 0
#define MSGL_ERR 1
#define MSGL_WARN 2
#define MSGL_INFO 4
#define MSGL_V 6
#define MSGL_DBG2 7

void blur(unsigned char *buffer, unsigned short *tmp2, int width,
          int height, int stride, int *m2, int r, int mwidth);

void *guess_buffer_cp(unsigned char *buffer, int buflen,
                      char *preferred_language, char *fallback);

#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))

#endif