[FFmpeg-cvslog] lavc/golomb: add value range comment for set_ue_golomb().

Jun Zhao git at videolan.org
Fri Jun 23 14:43:14 EEST 2017


ffmpeg | branch: master | Jun Zhao <jun.zhao at intel.com> | Wed Jun 14 10:08:58 2017 +0800| [ea1d07aed96a170d2aaf68a96822485dd20cb346] | committer: Michael Niedermayer

lavc/golomb: add value range comment for set_ue_golomb().

set_ue_golomb just support 2^16 - 2 at most, becase this function call
put_bits, and put_bits just support write up to 31 bits, when write 32
bit in put_bits, it's will overwrite the bit buffer, and the default
assert level is 0, the av_assert2(n <= 31 && value < (1U << n)) in
put_bits can not be trigger runtime.

Signed-off-by: Jun Zhao <jun.zhao at intel.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea1d07aed96a170d2aaf68a96822485dd20cb346
---

 libavcodec/golomb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 4f5514795a..1e834f9327 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -458,7 +458,7 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
 #endif /* TRACE */
 
 /**
- * write unsigned exp golomb code.
+ * write unsigned exp golomb code. 2^16 - 2 at most
  */
 static inline void set_ue_golomb(PutBitContext *pb, int i)
 {



More information about the ffmpeg-cvslog mailing list