Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
5971e898
Commit
5971e898
authored
Aug 04, 2014
by
Pengchong Jin
Committed by
Gerrit Code Review
Aug 04, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Store first pass motion vector directions"
parents
ef1023b7
233e0ccc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
43 deletions
+46
-43
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_encodeframe.c
+3
-3
vp9/encoder/vp9_firstpass.c
vp9/encoder/vp9_firstpass.c
+32
-29
vp9/encoder/vp9_firstpass.h
vp9/encoder/vp9_firstpass.h
+11
-11
No files found.
vp9/encoder/vp9_encodeframe.c
View file @
5971e898
...
...
@@ -2091,10 +2091,10 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
for
(
r
=
mb_row
;
r
<
mb_row_end
;
r
++
)
{
for
(
c
=
mb_col
;
c
<
mb_col_end
;
c
++
)
{
const
int
mb_index
=
r
*
cm
->
mb_cols
+
c
;
if
((
cpi
->
twopass
.
this_frame_mb_stats
[
mb_index
]
&
FPMB_NONZERO_MOTION
_MASK
)
||
if
(
!
(
cpi
->
twopass
.
this_frame_mb_stats
[
mb_index
]
&
FPMB_MOTION_ZERO
_MASK
)
||
!
(
cpi
->
twopass
.
this_frame_mb_stats
[
mb_index
]
&
FPMB_ERROR_
LEVEL0
_MASK
))
{
FPMB_ERROR_
SMALL
_MASK
))
{
skip
=
0
;
break
;
}
...
...
vp9/encoder/vp9_firstpass.c
View file @
5971e898
...
...
@@ -689,18 +689,11 @@ void vp9_first_pass(VP9_COMP *cpi) {
// intra predication statistics
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
=
0
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_DCINTRA_MASK
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
&=
~
FPMB_NONZERO_MOTION_MASK
;
if
(
this_error
>
FPMB_ERROR_LEVEL4_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL4_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL3_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL3_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL2_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL2_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL1_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL1_MASK
;
}
else
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL0_MASK
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_ZERO_MASK
;
if
(
this_error
>
FPMB_ERROR_LARGE_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LARGE_MASK
;
}
else
if
(
this_error
<
FPMB_ERROR_SMALL_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_SMALL_MASK
;
}
}
#endif
...
...
@@ -738,23 +731,13 @@ void vp9_first_pass(VP9_COMP *cpi) {
// inter predication statistics
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
=
0
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
&=
~
FPMB_DCINTRA_MASK
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
&=
~
FPMB_NONZERO_MOTION_MASK
;
if
(
this_error
>
FPMB_ERROR_LEVEL4_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL4_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL3_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL3_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL2_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_ZERO_MASK
;
if
(
this_error
>
FPMB_ERROR_LARGE_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_L
EVEL2
_MASK
;
}
else
if
(
this_error
>
FPMB_ERROR_LEVEL1
_TH
)
{
FPMB_ERROR_L
ARGE
_MASK
;
}
else
if
(
this_error
<
FPMB_ERROR_SMALL
_TH
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL1_MASK
;
}
else
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_ERROR_LEVEL0_MASK
;
FPMB_ERROR_SMALL_MASK
;
}
}
#endif
...
...
@@ -764,8 +747,28 @@ void vp9_first_pass(VP9_COMP *cpi) {
#if CONFIG_FP_MB_STATS
if
(
cpi
->
use_fp_mb_stats
)
{
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_NONZERO_MOTION_MASK
;
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
&=
~
FPMB_MOTION_ZERO_MASK
;
// check estimated motion direction
if
(
mv
.
as_mv
.
col
>
0
&&
mv
.
as_mv
.
col
>=
abs
(
mv
.
as_mv
.
row
))
{
// right direction
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_RIGHT_MASK
;
}
else
if
(
mv
.
as_mv
.
row
<
0
&&
abs
(
mv
.
as_mv
.
row
)
>=
abs
(
mv
.
as_mv
.
col
))
{
// up direction
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_UP_MASK
;
}
else
if
(
mv
.
as_mv
.
col
<
0
&&
abs
(
mv
.
as_mv
.
col
)
>=
abs
(
mv
.
as_mv
.
row
))
{
// left direction
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_LEFT_MASK
;
}
else
{
// down direction
cpi
->
twopass
.
frame_mb_stats_buf
[
mb_index
]
|=
FPMB_MOTION_DOWN_MASK
;
}
}
#endif
...
...
vp9/encoder/vp9_firstpass.h
View file @
5971e898
...
...
@@ -21,17 +21,17 @@ extern "C" {
#if CONFIG_FP_MB_STATS
#define FPMB_DCINTRA_MASK 0x01
#define FPMB_NONZERO_MOTION_MASK 0x02
#define FPMB_
ERROR_LEVEL0_MASK 0x04
#define FPMB_
ERROR_LEVEL1_MASK 0x10
#define FPMB_
ERROR_LEVEL2_MASK 0x20
#define FPMB_
ERROR_LEVEL3_MASK 0x4
0
#define FPMB_
ERROR_LEVEL4_MASK 0x8
0
#define FPMB_ERROR_
LEVEL1_TH 200
0
#define FPMB_ERROR_L
EVEL2_TH 800
0
#define FPMB_ERROR_
LEVEL3_TH 24
000
#define FPMB_ERROR_L
EVEL4
_TH 48000
#define FPMB_
MOTION_ZERO_MASK 0x02
#define FPMB_
MOTION_LEFT_MASK 0x04
#define FPMB_
MOTION_RIGHT_MASK 0x08
#define FPMB_
MOTION_UP_MASK 0x1
0
#define FPMB_
MOTION_DOWN_MASK 0x2
0
#define FPMB_ERROR_
SMALL_MASK 0x4
0
#define FPMB_ERROR_L
ARGE_MASK 0x8
0
#define FPMB_ERROR_
SMALL_TH 2
000
#define FPMB_ERROR_L
ARGE
_TH 48000
typedef
struct
{
uint8_t
*
mb_stats_start
;
...
...
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