avcodec/unary: Improve get_unary() docs
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 22 Sep 2018 13:18:17 +0000 (15:18 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 31 Oct 2018 23:52:46 +0000 (00:52 +0100)
Found-by: kierank
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad89e203bfedf25df00e2a6ed9196170d772f25b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/unary.h

index 908dc93..d57f9f7 100644 (file)
  * @param gb GetBitContext
  * @param[in] stop The bitstop value (unary code of 1's or 0's)
  * @param[in] len Maximum length
- * @return Unary length/index
+ * @return unary 0 based code index. This is also the length in bits of the
+ * code excluding the stop bit.
+ * (in case len=1)
+ * 1            0
+ * 0            1
+ * (in case len=2)
+ * 1            0
+ * 01           1
+ * 00           2
+ * (in case len=3)
+ * 1            0
+ * 01           1
+ * 001          2
+ * 000          3
  */
 static inline int get_unary(GetBitContext *gb, int stop, int len)
 {