h264: use one table instead of several for cabac functions
[ffmpeg.git] / libavcodec / cabac_functions.h
index 4c74cf7..484ba85 100644 (file)
 #   include "x86/cabac.h"
 #endif
 
-extern const uint8_t ff_h264_norm_shift[512];
-extern uint8_t ff_h264_mlps_state[4*64];
-extern uint8_t ff_h264_lps_range[4*2*64];  ///< rangeTabLPS
+extern uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
+static uint8_t * const ff_h264_norm_shift = ff_h264_cabac_tables + H264_NORM_SHIFT_OFFSET;
+static uint8_t * const ff_h264_lps_range = ff_h264_cabac_tables + H264_LPS_RANGE_OFFSET;
+static uint8_t * const ff_h264_mlps_state = ff_h264_cabac_tables + H264_MLPS_STATE_OFFSET;
+static uint8_t * const ff_h264_last_coeff_flag_offset_8x8 = ff_h264_cabac_tables + H264_LAST_COEFF_FLAG_OFFSET_8x8_OFFSET;
 
 static void refill(CABACContext *c){
 #if CABAC_BITS == 16