shithub: libvpx

Download patch

ref: 4f2f86725b3e56b28762318f3f810edcd6d619ef
parent: 353819103eb2c72f0d6704c5f61c5572e62be8e7
author: Jingning Han <[email protected]>
date: Wed Jul 23 07:47:56 EDT 2014

Use the chessboard pattern pred search in newmv mode

This commit extends the chessboard pattern prediction filter search.
If the above and left blocks have the same prediction filter type,
the encoder will skip the prediction filter type search and use the
reference one.

The overall chessboard pattern prediction filter type search reduces
speed 3 runtime for hard clips. Experiments on park joy at 1080p
and 15000 kbps show that the runtime goes from 723265 ms to 65832 ms,
i.e., about 10% speed-up. Compression performance wise, it affects
the coding quality by

Change-Id: I880975497c7ad166532e9eea9bf46684d77ff327
derf:    -0.326%
yt:      -0.257%
hd:      -0.241%
stdhd:   -0.417%

--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2045,11 +2045,15 @@
   int pred_filter_search = cpi->sf.cb_pred_filter_search ?
       (((mi_row + mi_col) >> bsl)) & 0x01 : 0;
 
-  if (pred_filter_search && this_mode != NEWMV) {
+  if (pred_filter_search) {
+    INTERP_FILTER af = SWITCHABLE, lf = SWITCHABLE;
     if (xd->up_available)
-      best_filter = xd->mi[-xd->mi_stride]->mbmi.interp_filter;
-    else if (xd->left_available)
-      best_filter = xd->mi[-1]->mbmi.interp_filter;
+      af = xd->mi[-xd->mi_stride]->mbmi.interp_filter;
+    if (xd->left_available)
+      lf = xd->mi[-1]->mbmi.interp_filter;
+
+    if ((this_mode != NEWMV) || (af == lf))
+      best_filter = af;
   }
 
   if (is_comp_pred) {