1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 /**************************************************************************** 13 * 14 * Module Title : boolhuff.h 15 * 16 * Description : Bool Coder header file. 17 * 18 ****************************************************************************/ 19 #ifndef __INC_BOOLHUFF_H 20 #define __INC_BOOLHUFF_H 21 22 23 typedef struct 24 { 25 unsigned int lowvalue; 26 unsigned int range; 27 unsigned int value; 28 int count; 29 unsigned int pos; 30 unsigned char *buffer; 31 32 // Variables used to track bit costs without outputing to the bitstream 33 unsigned int measure_cost; 34 unsigned long bit_counter; 35 } BOOL_CODER; 36 37 extern void vp8_start_encode(BOOL_CODER *bc, unsigned char *buffer); 38 extern void vp8_encode_bool(BOOL_CODER *bc, int x, int context); 39 extern void vp8_encode_value(BOOL_CODER *br, int data, int bits); 40 extern void vp8_stop_encode(BOOL_CODER *bc); 41 extern const unsigned int vp8_prob_cost[256]; 42 43 #endif 44