summaryrefslogtreecommitdiff
path: root/libavutil/mem.h
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-10-18 19:27:51 +0200
committerDiego Biurrun <diego@biurrun.de>2012-10-25 11:36:57 +0200
commit5bac2d0c3020587a03cb14e8b6a664a0b92f26c2 (patch)
tree08c6ccffd567aabf43301cc5d3dee357580d3eed /libavutil/mem.h
parenta6e9d6497739b7b60e3284f03b27883514bbc94a (diff)
avutil: Move memcpy_backptr() to mem.c
The function is used elsewhere and does not belong with the LZO code.
Diffstat (limited to 'libavutil/mem.h')
-rw-r--r--libavutil/mem.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavutil/mem.h b/libavutil/mem.h
index 4f14f27a91..8f4722447d 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -27,6 +27,7 @@
#define AVUTIL_MEM_H
#include <limits.h>
+#include <stdint.h>
#include "attributes.h"
#include "avutil.h"
@@ -165,6 +166,17 @@ char *av_strdup(const char *s) av_malloc_attrib;
void av_freep(void *ptr);
/**
+ * @brief deliberately overlapping memcpy implementation
+ * @param dst destination buffer
+ * @param back how many bytes back we start (the initial size of the overlapping window)
+ * @param cnt number of bytes to copy, must be >= 0
+ *
+ * cnt > back is valid, this will copy the bytes we just copied,
+ * thus creating a repeating pattern with a period length of back.
+ */
+void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
+
+/**
* @}
*/