* 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
- *
*/
/**
#include <string.h>
-#include "common.h"
+#include "libavutil/common.h"
#include "bitstream.h"
#include "cabac.h"
}
}
-#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];
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;
return 0;
}
-#endif
+#endif /* TEST */