Allow encoder to set lpf level to 0

As a way to speed-up rtc encoding at speed 7.

Change-Id: Ie36a010392cf7b741dc130df21a4e733622a75b7
This commit is contained in:
Yaowu Xu 2014-06-27 15:23:02 -07:00
parent 3f92b7b994
commit d0cb273e04
3 changed files with 6 additions and 2 deletions

View File

@ -144,7 +144,9 @@ void vp9_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
lf->sharpness_level = cm->frame_type == KEY_FRAME ? 0 lf->sharpness_level = cm->frame_type == KEY_FRAME ? 0
: cpi->oxcf.sharpness; : cpi->oxcf.sharpness;
if (method == LPF_PICK_FROM_Q) { if (method == LPF_PICK_MINIMAL_LPF && lf->filter_level) {
lf->filter_level = 0;
} else if (method >= LPF_PICK_FROM_Q) {
const int min_filter_level = 0; const int min_filter_level = 0;
const int max_filter_level = get_max_filter_level(cpi); const int max_filter_level = get_max_filter_level(cpi);
const int q = vp9_ac_quant(cm->base_qindex, 0); const int q = vp9_ac_quant(cm->base_qindex, 0);

View File

@ -280,7 +280,7 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
sf->reuse_inter_pred_sby = 1; sf->reuse_inter_pred_sby = 1;
} }
if (speed >= 7) { if (speed >= 7) {
sf->disable_filter_search_var_thresh = 1000; sf->lpf_pick = LPF_PICK_MINIMAL_LPF;
} }
if (speed >= 8) { if (speed >= 8) {
int i; int i;

View File

@ -73,6 +73,8 @@ typedef enum {
LPF_PICK_FROM_SUBIMAGE, LPF_PICK_FROM_SUBIMAGE,
// Estimate the level based on quantizer and frame type // Estimate the level based on quantizer and frame type
LPF_PICK_FROM_Q, LPF_PICK_FROM_Q,
// Pick 0 to disable LPF if LPF was enabled last frame
LPF_PICK_MINIMAL_LPF
} LPF_PICK_METHOD; } LPF_PICK_METHOD;
typedef enum { typedef enum {