SRCS = common/mc.c common/predict.c common/pixel.c common/macroblock.c \
common/frame.c common/dct.c common/cpu.c common/cabac.c \
common/common.c common/mdate.c common/set.c \
- common/quant.c \
+ common/quant.c common/vlc.c \
encoder/analyse.c encoder/me.c encoder/ratecontrol.c \
encoder/set.c encoder/macroblock.c encoder/cabac.c \
encoder/cavlc.c encoder/encoder.c encoder/eval.c
#ifndef X264_BS_H
#define X264_BS_H
+typedef struct
+{
+ uint8_t i_bits;
+ uint8_t i_size;
+} vlc_t;
+
typedef struct bs_s
{
uint8_t *p_start;
int i_bits_encoded; /* RD only */
} bs_t;
+extern const vlc_t x264_coeff_token[5][17*4];
+extern const vlc_t x264_total_zeros[15][16];
+extern const vlc_t x264_total_zeros_dc[3][4];
+extern const vlc_t x264_run_before[7][15];
+
static inline void bs_init( bs_t *s, void *p_data, int i_data )
{
int offset = ((intptr_t)p_data & (WORD_SIZE-1));
/*****************************************************************************
- * vlc.h : vlc table
+ * vlc.c : vlc table
*****************************************************************************
* Copyright (C) 2003 Laurent Aimar <fenrir@via.ecp.fr>
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
*****************************************************************************/
-typedef struct
-{
- uint16_t i_bits;
- uint16_t i_size;
-} vlc_t;
+#include "common.h"
-/* XXX: don't forget to change it if you change vlc_t */
#define MKVLC( a, b ) { a, b }
-static const vlc_t x264_coeff_token[5][17*4] =
+const vlc_t x264_coeff_token[5][17*4] =
{
/* table 0 */
{
};
/* [i_total_coeff-1][i_total_zeros] */
-static const vlc_t x264_total_zeros[15][16] =
+const vlc_t x264_total_zeros[15][16] =
{
{ /* i_total 1 */
MKVLC( 0x1, 1 ), /* str=1 */
};
/* [i_total_coeff-1][i_total_zeros] */
-static const vlc_t x264_total_zeros_dc[3][4] =
+const vlc_t x264_total_zeros_dc[3][4] =
{
{
MKVLC( 0x01, 1 ), /* 1 */
};
/* x264_run_before[__MIN( i_zero_left -1, 6 )][run_before] */
-static const vlc_t x264_run_before[7][15] =
+const vlc_t x264_run_before[7][15] =
{
{ /* i_zero_left 1 */
MKVLC( 0x1, 1 ), /* str=1 */