New macros: GST_ROUND_UP_2() through GST_ROUND_UP_64().

Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
New macros: GST_ROUND_UP_2() through GST_ROUND_UP_64().
This commit is contained in:
Tim-Philipp Müller 2005-08-09 16:25:45 +00:00
parent 56dfe83647
commit 8e8a415095
3 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-08-09 Tim-Philipp Müller <tim at centricular dot net>
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
New macros: GST_ROUND_UP_2() through GST_ROUND_UP_64().
2005-08-08 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/base/gstbasetransform.c: (gst_base_transform_buffer_alloc):

View file

@ -1519,6 +1519,12 @@ GST_WRITE_UINT32_LE
GST_WRITE_UINT32_BE
GST_WRITE_UINT64_LE
GST_WRITE_UINT64_BE
GST_ROUND_UP_2
GST_ROUND_UP_4
GST_ROUND_UP_8
GST_ROUND_UP_16
GST_ROUND_UP_32
GST_ROUND_UP_64
<SUBSECTION Private>
GST_HAVE_UNALIGNED_ACCESS
</SECTION>

View file

@ -224,6 +224,15 @@ type_as_function ## _get_type (void) \
#endif /* GST_HAVE_UNALIGNED_ACCESS */
/* Miscellaneous utility macros */
#define GST_ROUND_UP_2(num) (((num)+1)&~1)
#define GST_ROUND_UP_4(num) (((num)+3)&~3)
#define GST_ROUND_UP_8(num) (((num)+7)&~7)
#define GST_ROUND_UP_16(num) (((num)+15)&~15)
#define GST_ROUND_UP_32(num) (((num)+31)&~31)
#define GST_ROUND_UP_64(num) (((num)+63)&~63)
void gst_object_default_error (GstObject * source,
GError * error, gchar * debug);