blob: 92bd37f6e97c1f71fd42d8885b5ecbc2dceac983 [file] [log] [blame]
Hamsalekha S8d3d3032015-03-13 21:24:58 +05301/******************************************************************************
2 *
3 * Copyright (C) 2015 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*/
20
21/**
22 *******************************************************************************
23 * @file
24 * ih264e_half_pel.h
25 *
26 * @brief
27 * Contains extern declarations of subpel functions used by the encoder
28 *
29 * @author
30 * ittiam
31 *
32 * @remarks
33 * none
34 *
35 *******************************************************************************
36 */
37
38#ifndef IH264E_HALF_PEL_H_
39#define IH264E_HALF_PEL_H_
40
41/*****************************************************************************/
42/* Global constants */
43/*****************************************************************************/
44/*
45 * Dimensions of subpel plane buffers
46 */
47#define HP_PL_WD MB_SIZE + 1
48#define HP_PL_HT MB_SIZE + 1
49
50/*****************************************************************************/
51/* Extern Function Declarations */
52/*****************************************************************************/
53
54/**
55*******************************************************************************
56*
57* @brief
58* Interprediction luma filter for horizontal input (Filter run for width = 17
59* and height =16)
60*
61* @par Description:
62* Applies a 6 tap horizontal filter .The output is clipped to 8 bits
63* sec 8.4.2.2.1 titled "Luma sample interpolation process"
64*
65* @param[in] pu1_src
66* UWORD8 pointer to the source
67*
68* @param[out] pu1_dst
69* UWORD8 pointer to the destination
70*
71* @param[in] src_strd
72* integer source stride
73*
74* @param[in] dst_strd
75* integer destination stride
76*
77* @returns
78*
79* @remarks
80* None
81*
82*******************************************************************************
83*/
84typedef void ih264e_sixtapfilter_horz_ft(UWORD8 *pu1_src,
85 UWORD8 *pu1_dst,
86 WORD32 src_strd,
87 WORD32 dst_strd);
88
89ih264e_sixtapfilter_horz_ft ih264e_sixtapfilter_horz;
90
91/* arm assembly */
92ih264e_sixtapfilter_horz_ft ih264e_sixtapfilter_horz_a9q;
93ih264e_sixtapfilter_horz_ft ih264e_sixtapfilter_horz_av8;
94
95/* x86 intrinsics*/
96ih264e_sixtapfilter_horz_ft ih264e_sixtapfilter_horz_ssse3;
97
98/**
99*******************************************************************************
100*
101* @brief
102* This function implements a two stage cascaded six tap filter. It applies
103* the six tap filter in the vertical direction on the predictor values,
104* followed by applying the same filter in the horizontal direction on the
105* output of the first stage. The six tap filtering operation is described in
106* sec 8.4.2.2.1 titled "Luma sample interpolation process" (Filter run for
107* width = 17 and height = 17)
108*
109* @par Description:
110* The function interpolates the predictors first in the vertical direction and
111* then in the horizontal direction to output the (1/2,1/2). The output of the
112* first stage of the filter is stored in the buffer pointed to by
113* pi16_pred1(only in C) in 16 bit precision.
114*
115* @param[in] pu1_src
116* UWORD8 pointer to the source
117*
118* @param[out] pu1_dst1
119* UWORD8 pointer to the destination (Horizontal filtered output)
120*
121* @param[out] pu1_dst2
122* UWORD8 pointer to the destination (output after applying vertical filter to
123* the intermediate horizontal output)
124*
125* @param[in] src_strd
126* integer source stride
127
128* @param[in] dst_strd
129* integer destination stride of pu1_dst
130*
131* @param[in] pi4_pred
132* Pointer to 16bit intermediate buffer (used only in c)
133*
134* @param[in] i4_pred_strd
135* integer destination stride of pi16_pred1
136*
137* @returns
138*
139* @remarks
140* None
141*
142*******************************************************************************
143*/
144typedef void ih264e_sixtap_filter_2dvh_vert_ft(UWORD8 *pu1_src,
145 UWORD8 *pu1_dst1,
146 UWORD8 *pu1_dst2,
147 WORD32 src_strd,
148 WORD32 dst_strd,
149 WORD32 *pi4_pred,
150 WORD32 i4_pred_strd);
151
152ih264e_sixtap_filter_2dvh_vert_ft ih264e_sixtap_filter_2dvh_vert;
153
154/* assembly */
155ih264e_sixtap_filter_2dvh_vert_ft ih264e_sixtap_filter_2dvh_vert_a9q;
156
157ih264e_sixtap_filter_2dvh_vert_ft ih264e_sixtap_filter_2dvh_vert_av8;
158
159/* x86 intrinsics */
160ih264e_sixtap_filter_2dvh_vert_ft ih264e_sixtap_filter_2dvh_vert_ssse3;
161
162#endif /* IH264E_HALF_PEL_H_ */