mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
golomb: Fix the implementation of get_se_golomb_long
This was only used in hevc muxing code so far. This makes the return values match what get_se_golomb returns for the same bitstream reader instances. The logic for producing a signed golomb code out of an unsigned one was based on the corresponding code in get_se_golomb, which operated directly on the bitstream reader buffer - not on the equivalent return value from get_ue_golomb. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
53c20f17c7
commit
508a84e672
@ -211,9 +211,9 @@ static inline int get_se_golomb_long(GetBitContext *gb)
|
||||
unsigned int buf = get_ue_golomb_long(gb);
|
||||
|
||||
if (buf & 1)
|
||||
buf = -(buf >> 1);
|
||||
buf = (buf + 1) >> 1;
|
||||
else
|
||||
buf = (buf >> 1);
|
||||
buf = -(buf >> 1);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user