On Thu, Mar 13, 2014 at 03:10:20PM +0100, Niels Möller wrote:
> The specification describes the "unary" part of a rice code as a number
> of zero bits followed by a one bit. The pseudocode uses a function
> ExtractUnary, which is not defined anywhere. My best guess is that the
> unary part is encoded as follows:
> 
> value (decimal)  codeword (binary, variable length)
> 0                1
> 1                01
> 2                001
> ...
> 10               00000000001
> ...
> 
> It's not clear to me if there's any upper bound on the length of the
> code words. (The spec also describes a "Hybrid RICE coding", with some
> bound on the code size).
> 
> Now I wonder, which if the umpteen functions (if any?) in
> libavcoded/golomb.h should I use to decode this?

none
get_unary(gb, 1, 33) (from unary.h) should be what you need, and 33 might be a
reasonable limit too
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to