Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Martres
aom-rav1e
Commits
0195fb53
Commit
0195fb53
authored
Jul 12, 2013
by
James Zern
Browse files
vp9: consistent 'log2' variable naming
lg2 -> log2 Change-Id: I0602ddff49e42c9c40c29c084d04b7592b9f8edf
parent
37c0a1a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
0195fb53
...
...
@@ -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_l
o
g2
=
bwl
-
txwl
;
const
int
tx_cols
=
1
<<
tx_cols_l
o
g2
;
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_l
o
g2
<<
(
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_l
o
g2
=
bwl
-
txwl
;
const
int
tx_cols
=
1
<<
tx_cols_l
o
g2
;
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_l
o
g2
<<
(
txwl
);
}
static
void
extend_for_intra
(
MACROBLOCKD
*
const
xd
,
int
plane
,
int
block
,
...
...
vp9/common/vp9_onyxc_int.h
View file @
0195fb53
...
...
@@ -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_L
O
G2 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_L
O
G2 2
#define NUM_FRAME_CONTEXTS (1 << NUM_FRAME_CONTEXTS_L
O
G2)
#define MAX_LAG_BUFFERS 25
...
...
vp9/decoder/vp9_decodframe.c
View file @
0195fb53
...
...
@@ -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_L
O
G2
);
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_L
O
G2
);
if
(
cm
->
frame_type
==
KEY_FRAME
||
cm
->
error_resilient_mode
||
cm
->
intra_only
)
vp9_setup_past_independence
(
cm
,
xd
);
...
...
vp9/encoder/vp9_bitstream.c
View file @
0195fb53
...
...
@@ -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_L
O
G2
);
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_L
O
G2
);
encode_loopfilter
(
cm
,
xd
,
wb
);
encode_quantization
(
cm
,
wb
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment