<< "Buffer Underrun at frame " << pkt->data.frame.pts;
}
}
+
+ ASSERT_EQ(pkt->data.frame.width[sl],
+ top_sl_width_ * svc_params_.scaling_factor_num[sl] /
+ svc_params_.scaling_factor_den[sl]);
+
+ ASSERT_EQ(pkt->data.frame.height[sl],
+ top_sl_height_ * svc_params_.scaling_factor_num[sl] /
+ svc_params_.scaling_factor_den[sl]);
}
}
int number_temporal_layers_;
int layer_target_avg_bandwidth_[VPX_MAX_LAYERS];
bool dynamic_drop_layer_;
+ unsigned int top_sl_width_;
+ unsigned int top_sl_height_;
};
static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg,
const vpx_svc_extra_cfg_t *svc_params,
number_spatial_layers_ = cfg_.ss_number_layers;
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 60);
+ top_sl_width_ = 1280;
+ top_sl_height_ = 720;
cfg_.rc_target_bitrate = 500;
ResetModel();
tune_content_ = 1;
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
// TODO(marpan): Check that effective_datarate for each layer hits the
// layer target_bitrate.
for (int i = 200; i <= 800; i += 200) {
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
// TODO(marpan): Check that effective_datarate for each layer hits the
// layer target_bitrate.
// For SVC, noise_sen = 1 means denoising only the top spatial layer
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
// For this 3 temporal layer case, pattern repeats every 4 frames, so choose
// 4 key neighboring key frame periods (so key frame will land on 0-2-1-2).
for (int j = 64; j <= 67; j++) {
number_spatial_layers_ = cfg_.ss_number_layers;
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 60);
+ top_sl_width_ = 1280;
+ top_sl_height_ = 720;
cfg_.rc_target_bitrate = 800;
ResetModel();
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
cfg_.rc_target_bitrate = 800;
ResetModel();
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
cfg_.rc_target_bitrate = 800;
ResetModel();
dynamic_drop_layer_ = true;
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::I420VideoSource video("niklas_640_480_30.yuv", 640, 480, 30, 1,
0, 400);
+ top_sl_width_ = 640;
+ top_sl_height_ = 480;
// For this 3 temporal layer case, pattern repeats every 4 frames, so choose
// 4 key neighboring key frame periods (so key frame will land on 0-2-1-2).
for (int j = 32; j <= 35; j++) {
number_spatial_layers_ = cfg_.ss_number_layers;
number_temporal_layers_ = cfg_.ts_number_layers;
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 60);
+ top_sl_width_ = 1280;
+ top_sl_height_ = 720;
cfg_.rc_target_bitrate = 800;
ResetModel();
assign_layer_bitrates(&cfg_, &svc_params_, cfg_.ss_number_layers,
bits_in_buffer_model_[1] =
cfg_.layer_target_bitrate[1] * cfg_.rc_buf_initial_sz;
::libvpx_test::Y4mVideoSource video("niklas_1280_720_30.y4m", 0, 60);
+ top_sl_width_ = 1280;
+ top_sl_height_ = 720;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
CheckLayerRateTargeting(&cfg_, number_spatial_layers_,
number_temporal_layers_, file_datarate_, 0.78, 1.15);
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
- ASSERT_NE(static_cast<int>(pkt->data.frame.width), 0);
- ASSERT_NE(static_cast<int>(pkt->data.frame.height), 0);
- encode_frame_width_.push_back(pkt->data.frame.width);
- encode_frame_height_.push_back(pkt->data.frame.height);
+ ASSERT_NE(static_cast<int>(pkt->data.frame.width[0]), 0);
+ ASSERT_NE(static_cast<int>(pkt->data.frame.height[0]), 0);
+ encode_frame_width_.push_back(pkt->data.frame.width[0]);
+ encode_frame_height_.push_back(pkt->data.frame.height[0]);
}
unsigned int GetFrameWidth(size_t idx) const {
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
- ASSERT_NE(static_cast<int>(pkt->data.frame.width), 0);
- ASSERT_NE(static_cast<int>(pkt->data.frame.height), 0);
- encode_frame_width_.push_back(pkt->data.frame.width);
- encode_frame_height_.push_back(pkt->data.frame.height);
+ ASSERT_NE(static_cast<int>(pkt->data.frame.width[0]), 0);
+ ASSERT_NE(static_cast<int>(pkt->data.frame.height[0]), 0);
+ encode_frame_width_.push_back(pkt->data.frame.width[0]);
+ encode_frame_height_.push_back(pkt->data.frame.height[0]);
}
unsigned int GetMismatchFrames() { return mismatch_nframes_; }