1/*
2 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license
5 *  that can be found in the LICENSE file in the root of the source
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "vpx_config.h"
12#include "vp8_rtcd.h"
13#include <math.h>
14#include "vp8/common/filter.h"
15#include "bilinearfilter_arm.h"
16
17void vp8_filter_block2d_bil_armv6
18(
19    unsigned char *src_ptr,
20    unsigned char *dst_ptr,
21    unsigned int   src_pitch,
22    unsigned int   dst_pitch,
23    const short   *HFilter,
24    const short   *VFilter,
25    int            Width,
26    int            Height
27)
28{
29    unsigned short FData[36*16]; /* Temp data buffer used in filtering */
30
31    /* First filter 1-D horizontally... */
32    vp8_filter_block2d_bil_first_pass_armv6(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
33
34    /* then 1-D vertically... */
35    vp8_filter_block2d_bil_second_pass_armv6(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
36}
37
38
39void vp8_bilinear_predict4x4_armv6
40(
41    unsigned char  *src_ptr,
42    int   src_pixels_per_line,
43    int  xoffset,
44    int  yoffset,
45    unsigned char *dst_ptr,
46    int dst_pitch
47)
48{
49    const short  *HFilter;
50    const short  *VFilter;
51
52    HFilter = vp8_bilinear_filters[xoffset];
53    VFilter = vp8_bilinear_filters[yoffset];
54
55    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4);
56}
57
58void vp8_bilinear_predict8x8_armv6
59(
60    unsigned char  *src_ptr,
61    int  src_pixels_per_line,
62    int  xoffset,
63    int  yoffset,
64    unsigned char *dst_ptr,
65    int  dst_pitch
66)
67{
68    const short  *HFilter;
69    const short  *VFilter;
70
71    HFilter = vp8_bilinear_filters[xoffset];
72    VFilter = vp8_bilinear_filters[yoffset];
73
74    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 8);
75}
76
77void vp8_bilinear_predict8x4_armv6
78(
79    unsigned char  *src_ptr,
80    int  src_pixels_per_line,
81    int  xoffset,
82    int  yoffset,
83    unsigned char *dst_ptr,
84    int  dst_pitch
85)
86{
87    const short  *HFilter;
88    const short  *VFilter;
89
90    HFilter = vp8_bilinear_filters[xoffset];
91    VFilter = vp8_bilinear_filters[yoffset];
92
93    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 4);
94}
95
96void vp8_bilinear_predict16x16_armv6
97(
98    unsigned char  *src_ptr,
99    int  src_pixels_per_line,
100    int  xoffset,
101    int  yoffset,
102    unsigned char *dst_ptr,
103    int  dst_pitch
104)
105{
106    const short  *HFilter;
107    const short  *VFilter;
108
109    HFilter = vp8_bilinear_filters[xoffset];
110    VFilter = vp8_bilinear_filters[yoffset];
111
112    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
113}
114