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
0928da3b
Commit
0928da3b
authored
Oct 22, 2014
by
Hui Su
Browse files
Combine vp9_encode_block_intra and encode_block_intra
Change-Id: I79091fb677b64892ecca2fb466fde14602d8cdfc
parent
982dab60
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_encodemb.c
View file @
0928da3b
...
...
@@ -29,12 +29,6 @@ struct optimize_ctx {
ENTROPY_CONTEXT
tl
[
MAX_MB_PLANE
][
16
];
};
struct
encode_b_args
{
MACROBLOCK
*
x
;
struct
optimize_ctx
*
ctx
;
int8_t
*
skip
;
};
void
vp9_subtract_block_c
(
int
rows
,
int
cols
,
int16_t
*
diff
,
ptrdiff_t
diff_stride
,
const
uint8_t
*
src
,
ptrdiff_t
src_stride
,
...
...
@@ -802,7 +796,7 @@ void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) {
}
}
static
void
encode_block_intra
(
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
void
vp9_
encode_block_intra
(
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
void
*
arg
)
{
struct
encode_b_args
*
const
args
=
arg
;
MACROBLOCK
*
const
x
=
args
->
x
;
...
...
@@ -1040,18 +1034,10 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
*
(
args
->
skip
)
=
0
;
}
void
vp9_encode_block_intra
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
int8_t
*
skip
)
{
struct
encode_b_args
arg
=
{
x
,
NULL
,
skip
};
encode_block_intra
(
plane
,
block
,
plane_bsize
,
tx_size
,
&
arg
);
}
void
vp9_encode_intra_block_plane
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
,
int
plane
)
{
const
MACROBLOCKD
*
const
xd
=
&
x
->
e_mbd
;
struct
encode_b_args
arg
=
{
x
,
NULL
,
&
xd
->
mi
[
0
].
src_mi
->
mbmi
.
skip
};
vp9_foreach_transformed_block_in_plane
(
xd
,
bsize
,
plane
,
encode_block_intra
,
&
arg
);
vp9_foreach_transformed_block_in_plane
(
xd
,
bsize
,
plane
,
vp9_encode_block_intra
,
&
arg
);
}
vp9/encoder/vp9_encodemb.h
View file @
0928da3b
...
...
@@ -18,6 +18,11 @@
extern
"C"
{
#endif
struct
encode_b_args
{
MACROBLOCK
*
x
;
struct
optimize_ctx
*
ctx
;
int8_t
*
skip
;
};
void
vp9_encode_sb
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
);
void
vp9_encode_sby_pass1
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
);
void
vp9_xform_quant_fp
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
...
...
@@ -29,9 +34,8 @@ void vp9_xform_quant(MACROBLOCK *x, int plane, int block,
void
vp9_subtract_plane
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
,
int
plane
);
void
vp9_encode_block_intra
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
int8_t
*
skip
);
void
vp9_encode_block_intra
(
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
void
*
arg
);
void
vp9_encode_intra_block_plane
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
,
int
plane
);
...
...
vp9/encoder/vp9_rdopt.c
View file @
0928da3b
...
...
@@ -478,7 +478,8 @@ static void block_rd_txfm(int plane, int block, BLOCK_SIZE plane_bsize,
return
;
if
(
!
is_inter_block
(
mbmi
))
{
vp9_encode_block_intra
(
x
,
plane
,
block
,
plane_bsize
,
tx_size
,
&
mbmi
->
skip
);
struct
encode_b_args
arg
=
{
x
,
NULL
,
&
mbmi
->
skip
};
vp9_encode_block_intra
(
plane
,
block
,
plane_bsize
,
tx_size
,
&
arg
);
#if CONFIG_VP9_HIGHBITDEPTH
if
(
xd
->
cur_buf
->
flags
&
YV12_FLAG_HIGHBITDEPTH
)
{
dist_block
(
plane
,
block
,
tx_size
,
args
,
xd
->
bd
);
...
...
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