Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
c30cc9f2
Commit
c30cc9f2
authored
Feb 24, 2014
by
Marco Paniconi
Browse files
vpx_temporal_scalable_patterns: fix to encoding_bitrate computation.
Change-Id: I56fcb82c4334c7591b765b55b3c2912778af6db5
parent
8cc54d57
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/vpx_temporal_scalable_patterns.c
View file @
c30cc9f2
...
...
@@ -81,7 +81,7 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc,
vpx_codec_enc_cfg_t
*
cfg
,
int
frame_cnt
)
{
unsigned
int
i
=
0
;
int
check
_num_frames
=
0
;
int
tot
_num_frames
=
0
;
printf
(
"Total number of processed frames: %d
\n\n
"
,
frame_cnt
-
1
);
printf
(
"Rate control layer stats for %d layer(s):
\n\n
"
,
cfg
->
ts_number_layers
);
...
...
@@ -89,8 +89,9 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc,
const
int
num_dropped
=
(
i
>
0
)
?
(
rc
->
layer_input_frames
[
i
]
-
rc
->
layer_enc_frames
[
i
])
:
(
rc
->
layer_input_frames
[
i
]
-
rc
->
layer_enc_frames
[
i
]
-
1
);
tot_num_frames
+=
rc
->
layer_input_frames
[
i
];
rc
->
layer_encoding_bitrate
[
i
]
=
0
.
001
*
rc
->
layer_framerate
[
i
]
*
rc
->
layer_encoding_bitrate
[
i
]
/
rc
->
layer_
tot_
enc
_frames
[
i
]
;
rc
->
layer_encoding_bitrate
[
i
]
/
tot_
num
_frames
;
rc
->
layer_avg_frame_size
[
i
]
=
rc
->
layer_avg_frame_size
[
i
]
/
rc
->
layer_enc_frames
[
i
];
rc
->
layer_avg_rate_mismatch
[
i
]
=
100
.
0
*
rc
->
layer_avg_rate_mismatch
[
i
]
/
...
...
@@ -105,10 +106,9 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc,
"and perc dropped frames: %d %d %f
\n
"
,
rc
->
layer_input_frames
[
i
],
rc
->
layer_enc_frames
[
i
],
100
.
0
*
num_dropped
/
rc
->
layer_input_frames
[
i
]);
check_num_frames
+=
rc
->
layer_input_frames
[
i
];
printf
(
"
\n
"
);
}
if
((
frame_cnt
-
1
)
!=
check
_num_frames
)
if
((
frame_cnt
-
1
)
!=
tot
_num_frames
)
die
(
"Error: Number of input frames not equal to output!
\n
"
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment