aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/golomb.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-10 19:40:55 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-10 19:40:55 +0000
commita6c01275ad603139a0fb2f7b639519019263a8e0 (patch)
treeb60df98e426e52451a10e8a685c1980d85b0ceac /libavcodec/golomb.h
parent8bf5d58f86e98f2df61b9ac6d0d945a1c04ece38 (diff)
downloadffmpeg-a6c01275ad603139a0fb2f7b639519019263a8e0.tar.gz
get/set_sr_golomb() cleanup
Originally committed as revision 3451 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/golomb.h')
-rw-r--r--libavcodec/golomb.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 649664368b..f8b144a531 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -263,7 +263,7 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int
/**
* read signed golomb rice code (ffv1).
*/
-static inline int get_sr_golomb_ffv1(GetBitContext *gb, int k, int limit, int esc_len){
+static inline int get_sr_golomb(GetBitContext *gb, int k, int limit, int esc_len){
int v= get_ur_golomb(gb, k, limit, esc_len);
v++;
@@ -272,8 +272,8 @@ static inline int get_sr_golomb_ffv1(GetBitContext *gb, int k, int limit, int es
// return (v>>1) ^ -(v&1);
}
-/**
+/**
* read signed golomb rice code (flac).
*/
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int esc_len){
@@ -281,17 +281,6 @@ static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit, int es
return (v>>1) ^ -(v&1);
}
-/**
- * read signed golomb rice code (sonic).
- */
-static inline int get_sr_golomb_sonic(GetBitContext *gb, int k, int limit, int esc_len){
- int v= get_ur_golomb(gb, k, limit, esc_len);
-
- v++;
- if (v&1) return -(v>>1);
- else return v>>1;
-}
-
#ifdef TRACE
static inline int get_ue(GetBitContext *s, char *file, char *func, int line){
@@ -432,7 +421,7 @@ static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, int lim
/**
* write signed golomb rice code (ffv1).
*/
-static inline void set_sr_golomb_ffv1(PutBitContext *pb, int i, int k, int limit, int esc_len){
+static inline void set_sr_golomb(PutBitContext *pb, int i, int k, int limit, int esc_len){
int v;
v = -2*i-1;
@@ -452,15 +441,3 @@ static inline void set_sr_golomb_flac(PutBitContext *pb, int i, int k, int limit
set_ur_golomb_jpegls(pb, v, k, limit, esc_len);
}
-
-/**
- * write signed golomb rice code (sonic).
- */
-static inline void set_sr_golomb_sonic(PutBitContext *pb, int i, int k, int limit, int esc_len){
- int v;
-
- v = 2*i-1;
- if (v<0) v ^= -1;
-
- set_ur_golomb(pb, v, k, limit, esc_len);
-}