Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
db0c7d4f
Commit
db0c7d4f
authored
Mar 23, 2017
by
Angie Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use av1_set_txb_context in encode_block
Change-Id: Ida4a10fae54591f8f5b740739ab71a2650303958
parent
b3a12b5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
21 deletions
+17
-21
av1/encoder/encodemb.c
av1/encoder/encodemb.c
+14
-17
av1/encoder/encodemb.h
av1/encoder/encodemb.h
+1
-2
av1/encoder/rdopt.c
av1/encoder/rdopt.c
+2
-2
No files found.
av1/encoder/encodemb.c
View file @
db0c7d4f
...
...
@@ -735,26 +735,18 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
}
#endif
#if !CONFIG_PVQ
if
(
p
->
eobs
[
block
]
&&
!
xd
->
lossless
[
xd
->
mi
[
0
]
->
mbmi
.
segment_id
])
{
*
a
=
*
l
=
av1_optimize_b
(
cm
,
x
,
plane
,
block
,
tx_size
,
ctx
)
>
0
;
}
else
{
*
a
=
*
l
=
p
->
eobs
[
block
]
>
0
;
}
#if CONFIG_VAR_TX
int
i
;
for
(
i
=
0
;
i
<
tx_size_wide_unit
[
tx_size
];
++
i
)
a
[
i
]
=
a
[
0
];
for
(
i
=
0
;
i
<
tx_size_high_unit
[
tx_size
];
++
i
)
l
[
i
]
=
l
[
0
];
if
(
p
->
eobs
[
block
]
&&
!
xd
->
lossless
[
xd
->
mi
[
0
]
->
mbmi
.
segment_id
])
av1_optimize_b
(
cm
,
x
,
plane
,
block
,
tx_size
,
ctx
);
#endif
av1_set_txb_context
(
x
,
plane
,
block
,
tx_size
,
a
,
l
);
#if !CONFIG_PVQ
if
(
p
->
eobs
[
block
])
*
(
args
->
skip
)
=
0
;
if
(
p
->
eobs
[
block
]
==
0
)
return
;
#else
(
void
)
ctx
;
*
a
=
*
l
=
!
x
->
pvq_skip
[
plane
];
if
(
!
x
->
pvq_skip
[
plane
])
*
(
args
->
skip
)
=
0
;
if
(
x
->
pvq_skip
[
plane
])
return
;
...
...
@@ -1010,10 +1002,8 @@ void av1_encode_sb_supertx(AV1_COMMON *cm, MACROBLOCK *x, BLOCK_SIZE bsize) {
}
#endif // CONFIG_SUPERTX
void
av1_set_txb_context
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
void
av1_set_txb_context
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
TX_SIZE
tx_size
,
ENTROPY_CONTEXT
*
a
,
ENTROPY_CONTEXT
*
l
)
{
(
void
)
plane_bsize
;
(
void
)
tx_size
;
#if !CONFIG_PVQ
struct
macroblock_plane
*
p
=
&
x
->
plane
[
plane
];
...
...
@@ -1022,6 +1012,13 @@ void av1_set_txb_context(MACROBLOCK *x, int plane, int block,
(
void
)
block
;
*
a
=
*
l
=
!
x
->
pvq_skip
[
plane
];
#endif // !CONFIG_PVQ
#if CONFIG_VAR_TX || CONFIG_LV_MAP
int
i
;
for
(
i
=
0
;
i
<
tx_size_wide_unit
[
tx_size
];
++
i
)
a
[
i
]
=
a
[
0
];
for
(
i
=
0
;
i
<
tx_size_high_unit
[
tx_size
];
++
i
)
l
[
i
]
=
l
[
0
];
#endif
}
static
void
encode_block_intra_and_set_context
(
int
plane
,
int
block
,
...
...
@@ -1035,7 +1032,7 @@ static void encode_block_intra_and_set_context(int plane, int block,
MACROBLOCK
*
x
=
args
->
x
;
ENTROPY_CONTEXT
*
a
=
&
args
->
ta
[
blk_col
];
ENTROPY_CONTEXT
*
l
=
&
args
->
tl
[
blk_row
];
av1_set_txb_context
(
x
,
plane
,
block
,
plane_bsize
,
tx_size
,
a
,
l
);
av1_set_txb_context
(
x
,
plane
,
block
,
tx_size
,
a
,
l
);
}
void
av1_encode_block_intra
(
int
plane
,
int
block
,
int
blk_row
,
int
blk_col
,
...
...
av1/encoder/encodemb.h
View file @
db0c7d4f
...
...
@@ -63,8 +63,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
void
av1_subtract_plane
(
MACROBLOCK
*
x
,
BLOCK_SIZE
bsize
,
int
plane
);
void
av1_set_txb_context
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
BLOCK_SIZE
plane_bsize
,
TX_SIZE
tx_size
,
void
av1_set_txb_context
(
MACROBLOCK
*
x
,
int
plane
,
int
block
,
TX_SIZE
tx_size
,
ENTROPY_CONTEXT
*
a
,
ENTROPY_CONTEXT
*
l
);
void
av1_encode_block_intra
(
int
plane
,
int
block
,
int
blk_row
,
int
blk_col
,
...
...
av1/encoder/rdopt.c
View file @
db0c7d4f
...
...
@@ -1581,8 +1581,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
#else
this_rd_stats.rate = x->rate;
#endif // !CONFIG_PVQ
av1_set_txb_context(x, plane, block,
plane_bsize, tx_size
,
args->t_above + blk_col,
args->t_left + blk_row);
av1_set_txb_context(x, plane, block,
tx_size, args->t_above + blk_col
,
args->t_left + blk_row);
rd1 = RDCOST(x->rdmult, x->rddiv, this_rd_stats.rate, this_rd_stats.dist);
rd2 = RDCOST(x->rdmult, x->rddiv, 0, this_rd_stats.sse);
...
...
Write
Preview
Markdown
is supported
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