diff base64.h @ 929:d0be85c9c96f libavutil

Add AV_BASE64_SIZE() macro
author hyc
date Fri, 04 Jun 2010 01:15:07 +0000
parents 4f98a323598c
children e34e8d654ded
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 */