From 5bac2d0c3020587a03cb14e8b6a664a0b92f26c2 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 18 Oct 2012 19:27:51 +0200 Subject: avutil: Move memcpy_backptr() to mem.c The function is used elsewhere and does not belong with the LZO code. --- libavutil/mem.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libavutil/mem.h') 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 +#include #include "attributes.h" #include "avutil.h" @@ -164,6 +165,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); + /** * @} */ -- cgit v1.2.3