Commit 57d521a0 authored by Deb Mukherjee's avatar Deb Mukherjee
Browse files

Refining the 8-tap interpolation filters.

Fixes a rounding issue with the 8-tap filters, which allows us to
use sharper filters that before with a little better performance.
Results on derf (0verall gain 0.76):
http://www.corp.google.com/~debargha/vp8_results/enhinterp.html
Results on a 720P set (Overall gain 0.61):
http://www.corp.google.com/~debargha/vp8_results/enhinterp_hd.html

Change-Id: I4cd7bdf3583db974dc5589fa64857bc31ac861fa
parent 6fa47a5f
......@@ -26,17 +26,37 @@ DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]) =
};
#if CONFIG_ENHANCED_INTERP
#define FILTER_ALPHA 75
#define FILTER_ALPHA 90
DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][2*INTERP_EXTEND]) =
{
/* Generated using MATLAB:
* alpha = 0.75;
* alpha = 0.9;
* b=intfilt(8,4,alpha);
* bi=round(128*b);
* ba=flipud(reshape([bi 0], 8, 8));
* disp(num2str(ba, '%d,'))
*/
#if FILTER_ALPHA == 75
#if FILTER_ALPHA == 90
/* alpha = 0.90 */
{ 0, 0, 0, 128, 0, 0, 0, 0},
{-3, 6, -13, 125, 18, -8, 5, -2},
{-5, 11, -21, 115, 39, -15, 9, -5},
{-7, 14, -25, 100, 61, -21, 13, -7},
{-7, 14, -25, 82, 82, -25, 14, -7},
{-7, 13, -21, 61, 100, -25, 14, -7},
{-5, 9, -15, 39, 115, -21, 11, -5},
{-2, 5, -8, 18, 125, -13, 6, -3}
#elif FILTER_ALPHA == 85
/* alpha = 0.85 */
{ 0, 0, 0, 128, 0, 0, 0, 0},
{-2, 5, -12, 124, 18, -7, 4, -2},
{-4, 10, -20, 114, 39, -15, 8, -4},
{-5, 12, -24, 100, 60, -21, 11, -5},
{-5, 12, -24, 81, 81, -24, 12, -5},
{-5, 11, -21, 60, 100, -24, 12, -5},
{-4, 8, -15, 39, 114, -20, 10, -4},
{-2, 4, -7, 18, 124, -12, 5, -2}
#elif FILTER_ALPHA == 75
/* alpha = 0.75 */
{ 0, 0, 0, 128, 0, 0, 0, 0},
{-1, 4, -11, 123, 18, -7, 3, -1},
......@@ -46,26 +66,6 @@ DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][2*INTERP_EXTEND]) =
{-3, 8, -19, 59, 98, -22, 9, -3},
{-2, 6, -14, 38, 113, -19, 7, -2},
{-1, 3, -7, 18, 123, -11, 4, -1}
#elif FILTER_ALPHA == 625
/* alpha = 0.625 */
{ 0, 0, 0, 128, 0, 0, 0, 0},
{-1, 3, -10, 123, 18, -6, 2, -1},
{-1, 5, -17, 112, 38, -12, 4, -1},
{-1, 6, -20, 97, 58, -17, 6, -1},
{-2, 7, -20, 79, 79, -20, 7, -2},
{-1, 6, -17, 58, 97, -20, 6, -1},
{-1, 4, -12, 38, 112, -17, 5, -1},
{-1, 2, -6, 18, 123, -10, 3, -1}
#elif FILTER_ALPHA == 50
/* alpha = 0.5 */
{ 0, 0, 0, 128, 0, 0, 0, 0},
{ 0, 2, -10, 122, 18, -6, 2, 0},
{-1, 4, -16, 112, 37, -11, 3, -1},
{-1, 5, -18, 96, 58, -16, 4, -1},
{-1, 5, -18, 78, 78, -18, 5, -1},
{-1, 4, -16, 58, 96, -18, 5, -1},
{-1, 3, -11, 37, 112, -16, 4, -1},
{ 0, 2, -6, 18, 122, -10, 2, 0}
#endif
};
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment