|
@@ -91,9 +91,9 @@ static av_cold void x8_vlc_init(void)
|
|
|
|
|
|
static void x8_reset_vlc_tables(IntraX8Context *w)
|
|
|
{
|
|
|
- memset(w->j_dc_vlc, 0, sizeof(w->j_dc_vlc));
|
|
|
- memset(w->j_ac_vlc, 0, sizeof(w->j_ac_vlc));
|
|
|
- w->j_orient_vlc = NULL;
|
|
|
+ memset(w->j_dc_vlc_table, 0, sizeof(w->j_dc_vlc_table));
|
|
|
+ memset(w->j_ac_vlc_table, 0, sizeof(w->j_ac_vlc_table));
|
|
|
+ w->j_orient_vlc_table = NULL;
|
|
|
}
|
|
|
|
|
|
static inline void x8_select_ac_table(IntraX8Context *const w, int mode)
|
|
@@ -102,23 +102,23 @@ static inline void x8_select_ac_table(IntraX8Context *const w, int mode)
|
|
|
|
|
|
av_assert2(mode < 4);
|
|
|
|
|
|
- if (w->j_ac_vlc[mode])
|
|
|
+ if (w->j_ac_vlc_table[mode])
|
|
|
return;
|
|
|
|
|
|
table_index = get_bits(w->gb, 3);
|
|
|
// 2 modes use same tables
|
|
|
- w->j_ac_vlc[mode] = &j_ac_vlc[w->quant < 13][mode >> 1][table_index];
|
|
|
+ w->j_ac_vlc_table[mode] = j_ac_vlc[w->quant < 13][mode >> 1][table_index].table;
|
|
|
av_assert2(w->j_ac_vlc[mode]);
|
|
|
}
|
|
|
|
|
|
static inline int x8_get_orient_vlc(IntraX8Context *w)
|
|
|
{
|
|
|
- if (!w->j_orient_vlc) {
|
|
|
+ if (!w->j_orient_vlc_table) {
|
|
|
int table_index = get_bits(w->gb, 1 + (w->quant < 13));
|
|
|
- w->j_orient_vlc = &j_orient_vlc[w->quant < 13][table_index];
|
|
|
+ w->j_orient_vlc_table = j_orient_vlc[w->quant < 13][table_index].table;
|
|
|
}
|
|
|
|
|
|
- return get_vlc2(w->gb, w->j_orient_vlc->table, OR_VLC_BITS, OR_VLC_MTD);
|
|
|
+ return get_vlc2(w->gb, w->j_orient_vlc_table, OR_VLC_BITS, OR_VLC_MTD);
|
|
|
}
|
|
|
|
|
|
#define extra_bits(eb) (eb) // 3 bits
|
|
@@ -174,7 +174,7 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
|
|
|
int i, e;
|
|
|
|
|
|
// x8_select_ac_table(w, mode);
|
|
|
- i = get_vlc2(w->gb, w->j_ac_vlc[mode]->table, AC_VLC_BITS, AC_VLC_MTD);
|
|
|
+ i = get_vlc2(w->gb, w->j_ac_vlc_table[mode], AC_VLC_BITS, AC_VLC_MTD);
|
|
|
|
|
|
if (i < 46) { // [0-45]
|
|
|
int t, l;
|
|
@@ -254,13 +254,13 @@ static int x8_get_dc_rlf(IntraX8Context *const w, const int mode,
|
|
|
int i, e, c;
|
|
|
|
|
|
av_assert2(mode < 3);
|
|
|
- if (!w->j_dc_vlc[mode]) {
|
|
|
+ if (!w->j_dc_vlc_table[mode]) {
|
|
|
int table_index = get_bits(w->gb, 3);
|
|
|
// 4 modes, same table
|
|
|
- w->j_dc_vlc[mode] = &j_dc_vlc[w->quant < 13][table_index];
|
|
|
+ w->j_dc_vlc_table[mode] = j_dc_vlc[w->quant < 13][table_index].table;
|
|
|
}
|
|
|
|
|
|
- i = get_vlc2(w->gb, w->j_dc_vlc[mode]->table, DC_VLC_BITS, DC_VLC_MTD);
|
|
|
+ i = get_vlc2(w->gb, w->j_dc_vlc_table[mode], DC_VLC_BITS, DC_VLC_MTD);
|
|
|
|
|
|
/* (i >= 17) { i -= 17; final =1; } */
|
|
|
c = i > 16;
|