Commit 1bc32afd authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "[svc] Fix SvcTest.SecondPassEncode failure"

parents ab961ad0 86394d26
d5dfb0151c9051f8c85999255645d7a23916d3c0 hantro_collage_w352h288.yuv
2752863aa6330a93eaeb30f883310f87aa3de87c hantro_collage_w352h288.stat
998cec53307c94aa5835aaf8d5731f6a3c7c2e5a hantro_collage_w352h288.stat
b87815bf86020c592ccc7a846ba2e28ec8043902 hantro_odd.yuv
b1f1c3ec79114b9a0651af24ce634afb44a9a419 rush_hour_444.y4m
5184c46ddca8b1fadd16742e8500115bc8f749da vp80-00-comprehensive-001.ivf
......
......@@ -35,7 +35,7 @@ typedef struct {
double new_mv_count;
double duration;
double count;
int spatial_layer_id;
int64_t spatial_layer_id;
} FIRSTPASS_STATS;
struct twopass_rc {
......
......@@ -1338,7 +1338,7 @@ VP9_COMP *vp9_create_compressor(VP9_CONFIG *oxcf) {
for (i = 0; i < oxcf->ss_number_layers; ++i) {
FIRSTPASS_STATS *const last_packet_for_layer =
&stats[packets - oxcf->ss_number_layers + i];
const int layer_id = last_packet_for_layer->spatial_layer_id;
const int layer_id = (int)last_packet_for_layer->spatial_layer_id;
const int packets_in_layer = (int)last_packet_for_layer->count + 1;
if (layer_id >= 0 && layer_id < oxcf->ss_number_layers) {
LAYER_CONTEXT *const lc = &cpi->svc.layer_context[layer_id];
......@@ -1357,7 +1357,7 @@ VP9_COMP *vp9_create_compressor(VP9_CONFIG *oxcf) {
}
for (i = 0; i < packets; ++i) {
const int layer_id = stats[i].spatial_layer_id;
const int layer_id = (int)stats[i].spatial_layer_id;
if (layer_id >= 0 && layer_id < oxcf->ss_number_layers
&& stats_copy[layer_id] != NULL) {
*stats_copy[layer_id] = stats[i];
......
......@@ -227,7 +227,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
stats = cfg->rc_twopass_stats_in.buf;
for (i = 0; i < n_packets; ++i) {
const int layer_id = stats[i].spatial_layer_id;
const int layer_id = (int)stats[i].spatial_layer_id;
if (layer_id >= 0 && layer_id < (int)cfg->ss_number_layers) {
++n_packets_per_layer[layer_id];
}
......@@ -242,7 +242,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
stats = (const FIRSTPASS_STATS *)cfg->rc_twopass_stats_in.buf +
n_packets - cfg->ss_number_layers + i;
layer_id = stats->spatial_layer_id;
layer_id = (int)stats->spatial_layer_id;
if (layer_id >= cfg->ss_number_layers
||(int)(stats->count + 0.5) != n_packets_per_layer[layer_id] - 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment