Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.03 KB | None | 0 0
  1. commit 4297cd1ce0af266a0a349b0163e8d741700a082b (HEAD -> master)
  2. Author: Michael Niedermayer <michael@niedermayer.cc>
  3. Date:   Thu Sep 20 00:05:38 2018 +0200
  4.  
  5.     avcodec/unary: Improve get_unary() docs
  6.    
  7.     Found-by: kierank
  8.     Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
  9.  
  10. diff --git a/libavcodec/unary.h b/libavcodec/unary.h
  11. index 908dc93507..d57f9f70c5 100644
  12. --- a/libavcodec/unary.h
  13. +++ b/libavcodec/unary.h
  14. @@ -28,7 +28,20 @@
  15.   * @param gb GetBitContext
  16.   * @param[in] stop The bitstop value (unary code of 1's or 0's)
  17.   * @param[in] len Maximum length
  18. - * @return Unary length/index
  19. + * @return unary 0 based code index. This is also the length in bits of the
  20. + * code excluding the stop bit.
  21. + * (in case len=1)
  22. + * 1            0
  23. + * 0            1
  24. + * (in case len=2)
  25. + * 1            0
  26. + * 01           1
  27. + * 00           2
  28. + * (in case len=3)
  29. + * 1            0
  30. + * 01           1
  31. + * 001          2
  32. + * 000          3
  33.   */
  34.  static inline int get_unary(GetBitContext *gb, int stop, int len)
  35.  {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement