[libav-commits] cabac: drop unused and disabled get_cabac_u() / get_cabac_ueg() functions

Diego Biurrun git at libav.org
Wed Jan 4 01:16:01 CET 2012


Module: libav
Branch: master
Commit: 9dec55748cd5cf371d8f3eb35bac073d285f0617

Author:    Diego Biurrun <diego at biurrun.de>
Committer: Diego Biurrun <diego at biurrun.de>
Date:      Tue Dec 27 11:51:28 2011 +0100

cabac: drop unused and disabled get_cabac_u() / get_cabac_ueg() functions

---

 libavcodec/cabac.c |   15 -------------
 libavcodec/cabac.h |   58 ----------------------------------------------------
 2 files changed, 0 insertions(+), 73 deletions(-)

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 25713ee..bcb2429 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -343,21 +343,6 @@ START_TIMER
             av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i);
 STOP_TIMER("get_cabac")
     }
-#if 0
-    for(i=0; i<SIZE; i++){
-START_TIMER
-        if( r[i] != get_cabac_u(&c, state, (i&1) ? 6 : 7, 3, i&1) )
-            av_log(NULL, AV_LOG_ERROR, "CABAC unary (truncated) binarization failure at %d\n", i);
-STOP_TIMER("get_cabac_u")
-    }
-
-    for(i=0; i<SIZE; i++){
-START_TIMER
-        if( r[i] != get_cabac_ueg(&c, state, 3, 0, 1, 2))
-            av_log(NULL, AV_LOG_ERROR, "CABAC unary (truncated) binarization failure at %d\n", i);
-STOP_TIMER("get_cabac_ueg")
-    }
-#endif
     if(!get_cabac_terminate(&c))
         av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n");
 
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index b3f8f55..aff6495 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -213,62 +213,4 @@ static int av_unused get_cabac_terminate(CABACContext *c){
     }
 }
 
-#if 0
-/**
- * Get (truncated) unary binarization.
- */
-static int get_cabac_u(CABACContext *c, uint8_t * state, int max, int max_index, int truncated){
-    int i;
-
-    for(i=0; i<max; i++){
-        if(get_cabac(c, state)==0)
-            return i;
-
-        if(i< max_index) state++;
-    }
-
-    return truncated ? max : -1;
-}
-
-/**
- * get unary exp golomb k-th order binarization.
- */
-static int get_cabac_ueg(CABACContext *c, uint8_t * state, int max, int is_signed, int k, int max_index){
-    int i, v;
-    int m= 1<<k;
-
-    if(get_cabac(c, state)==0)
-        return 0;
-
-    if(0 < max_index) state++;
-
-    for(i=1; i<max; i++){
-        if(get_cabac(c, state)==0){
-            if(is_signed && get_cabac_bypass(c)){
-                return -i;
-            }else
-                return i;
-        }
-
-        if(i < max_index) state++;
-    }
-
-    while(get_cabac_bypass(c)){
-        i+= m;
-        m+= m;
-    }
-
-    v=0;
-    while(m>>=1){
-        v+= v + get_cabac_bypass(c);
-    }
-    i += v;
-
-    if(is_signed && get_cabac_bypass(c)){
-        return -i;
-    }else
-        return i;
-}
-#endif /* 0 */
-
 #endif /* AVCODEC_CABAC_H */



More information about the libav-commits mailing list