Browse Source

Merge commit '5eacbb53289570834f9a1acb15fd406ea224eef6'

* commit '5eacbb53289570834f9a1acb15fd406ea224eef6':
  golomb: Add a get_se_golomb_long

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 12 years ago
parent
commit
d79d5aed6d
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      libavcodec/golomb.h

+ 12
- 0
libavcodec/golomb.h View File

@@ -214,6 +214,18 @@ static inline int get_se_golomb(GetBitContext *gb)
}
}

static inline int get_se_golomb_long(GetBitContext *gb)
{
unsigned int buf = get_ue_golomb_long(gb);

if (buf & 1)
buf = -(buf >> 1);
else
buf = (buf >> 1);

return buf;
}

static inline int svq3_get_se_golomb(GetBitContext *gb)
{
unsigned int buf;


Loading…
Cancel
Save