summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavcodec/golomb.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/golomb.h')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/golomb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/golomb.h b/chromium/third_party/ffmpeg/libavcodec/golomb.h
index 43875dc85c4..1c4e2106ee1 100644
--- a/chromium/third_party/ffmpeg/libavcodec/golomb.h
+++ b/chromium/third_party/ffmpeg/libavcodec/golomb.h
@@ -214,6 +214,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) >> 1;
+ else
+ buf = -(buf >> 1);
+
+ return buf;
+}
+
static inline int svq3_get_se_golomb(GetBitContext *gb)
{
unsigned int buf;