Merge "For 1 pass: always use the normative filter in vp9_scale_if_required()"
This commit is contained in:
commit
bb581f4e83
@ -3200,7 +3200,8 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
|
||||
|
||||
cpi->Source = vp9_scale_if_required(cm,
|
||||
cpi->un_scaled_source,
|
||||
&cpi->scaled_source);
|
||||
&cpi->scaled_source,
|
||||
(cpi->oxcf.pass == 0));
|
||||
|
||||
// Avoid scaling last_source unless its needed.
|
||||
// Last source is currently only used for screen-content mode,
|
||||
@ -3210,7 +3211,8 @@ static void encode_without_recode_loop(VP9_COMP *cpi,
|
||||
cpi->sf.partition_search_type == SOURCE_VAR_BASED_PARTITION))
|
||||
cpi->Last_Source = vp9_scale_if_required(cm,
|
||||
cpi->unscaled_last_source,
|
||||
&cpi->scaled_last_source);
|
||||
&cpi->scaled_last_source,
|
||||
(cpi->oxcf.pass == 0));
|
||||
|
||||
if (cpi->oxcf.pass == 0 &&
|
||||
cpi->oxcf.rc_mode == VPX_CBR &&
|
||||
@ -3342,11 +3344,13 @@ static void encode_with_recode_loop(VP9_COMP *cpi,
|
||||
}
|
||||
|
||||
cpi->Source = vp9_scale_if_required(cm, cpi->un_scaled_source,
|
||||
&cpi->scaled_source);
|
||||
&cpi->scaled_source,
|
||||
(cpi->oxcf.pass == 0));
|
||||
|
||||
if (cpi->unscaled_last_source != NULL)
|
||||
cpi->Last_Source = vp9_scale_if_required(cm, cpi->unscaled_last_source,
|
||||
&cpi->scaled_last_source);
|
||||
&cpi->scaled_last_source,
|
||||
(cpi->oxcf.pass == 0));
|
||||
|
||||
if (frame_is_intra_only(cm) == 0) {
|
||||
if (loop_count > 0) {
|
||||
@ -3597,20 +3601,17 @@ static void set_ext_overrides(VP9_COMP *cpi) {
|
||||
|
||||
YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
|
||||
YV12_BUFFER_CONFIG *unscaled,
|
||||
YV12_BUFFER_CONFIG *scaled) {
|
||||
YV12_BUFFER_CONFIG *scaled,
|
||||
int use_normative_scaler) {
|
||||
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
|
||||
cm->mi_rows * MI_SIZE != unscaled->y_height) {
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
if (unscaled->y_width == (scaled->y_width << 1) &&
|
||||
unscaled->y_height == (scaled->y_height << 1))
|
||||
if (use_normative_scaler)
|
||||
scale_and_extend_frame(unscaled, scaled, (int)cm->bit_depth);
|
||||
else
|
||||
scale_and_extend_frame_nonnormative(unscaled, scaled, (int)cm->bit_depth);
|
||||
#else
|
||||
// Use the faster normative (convolve8) scaling filter: for now only for
|
||||
// scaling factor of 2.
|
||||
if (unscaled->y_width == (scaled->y_width << 1) &&
|
||||
unscaled->y_height == (scaled->y_height << 1))
|
||||
if (use_normative_scaler)
|
||||
scale_and_extend_frame(unscaled, scaled);
|
||||
else
|
||||
scale_and_extend_frame_nonnormative(unscaled, scaled);
|
||||
|
@ -613,7 +613,8 @@ void vp9_set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv);
|
||||
|
||||
YV12_BUFFER_CONFIG *vp9_scale_if_required(VP9_COMMON *cm,
|
||||
YV12_BUFFER_CONFIG *unscaled,
|
||||
YV12_BUFFER_CONFIG *scaled);
|
||||
YV12_BUFFER_CONFIG *scaled,
|
||||
int use_normative_scaler);
|
||||
|
||||
void vp9_apply_encoding_flags(VP9_COMP *cpi, vpx_enc_frame_flags_t flags);
|
||||
|
||||
|
@ -597,7 +597,7 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
|
||||
(cpi->ref_frame_flags & VP9_GOLD_FLAG) ? GOLDEN_FRAME : NONE);
|
||||
|
||||
cpi->Source = vp9_scale_if_required(cm, cpi->un_scaled_source,
|
||||
&cpi->scaled_source);
|
||||
&cpi->scaled_source, 0);
|
||||
}
|
||||
|
||||
vp9_setup_block_planes(&x->e_mbd, cm->subsampling_x, cm->subsampling_y);
|
||||
|
@ -721,7 +721,7 @@ void vp9_temporal_filter(VP9_COMP *cpi, int distance) {
|
||||
"Failed to reallocate alt_ref_buffer");
|
||||
}
|
||||
frames[frame] = vp9_scale_if_required(
|
||||
cm, frames[frame], &cpi->svc.scaled_frames[frame_used]);
|
||||
cm, frames[frame], &cpi->svc.scaled_frames[frame_used], 0);
|
||||
++frame_used;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user