Commit 0195fb53 authored by James Zern's avatar James Zern

vp9: consistent 'log2' variable naming

lg2 -> log2

Change-Id: I0602ddff49e42c9c40c29c084d04b7592b9f8edf
parent 37c0a1a8
......@@ -615,11 +615,11 @@ static int txfrm_block_to_raster_block(MACROBLOCKD *xd,
int ss_txfrm_size) {
const int bwl = b_width_log2(bsize) - xd->plane[plane].subsampling_x;
const int txwl = ss_txfrm_size / 2;
const int tx_cols_lg2 = bwl - txwl;
const int tx_cols = 1 << tx_cols_lg2;
const int tx_cols_log2 = bwl - txwl;
const int tx_cols = 1 << tx_cols_log2;
const int raster_mb = block >> ss_txfrm_size;
const int x = (raster_mb & (tx_cols - 1)) << (txwl);
const int y = raster_mb >> tx_cols_lg2 << (txwl);
const int y = raster_mb >> tx_cols_log2 << (txwl);
return x + (y << bwl);
}
......@@ -630,11 +630,11 @@ static void txfrm_block_to_raster_xy(MACROBLOCKD *xd,
int *x, int *y) {
const int bwl = b_width_log2(bsize) - xd->plane[plane].subsampling_x;
const int txwl = ss_txfrm_size / 2;
const int tx_cols_lg2 = bwl - txwl;
const int tx_cols = 1 << tx_cols_lg2;
const int tx_cols_log2 = bwl - txwl;
const int tx_cols = 1 << tx_cols_log2;
const int raster_mb = block >> ss_txfrm_size;
*x = (raster_mb & (tx_cols - 1)) << (txwl);
*y = raster_mb >> tx_cols_lg2 << (txwl);
*y = raster_mb >> tx_cols_log2 << (txwl);
}
static void extend_for_intra(MACROBLOCKD* const xd, int plane, int block,
......
......@@ -28,7 +28,7 @@
// Define the number of candidate reference buffers.
#define NUM_REF_FRAMES 8
#define NUM_REF_FRAMES_LG2 3
#define NUM_REF_FRAMES_LOG2 3
#define ALLOWED_REFS_PER_FRAME 3
......@@ -37,8 +37,8 @@
// normal reference pool.
#define NUM_YV12_BUFFERS (NUM_REF_FRAMES + 4)
#define NUM_FRAME_CONTEXTS_LG2 2
#define NUM_FRAME_CONTEXTS (1 << NUM_FRAME_CONTEXTS_LG2)
#define NUM_FRAME_CONTEXTS_LOG2 2
#define NUM_FRAME_CONTEXTS (1 << NUM_FRAME_CONTEXTS_LOG2)
#define MAX_LAG_BUFFERS 25
......
......@@ -868,7 +868,7 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
pbi->refresh_frame_flags = vp9_rb_read_literal(rb, NUM_REF_FRAMES);
for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
const int ref = vp9_rb_read_literal(rb, NUM_REF_FRAMES_LG2);
const int ref = vp9_rb_read_literal(rb, NUM_REF_FRAMES_LOG2);
cm->active_ref_idx[i] = cm->ref_frame_map[ref];
cm->ref_frame_sign_bias[LAST_FRAME + i] = vp9_rb_read_bit(rb);
}
......@@ -893,7 +893,7 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
cm->frame_parallel_decoding_mode = 1;
}
cm->frame_context_idx = vp9_rb_read_literal(rb, NUM_FRAME_CONTEXTS_LG2);
cm->frame_context_idx = vp9_rb_read_literal(rb, NUM_FRAME_CONTEXTS_LOG2);
if (cm->frame_type == KEY_FRAME || cm->error_resilient_mode || cm->intra_only)
vp9_setup_past_independence(cm, xd);
......
......@@ -1352,7 +1352,7 @@ static void write_uncompressed_header(VP9_COMP *cpi,
int i;
vp9_wb_write_literal(wb, get_refresh_mask(cpi), NUM_REF_FRAMES);
for (i = 0; i < ALLOWED_REFS_PER_FRAME; ++i) {
vp9_wb_write_literal(wb, refs[i], NUM_REF_FRAMES_LG2);
vp9_wb_write_literal(wb, refs[i], NUM_REF_FRAMES_LOG2);
vp9_wb_write_bit(wb, cm->ref_frame_sign_bias[LAST_FRAME + i]);
}
......@@ -1370,7 +1370,7 @@ static void write_uncompressed_header(VP9_COMP *cpi,
vp9_wb_write_bit(wb, cm->frame_parallel_decoding_mode);
}
vp9_wb_write_literal(wb, cm->frame_context_idx, NUM_FRAME_CONTEXTS_LG2);
vp9_wb_write_literal(wb, cm->frame_context_idx, NUM_FRAME_CONTEXTS_LOG2);
encode_loopfilter(cm, xd, wb);
encode_quantization(cm, wb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment