added a speed feature on lpf level picking
authorYaowu Xu <yaowu@google.com>
Tue, 6 Aug 2013 22:46:26 +0000 (15:46 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 9 Aug 2013 14:36:32 +0000 (07:36 -0700)
Change-Id: Id578f8afdeab3702fc8386969f2d832d8f1b5420

vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_int.h
vp9/encoder/vp9_picklpf.c
vp9/encoder/vp9_picklpf.h

index 914476c..aff93fb 100644 (file)
@@ -744,6 +744,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
   sf->use_rd_breakout = 0;
   sf->skip_encode_sb = 0;
   sf->use_uv_intra_rd_estimate = 0;
+  sf->use_fast_lpf_pick = 0;
   sf->using_small_partition_info = 0;
   // Skip any mode not chosen at size < X for all sizes > X
   // Hence BLOCK_64X64 (skip is off)
@@ -830,6 +831,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) {
         sf->auto_mv_step_size = 1;
         sf->search_method = SQUARE;
         sf->subpel_iters_per_step = 1;
+        sf->use_fast_lpf_pick = 1;
       }
       if (speed == 3) {
         sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;
@@ -2434,7 +2436,10 @@ static void loopfilter_frame(VP9_COMP *cpi, VP9_COMMON *cm) {
 
     vpx_usec_timer_start(&timer);
 
-    vp9_pick_filter_level(cpi->Source, cpi);
+    if (cpi->sf.use_fast_lpf_pick == 0)
+      vp9_pick_filter_level(cpi->Source, cpi);
+    else
+      vp9_pick_filter_level_fast(cpi->Source, cpi);
 
     vpx_usec_timer_mark(&timer);
     cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer);
index 083ff71..b568990 100644 (file)
@@ -289,6 +289,7 @@ typedef struct {
   MB_PREDICTION_MODE last_chroma_intra_mode;
   int use_rd_breakout;
   int use_uv_intra_rd_estimate;
+  int use_fast_lpf_pick;
 } SPEED_FEATURES;
 
 typedef struct VP9_COMP {
index 2b8f2cd..ff0951b 100644 (file)
@@ -125,6 +125,10 @@ static int get_max_filter_level(VP9_COMP *cpi, int base_qindex) {
 void vp9_set_alt_lf_level(VP9_COMP *cpi, int filt_val) {
 }
 
+void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
+  struct loopfilter *lf = &cpi->mb.e_mbd.lf;
+  lf->filter_level = 0;
+}
 void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi) {
   VP9_COMMON *cm = &cpi->common;
   struct loopfilter *lf = &cpi->mb.e_mbd.lf;
index 698cb8d..da39352 100644 (file)
@@ -20,4 +20,6 @@ void vp9_set_alt_lf_level(struct VP9_COMP *cpi, int filt_val);
 void vp9_pick_filter_level(struct yv12_buffer_config *sd,
                            struct VP9_COMP *cpi);
 
+void vp9_pick_filter_level_fast(struct yv12_buffer_config *sd,
+                                struct VP9_COMP *cpi);
 #endif  // VP9_ENCODER_VP9_PICKLPF_H_