On Mon, Mar 10, 2014 at 12:43 PM, Tim Walker <[email protected]> wrote:
>
> On 10 Mar 2014, at 11:01, Luca Barbato <[email protected]> wrote:
>
>> Do not use inline functions that refer to tables present in other
>> libraries.
>> ---
>> libavformat/hevc.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> I used get_se_golomb because the spec. said those fields were se(v) and I was 
> unsure whether get_ue_golomb/get_ue_golomb_long would read the correct number 
> of bits (I really had no clue what I was doing).
>
> But it seems your get_se_golomb_long just uses get_ue_golomb_long - were's 
> skipping these fields anyway, is there any difference in behavior or does it 
> just make it obvious we're skipping signed golomb codes?
>

unsigned and signed golombs are coded the same, just the
interpretation of the numbers is different.
Signed golombs alternate between signed/unsigned, so you can interpet
the lowest bit as a sign bit. Which means you can read unsigned and
convert easily to the signed number - as seen in the patch that adds
the function.

And of course its a good idea to use the correct reading function,
otherwise it may cause odd errors later if one of the values is needed
afterall.

- Hendrik
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to