shithub: libvpx

Download patch

ref: 597d02b5081d1f21740a25ee68c898b68a57654b
parent: fb5a692d27d01bd088fba0b7357c95d5165669ed
parent: c6ef75690fb71c801225c4884615834ab2b5d9cc
author: John Koleszar <jkoleszar@google.com>
date: Fri Feb 18 00:26:23 EST 2011

Merge "Dont pick encoder filter level when loopfilter is disabled."

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4417,23 +4417,26 @@
 
         //#pragma omp section
         {
-
-            struct vpx_usec_timer timer;
-
-            vpx_usec_timer_start(&timer);
-
-            if (cpi->sf.auto_filter == 0)
-                vp8cx_pick_filter_level_fast(cpi->Source, cpi);
+            if (cm->no_lpf)
+            {
+                cm->filter_level = 0;
+            }
             else
-                vp8cx_pick_filter_level(cpi->Source, cpi);
+            {
+                struct vpx_usec_timer timer;
 
-            vpx_usec_timer_mark(&timer);
+                vpx_usec_timer_start(&timer);
 
-            cpi->time_pick_lpf +=  vpx_usec_timer_elapsed(&timer);
+                if (cpi->sf.auto_filter == 0)
+                    vp8cx_pick_filter_level_fast(cpi->Source, cpi);
+                else
+                    vp8cx_pick_filter_level(cpi->Source, cpi);
 
-            if (cm->no_lpf)
-                cm->filter_level = 0;
+                vpx_usec_timer_mark(&timer);
 
+                cpi->time_pick_lpf +=  vpx_usec_timer_elapsed(&timer);
+            }
+
             if (cm->filter_level > 0)
             {
                 vp8cx_set_alt_lf_level(cpi, cm->filter_level);
@@ -4441,7 +4444,9 @@
                 cm->last_filter_type = cm->filter_type;
                 cm->last_sharpness_level = cm->sharpness_level;
             }
-            /* Move storing frame_type out of the above loop since it is also needed in motion search besides loopfilter */
+
+            /* Move storing frame_type out of the above loop since it is also
+             * needed in motion search besides loopfilter */
             cm->last_frame_type = cm->frame_type;
 
             vp8_yv12_extend_frame_borders_ptr(cm->frame_to_show);