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
Xiph.Org
aom-rav1e
Commits
2a40085c
Commit
2a40085c
authored
Apr 23, 2013
by
John Koleszar
Committed by
Gerrit Code Review
Apr 23, 2013
Browse files
Merge "Move skip_block from BLOCK to MACROBLOCK" into experimental
parents
627a8e67
c7c98a7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_block.h
View file @
2a40085c
...
...
@@ -28,8 +28,6 @@ typedef struct block {
uint8_t
**
base_second_src
;
int
src
;
int
src_stride
;
int
skip_block
;
}
BLOCK
;
typedef
struct
{
...
...
@@ -86,6 +84,7 @@ struct macroblock_plane {
typedef
struct
macroblock
MACROBLOCK
;
struct
macroblock
{
struct
macroblock_plane
plane
[
MAX_MB_PLANE
];
int
skip_block
;
// 16 Y blocks, 4 U blocks, 4 V blocks,
BLOCK
block
[
24
];
...
...
vp9/encoder/vp9_quantize.c
View file @
2a40085c
...
...
@@ -28,7 +28,6 @@ static INLINE int plane_idx(int plane) {
void
vp9_ht_quantize_b_4x4
(
MACROBLOCK
*
mb
,
int
b_idx
,
TX_TYPE
tx_type
)
{
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
BLOCK
*
const
b
=
&
mb
->
block
[
0
];
BLOCKD
*
const
d
=
&
xd
->
block
[
0
];
int
i
,
rc
,
eob
;
int
zbin
;
...
...
@@ -51,7 +50,7 @@ void vp9_ht_quantize_b_4x4(MACROBLOCK *mb, int b_idx, TX_TYPE tx_type) {
eob
=
-
1
;
if
(
!
b
->
skip_block
)
{
if
(
!
m
b
->
skip_block
)
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
rc
=
pt_scan
[
i
];
z
=
coeff_ptr
[
rc
];
...
...
@@ -85,7 +84,6 @@ void vp9_regular_quantize_b_4x4(MACROBLOCK *mb, int b_idx, int y_blocks) {
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
const
struct
plane_block_idx
pb_idx
=
plane_block_idx
(
y_blocks
,
b_idx
);
const
int
c_idx
=
plane_idx
(
pb_idx
.
plane
);
BLOCK
*
const
b
=
&
mb
->
block
[
c_idx
];
BLOCKD
*
const
d
=
&
xd
->
block
[
c_idx
];
int
i
,
rc
,
eob
;
int
zbin
;
...
...
@@ -112,7 +110,7 @@ void vp9_regular_quantize_b_4x4(MACROBLOCK *mb, int b_idx, int y_blocks) {
eob
=
-
1
;
if
(
!
b
->
skip_block
)
{
if
(
!
m
b
->
skip_block
)
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
rc
=
vp9_default_zig_zag1d_4x4
[
i
];
z
=
coeff_ptr
[
rc
];
...
...
@@ -154,7 +152,6 @@ void vp9_regular_quantize_b_8x8(MACROBLOCK *mb, int b_idx, TX_TYPE tx_type,
pb_idx
.
block
,
16
);
int16_t
*
coeff_ptr
=
BLOCK_OFFSET
(
mb
->
plane
[
pb_idx
.
plane
].
coeff
,
pb_idx
.
block
,
16
);
BLOCK
*
const
b
=
&
mb
->
block
[
c_idx
];
BLOCKD
*
const
d
=
&
xd
->
block
[
c_idx
];
const
int
*
pt_scan
=
get_scan_8x8
(
tx_type
);
...
...
@@ -164,7 +161,7 @@ void vp9_regular_quantize_b_8x8(MACROBLOCK *mb, int b_idx, TX_TYPE tx_type,
vpx_memset
(
qcoeff_ptr
,
0
,
64
*
sizeof
(
int16_t
));
vpx_memset
(
dqcoeff_ptr
,
0
,
64
*
sizeof
(
int16_t
));
if
(
!
b
->
skip_block
)
{
if
(
!
m
b
->
skip_block
)
{
int
i
,
rc
,
eob
;
int
zbin
;
int
x
,
y
,
z
,
sz
;
...
...
@@ -289,7 +286,6 @@ void vp9_regular_quantize_b_16x16(MACROBLOCK *mb, int b_idx, TX_TYPE tx_type,
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
const
struct
plane_block_idx
pb_idx
=
plane_block_idx
(
y_blocks
,
b_idx
);
const
int
c_idx
=
plane_idx
(
pb_idx
.
plane
);
BLOCK
*
const
b
=
&
mb
->
block
[
c_idx
];
BLOCKD
*
const
d
=
&
xd
->
block
[
c_idx
];
const
int
*
pt_scan
=
get_scan_16x16
(
tx_type
);
...
...
@@ -298,7 +294,7 @@ void vp9_regular_quantize_b_16x16(MACROBLOCK *mb, int b_idx, TX_TYPE tx_type,
if
(
c_idx
==
20
)
assert
(
pb_idx
.
plane
==
2
);
quantize
(
mb
->
plane
[
pb_idx
.
plane
].
zrun_zbin_boost
,
BLOCK_OFFSET
(
mb
->
plane
[
pb_idx
.
plane
].
coeff
,
pb_idx
.
block
,
16
),
256
,
b
->
skip_block
,
256
,
m
b
->
skip_block
,
mb
->
plane
[
pb_idx
.
plane
].
zbin
,
mb
->
plane
[
pb_idx
.
plane
].
round
,
mb
->
plane
[
pb_idx
.
plane
].
quant
,
...
...
@@ -315,7 +311,6 @@ void vp9_regular_quantize_b_32x32(MACROBLOCK *mb, int b_idx, int y_blocks) {
MACROBLOCKD
*
const
xd
=
&
mb
->
e_mbd
;
const
struct
plane_block_idx
pb_idx
=
plane_block_idx
(
y_blocks
,
b_idx
);
const
int
c_idx
=
plane_idx
(
pb_idx
.
plane
);
BLOCK
*
const
b
=
&
mb
->
block
[
c_idx
];
BLOCKD
*
const
d
=
&
xd
->
block
[
c_idx
];
if
(
c_idx
==
0
)
assert
(
pb_idx
.
plane
==
0
);
...
...
@@ -323,7 +318,7 @@ void vp9_regular_quantize_b_32x32(MACROBLOCK *mb, int b_idx, int y_blocks) {
if
(
c_idx
==
20
)
assert
(
pb_idx
.
plane
==
2
);
quantize
(
mb
->
plane
[
pb_idx
.
plane
].
zrun_zbin_boost
,
BLOCK_OFFSET
(
mb
->
plane
[
pb_idx
.
plane
].
coeff
,
pb_idx
.
block
,
16
),
1024
,
b
->
skip_block
,
1024
,
m
b
->
skip_block
,
mb
->
plane
[
pb_idx
.
plane
].
zbin
,
mb
->
plane
[
pb_idx
.
plane
].
round
,
mb
->
plane
[
pb_idx
.
plane
].
quant
,
...
...
@@ -505,7 +500,6 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
MACROBLOCKD
*
xd
=
&
x
->
e_mbd
;
int
zbin_extra
;
int
segment_id
=
xd
->
mode_info_context
->
mbmi
.
segment_id
;
int
skip_block
;
// Select the baseline MB Q index allowing for any segment level change.
if
(
vp9_segfeature_active
(
xd
,
segment_id
,
SEG_LVL_ALT_Q
))
{
...
...
@@ -552,11 +546,7 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
for
(
i
=
16
;
i
<
24
;
i
++
)
x
->
e_mbd
.
block
[
i
].
dequant
=
cpi
->
common
.
uv_dequant
[
qindex
];
skip_block
=
vp9_segfeature_active
(
xd
,
segment_id
,
SEG_LVL_SKIP
);
for
(
i
=
0
;
i
<
24
;
i
++
)
{
// Segment skip feature.
x
->
block
[
i
].
skip_block
=
skip_block
;
}
x
->
skip_block
=
vp9_segfeature_active
(
xd
,
segment_id
,
SEG_LVL_SKIP
);
/* save this macroblock QIndex for vp9_update_zbin_extra() */
x
->
e_mbd
.
q_index
=
qindex
;
...
...
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