Useful in libavformat mostly.
---
libavcodec/golomb.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index efe5059..ce3500f 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -206,6 +206,18 @@ static inline int get_se_golomb(GetBitContext *gb)
}
}
+static inline int get_se_golomb_long(GetBitContext *gb)
+{
+ unsigned int buf = get_ue_golomb_long(gb);
+
+ if (buf & 1)
+ buf = -(buf >> 1);
+ else
+ buf = (buf >> 1);
+
+ return buf;
+}
+
static inline int svq3_get_se_golomb(GetBitContext *gb)
{
unsigned int buf;
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel