nr->cache = 0xff;
}
-static gboolean
+static inline gboolean
nal_reader_read (NalReader * nr, guint nbits)
{
if (G_UNLIKELY (nr->byte * 8 + (nbits - nr->bits_in_cache) > nr->size * 8)) {
static inline gboolean
nal_reader_skip (NalReader * nr, guint nbits)
{
- g_return_val_if_fail (nr != NULL, FALSE);
-
if (G_UNLIKELY (!nal_reader_read (nr, nbits)))
return FALSE;
static inline gboolean
nal_reader_skip_to_byte (NalReader * nr)
{
- g_return_val_if_fail (nr != NULL, FALSE);
-
if (nr->bits_in_cache == 0) {
if (G_LIKELY ((nr->size - nr->byte) > 0))
nr->byte++;
{ \
guint shift; \
\
- g_return_val_if_fail (nr != NULL, FALSE); \
- g_return_val_if_fail (val != NULL, FALSE); \
- g_return_val_if_fail (nbits <= bits, FALSE); \
- \
if (!nal_reader_read (nr, nbits)) \
return FALSE; \
\
{ \
NalReader tmp; \
\
- g_return_val_if_fail (nr != NULL, FALSE); \
tmp = *nr; \
return nal_reader_get_bits_uint##bits (&tmp, val, nbits); \
}
return TRUE;
}
-static gboolean
+static inline gboolean
nal_reader_get_se (NalReader * nr, gint32 * val)
{
guint32 value;