Commit 7feae8e8 authored by clang-format's avatar clang-format Committed by James Zern

vp10/common: apply clang-format

Change-Id: I01d8241eba3ccaf4d06c00a51df2d17c126f6f9d
parent 26777fca
......@@ -35,8 +35,7 @@ static int alloc_seg_map(VP10_COMMON *cm, int seg_map_size) {
for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) {
cm->seg_map_array[i] = (uint8_t *)vpx_calloc(seg_map_size, 1);
if (cm->seg_map_array[i] == NULL)
return 1;
if (cm->seg_map_array[i] == NULL) return 1;
}
cm->seg_map_alloc_size = seg_map_size;
......@@ -91,7 +90,7 @@ void vp10_free_context_buffers(VP10_COMMON *cm) {
int i;
cm->free_mi(cm);
free_seg_map(cm);
for (i = 0 ; i < MAX_MB_PLANE ; i++) {
for (i = 0; i < MAX_MB_PLANE; i++) {
vpx_free(cm->above_context[i]);
cm->above_context[i] = NULL;
}
......@@ -110,15 +109,13 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
new_mi_size = cm->mi_stride * calc_mi_size(cm->mi_rows);
if (cm->mi_alloc_size < new_mi_size) {
cm->free_mi(cm);
if (cm->alloc_mi(cm, new_mi_size))
goto fail;
if (cm->alloc_mi(cm, new_mi_size)) goto fail;
}
if (cm->seg_map_alloc_size < cm->mi_rows * cm->mi_cols) {
// Create the segmentation map structure and set to 0.
free_seg_map(cm);
if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols))
goto fail;
if (alloc_seg_map(cm, cm->mi_rows * cm->mi_cols)) goto fail;
}
if (cm->above_context_alloc_cols < cm->mi_cols) {
......@@ -129,7 +126,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
ALIGN_POWER_OF_TWO(cm->mi_cols, MAX_MIB_SIZE_LOG2);
int i;
for (i = 0 ; i < MAX_MB_PLANE ; i++) {
for (i = 0; i < MAX_MB_PLANE; i++) {
vpx_free(cm->above_context[i]);
cm->above_context[i] = (ENTROPY_CONTEXT *)vpx_calloc(
2 * aligned_mi_cols, sizeof(*cm->above_context[0]));
......@@ -153,7 +150,7 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) {
return 0;
fail:
fail:
vp10_free_context_buffers(cm);
return 1;
}
......
......@@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP10_COMMON_ALLOCCOMMON_H_
#define VP10_COMMON_ALLOCCOMMON_H_
......
......@@ -23,20 +23,18 @@
#if ANS_DIVIDE_BY_MULTIPLY
#include "vp10/common/divide.h"
#define ANS_DIVREM(quotient, remainder, dividend, divisor) \
do { \
quotient = fastdiv(dividend, divisor); \
remainder = dividend - quotient * divisor; \
do { \
quotient = fastdiv(dividend, divisor); \
remainder = dividend - quotient * divisor; \
} while (0)
#define ANS_DIV(dividend, divisor) \
fastdiv(dividend, divisor)
#define ANS_DIV(dividend, divisor) fastdiv(dividend, divisor)
#else
#define ANS_DIVREM(quotient, remainder, dividend, divisor) \
do { \
quotient = dividend / divisor; \
remainder = dividend % divisor; \
do { \
quotient = dividend / divisor; \
remainder = dividend % divisor; \
} while (0)
#define ANS_DIV(dividend, divisor) \
((dividend) / (divisor))
#define ANS_DIV(dividend, divisor) ((dividend) / (divisor))
#endif
#ifdef __cplusplus
......@@ -245,8 +243,7 @@ static INLINE int uabs_read_literal(struct AnsDecoder *ans, int bits) {
// TODO(aconverse): Investigate ways to read/write literals faster,
// e.g. 8-bit chunks.
for (bit = bits - 1; bit >= 0; bit--)
literal |= uabs_read_bit(ans) << bit;
for (bit = bits - 1; bit >= 0; bit--) literal |= uabs_read_bit(ans) << bit;
return literal;
}
......@@ -257,8 +254,7 @@ static INLINE int uabs_read_tree(struct AnsDecoder *ans,
const AnsP8 *probs) {
vpx_tree_index i = 0;
while ((i = tree[i + uabs_read(ans, probs[i >> 1])]) > 0)
continue;
while ((i = tree[i + uabs_read(ans, probs[i >> 1])]) > 0) continue;
return -i;
}
......@@ -288,8 +284,7 @@ static INLINE void rans_build_cdf_from_pdf(const AnsP10 token_probs[],
assert(cdf_tab[i - 1] == rans_precision);
}
static INLINE int ans_find_largest(const AnsP10 *const pdf_tab,
int num_syms) {
static INLINE int ans_find_largest(const AnsP10 *const pdf_tab, int num_syms) {
int largest_idx = -1;
int largest_p = -1;
int i;
......@@ -365,8 +360,7 @@ static INLINE void fetch_sym(struct rans_dec_sym *out, const rans_dec_lut cdf,
out->cum_prob = (AnsP10)cdf[i - 1];
}
static INLINE int rans_read(struct AnsDecoder *ans,
const rans_dec_lut tab) {
static INLINE int rans_read(struct AnsDecoder *ans, const rans_dec_lut tab) {
unsigned rem;
unsigned quo;
struct rans_dec_sym sym;
......@@ -381,8 +375,7 @@ static INLINE int rans_read(struct AnsDecoder *ans,
}
static INLINE int ans_read_init(struct AnsDecoder *const ans,
const uint8_t *const buf,
int offset) {
const uint8_t *const buf, int offset) {
unsigned x;
if (offset < 1) return 1;
ans->buf = buf;
......@@ -403,8 +396,7 @@ static INLINE int ans_read_init(struct AnsDecoder *const ans,
return 1;
}
ans->state += l_base;
if (ans->state >= l_base * io_base)
return 1;
if (ans->state >= l_base * io_base) return 1;
return 0;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -15,10 +15,9 @@
#include "vp10/common/blockd.h"
PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *left_mi, int b) {
const MODE_INFO *left_mi, int b) {
if (b == 0 || b == 2) {
if (!left_mi || is_inter_block(&left_mi->mbmi))
return DC_PRED;
if (!left_mi || is_inter_block(&left_mi->mbmi)) return DC_PRED;
return get_y_mode(left_mi, b + 1);
} else {
......@@ -28,10 +27,9 @@ PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi,
}
PREDICTION_MODE vp10_above_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *above_mi, int b) {
const MODE_INFO *above_mi, int b) {
if (b == 0 || b == 1) {
if (!above_mi || is_inter_block(&above_mi->mbmi))
return DC_PRED;
if (!above_mi || is_inter_block(&above_mi->mbmi)) return DC_PRED;
return get_y_mode(above_mi, b + 2);
} else {
......@@ -44,12 +42,11 @@ void vp10_foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
foreach_transformed_block_visitor visit, void *arg) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
const MB_MODE_INFO* mbmi = &xd->mi[0]->mbmi;
const MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
// transform size varies per plane, look it up in a common way.
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd)
: mbmi->tx_size;
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) : mbmi->tx_size;
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize];
const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize];
......@@ -61,13 +58,16 @@ void vp10_foreach_transformed_block_in_plane(
// If mb_to_right_edge is < 0 we are in a situation in which
// the current block size extends into the UMV and we won't
// visit the sub blocks that are wholly within the UMV.
const int max_blocks_wide = num_4x4_w + (xd->mb_to_right_edge >= 0 ? 0 :
xd->mb_to_right_edge >> (5 + pd->subsampling_x));
const int max_blocks_high = num_4x4_h + (xd->mb_to_bottom_edge >= 0 ? 0 :
xd->mb_to_bottom_edge >> (5 + pd->subsampling_y));
const int extra_step =
((num_4x4_w - max_blocks_wide) >>
num_4x4_blocks_wide_txsize_log2_lookup[tx_size]) * step;
const int max_blocks_wide =
num_4x4_w + (xd->mb_to_right_edge >= 0 ? 0 : xd->mb_to_right_edge >>
(5 + pd->subsampling_x));
const int max_blocks_high =
num_4x4_h + (xd->mb_to_bottom_edge >= 0
? 0
: xd->mb_to_bottom_edge >> (5 + pd->subsampling_y));
const int extra_step = ((num_4x4_w - max_blocks_wide) >>
num_4x4_blocks_wide_txsize_log2_lookup[tx_size]) *
step;
// Keep track of the row and column of the blocks we use so that we know
// if we are in the unrestricted motion border.
......@@ -81,10 +81,10 @@ void vp10_foreach_transformed_block_in_plane(
}
}
void vp10_foreach_transformed_block(const MACROBLOCKD* const xd,
BLOCK_SIZE bsize,
foreach_transformed_block_visitor visit,
void *arg) {
void vp10_foreach_transformed_block(const MACROBLOCKD *const xd,
BLOCK_SIZE bsize,
foreach_transformed_block_visitor visit,
void *arg) {
int plane;
for (plane = 0; plane < MAX_MB_PLANE; ++plane)
vp10_foreach_transformed_block_in_plane(xd, bsize, plane, visit, arg);
......@@ -107,10 +107,8 @@ void vp10_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
if (above_contexts + aoff > blocks_wide)
above_contexts = blocks_wide - aoff;
for (i = 0; i < above_contexts; ++i)
a[i] = has_eob;
for (i = above_contexts; i < tx_w_in_blocks; ++i)
a[i] = 0;
for (i = 0; i < above_contexts; ++i) a[i] = has_eob;
for (i = above_contexts; i < tx_w_in_blocks; ++i) a[i] = 0;
} else {
memset(a, has_eob, sizeof(ENTROPY_CONTEXT) * tx_w_in_blocks);
}
......@@ -121,13 +119,10 @@ void vp10_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
const int blocks_high = num_4x4_blocks_high_lookup[plane_bsize] +
(xd->mb_to_bottom_edge >> (5 + pd->subsampling_y));
int left_contexts = tx_h_in_blocks;
if (left_contexts + loff > blocks_high)
left_contexts = blocks_high - loff;
if (left_contexts + loff > blocks_high) left_contexts = blocks_high - loff;
for (i = 0; i < left_contexts; ++i)
l[i] = has_eob;
for (i = left_contexts; i < tx_h_in_blocks; ++i)
l[i] = 0;
for (i = 0; i < left_contexts; ++i) l[i] = has_eob;
for (i = left_contexts; i < tx_h_in_blocks; ++i) l[i] = 0;
} else {
memset(l, has_eob, sizeof(ENTROPY_CONTEXT) * tx_h_in_blocks);
}
......@@ -145,37 +140,26 @@ void vp10_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y) {
#if CONFIG_EXT_INTRA
const int16_t dr_intra_derivative[90] = {
1, 14666, 7330, 4884, 3660,
2926, 2435, 2084, 1821, 1616,
1451, 1317, 1204, 1108, 1026,
955, 892, 837, 787, 743,
703, 666, 633, 603, 574,
548, 524, 502, 481, 461,
443, 426, 409, 394, 379,
365, 352, 339, 327, 316,
305, 294, 284, 274, 265,
256, 247, 238, 230, 222,
214, 207, 200, 192, 185,
179, 172, 166, 159, 153,
147, 141, 136, 130, 124,
119, 113, 108, 103, 98,
93, 88, 83, 78, 73,
68, 63, 59, 54, 49,
45, 40, 35, 31, 26,
22, 17, 13, 8, 4,
1, 14666, 7330, 4884, 3660, 2926, 2435, 2084, 1821, 1616, 1451, 1317, 1204,
1108, 1026, 955, 892, 837, 787, 743, 703, 666, 633, 603, 574, 548,
524, 502, 481, 461, 443, 426, 409, 394, 379, 365, 352, 339, 327,
316, 305, 294, 284, 274, 265, 256, 247, 238, 230, 222, 214, 207,
200, 192, 185, 179, 172, 166, 159, 153, 147, 141, 136, 130, 124,
119, 113, 108, 103, 98, 93, 88, 83, 78, 73, 68, 63, 59,
54, 49, 45, 40, 35, 31, 26, 22, 17, 13, 8, 4,
};
// Returns whether filter selection is needed for a given
// intra prediction angle.
int vp10_is_intra_filter_switchable(int angle) {
assert(angle > 0 && angle < 270);
if (angle % 45 == 0)
return 0;
if (angle % 45 == 0) return 0;
if (angle > 90 && angle < 180) {
return 1;
} else {
return ((angle < 90 ? dr_intra_derivative[angle] :
dr_intra_derivative[270 - angle]) & 0xFF) > 0;
return ((angle < 90 ? dr_intra_derivative[angle]
: dr_intra_derivative[270 - angle]) &
0xFF) > 0;
}
}
#endif // CONFIG_EXT_INTRA
This diff is collapsed.
......@@ -28,15 +28,17 @@ extern "C" {
#define PI 3.141592653589793238462643383279502884
// Only need this for fixed-size arrays, for structs just assign.
#define vp10_copy(dest, src) { \
#define vp10_copy(dest, src) \
{ \
assert(sizeof(dest) == sizeof(src)); \
memcpy(dest, src, sizeof(src)); \
memcpy(dest, src, sizeof(src)); \
}
// Use this for variably-sized arrays.
#define vp10_copy_array(dest, src, n) { \
assert(sizeof(*(dest)) == sizeof(*(src))); \
memcpy(dest, src, n * sizeof(*(src))); \
#define vp10_copy_array(dest, src, n) \
{ \
assert(sizeof(*(dest)) == sizeof(*(src))); \
memcpy(dest, src, n * sizeof(*(src))); \
}
#define vp10_zero(dest) memset(&(dest), 0, sizeof(dest))
......@@ -47,19 +49,21 @@ static INLINE int get_unsigned_bits(unsigned int num_values) {
}
#if CONFIG_DEBUG
#define CHECK_MEM_ERROR(cm, lval, expr) do { \
lval = (expr); \
if (!lval) \
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
"Failed to allocate "#lval" at %s:%d", \
__FILE__, __LINE__); \
#define CHECK_MEM_ERROR(cm, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
"Failed to allocate " #lval " at %s:%d", __FILE__, \
__LINE__); \
} while (0)
#else
#define CHECK_MEM_ERROR(cm, lval, expr) do { \
lval = (expr); \
if (!lval) \
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
"Failed to allocate "#lval); \
#define CHECK_MEM_ERROR(cm, lval, expr) \
do { \
lval = (expr); \
if (!lval) \
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
"Failed to allocate " #lval); \
} while (0)
#endif
// TODO(yaowu: validate the usage of these codes or develop new ones.)
......
This diff is collapsed.
......@@ -34,9 +34,7 @@ static void print_mi_data(VP10_COMMON *cm, FILE *file, const char *descriptor,
for (mi_row = 0; mi_row < rows; mi_row++) {
fprintf(file, "%c ", prefix);
for (mi_col = 0; mi_col < cols; mi_col++) {
fprintf(file, "%2d ",
*((int*) ((char *) (&mi[0]->mbmi) +
member_offset)));
fprintf(file, "%2d ", *((int *)((char *)(&mi[0]->mbmi) + member_offset)));
mi++;
}
fprintf(file, "\n");
......@@ -79,7 +77,7 @@ void vp10_print_modes_and_motion_vectors(VP10_COMMON *cm, const char *file) {
fprintf(mvs, "V ");
for (mi_col = 0; mi_col < cols; mi_col++) {
fprintf(mvs, "%4d:%4d ", mi[0]->mbmi.mv[0].as_mv.row,
mi[0]->mbmi.mv[0].as_mv.col);
mi[0]->mbmi.mv[0].as_mv.col);
mi++;
}
fprintf(mvs, "\n");
......
......@@ -26,68 +26,90 @@ void init_fastdiv() {
}
*/
const struct fastdiv_elem vp10_fastdiv_tab[256] = {
{0, 0}, {0, 0}, {0, 1}, {1431655766, 2},
{0, 2}, {2576980378u, 3}, {1431655766, 3}, {613566757, 3},
{0, 3}, {3340530120u, 4}, {2576980378u, 4}, {1952257862, 4},
{1431655766, 4}, {991146300, 4}, {613566757, 4}, {286331154u, 4},
{0, 4}, {3789677026u, 5}, {3340530120u, 5}, {2938661835u, 5},
{2576980378u, 5}, {2249744775u, 5}, {1952257862, 5}, {1680639377, 5},
{1431655766, 5}, {1202590843, 5}, {991146300, 5}, {795364315, 5},
{613566757, 5}, {444306962, 5}, {286331154, 5}, {138547333, 5},
{0, 5}, {4034666248u, 6}, {3789677026u, 6}, {3558687189u, 6},
{3340530120u, 6}, {3134165325u, 6}, {2938661835u, 6}, {2753184165u, 6},
{2576980378u, 6}, {2409371898u, 6}, {2249744775u, 6}, {2097542168u, 6},
{1952257862, 6}, {1813430637, 6}, {1680639377, 6}, {1553498810, 6},
{1431655766, 6}, {1314785907, 6}, {1202590843, 6}, {1094795586, 6},
{991146300, 6}, {891408307, 6}, {795364315, 6}, {702812831, 6},
{613566757, 6}, {527452125, 6}, {444306962, 6}, {363980280, 6},
{286331154, 6}, {211227900, 6}, {138547333, 6}, {68174085, 6},
{0, 6}, {4162814457u, 7}, {4034666248u, 7}, {3910343360u, 7},
{3789677026u, 7}, {3672508268u, 7}, {3558687189u, 7}, {3448072337u, 7},
{3340530120u, 7}, {3235934265u, 7}, {3134165325u, 7}, {3035110223u, 7},
{2938661835u, 7}, {2844718599u, 7}, {2753184165u, 7}, {2663967058u, 7},
{2576980378u, 7}, {2492141518u, 7}, {2409371898u, 7}, {2328596727u, 7},
{2249744775u, 7}, {2172748162u, 7}, {2097542168, 7}, {2024065048, 7},
{1952257862, 7}, {1882064321, 7}, {1813430637, 7}, {1746305385, 7},
{1680639377, 7}, {1616385542, 7}, {1553498810, 7}, {1491936009, 7},
{1431655766, 7}, {1372618415, 7}, {1314785907, 7}, {1258121734, 7},
{1202590843, 7}, {1148159575, 7}, {1094795586, 7}, {1042467791, 7},
{991146300, 7}, {940802361, 7}, {891408307, 7}, {842937507, 7},
{795364315, 7}, {748664025, 7}, {702812831, 7}, {657787785, 7},
{613566757, 7}, {570128403, 7}, {527452125, 7}, {485518043, 7},
{444306962, 7}, {403800345, 7}, {363980280, 7}, {324829460, 7},
{286331154, 7}, {248469183, 7}, {211227900, 7}, {174592167, 7},
{138547333, 7}, {103079216, 7}, {68174085, 7}, {33818641, 7},
{0, 7}, {4228378656u, 8}, {4162814457u, 8}, {4098251237u, 8},
{4034666248u, 8}, {3972037425u, 8}, {3910343360u, 8}, {3849563281u, 8},
{3789677026u, 8}, {3730665024u, 8}, {3672508268u, 8}, {3615188300u, 8},
{3558687189u, 8}, {3502987511u, 8}, {3448072337u, 8}, {3393925206u, 8},
{3340530120u, 8}, {3287871517u, 8}, {3235934265u, 8}, {3184703642u, 8},
{3134165325u, 8}, {3084305374u, 8}, {3035110223u, 8}, {2986566663u, 8},
{2938661835u, 8}, {2891383213u, 8}, {2844718599u, 8}, {2798656110u, 8},
{2753184165u, 8}, {2708291480u, 8}, {2663967058u, 8}, {2620200175u, 8},
{2576980378u, 8}, {2534297473u, 8}, {2492141518u, 8}, {2450502814u, 8},
{2409371898u, 8}, {2368739540u, 8}, {2328596727u, 8}, {2288934667u, 8},
{2249744775u, 8}, {2211018668u, 8}, {2172748162u, 8}, {2134925265u, 8},
{2097542168, 8}, {2060591247, 8}, {2024065048, 8}, {1987956292, 8},
{1952257862, 8}, {1916962805, 8}, {1882064321, 8}, {1847555765, 8},
{1813430637, 8}, {1779682582, 8}, {1746305385, 8}, {1713292966, 8},
{1680639377, 8}, {1648338801, 8}, {1616385542, 8}, {1584774030, 8},
{1553498810, 8}, {1522554545, 8}, {1491936009, 8}, {1461638086, 8},
{1431655766, 8}, {1401984144, 8}, {1372618415, 8}, {1343553873, 8},
{1314785907, 8}, {1286310003, 8}, {1258121734, 8}, {1230216764, 8},
{1202590843, 8}, {1175239808, 8}, {1148159575, 8}, {1121346142, 8},
{1094795586, 8}, {1068504060, 8}, {1042467791, 8}, {1016683080, 8},
{991146300, 8}, {965853890, 8}, {940802361, 8}, {915988286, 8},
{891408307, 8}, {867059126, 8}, {842937507, 8}, {819040276, 8},
{795364315, 8}, {771906565, 8}, {748664025, 8}, {725633745, 8},
{702812831, 8}, {680198441, 8}, {657787785, 8}, {635578121, 8},
{613566757, 8}, {591751050, 8}, {570128403, 8}, {548696263, 8},
{527452125, 8}, {506393524, 8}, {485518043, 8}, {464823301, 8},
{444306962, 8}, {423966729, 8}, {403800345, 8}, {383805589, 8},
{363980280, 8}, {344322273, 8}, {324829460, 8}, {305499766, 8},
{286331154, 8}, {267321616, 8}, {248469183, 8}, {229771913, 8},
{211227900, 8}, {192835267, 8}, {174592167, 8}, {156496785, 8},
{138547333, 8}, {120742053, 8}, {103079216, 8}, {85557118, 8},
{68174085, 8}, {50928466, 8}, {33818641, 8}, {16843010, 8},
{ 0, 0 }, { 0, 0 }, { 0, 1 },
{ 1431655766, 2 }, { 0, 2 }, { 2576980378u, 3 },
{ 1431655766, 3 }, { 613566757, 3 }, { 0, 3 },
{ 3340530120u, 4 }, { 2576980378u, 4 }, { 1952257862, 4 },
{ 1431655766, 4 }, { 991146300, 4 }, { 613566757, 4 },
{ 286331154u, 4 }, { 0, 4 }, { 3789677026u, 5 },
{ 3340530120u, 5 }, { 2938661835u, 5 }, { 2576980378u, 5 },
{ 2249744775u, 5 }, { 1952257862, 5 }, { 1680639377, 5 },
{ 1431655766, 5 }, { 1202590843, 5 }, { 991146300, 5 },
{ 795364315, 5 }, { 613566757, 5 }, { 444306962, 5 },
{ 286331154, 5 }, { 138547333, 5 }, { 0, 5 },
{ 4034666248u, 6 }, { 3789677026u, 6 }, { 3558687189u, 6 },
{ 3340530120u, 6 }, { 3134165325u, 6 }, { 2938661835u, 6 },
{ 2753184165u, 6 }, { 2576980378u, 6 }, { 2409371898u, 6 },
{ 2249744775u, 6 }, { 2097542168u, 6 }, { 1952257862, 6 },
{ 1813430637, 6 }, { 1680639377, 6 }, { 1553498810, 6 },
{ 1431655766, 6 }, { 1314785907, 6 }, { 1202590843, 6 },
{ 1094795586, 6 }, { 991146300, 6 }, { 891408307, 6 },
{ 795364315, 6 }, { 702812831, 6 }, { 613566757, 6 },
{ 527452125, 6 }, { 444306962, 6 }, { 363980280, 6 },
{ 286331154, 6 }, { 211227900, 6 }, { 138547333, 6 },
{ 68174085, 6 }, { 0, 6 }, { 4162814457u, 7 },
{ 4034666248u, 7 }, { 3910343360u, 7 }, { 3789677026u, 7 },
{ 3672508268u, 7 }, { 3558687189u, 7 }, { 3448072337u, 7 },
{ 3340530120u, 7 }, { 3235934265u, 7 }, { 3134165325u, 7 },
{ 3035110223u, 7 }, { 2938661835u, 7 }, { 2844718599u, 7 },
{ 2753184165u, 7 }, { 2663967058u, 7 }, { 2576980378u, 7 },
{ 2492141518u, 7 }, { 2409371898u, 7 }, { 2328596727u, 7 },
{ 2249744775u, 7 }, { 2172748162u, 7 }, { 2097542168, 7 },
{ 2024065048, 7 }, { 1952257862, 7 }, { 1882064321, 7 },
{ 1813430637, 7 }, { 1746305385, 7 }, { 1680639377, 7 },
{ 1616385542, 7 }, { 1553498810, 7 }, { 1491936009, 7 },
{ 1431655766, 7 }, { 1372618415, 7 }, { 1314785907, 7 },
{ 1258121734, 7 }, { 1202590843, 7 }, { 1148159575, 7 },
{ 1094795586, 7 }, { 1042467791, 7 }, { 991146300, 7 },
{ 940802361, 7 }, { 891408307, 7 }, { 842937507, 7 },
{ 795364315, 7 }, { 748664025, 7 }, { 702812831, 7 },
{ 657787785, 7 }, { 613566757, 7 }, { 570128403, 7 },
{ 527452125, 7 }, { 485518043, 7 }, { 444306962, 7 },
{ 403800345, 7 }, { 363980280, 7 }, { 324829460, 7 },
{ 286331154, 7 }, { 248469183, 7 }, { 211227900, 7 },
{ 174592167, 7 }, { 138547333, 7 }, { 103079216, 7 },
{ 68174085, 7 }, { 33818641, 7 }, { 0, 7 },
{ 4228378656u, 8 }, { 4162814457u, 8 }, { 4098251237u, 8 },
{ 4034666248u, 8 }, { 3972037425u, 8 }, { 3910343360u, 8 },
{ 3849563281u, 8 }, { 3789677026u, 8 }, { 3730665024u, 8 },
{ 3672508268u, 8 }, { 3615188300u, 8 }, { 3558687189u, 8 },
{ 3502987511u, 8 }, { 3448072337u, 8 }, { 3393925206u, 8 },
{ 3340530120u, 8 }, { 3287871517u, 8 }, { 3235934265u, 8 },
{ 3184703642u, 8 }, { 3134165325u, 8 }, { 3084305374u, 8 },
{ 3035110223u, 8 }, { 2986566663u, 8 }, { 2938661835u, 8 },
{ 2891383213u, 8 }, { 2844718599u, 8 }, { 2798656110u, 8 },
{ 2753184165u, 8 }, { 2708291480u, 8 }, { 2663967058u, 8 },
{ 2620200175u, 8 }, { 2576980378u, 8 }, { 2534297473u, 8 },
{ 2492141518u, 8 }, { 2450502814u, 8 }, { 2409371898u, 8 },
{ 2368739540u, 8 }, { 2328596727u, 8 }, { 2288934667u, 8 },
{ 2249744775u, 8 }, { 2211018668u, 8 }, { 2172748162u, 8 },
{ 2134925265u, 8 }, { 2097542168, 8 }, { 2060591247, 8 },
{ 2024065048, 8 }, { 1987956292, 8 }, { 1952257862, 8 },
{ 1916962805, 8 }, { 1882064321, 8 }, { 1847555765, 8 },
{ 1813430637, 8 }, { 1779682582, 8 }, { 1746305385, 8 },
{ 1713292966, 8 }, { 1680639377, 8 }, { 1648338801, 8 },
{ 1616385542, 8 }, { 1584774030, 8 }, { 1553498810, 8 },
{ 1522554545, 8 }, { 1491936009, 8 }, { 1461638086, 8 },
{ 1431655766, 8 }, { 1401984144, 8 }, { 1372618415, 8 },
{ 1343553873, 8 }, { 1314785907, 8 }, { 1286310003, 8 },
{ 1258121734, 8 }, { 1230216764, 8 }, { 1202590843, 8 },
{ 1175239808, 8 }, { 1148159575, 8 }, { 1121346142, 8 },
{ 1094795586, 8 }, { 1068504060, 8 }, { 1042467791, 8 },
{ 1016683080, 8 }, { 991146300, 8 }, { 965853890, 8 },
{ 940802361, 8 }, { 915988286, 8 }, { 891408307, 8 },
{ 867059126, 8 }, { 842937507, 8 }, { 819040276, 8 },
{ 795364315, 8 }, { 771906565, 8 }, { 748664025, 8 },
{ 725633745, 8 }, { 702812831, 8 }, { 680198441, 8 },
{ 657787785, 8 }, { 635578121, 8 }, { 613566757, 8 },
{ 591751050, 8 }, { 570128403, 8 }, { 548696263, 8 },
{ 527452125, 8 }, { 506393524, 8 }, { 485518043, 8 },
{ 464823301, 8 }, { 444306962, 8 }, { 423966729, 8 },
{ 403800345, 8 }, { 383805589, 8 }, { 363980280, 8 },
{ 344322273, 8 }, { 324829460, 8 }, { 305499766, 8 },
{ 286331154, 8 }, { 267321616, 8 }, { 248469183, 8 },
{ 229771913, 8 }, { 211227900, 8 }, { 192835267, 8 },
{ 174592167, 8 }, { 156496785, 8 }, { 138547333, 8 },
{ 120742053, 8 }, { 103079216, 8 }, { 85557118, 8 },
{ 68174085, 8 }, { 50928466, 8 }, { 33818641, 8 },
{ 16843010, 8 },
};
This diff is collapsed.
......@@ -24,7 +24,7 @@
extern "C" {
#endif
#define DIFF_UPDATE_PROB 252
#define DIFF_UPDATE_PROB 252
#define GROUP_DIFF_UPDATE_PROB 252
#if CONFIG_ENTROPY
......@@ -34,18 +34,18 @@ extern "C" {
#endif // CONFIG_ENTROPY
// Coefficient token alphabet
#define ZERO_TOKEN 0 // 0 Extra Bits 0+0
#define ONE_TOKEN 1 // 1 Extra Bits 0+1
#define TWO_TOKEN 2 // 2 Extra Bits 0+1
#define THREE_TOKEN 3 // 3 Extra Bits 0+1
#define FOUR_TOKEN 4 // 4 Extra Bits 0+1
#define ZERO_TOKEN 0 // 0 Extra Bits 0+0
#define ONE_TOKEN 1 // 1 Extra Bits 0+1
#define TWO_TOKEN 2 // 2 Extra Bits 0+1
#define THREE_TOKEN 3 // 3 Extra Bits 0+1
#define FOUR_TOKEN 4 // 4 Extra Bits 0+1
#define CATEGORY1_TOKEN 5 // 5-6 Extra Bits 1+1
#define CATEGORY2_TOKEN 6 // 7-10 Extra Bits 2+1
#define CATEGORY3_TOKEN 7 // 11-18 Extra Bits 3+1
#define CATEGORY4_TOKEN 8 // 19-34 Extra Bits 4+1
#define CATEGORY5_TOKEN 9 // 35-66 Extra Bits 5+1
#define CATEGORY6_TOKEN 10 // 67+ Extra Bits 14+1
#define EOB_TOKEN 11 // EOB Extra Bits 0+0
#define EOB_TOKEN 11 // EOB Extra Bits 0+0
#define ENTROPY_TOKENS 12
......@@ -53,12 +53,12 @@ extern "C" {