summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-02-26 16:53:10 -0800
committerJames Zern <jzern@google.com>2016-02-26 16:53:26 -0800
commit8062e1016216b074a889b0aa997c8f16c0d23b4c (patch)
tree988a7c97c40fd69149b80e8fd275499f5138c6d0 /vp9/encoder/vp9_encoder.c
parent9ef41cf577b507d17878038ab5329fe908f6bf40 (diff)
downloadlibvpx-8062e1016216b074a889b0aa997c8f16c0d23b4c.tar
libvpx-8062e1016216b074a889b0aa997c8f16c0d23b4c.tar.gz
libvpx-8062e1016216b074a889b0aa997c8f16c0d23b4c.tar.bz2
libvpx-8062e1016216b074a889b0aa997c8f16c0d23b4c.zip
Revert "vp9-svc: Fix speed issue with source downscaling for spatial layers."
This reverts commit f51f0998e1ca99cd7497ded3642bb27445b1b215. This causes datarate tests to fail. Some are due to the new default keyframe distance, another causes an assert even forcing 9999: [ RUN ] VP9/DatarateOnePassCbrSvc.OnePassCbrSvc3SpatialLayers/0 test_libvpx: vpx_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c:853: scaledconvolve2d: Assertion `y_step_q4 <= 32' failed. Change-Id: I4ee4fea97f47e4f1a23b82a62e6afc6280961e38
Diffstat (limited to 'vp9/encoder/vp9_encoder.c')
-rw-r--r--vp9/encoder/vp9_encoder.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index a32b782df..f8f681aec 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -410,9 +410,6 @@ static void dealloc_compressor_data(VP9_COMP *cpi) {
memset(&cpi->svc.scaled_frames[0], 0,
MAX_LAG_BUFFERS * sizeof(cpi->svc.scaled_frames[0]));
- vpx_free_frame_buffer(&cpi->svc.scaled_temp);
- memset(&cpi->svc.scaled_temp, 0, sizeof(cpi->svc.scaled_temp));
-
vpx_free_frame_buffer(&cpi->svc.empty_frame.img);
memset(&cpi->svc.empty_frame, 0, sizeof(cpi->svc.empty_frame));
@@ -3360,20 +3357,11 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
vpx_clear_system_state();
set_frame_size(cpi);
+ cpi->Source = vp9_scale_if_required(cm,
+ cpi->un_scaled_source,
+ &cpi->scaled_source,
+ (cpi->oxcf.pass == 0));
- if (is_one_pass_cbr_svc(cpi) &&
- cpi->un_scaled_source->y_width == cm->width << 2 &&
- cpi->un_scaled_source->y_height == cm->height << 2) {
- cpi->Source = vp9_svc_twostage_scale(cm,
- cpi->un_scaled_source,
- &cpi->scaled_source,
- &cpi->svc.scaled_temp);
- } else {
- cpi->Source = vp9_scale_if_required(cm,
- cpi->un_scaled_source,
- &cpi->scaled_source,
- (cpi->oxcf.pass == 0));
- }
// Avoid scaling last_source unless its needed.
// Last source is needed if vp9_avg_source_sad() is used, or if
// partition_search_type == SOURCE_VAR_BASED_PARTITION, or if noise
@@ -3794,25 +3782,6 @@ static void set_ext_overrides(VP9_COMP *cpi) {
}
}
-YV12_BUFFER_CONFIG *vp9_svc_twostage_scale(VP9_COMMON *cm,
- YV12_BUFFER_CONFIG *unscaled,
- YV12_BUFFER_CONFIG *scaled,
- YV12_BUFFER_CONFIG *scaled_temp) {
- if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
- cm->mi_rows * MI_SIZE != unscaled->y_height) {
-#if CONFIG_VP9_HIGHBITDEPTH
- scale_and_extend_frame(unscaled, scaled_temp, (int)cm->bit_depth);
- scale_and_extend_frame(scaled_temp, scaled, (int)cm->bit_depth);
-#else
- vp9_scale_and_extend_frame(unscaled, scaled_temp);
- vp9_scale_and_extend_frame(scaled_temp, scaled);
-#endif // CONFIG_VP9_HIGHBITDEPTH
- return scaled;
- } else {
- return unscaled;
- }
-}
-
YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
YV12_BUFFER_CONFIG *unscaled,
YV12_BUFFER_CONFIG *scaled,