changeset 929:d0be85c9c96f libavutil

Add AV_BASE64_SIZE() macro
author hyc
date Fri, 04 Jun 2010 01:15:07 +0000
parents 11ae7ad12c53
children 7c8cc500e1f4
files base64.h
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/base64.h	Thu Jun 03 21:08:56 2010 +0000
+++ b/base64.h	Fri Jun 04 01:15:07 2010 +0000
@@ -46,4 +46,9 @@
  */
 char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size);
 
+/**
+ * Calculate the output size needed to base64-encode x bytes.
+ */
+#define AV_BASE64_SIZE(x)  (((x)+2) / 3 * 4 + 1)
+
 #endif /* AVUTIL_BASE64_H */