bilinearfilter_arm.c 2.85 KB
Newer Older
John Koleszar's avatar
John Koleszar committed
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
John Koleszar's avatar
John Koleszar committed
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5 6
 *  that can be found in the LICENSE file in the root of the source
 *  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.
John Koleszar's avatar
John Koleszar committed
9 10
 */

John Koleszar's avatar
John Koleszar committed
11 12
#include "vpx_config.h"
#include "vpx_rtcd.h"
John Koleszar's avatar
John Koleszar committed
13
#include <math.h>
John Koleszar's avatar
John Koleszar committed
14 15
#include "vp8/common/filter.h"
#include "bilinearfilter_arm.h"
John Koleszar's avatar
John Koleszar committed
16 17 18 19

void vp8_filter_block2d_bil_armv6
(
    unsigned char *src_ptr,
Johann's avatar
Johann committed
20 21
    unsigned char *dst_ptr,
    unsigned int   src_pitch,
John Koleszar's avatar
John Koleszar committed
22
    unsigned int   dst_pitch,
Johann's avatar
Johann committed
23 24
    const short   *HFilter,
    const short   *VFilter,
John Koleszar's avatar
John Koleszar committed
25 26 27 28
    int            Width,
    int            Height
)
{
Johann's avatar
Johann committed
29
    unsigned short FData[36*16]; /* Temp data buffer used in filtering */
John Koleszar's avatar
John Koleszar committed
30

31
    /* First filter 1-D horizontally... */
Johann's avatar
Johann committed
32
    vp8_filter_block2d_bil_first_pass_armv6(src_ptr, FData, src_pitch, Height + 1, Width, HFilter);
John Koleszar's avatar
John Koleszar committed
33

34
    /* then 1-D vertically... */
Johann's avatar
Johann committed
35
    vp8_filter_block2d_bil_second_pass_armv6(FData, dst_ptr, dst_pitch, Height, Width, VFilter);
John Koleszar's avatar
John Koleszar committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
}


void vp8_bilinear_predict4x4_armv6
(
    unsigned char  *src_ptr,
    int   src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int dst_pitch
)
{
    const short  *HFilter;
    const short  *VFilter;

Johann's avatar
Johann committed
52 53
    HFilter = vp8_bilinear_filters[xoffset];
    VFilter = vp8_bilinear_filters[yoffset];
John Koleszar's avatar
John Koleszar committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 4, 4);
}

void vp8_bilinear_predict8x8_armv6
(
    unsigned char  *src_ptr,
    int  src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int  dst_pitch
)
{
    const short  *HFilter;
    const short  *VFilter;

Johann's avatar
Johann committed
71 72
    HFilter = vp8_bilinear_filters[xoffset];
    VFilter = vp8_bilinear_filters[yoffset];
John Koleszar's avatar
John Koleszar committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89

    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 8);
}

void vp8_bilinear_predict8x4_armv6
(
    unsigned char  *src_ptr,
    int  src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int  dst_pitch
)
{
    const short  *HFilter;
    const short  *VFilter;

Johann's avatar
Johann committed
90 91
    HFilter = vp8_bilinear_filters[xoffset];
    VFilter = vp8_bilinear_filters[yoffset];
John Koleszar's avatar
John Koleszar committed
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108

    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 8, 4);
}

void vp8_bilinear_predict16x16_armv6
(
    unsigned char  *src_ptr,
    int  src_pixels_per_line,
    int  xoffset,
    int  yoffset,
    unsigned char *dst_ptr,
    int  dst_pitch
)
{
    const short  *HFilter;
    const short  *VFilter;

Johann's avatar
Johann committed
109 110
    HFilter = vp8_bilinear_filters[xoffset];
    VFilter = vp8_bilinear_filters[yoffset];
John Koleszar's avatar
John Koleszar committed
111 112 113

    vp8_filter_block2d_bil_armv6(src_ptr, dst_ptr, src_pixels_per_line, dst_pitch, HFilter, VFilter, 16, 16);
}