Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Zumer
aom-rav1e
Commits
a5c5f856
Commit
a5c5f856
authored
8 years ago
by
Jim Bankoski
Committed by
Yaowu Xu
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
set_maps: add back script and fix.
Change-Id: Ie50a81063b5e14f4b5f3b5adcb822dba6b3ee93d
parent
738d5b19
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/set_maps.c
+1
-36
1 addition, 36 deletions
examples/set_maps.c
test/set_maps.sh
+1
-8
1 addition, 8 deletions
test/set_maps.sh
with
2 additions
and
44 deletions
examples/set_maps.c
+
1
−
36
View file @
a5c5f856
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
test/set_maps.sh
+
1
−
8
View file @
a5c5f856
...
...
@@ -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
}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment