]> granicus.if.org Git - libvpx/commitdiff
Convert filter kernel choice to lookup
authorYaowu Xu <yaowu@google.com>
Fri, 1 Nov 2013 16:40:20 +0000 (09:40 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 1 Nov 2013 20:03:18 +0000 (13:03 -0700)
Also removed unused declaration related 6 tap filter

Change-Id: Ic17f516141d885157918505f4204081e4c951fad

vp9/common/vp9_filter.c
vp9/common/vp9_filter.h

index 8f24052c7aa78ec61867c0bba672eb4d37f88570..79ace147cb84ae305d2130c3d6f4ef1b21309b6c 100644 (file)
@@ -97,19 +97,15 @@ DECLARE_ALIGNED(256, const subpel_kernel,
   { 0, -3,  1,  38, 64, 32, -1, -3}
 };
 
+
+static const subpel_kernel* vp9_filter_kernels[4] = {
+  vp9_sub_pel_filters_8,
+  vp9_sub_pel_filters_8lp,
+  vp9_sub_pel_filters_8s,
+  vp9_bilinear_filters
+};
+
 const subpel_kernel *vp9_get_filter_kernel(INTERPOLATION_TYPE type) {
-  switch (type) {
-    case EIGHTTAP:
-      return vp9_sub_pel_filters_8;
-    case EIGHTTAP_SMOOTH:
-      return vp9_sub_pel_filters_8lp;
-    case EIGHTTAP_SHARP:
-      return vp9_sub_pel_filters_8s;
-    case BILINEAR:
-      return vp9_bilinear_filters;
-    default:
-      assert(!"Invalid interpolation type.");
-      return NULL;
-  }
+  return vp9_filter_kernels[type];
 }
 
index 8652a6e3be56668def35d97b69d106c82e402f7a..b1e7e6499e43542a015577f8bdd00f13650eb2fa 100644 (file)
@@ -39,7 +39,6 @@ struct subpix_fn_table {
 const subpel_kernel *vp9_get_filter_kernel(INTERPOLATION_TYPE type);
 
 extern const subpel_kernel vp9_bilinear_filters[SUBPEL_SHIFTS];
-extern const subpel_kernel vp9_sub_pel_filters_6[SUBPEL_SHIFTS];
 extern const subpel_kernel vp9_sub_pel_filters_8[SUBPEL_SHIFTS];
 extern const subpel_kernel vp9_sub_pel_filters_8s[SUBPEL_SHIFTS];
 extern const subpel_kernel vp9_sub_pel_filters_8lp[SUBPEL_SHIFTS];