summaryrefslogtreecommitdiffstats
path: root/video/memcpy_pic.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/memcpy_pic.h')
-rw-r--r--video/memcpy_pic.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/video/memcpy_pic.h b/video/memcpy_pic.h
index 2def66f3a4..5343739e82 100644
--- a/video/memcpy_pic.h
+++ b/video/memcpy_pic.h
@@ -70,4 +70,20 @@ static inline void memset_pic(void *dst, int fill, int bytesPerLine, int height,
}
}
+static inline void memset16_pic(void *dst, int fill, int unitsPerLine,
+ int height, int stride)
+{
+ if (fill == 0) {
+ memset_pic(dst, 0, unitsPerLine * 2, height, stride);
+ } else {
+ for (int i = 0; i < height; i++) {
+ uint16_t *line = dst;
+ uint16_t *end = line + unitsPerLine;
+ while (line < end)
+ *line++ = fill;
+ dst = (uint8_t *)dst + stride;
+ }
+ }
+}
+
#endif /* MPLAYER_FASTMEMCPY_H */