@@ -21,6 +21,9 @@ API changes, most recent first:
2019-01-08 - xxxxxxxxxx - lavu 56.26.100 - frame.h
Add AV_FRAME_DATA_REGIONS_OF_INTEREST
+201x-xx-xx - xxxxxxxxxx - lavu 56.xx.xxx - imgutils.h
+ Add av_memset_bytes()
+
2018-12-21 - 2744d6b364 - lavu 56.25.100 - hdr_dynamic_metadata.h
Add AV_FRAME_DATA_DYNAMIC_HDR_PLUS enum value, av_dynamic_hdr_plus_alloc(),
av_dynamic_hdr_plus_create_side_data() functions, and related structs.
@@ -494,11 +494,7 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
return size;
}
-// Fill dst[0..dst_size] with the bytes in clear[0..clear_size]. The clear
-// bytes are repeated until dst_size is reached. If dst_size is unaligned (i.e.
-// dst_size%clear_size!=0), the remaining data will be filled with the beginning
-// of the clear data only.
-static void memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear,
+void av_memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear,
size_t clear_size)
{
int same = 1;
@@ -636,7 +632,7 @@ int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4],
int plane_h = ((height + ( 1 << chroma_div) - 1)) >> chroma_div;
for (; plane_h > 0; plane_h--) {
- memset_bytes(data, bytewidth, &clear_block[plane][0], clear_block_size[plane]);
+ av_memset_bytes(data, bytewidth, &clear_block[plane][0], clear_block_size[plane]);
data += dst_linesize[plane];
}
}
@@ -269,6 +269,16 @@ int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4],
enum AVPixelFormat pix_fmt, enum AVColorRange range,
int width, int height);
+/**
+ * Fill dst[0..dst_size] with the bytes in clear[0..clear_size]. The clear
+ * bytes are repeated until dst_size is reached. If dst_size is unaligned (i.e.
+ * dst_size%clear_size!=0), the remaining data will be filled with the beginning
+ * of the clear data only.
+ */
+void av_memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear,
+ size_t clear_size);
+
+
/**
* @}
*/
This function is useful in more cases than just imgutils Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- doc/APIchanges | 3 +++ libavutil/imgutils.c | 8 ++------ libavutil/imgutils.h | 10 ++++++++++ 3 files changed, 15 insertions(+), 6 deletions(-)