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
250a52ed
Commit
250a52ed
authored
Sep 09, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "set_maps: add back script and fix." into nextgenv2
parents
66c41f99
a7a3909f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
44 deletions
+2
-44
examples/set_maps.c
examples/set_maps.c
+1
-36
test/set_maps.sh
test/set_maps.sh
+1
-8
No files found.
examples/set_maps.c
View file @
250a52ed
...
...
@@ -61,39 +61,6 @@ void usage_exit(void) {
exit
(
EXIT_FAILURE
);
}
static
void
set_roi_map
(
const
aom_codec_enc_cfg_t
*
cfg
,
aom_codec_ctx_t
*
codec
)
{
unsigned
int
i
;
aom_roi_map_t
roi
;
memset
(
&
roi
,
0
,
sizeof
(
roi
));
roi
.
rows
=
(
cfg
->
g_h
+
15
)
/
16
;
roi
.
cols
=
(
cfg
->
g_w
+
15
)
/
16
;
roi
.
delta_q
[
0
]
=
0
;
roi
.
delta_q
[
1
]
=
-
2
;
roi
.
delta_q
[
2
]
=
-
4
;
roi
.
delta_q
[
3
]
=
-
6
;
roi
.
delta_lf
[
0
]
=
0
;
roi
.
delta_lf
[
1
]
=
1
;
roi
.
delta_lf
[
2
]
=
2
;
roi
.
delta_lf
[
3
]
=
3
;
roi
.
static_threshold
[
0
]
=
1500
;
roi
.
static_threshold
[
1
]
=
1000
;
roi
.
static_threshold
[
2
]
=
500
;
roi
.
static_threshold
[
3
]
=
0
;
roi
.
roi_map
=
(
uint8_t
*
)
malloc
(
roi
.
rows
*
roi
.
cols
);
for
(
i
=
0
;
i
<
roi
.
rows
*
roi
.
cols
;
++
i
)
roi
.
roi_map
[
i
]
=
i
%
4
;
if
(
aom_codec_control
(
codec
,
AOME_SET_ROI_MAP
,
&
roi
))
die_codec
(
codec
,
"Failed to set ROI map"
);
free
(
roi
.
roi_map
);
}
static
void
set_active_map
(
const
aom_codec_enc_cfg_t
*
cfg
,
aom_codec_ctx_t
*
codec
)
{
unsigned
int
i
;
...
...
@@ -216,9 +183,7 @@ int main(int argc, char **argv) {
while
(
aom_img_read
(
&
raw
,
infile
))
{
++
frame_count
;
if
(
frame_count
==
22
&&
encoder
->
fourcc
==
AV1_FOURCC
)
{
set_roi_map
(
&
cfg
,
&
codec
);
}
else
if
(
frame_count
==
33
)
{
if
(
frame_count
==
33
)
{
set_active_map
(
&
cfg
,
&
codec
);
}
else
if
(
frame_count
==
44
)
{
unset_active_map
(
&
cfg
,
&
codec
);
...
...
test/set_maps.sh
View file @
250a52ed
...
...
@@ -41,19 +41,12 @@ set_maps() {
[
-e
"
${
output_file
}
"
]
||
return
1
}
set_maps_aom
()
{
if
[
"
$(
aom_encode_available
)
"
=
"yes"
]
;
then
set_maps aom
||
return
1
fi
}
set_maps_av1
()
{
if
[
"
$(
av1_encode_available
)
"
=
"yes"
]
;
then
set_maps av1
||
return
1
fi
}
set_maps_tests
=
"set_maps_aom
set_maps_av1"
set_maps_tests
=
"set_maps_av1"
run_tests set_maps_verify_environment
"
${
set_maps_tests
}
"
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