ref: 0195fb53cb3535cc0e169e98328fcd57bc980a41
parent: 37c0a1a8d0a360d7a13e27ac5cc6f2c40c046b5a
author: James Zern <jzern@google.com>
date: Fri Jul 12 07:37:43 EDT 2013
vp9: consistent 'log2' variable naming lg2 -> log2 Change-Id: I0602ddff49e42c9c40c29c084d04b7592b9f8edf
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -615,11 +615,11 @@
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 @@
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,
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -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
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -868,7 +868,7 @@
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 @@
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);
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1352,7 +1352,7 @@
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 @@
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);
--
⑨