28 # define VLC_COMMON_H 1 67 # define VLC_GCC_VERSION(maj,min) \ 68 ((__GNUC__ > (maj)) || (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min))) 71 # define VLC_GCC_VERSION(maj,min) (0) 75 #if defined( _WIN32 ) && defined( __USE_MINGW_ANSI_STDIO ) 86 #define snprintf __mingw_snprintf 87 #define vsnprintf __mingw_vsnprintf 88 #define swprintf _snwprintf 93 # define VLC_DEPRECATED __attribute__((deprecated)) 94 # if VLC_GCC_VERSION(6,0) 95 # define VLC_DEPRECATED_ENUM __attribute__((deprecated)) 97 # define VLC_DEPRECATED_ENUM 100 # if defined( _WIN32 ) && !defined( __clang__ ) 101 # define VLC_FORMAT(x,y) __attribute__ ((format(gnu_printf,x,y))) 103 # define VLC_FORMAT(x,y) __attribute__ ((format(printf,x,y))) 105 # define VLC_FORMAT_ARG(x) __attribute__ ((format_arg(x))) 106 # define VLC_MALLOC __attribute__ ((malloc)) 107 # define VLC_USED __attribute__ ((warn_unused_result)) 119 # define VLC_DEPRECATED 129 # define VLC_DEPRECATED_ENUM 141 # define VLC_FORMAT(x,y) 152 # define VLC_FORMAT_ARG(x) 188 #if defined (__ELF__) || defined (__MACH__) 189 # define VLC_WEAK __attribute__((weak)) 202 #if defined (__GNUC__) || defined (__clang__) 203 # define likely(p) __builtin_expect(!!(p), 1) 204 # define unlikely(p) __builtin_expect(!!(p), 0) 205 # define unreachable() __builtin_unreachable() 214 # define likely(p) (!!(p)) 223 # define unlikely(p) (!!(p)) 235 # define unreachable() ((void)0) 249 #define vlc_assert_unreachable() (vlc_assert(!"unreachable"), unreachable()) 265 # define vlc_assert(pred) assert(pred) 267 # define vlc_assert(pred) ((void)0) 272 # define VLC_EXTERN extern "C" 277 #if defined (_WIN32) && defined (DLL_EXPORT) 278 # define VLC_EXPORT __declspec(dllexport) 279 #elif defined (__GNUC__) 280 # define VLC_EXPORT __attribute__((visibility("default"))) 291 #define VLC_API VLC_EXTERN VLC_EXPORT 305 #ifdef WORDS_BIGENDIAN 306 # define VLC_FOURCC( a, b, c, d ) \ 307 ( ((uint32_t)d) | ( ((uint32_t)c) << 8 ) \ 308 | ( ((uint32_t)b) << 16 ) | ( ((uint32_t)a) << 24 ) ) 309 # define VLC_TWOCC( a, b ) \ 310 ( (uint16_t)(b) | ( (uint16_t)(a) << 8 ) ) 313 # define VLC_FOURCC( a, b, c, d ) \ 314 ( ((uint32_t)a) | ( ((uint32_t)b) << 8 ) \ 315 | ( ((uint32_t)c) << 16 ) | ( ((uint32_t)d) << 24 ) ) 316 # define VLC_TWOCC( a, b ) \ 317 ( (uint16_t)(a) | ( (uint16_t)(b) << 8 ) ) 330 memcpy( psz_fourcc, &fcc, 4 );
462 struct { int32_t x; int32_t
y; } coords;
470 #define VLC_SUCCESS (-0) 472 #define VLC_EGENERIC (-1) 474 #define VLC_ENOMEM (-2) 476 #define VLC_ETIMEOUT (-3) 478 #define VLC_ENOMOD (-4) 480 #define VLC_ENOOBJ (-5) 482 #define VLC_ENOVAR (-6) 484 #define VLC_EBADVAR (-7) 486 #define VLC_ENOITEM (-8) 509 #if defined( _WIN32 ) 512 # define PATH_MAX MAX_PATH 514 # include <windows.h> 518 #include <sys/syslimits.h> 519 #include <AvailabilityMacros.h> 523 # define OS2EMX_PLAIN_CHAR 526 # include <os2safe.h> 542 # define __MAX(a, b) ( ((a) > (b)) ? (a) : (b) ) 545 # define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) 549 #define VLC_CLIP(v, min, max) __MIN(__MAX((v), (min)), (max)) 553 static inline int64_t
GCD ( int64_t a, int64_t b )
568 if( a&(~255) )
return (-a)>>31;
577 #define VLC_INT_FUNC(basename) \ 578 VLC_INT_FUNC_TYPE(basename, unsigned, ) \ 579 VLC_INT_FUNC_TYPE(basename, unsigned long, l) \ 580 VLC_INT_FUNC_TYPE(basename, unsigned long long, ll) 582 #if defined (__GNUC__) || defined (__clang__) 583 # define VLC_INT_FUNC_TYPE(basename,type,suffix) \ 584 VLC_USED static inline int vlc_##basename##suffix(type x) \ 586 return __builtin_##basename##suffix(x); \ 591 VLC_USED
static inline int vlc_clzll(
unsigned long long x)
593 int i =
sizeof (x) * 8;
603 VLC_USED
static inline int vlc_clzl(
unsigned long x)
605 return vlc_clzll(x) - ((
sizeof (
long long) -
sizeof (
long)) * 8);
608 VLC_USED
static inline int vlc_clz(
unsigned x)
610 return vlc_clzll(x) - ((
sizeof (
long long) -
sizeof (
int)) * 8);
615 unsigned i =
sizeof (x) * 8;
627 for (
unsigned i = 4 *
sizeof (x); i > 0; i /= 2)
643 # define VLC_INT_FUNC_TYPE(basename,type,suffix) \ 644 VLC_USED static inline int vlc_##basename##suffix(type x) \ 646 return vlc_##basename##_generic(x); \ 655 # define VLC_INT_GENERIC(func,x) \ 657 unsigned char: func(x), \ 658 signed char: func(x), \ 659 unsigned short: func(x), \ 660 signed short: func(x), \ 661 unsigned int: func(x), \ 662 signed int: func(x), \ 663 unsigned long: func##l(x), \ 664 signed long: func##l(x), \ 665 unsigned long long: func##ll(x), \ 666 signed long long: func##ll(x)) 681 unsigned char: (vlc_clz(x) - (sizeof (unsigned) - 1) * 8), \ 682 unsigned short: (vlc_clz(x) \ 683 - (sizeof (unsigned) - sizeof (unsigned short)) * 8), \ 684 unsigned: vlc_clz(x), \ 685 unsigned long: vlc_clzl(x), \ 686 unsigned long long: vlc_clzll(x)) 698 # define ctz(x) VLC_INT_GENERIC(vlc_ctz, x) 707 # define parity(x) VLC_INT_GENERIC(vlc_parity, x) 716 # define vlc_popcount(x) \ 718 signed char: vlc_popcount((unsigned char)(x)), \ 719 signed short: vlc_popcount((unsigned short)(x)), \ 720 default: VLC_INT_GENERIC(vlc_popcount ,x)) 722 VLC_USED
static inline int vlc_popcount(
unsigned char x)
727 VLC_USED
static inline int vlc_popcount(
unsigned short x)
732 VLC_USED
static inline int vlc_popcount(
unsigned long x)
737 VLC_USED
static inline int vlc_popcount(
unsigned long long x)
747 return (x << 8) | (x >> 8);
754 #if defined (__GNUC__) || defined(__clang__) 755 return __builtin_bswap32 (x);
757 return ((x & 0x000000FF) << 24)
758 | ((x & 0x0000FF00) << 8)
759 | ((x & 0x00FF0000) >> 8)
760 | ((x & 0xFF000000) >> 24);
768 #if defined (__GNUC__) || defined(__clang__) 769 return __builtin_bswap64 (x);
770 #elif !defined (__cplusplus) 771 return ((x & 0x00000000000000FF) << 56)
772 | ((x & 0x000000000000FF00) << 40)
773 | ((x & 0x0000000000FF0000) << 24)
774 | ((x & 0x00000000FF000000) << 8)
775 | ((x & 0x000000FF00000000) >> 8)
776 | ((x & 0x0000FF0000000000) >> 24)
777 | ((x & 0x00FF000000000000) >> 40)
778 | ((x & 0xFF00000000000000) >> 56);
780 return ((x & 0x00000000000000FFULL) << 56)
781 | ((x & 0x000000000000FF00ULL) << 40)
782 | ((x & 0x0000000000FF0000ULL) << 24)
783 | ((x & 0x00000000FF000000ULL) << 8)
784 | ((x & 0x000000FF00000000ULL) >> 8)
785 | ((x & 0x0000FF0000000000ULL) >> 24)
786 | ((x & 0x00FF000000000000ULL) >> 40)
787 | ((x & 0xFF00000000000000ULL) >> 56);
796 static inline bool uadd_overflow(
unsigned a,
unsigned b,
unsigned *res)
798 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 799 return __builtin_uadd_overflow(a, b, res);
806 static inline bool uaddl_overflow(
unsigned long a,
unsigned long b,
809 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 810 return __builtin_uaddl_overflow(a, b, res);
817 static inline bool uaddll_overflow(
unsigned long long a,
unsigned long long b,
818 unsigned long long *res)
820 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 821 return __builtin_uaddll_overflow(a, b, res);
842 # define add_overflow(a,b,r) \ 844 unsigned: uadd_overflow(a, b, (unsigned *)(r)), \ 845 unsigned long: uaddl_overflow(a, b, (unsigned long *)(r)), \ 846 unsigned long long: uaddll_overflow(a, b, (unsigned long long *)(r))) 848 static inline bool add_overflow(
unsigned a,
unsigned b,
unsigned *res)
853 static inline bool add_overflow(
unsigned long a,
unsigned long b,
859 static inline bool add_overflow(
unsigned long long a,
unsigned long long b,
860 unsigned long long *res)
866 #if !(VLC_GCC_VERSION(5,0) || defined(__clang__)) 870 static inline bool umul_overflow(
unsigned a,
unsigned b,
unsigned *res)
872 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 873 return __builtin_umul_overflow(a, b, res);
876 return b > 0 && a > (UINT_MAX / b);
880 static inline bool umull_overflow(
unsigned long a,
unsigned long b,
883 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 884 return __builtin_umull_overflow(a, b, res);
887 return b > 0 && a > (ULONG_MAX / b);
891 static inline bool umulll_overflow(
unsigned long long a,
unsigned long long b,
892 unsigned long long *res)
894 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 895 return __builtin_umulll_overflow(a, b, res);
898 return b > 0 && a > (ULLONG_MAX / b);
916 #define mul_overflow(a,b,r) \ 918 unsigned: umul_overflow(a, b, (unsigned *)(r)), \ 919 unsigned long: umull_overflow(a, b, (unsigned long *)(r)), \ 920 unsigned long long: umulll_overflow(a, b, (unsigned long long *)(r))) 922 static inline bool mul_overflow(
unsigned a,
unsigned b,
unsigned *res)
927 static inline bool mul_overflow(
unsigned long a,
unsigned long b,
933 static inline bool mul_overflow(
unsigned long long a,
unsigned long long b,
934 unsigned long long *res)
943 #define FREENULL(a) do { free( a ); a = NULL; } while(0) 945 #define EMPTY_STR(str) (!str || !*str) 952 #ifdef WORDS_BIGENDIAN 953 # define hton16(i) ((uint16_t)(i)) 954 # define hton32(i) ((uint32_t)(i)) 955 # define hton64(i) ((uint64_t)(i)) 957 # define hton16(i) vlc_bswap16(i) 958 # define hton32(i) vlc_bswap32(i) 959 # define hton64(i) vlc_bswap64(i) 961 #define ntoh16(i) hton16(i) 962 #define ntoh32(i) hton32(i) 963 #define ntoh64(i) hton64(i) 967 static inline uint16_t
U16_AT (
const void *p)
971 memcpy (&x, p,
sizeof (x));
977 static inline uint32_t
U32_AT (
const void *p)
981 memcpy (&x, p,
sizeof (x));
987 static inline uint64_t
U64_AT (
const void *p)
991 memcpy (&x, p,
sizeof (x));
995 #define GetWBE(p) U16_AT(p) 996 #define GetDWBE(p) U32_AT(p) 997 #define GetQWBE(p) U64_AT(p) 1001 static inline uint16_t
GetWLE (
const void *p)
1005 memcpy (&x, p,
sizeof (x));
1006 #ifdef WORDS_BIGENDIAN 1014 static inline uint32_t
GetDWLE (
const void *p)
1018 memcpy (&x, p,
sizeof (x));
1019 #ifdef WORDS_BIGENDIAN 1027 static inline uint64_t
GetQWLE (
const void *p)
1031 memcpy (&x, p,
sizeof (x));
1032 #ifdef WORDS_BIGENDIAN 1039 static inline void SetWBE (
void *p, uint16_t w)
1042 memcpy (p, &w,
sizeof (w));
1046 static inline void SetDWBE (
void *p, uint32_t dw)
1049 memcpy (p, &dw,
sizeof (dw));
1053 static inline void SetQWBE (
void *p, uint64_t qw)
1056 memcpy (p, &qw,
sizeof (qw));
1060 static inline void SetWLE (
void *p, uint16_t w)
1062 #ifdef WORDS_BIGENDIAN 1065 memcpy (p, &w,
sizeof (w));
1069 static inline void SetDWLE (
void *p, uint32_t dw)
1071 #ifdef WORDS_BIGENDIAN 1074 memcpy (p, &dw,
sizeof (dw));
1078 static inline void SetQWLE (
void *p, uint64_t qw)
1080 #ifdef WORDS_BIGENDIAN 1083 memcpy (p, &qw,
sizeof (qw));
1087 #define VLC_UNUSED(x) (void)(x) 1093 # if defined( __MINGW32__ ) 1094 # if !defined( _OFF_T_ ) 1095 typedef long long _off_t;
1096 typedef _off_t off_t;
1102 # define off_t long long 1107 # define O_NONBLOCK 0 1112 # define swab(a,b,c) swab((char*) (a), (char*) (b), (c)) 1122 #define container_of(ptr, type, member) \ 1123 ((type *)(((char *)(ptr)) - offsetof(type, member))) 1128 return mul_overflow(count, size, &size) ? NULL : malloc(size);
1134 return mul_overflow(count, size, &size) ? NULL : realloc(ptr, size);
1142 VLC_FORMAT_ARG(1) VLC_FORMAT_ARG(2);
1144 #define vlc_pgettext( ctx, id ) \ 1145 vlc_pgettext_aux( ctx "\004" id, id ) 1148 static inline const
char *
vlc_pgettext_aux( const
char *ctx, const
char *
id )
1151 return (tr == ctx) ? id : tr;
1157 static inline void *
xmalloc(
size_t len)
1159 void *ptr = malloc(len);
1160 if (
unlikely(ptr == NULL && len > 0))
1165 static inline void *
xrealloc(
void *ptr,
size_t len)
1167 void *nptr = realloc(ptr, len);
1168 if (
unlikely(nptr == NULL && len > 0))
1173 static inline char *
xstrdup (
const char *str)
1175 char *ptr =
strdup (str);
1196 #if defined( _WIN32 ) || defined( __OS2__ ) 1197 # define DIR_SEP_CHAR '\\' 1198 # define DIR_SEP "\\" 1199 # define PATH_SEP_CHAR ';' 1200 # define PATH_SEP ";" 1202 # define DIR_SEP_CHAR '/' 1203 # define DIR_SEP "/" 1204 # define PATH_SEP_CHAR ':' 1205 # define PATH_SEP ":" 1208 #define LICENSE_MSG \ 1209 _("This program comes with NO WARRANTY, to the extent permitted by " \ 1210 "law.\nYou may redistribute it under the terms of the GNU General " \ 1211 "Public License;\nsee the file named COPYING for details.\n" \ 1212 "Written by the VideoLAN team; see the AUTHORS file.\n")
static int64_t GCD(int64_t a, int64_t b)
Greatest common divisor.
Definition: vlc_common.h:553
#define add_overflow(a, b, r)
Overflowing addition.
Definition: vlc_common.h:840
#define hton32(i)
Definition: vlc_common.h:956
const char * VLC_CompileHost(void)
Definition: version.c:44
#define clz(x)
Count leading zeroes.
Definition: vlc_common.h:677
static bool umulll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:889
Definition: vlc_addons.h:72
Video picture.
Definition: vlc_picture.h:126
static int vlc_popcount_generic(unsigned long long x)
Definition: vlc_common.h:632
Definition: vlc_vlm.h:183
char * strdup(const char *)
struct vod_media_t vod_media_t
Definition: vlc_common.h:438
struct playlist_item_t playlist_item_t
Definition: vlc_common.h:345
Internal state for block queues.
Definition: fifo.c:38
#define ntoh16(i)
Definition: vlc_common.h:959
Video subtitle region.
Definition: vlc_subpicture.h:59
static int vlc_clzl(unsigned long x)
Definition: vlc_common.h:603
#define parity(x)
Parity.
Definition: vlc_common.h:705
static void * xrealloc(void *ptr, size_t len)
Definition: vlc_common.h:1163
static uint64_t GetQWLE(const void *p)
Reads 64 bits in little-endian order.
Definition: vlc_common.h:1025
Definition: vlc_configuration.h:53
static int vlc_popcountl(unsigned long x)
Definition: vlc_common.h:650
static void SetQWBE(void *p, uint64_t qw)
Writes 64 bits in network byte order.
Definition: vlc_common.h:1051
Configuration item.
Definition: vlc_configuration.h:76
static const char * vlc_pgettext_aux(const char *ctx, const char *id)
Definition: vlc_common.h:1146
#define VLC_FORMAT_ARG(x)
Format string translation function annotation.
Definition: vlc_common.h:152
static int vlc_ctz_generic(unsigned long long x)
Definition: vlc_common.h:613
Video subtitle.
Definition: vlc_subpicture.h:166
VLC object variables and callbacks interface.
Definition: vlc_objects.h:113
static uint64_t U64_AT(const void *p)
Reads 64 bits in network byte order.
Definition: vlc_common.h:985
static int vlc_popcountll(unsigned long long x)
Definition: vlc_common.h:650
Main service discovery structure to build a SD module.
Definition: vlc_services_discovery.h:59
const char * vlc_ngettext(const char *s, const char *p, unsigned long n)
Definition: textdomain.c:88
static int vlc_clz(unsigned x)
Definition: vlc_common.h:608
Definition: vlc_image.h:39
Internal module descriptor.
Definition: modules.h:75
static char * xstrdup(const char *str)
Definition: vlc_common.h:1171
VLC value structure.
Definition: vlc_common.h:455
static uint16_t vlc_bswap16(uint16_t x)
Byte swap (16 bits)
Definition: vlc_common.h:743
static bool uaddl_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:804
This file describes the programming interface for the configuration module.
Definition: renderer_discovery.c:34
Timestamps without long-term rounding errors.
Definition: vlc_tick.h:226
bool vlc_ureduce(unsigned *, unsigned *, uint64_t, uint64_t, uint64_t)
This file defines of values used in interface, vout, aout and vlc core functions. ...
static void SetDWLE(void *p, uint32_t dw)
Writes 32 bits in little endian order.
Definition: vlc_common.h:1067
static int vlc_parity_generic(unsigned long long x)
Definition: vlc_common.h:625
audio_format_t audio_sample_format_t
Definition: vlc_common.h:378
Definition: vlc_input.h:52
static uint16_t GetWLE(const void *p)
Reads 16 bits in little-endian order.
Definition: vlc_common.h:999
const char * vlc_gettext(const char *msgid)
In-tree plugins share their gettext domain with LibVLC.
Definition: textdomain.c:79
const char * VLC_CompileBy(void)
Definition: version.c:43
Definition: fourcc_gen.c:34
static void SetWBE(void *p, uint16_t w)
Writes 16 bits in network byte order.
Definition: vlc_common.h:1037
Definition: vlc_configuration.h:331
Definition: vlc_es_out.h:139
#define VLC_INT_FUNC(basename)
Definition: vlc_common.h:577
#define VLC_MALLOC
Heap allocated result function annotation.
Definition: vlc_common.h:167
Stream output access_output.
Definition: vlc_sout.h:69
#define VLC_USED
Used result function annotation.
Definition: vlc_common.h:185
The update object.
Definition: update.h:158
Definition: vlc_url.h:145
static void SetDWBE(void *p, uint32_t dw)
Writes 32 bits in network byte order.
Definition: vlc_common.h:1044
Viewpoints.
Definition: vlc_viewpoint.h:41
#define hton16(i)
Definition: vlc_common.h:955
static uint32_t GetDWLE(const void *p)
Reads 32 bits in little-endian order.
Definition: vlc_common.h:1012
Common VLC object defintions.
static bool umull_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:878
static uint16_t U16_AT(const void *p)
Reads 16 bits in network byte order.
Definition: vlc_common.h:965
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:223
size_t count
Definition: core.c:402
Video output thread descriptor.
Definition: vlc_vout.h:60
Definition: vlc_input_item.h:53
float f_float
Definition: vlc_common.h:459
int32_t y
Definition: vlc_common.h:462
#define hton64(i)
Definition: vlc_common.h:957
int(* vlc_list_callback_t)(vlc_object_t *, char const *, int, vlc_value_t *, void *)
Definition: vlc_common.h:500
struct playlist_t playlist_t
Definition: vlc_common.h:344
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:88
static bool uadd_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:794
bool b_bool
Definition: vlc_common.h:458
Definition: vlc_sout.h:195
video_format_t video_frame_format_t
Definition: vlc_common.h:384
static void SetQWLE(void *p, uint64_t qw)
Writes 64 bits in little endian order.
Definition: vlc_common.h:1076
Definition: vlm_internal.h:83
const char * VLC_Compiler(void)
Definition: version.c:45
Definition: vlc_input_item.h:44
#define ntoh64(i)
Definition: vlc_common.h:961
Audio output object.
Definition: vlc_aout.h:140
static uint32_t vlc_bswap32(uint32_t x)
Byte swap (32 bits)
Definition: vlc_common.h:750
stream_t definition
Definition: vlc_stream.h:46
Muxer structure.
Definition: vlc_sout.h:117
Subpicture unit descriptor.
Definition: vlc_spu.h:47
#define ctz(x)
Count trailing zeroes.
Definition: vlc_common.h:696
Definition: vlc_codec.h:103
static int vlc_clzll(unsigned long long x)
Definition: vlc_common.h:591
Structure describing a filter.
Definition: vlc_filter.h:68
static uint64_t vlc_bswap64(uint64_t x)
Byte swap (64 bits)
Definition: vlc_common.h:764
Definition: vlc_renderer_discovery.h:165
uint32_t vlc_fourcc_t
The vlc_fourcc_t type.
Definition: vlc_common.h:303
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition: vlc_common.h:491
#define vlc_popcount(x)
Bit weight / population count.
Definition: vlc_common.h:714
Thread primitive declarations.
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1124
#define ntoh32(i)
Definition: vlc_common.h:960
Stream output instance (FIXME: should be private to src/ to avoid invalid unsynchronized access) ...
Definition: vlc_sout.h:48
struct decoder_synchro_t decoder_synchro_t
Definition: vlc_common.h:411
#define VLC_API
Exported API call annotation.
Definition: vlc_common.h:291
Definition: vlc_block.h:117
static uint32_t U32_AT(const void *p)
Reads 32 bits in network byte order.
Definition: vlc_common.h:975
int64_t i_int
Definition: vlc_common.h:457
static void * vlc_reallocarray(void *ptr, size_t count, size_t size)
Definition: vlc_common.h:1130
void * p_address
Definition: vlc_common.h:461
This file defines functions, structures and macros for handling arrays in vlc.
#define mul_overflow(a, b, r)
Overflowing multiplication.
Definition: vlc_common.h:914
static uint8_t clip_uint8_vlc(int32_t a)
Definition: vlc_common.h:566
static bool umul_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:868
static void vlc_fourcc_to_char(vlc_fourcc_t fcc, char *psz_fourcc)
Translate a vlc_fourcc into its string representation.
Definition: vlc_common.h:328
VLC object common members.
Definition: vlc_objects.h:43
char * psz_string
Definition: vlc_common.h:460
static void * xmalloc(size_t len)
Definition: vlc_common.h:1155
static bool uaddll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:815
Definition: vlc_codec.h:225
static void SetWLE(void *p, uint16_t w)
Writes 16 bits in little endian order.
Definition: vlc_common.h:1058
Definition: vlc_iso_lang.h:30