]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cabac.c
gain code, gain pitch and pitch delay decoding for ACELP based codecs
[ffmpeg] / libavcodec / cabac.c
index c6da6292a2103339e4469fd4c2e5a3532683a2e3..4ed6e028eb08b5e2b6ca816ec3000166c210914a 100644 (file)
@@ -17,7 +17,6 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /**
@@ -27,7 +26,7 @@
 
 #include <string.h>
 
-#include "common.h"
+#include "libavutil/common.h"
 #include "bitstream.h"
 #include "cabac.h"
 
@@ -179,12 +178,14 @@ void ff_init_cabac_states(CABACContext *c){
     }
 }
 
-#if 0 //selftest
+#ifdef TEST
+#undef random
 #define SIZE 10240
 
 #include "avcodec.h"
+#include "cabac.h"
 
-int main(){
+int main(void){
     CABACContext c;
     uint8_t b[9*SIZE];
     uint8_t r[9*SIZE];
@@ -192,7 +193,7 @@ int main(){
     uint8_t state[10]= {0};
 
     ff_init_cabac_encoder(&c, b, SIZE);
-    ff_init_cabac_states(&c, ff_h264_lps_range, ff_h264_mps_state, ff_h264_lps_state, 64);
+    ff_init_cabac_states(&c);
 
     for(i=0; i<SIZE; i++){
         r[i]= random()%7;
@@ -262,4 +263,4 @@ STOP_TIMER("get_cabac_ueg")
     return 0;
 }
 
-#endif
+#endif /* TEST */