Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Mark Harris
Opus
Commits
c305b824
Unverified
Commit
c305b824
authored
Sep 16, 2016
by
Felicia Lim
Committed by
Jean-Marc Valin
Sep 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove float ops from encoder settings fuzzer test
parent
f4dcc09f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_opus_encode.c
tests/test_opus_encode.c
+5
-5
No files found.
tests/test_opus_encode.c
View file @
c305b824
...
...
@@ -196,7 +196,7 @@ void fuzz_encoder_settings(const int num_encoders, const int num_setting_changes
int
lsb_depths
[
2
]
=
{
8
,
24
};
int
prediction_disabled
[
3
]
=
{
0
,
0
,
1
};
int
use_dtx
[
2
]
=
{
0
,
1
};
floa
t
frame_sizes_ms
[
6
]
=
{
2
.
5
,
5
,
10
,
20
,
40
,
60
};
in
t
frame_sizes_ms
_x2
[
6
]
=
{
5
,
10
,
20
,
40
,
80
,
120
};
/* x2 to avoid 2.5 ms */
char
debug_info
[
512
];
for
(
i
=
0
;
i
<
num_encoders
;
i
++
)
{
...
...
@@ -223,8 +223,8 @@ void fuzz_encoder_settings(const int num_encoders, const int num_setting_changes
int
lsb_depth
=
RAND_SAMPLE
(
lsb_depths
);
int
pred_disabled
=
RAND_SAMPLE
(
prediction_disabled
);
int
dtx
=
RAND_SAMPLE
(
use_dtx
);
floa
t
frame_size_ms
=
RAND_SAMPLE
(
frame_sizes_ms
);
int
frame_size
=
(
int
)(
frame_size_ms
*
sampling_rate
/
1
000
)
;
in
t
frame_size_ms
_x2
=
RAND_SAMPLE
(
frame_sizes_ms
_x2
);
int
frame_size
=
frame_size_ms
_x2
*
sampling_rate
/
2
000
;
int
frame_size_enum
=
get_frame_size_enum
(
frame_size
,
sampling_rate
);
force_channel
=
IMIN
(
force_channel
,
num_channels
);
...
...
@@ -232,10 +232,10 @@ void fuzz_encoder_settings(const int num_encoders, const int num_setting_changes
"fuzz_encoder_settings: %d kHz, %d ch, application: %d, "
"%d bps, force ch: %d, vbr: %d, vbr constraint: %d, complexity: %d, "
"max bw: %d, signal: %d, inband fec: %d, pkt loss: %d%%, lsb depth: %d, "
"pred disabled: %d, dtx: %d,
%.1f
ms
\n
"
,
"pred disabled: %d, dtx: %d,
(%d/2)
ms
\n
"
,
sampling_rate
/
1000
,
num_channels
,
application
,
bitrate
,
force_channel
,
vbr
,
vbr_constraint
,
complexity
,
max_bw
,
sig
,
inband_fec
,
pkt_loss
,
lsb_depth
,
pred_disabled
,
dtx
,
frame_size_ms
);
pkt_loss
,
lsb_depth
,
pred_disabled
,
dtx
,
frame_size_ms
_x2
);
if
(
opus_encoder_ctl
(
enc
,
OPUS_SET_BITRATE
(
bitrate
))
!=
OPUS_OK
)
test_failed
();
if
(
opus_encoder_ctl
(
enc
,
OPUS_SET_FORCE_CHANNELS
(
force_channel
))
!=
OPUS_OK
)
test_failed
();
...
...
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