summaryrefslogtreecommitdiffstats
path: root/libvo/fastmemcpy.h
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/fastmemcpy.h')
-rw-r--r--libvo/fastmemcpy.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libvo/fastmemcpy.h b/libvo/fastmemcpy.h
index 5d05d37043..36fada39fe 100644
--- a/libvo/fastmemcpy.h
+++ b/libvo/fastmemcpy.h
@@ -64,4 +64,17 @@ static inline void * memcpy_pic2(void * dst, const void * src,
return retval;
}
+static inline void memset_pic(void *dst, int fill, int bytesPerLine, int height,
+ int stride)
+{
+ if (bytesPerLine == stride) {
+ memset(dst, fill, stride * height);
+ } else {
+ for (int i = 0; i < height; i++) {
+ memset(dst, fill, bytesPerLine);
+ dst = (uint8_t *)dst + stride;
+ }
+ }
+}
+
#endif /* MPLAYER_FASTMEMCPY_H */