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
Xiph.Org
aom-rav1e
Commits
5826407f
Commit
5826407f
authored
Aug 20, 2013
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Aug 20, 2013
Browse files
Merge "Moving plane_block_idx from vp9_blockd.h to vp9_quantize.c."
parents
5baf510f
569ca37d
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_blockd.h
View file @
5826407f
...
...
@@ -366,32 +366,6 @@ static INLINE TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) {
return
MIN
(
mbmi
->
txfm_size
,
max_uv_txsize_lookup
[
mbmi
->
sb_type
]);
}
struct
plane_block_idx
{
int
plane
;
int
block
;
};
// TODO(jkoleszar): returning a struct so it can be used in a const context,
// expect to refactor this further later.
static
INLINE
struct
plane_block_idx
plane_block_idx
(
int
y_blocks
,
int
b_idx
)
{
const
int
v_offset
=
y_blocks
*
5
/
4
;
struct
plane_block_idx
res
;
if
(
b_idx
<
y_blocks
)
{
res
.
plane
=
0
;
res
.
block
=
b_idx
;
}
else
if
(
b_idx
<
v_offset
)
{
res
.
plane
=
1
;
res
.
block
=
b_idx
-
y_blocks
;
}
else
{
assert
(
b_idx
<
y_blocks
*
3
/
2
);
res
.
plane
=
2
;
res
.
block
=
b_idx
-
v_offset
;
}
return
res
;
}
static
BLOCK_SIZE_TYPE
get_plane_block_size
(
BLOCK_SIZE_TYPE
bsize
,
const
struct
macroblockd_plane
*
pd
)
{
BLOCK_SIZE_TYPE
bs
=
ss_size_lookup
[
bsize
]
...
...
vp9/encoder/vp9_quantize.c
View file @
5826407f
...
...
@@ -152,6 +152,32 @@ void vp9_quantize_b_32x32_c(int16_t *coeff_ptr, intptr_t n_coeffs,
*
eob_ptr
=
eob
+
1
;
}
struct
plane_block_idx
{
int
plane
;
int
block
;
};
// TODO(jkoleszar): returning a struct so it can be used in a const context,
// expect to refactor this further later.
static
INLINE
struct
plane_block_idx
plane_block_idx
(
int
y_blocks
,
int
b_idx
)
{
const
int
v_offset
=
y_blocks
*
5
/
4
;
struct
plane_block_idx
res
;
if
(
b_idx
<
y_blocks
)
{
res
.
plane
=
0
;
res
.
block
=
b_idx
;
}
else
if
(
b_idx
<
v_offset
)
{
res
.
plane
=
1
;
res
.
block
=
b_idx
-
y_blocks
;
}
else
{
assert
(
b_idx
<
y_blocks
*
3
/
2
);
res
.
plane
=
2
;
res
.
block
=
b_idx
-
v_offset
;
}
return
res
;
}
void
vp9_regular_quantize_b_4x4
(
MACROBLOCK
*
mb
,
int
b_idx
,
TX_TYPE
tx_type
,
int
y_blocks
)
{
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
...
...
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