Skip to content
GitLab
Menu
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
40ae02c2
Commit
40ae02c2
authored
Aug 22, 2013
by
James Zern
Browse files
rename LOG2_* defines to *_LOG2
gets rid of a mix of styles Change-Id: I3591d312157bc6f53a25438bf047765c671fd8a8
parent
8adc20ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_alloccommon.c
View file @
40ae02c2
...
...
@@ -74,8 +74,8 @@ static void set_mb_mi(VP9_COMMON *cm, int aligned_width, int aligned_height) {
cm
->
mb_rows
=
(
aligned_height
+
8
)
>>
4
;
cm
->
MBs
=
cm
->
mb_rows
*
cm
->
mb_cols
;
cm
->
mi_cols
=
aligned_width
>>
LOG2_
MI_SIZE
;
cm
->
mi_rows
=
aligned_height
>>
LOG2_
MI_SIZE
;
cm
->
mi_cols
=
aligned_width
>>
MI_SIZE
_LOG2
;
cm
->
mi_rows
=
aligned_height
>>
MI_SIZE
_LOG2
;
cm
->
mode_info_stride
=
cm
->
mi_cols
+
MI_BLOCK_SIZE
;
}
...
...
@@ -96,8 +96,8 @@ static void setup_mi(VP9_COMMON *cm) {
int
vp9_alloc_frame_buffers
(
VP9_COMMON
*
oci
,
int
width
,
int
height
)
{
int
i
,
mi_cols
;
const
int
aligned_width
=
ALIGN_POWER_OF_TWO
(
width
,
LOG2_
MI_SIZE
);
const
int
aligned_height
=
ALIGN_POWER_OF_TWO
(
height
,
LOG2_
MI_SIZE
);
const
int
aligned_width
=
ALIGN_POWER_OF_TWO
(
width
,
MI_SIZE
_LOG2
);
const
int
aligned_height
=
ALIGN_POWER_OF_TWO
(
height
,
MI_SIZE
_LOG2
);
const
int
ss_x
=
oci
->
subsampling_x
;
const
int
ss_y
=
oci
->
subsampling_y
;
int
mi_size
;
...
...
@@ -192,8 +192,8 @@ void vp9_initialize_common() {
void
vp9_update_frame_size
(
VP9_COMMON
*
cm
)
{
int
i
,
mi_cols
;
const
int
aligned_width
=
ALIGN_POWER_OF_TWO
(
cm
->
width
,
LOG2_
MI_SIZE
);
const
int
aligned_height
=
ALIGN_POWER_OF_TWO
(
cm
->
height
,
LOG2_
MI_SIZE
);
const
int
aligned_width
=
ALIGN_POWER_OF_TWO
(
cm
->
width
,
MI_SIZE
_LOG2
);
const
int
aligned_height
=
ALIGN_POWER_OF_TWO
(
cm
->
height
,
MI_SIZE
_LOG2
);
set_mb_mi
(
cm
,
aligned_width
,
aligned_height
);
setup_mi
(
cm
);
...
...
vp9/common/vp9_enums.h
View file @
40ae02c2
...
...
@@ -13,12 +13,12 @@
#include
"./vpx_config.h"
#define
LOG2_
MI_SIZE 3
#define
LOG2_
MI_BLOCK_SIZE (6 -
LOG2_
MI_SIZE) // 64 = 2^6
#define MI_SIZE
_LOG2
3
#define MI_BLOCK_SIZE
_LOG2
(6 - MI_SIZE
_LOG2
) // 64 = 2^6
#define MAX_BLOCK_SIZE (1 << 6) // max block size in pixel
#define MI_SIZE (1 <<
LOG2_
MI_SIZE) // pixels per mi-unit
#define MI_BLOCK_SIZE (1 <<
LOG2_
MI_BLOCK_SIZE) // mi-units per max block
#define MI_SIZE (1 << MI_SIZE
_LOG2
) // pixels per mi-unit
#define MI_BLOCK_SIZE (1 << MI_BLOCK_SIZE
_LOG2
) // mi-units per max block
#define MI_MASK (MI_BLOCK_SIZE - 1)
...
...
vp9/common/vp9_onyxc_int.h
View file @
40ae02c2
...
...
@@ -234,7 +234,7 @@ static void ref_cnt_fb(int *buf, int *idx, int new_idx) {
}
static
int
mi_cols_aligned_to_sb
(
int
n_mis
)
{
return
ALIGN_POWER_OF_TWO
(
n_mis
,
LOG2_
MI_BLOCK_SIZE
);
return
ALIGN_POWER_OF_TWO
(
n_mis
,
MI_BLOCK_SIZE
_LOG2
);
}
static
INLINE
void
set_skip_context
(
VP9_COMMON
*
cm
,
MACROBLOCKD
*
xd
,
...
...
vp9/common/vp9_tile_common.c
View file @
40ae02c2
...
...
@@ -14,7 +14,7 @@
#define MAX_TILE_WIDTH_B64 64
static
int
to_sbs
(
n_mis
)
{
return
mi_cols_aligned_to_sb
(
n_mis
)
>>
LOG2_
MI_BLOCK_SIZE
;
return
mi_cols_aligned_to_sb
(
n_mis
)
>>
MI_BLOCK_SIZE
_LOG2
;
}
static
void
vp9_get_tile_offsets
(
int
*
min_tile_off
,
int
*
max_tile_off
,
...
...
vp9/encoder/vp9_encodeframe.c
View file @
40ae02c2
...
...
@@ -374,8 +374,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
// when the mode was picked for it
for
(
y
=
0
;
y
<
mi_height
;
y
++
)
for
(
x_idx
=
0
;
x_idx
<
mi_width
;
x_idx
++
)
if
((
xd
->
mb_to_right_edge
>>
(
3
+
LOG2_
MI_SIZE
))
+
mi_width
>
x_idx
&&
(
xd
->
mb_to_bottom_edge
>>
(
3
+
LOG2_
MI_SIZE
))
+
mi_height
>
y
)
if
((
xd
->
mb_to_right_edge
>>
(
3
+
MI_SIZE
_LOG2
))
+
mi_width
>
x_idx
&&
(
xd
->
mb_to_bottom_edge
>>
(
3
+
MI_SIZE
_LOG2
))
+
mi_height
>
y
)
xd
->
mode_info_context
[
x_idx
+
y
*
mis
]
=
*
mi
;
// FIXME(rbultje) I'm pretty sure this should go to the end of this block
...
...
@@ -449,8 +449,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
int
i
,
j
;
for
(
j
=
0
;
j
<
mi_height
;
++
j
)
for
(
i
=
0
;
i
<
mi_width
;
++
i
)
if
((
xd
->
mb_to_right_edge
>>
(
3
+
LOG2_
MI_SIZE
))
+
mi_width
>
i
&&
(
xd
->
mb_to_bottom_edge
>>
(
3
+
LOG2_
MI_SIZE
))
+
mi_height
>
j
)
if
((
xd
->
mb_to_right_edge
>>
(
3
+
MI_SIZE
_LOG2
))
+
mi_width
>
i
&&
(
xd
->
mb_to_bottom_edge
>>
(
3
+
MI_SIZE
_LOG2
))
+
mi_height
>
j
)
xd
->
mode_info_context
[
mis
*
j
+
i
].
mbmi
=
*
mbmi
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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