]> granicus.if.org Git - libvpx/commitdiff
Removing redundant checks from vp9_change_config().
authorDmitry Kovalev <dkovalev@google.com>
Fri, 11 Apr 2014 22:57:39 +0000 (15:57 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Fri, 11 Apr 2014 22:57:39 +0000 (15:57 -0700)
Both values are already checked as command line arguments:
RANGE_CHECK_HI(cfg, g_lag_in_frames, MAX_LAG_BUFFERS);
RANGE_CHECK_HI(extra_cfg, sharpness, 7);

Change-Id: I584798d587152d88dfd517c210054b466f4e5f8a

vp9/encoder/vp9_onyx_if.c

index 721ce48bbfeee6f6a1fadaaefe0fec51b3fbcc67..714e2d989e298cca891b964ccb69131bd75783f2 100644 (file)
@@ -861,10 +861,7 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
   cm->display_width = cpi->oxcf.width;
   cm->display_height = cpi->oxcf.height;
 
-  // VP8 sharpness level mapping 0-7 (vs 0-10 in general VPx dialogs)
-  cpi->oxcf.sharpness = MIN(7, cpi->oxcf.sharpness);
-
-  cpi->common.lf.sharpness_level = cpi->oxcf.sharpness;
+  cm->lf.sharpness_level = cpi->oxcf.sharpness;
 
   if (cpi->initial_width) {
     // Increasing the size of the frame beyond the first seen frame, or some
@@ -884,10 +881,6 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) {
 
   cpi->speed = abs(cpi->oxcf.cpu_used);
 
-  // Limit on lag buffers as these are not currently dynamically allocated.
-  if (cpi->oxcf.lag_in_frames > MAX_LAG_BUFFERS)
-    cpi->oxcf.lag_in_frames = MAX_LAG_BUFFERS;
-
 #if CONFIG_MULTIPLE_ARF
   vp9_zero(cpi->alt_ref_source);
 #else