mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
update to libvpx b46243d from repo https://chromium.googlesource.com/webm/libvpx
This commit is contained in:
@@ -24,7 +24,7 @@ static const char quantizer_warning_string[] =
|
||||
"Bad quantizer values. Quantizer values should not be equal, and should "
|
||||
"differ by at least 8.";
|
||||
static const char lag_in_frames_with_realtime[] =
|
||||
"Lag in frames is ignored when deadline is set to realtime.";
|
||||
"Lag in frames is ignored when deadline is set to realtime for cbr mode.";
|
||||
|
||||
struct WarningListNode {
|
||||
const char *warning_string;
|
||||
@@ -47,8 +47,7 @@ static void add_warning(const char *warning_string,
|
||||
new_node->warning_string = warning_string;
|
||||
new_node->next_warning = NULL;
|
||||
|
||||
while (*node != NULL)
|
||||
node = &(*node)->next_warning;
|
||||
while (*node != NULL) node = &(*node)->next_warning;
|
||||
|
||||
*node = new_node;
|
||||
}
|
||||
@@ -78,10 +77,9 @@ static void check_quantizer(int min_q, int max_q,
|
||||
}
|
||||
|
||||
static void check_lag_in_frames_realtime_deadline(
|
||||
int lag_in_frames,
|
||||
int deadline,
|
||||
int lag_in_frames, int deadline, int rc_end_usage,
|
||||
struct WarningList *warning_list) {
|
||||
if (deadline == VPX_DL_REALTIME && lag_in_frames != 0)
|
||||
if (deadline == VPX_DL_REALTIME && lag_in_frames != 0 && rc_end_usage == 1)
|
||||
add_warning(lag_in_frames_with_realtime, warning_list);
|
||||
}
|
||||
|
||||
@@ -90,26 +88,22 @@ void check_encoder_config(int disable_prompt,
|
||||
const struct vpx_codec_enc_cfg *stream_config) {
|
||||
int num_warnings = 0;
|
||||
struct WarningListNode *warning = NULL;
|
||||
struct WarningList warning_list = {0};
|
||||
struct WarningList warning_list = { 0 };
|
||||
|
||||
check_quantizer(stream_config->rc_min_quantizer,
|
||||
stream_config->rc_max_quantizer,
|
||||
&warning_list);
|
||||
check_lag_in_frames_realtime_deadline(stream_config->g_lag_in_frames,
|
||||
global_config->deadline,
|
||||
&warning_list);
|
||||
stream_config->rc_max_quantizer, &warning_list);
|
||||
check_lag_in_frames_realtime_deadline(
|
||||
stream_config->g_lag_in_frames, global_config->deadline,
|
||||
stream_config->rc_end_usage, &warning_list);
|
||||
/* Count and print warnings. */
|
||||
for (warning = warning_list.warning_node;
|
||||
warning != NULL;
|
||||
warning = warning->next_warning,
|
||||
++num_warnings) {
|
||||
for (warning = warning_list.warning_node; warning != NULL;
|
||||
warning = warning->next_warning, ++num_warnings) {
|
||||
warn(warning->warning_string);
|
||||
}
|
||||
|
||||
free_warning_list(&warning_list);
|
||||
|
||||
if (num_warnings) {
|
||||
if (!disable_prompt && !continue_prompt(num_warnings))
|
||||
exit(EXIT_FAILURE);
|
||||
if (!disable_prompt && !continue_prompt(num_warnings)) exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user