[FFmpeg-devel] avcodec/unary: Improve get_unary() docs

Submitted by Michael Niedermayer on Sept. 19, 2018, 10:05 p.m.

Details

Message ID 20180919220538.9684-1-michael@niedermayer.cc
State Accepted
Headers show

Commit Message

Michael Niedermayer Sept. 19, 2018, 10:05 p.m.
Found-by: kierank
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/unary.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/unary.h b/libavcodec/unary.h
index 908dc93507..e7541a7604 100644
--- a/libavcodec/unary.h
+++ b/libavcodec/unary.h
@@ -28,7 +28,12 @@ 
  * @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 length - 1 or length for the stop code (all 1 or all 0 of len).
+ * (in case len=3)
+ * 1            0
+ * 01           1
+ * 001          2
+ * 000          3
  */
 static inline int get_unary(GetBitContext *gb, int stop, int len)
 {