blob: 5056ba09c95658143ce55dead770b6a3c6e681a2 [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 ih264e_distortion_metrics.h
24*
25* @brief
26* This file contains declarations of routines that compute distortion
27* between two macro/sub blocks of identical dimensions
28*
29* @author
30* Ittiam
31*
32* @remarks
33* None
34*
35*******************************************************************************
36*/
37
38#ifndef IME_DISTORTION_METRICS_H_
39#define IME_DISTORTION_METRICS_H_
40
41
42/*****************************************************************************/
43/* Type definitions for function prototypes */
44/*****************************************************************************/
45
46typedef void ime_compute_sad_ft(UWORD8 *pu1_src,
47 UWORD8 *pu1_est,
48 WORD32 src_strd,
49 WORD32 est_strd,
50 WORD32 i4_max_sad,
51 WORD32 *pi4_mb_distortion);
52
53typedef void ime_compute_sad4_diamond(UWORD8 *pu1_ref,
54 UWORD8 *pu1_src,
55 WORD32 ref_strd,
56 WORD32 src_strd,
57 WORD32 *pi4_sad);
58
59typedef void ime_compute_sad3_diamond(UWORD8 *pu1_ref1,
60 UWORD8 *pu1_ref2,
61 UWORD8 *pu1_ref3,
62 UWORD8 *pu1_src,
63 WORD32 ref_strd,
64 WORD32 src_strd,
65 WORD32 *pi4_sad);
66
67typedef void ime_compute_sad2_diamond(UWORD8 *pu1_ref1,
68 UWORD8 *pu1_ref2,
69 UWORD8 *pu1_src,
70 WORD32 ref_strd,
71 WORD32 src_strd,
72 WORD32 *pi4_sad);
73
74typedef void ime_sub_pel_compute_sad_16x16_ft(UWORD8 *pu1_src,
75 UWORD8 *pu1_ref_half_x,
76 UWORD8 *pu1_ref_half_y,
77 UWORD8 *pu1_ref_half_xy,
78 WORD32 src_strd,
79 WORD32 ref_strd,
80 WORD32 *pi4_sad);
81
82typedef void ime_compute_sad_stat(UWORD8 *pu1_src,
83 UWORD8 *pu1_est,
84 WORD32 src_strd,
85 WORD32 est_strd,
86 UWORD16 *pu2_thrsh,
87 WORD32 *pi4_mb_distortion,
88 UWORD32 *pu4_is_zero);
89
90typedef void ime_compute_satqd_16x16_lumainter_ft(UWORD8 *pu1_src,
91 UWORD8 *pu1_est,
92 WORD32 src_strd,
93 WORD32 est_strd,
94 UWORD16 *pu2_thrsh,
95 WORD32 *pi4_mb_distortion,
96 UWORD32 *pu4_is_zero);
97
98typedef void ime_compute_satqd_8x16_chroma_ft(UWORD8 *pu1_src,
99 UWORD8 *pu1_est,
100 WORD32 src_strd,
101 WORD32 est_strd,
102 WORD32 i4_max_sad,
103 UWORD16 *thrsh);
104
105typedef void ime_compute_satqd_16x16_lumaintra_ft(UWORD8 *pu1_src,
106 UWORD8 *pu1_est,
107 WORD32 src_strd,
108 WORD32 est_strd,
109 WORD32 i4_max_sad,
110 UWORD16 *thrsh,
111 WORD32 *pi4_mb_distortion,
112 UWORD8 *sig_nz_sad);
113
114/*****************************************************************************/
115/* Extern Function Declarations */
116/*****************************************************************************/
117
118ime_compute_sad_ft ime_compute_sad_16x16;
119ime_compute_sad_ft ime_compute_sad_16x16_fast;
120ime_compute_sad_ft ime_compute_sad_16x8;
121ime_compute_sad_ft ime_compute_sad_16x16_ea8;
122ime_compute_sad_ft ime_compute_sad_8x8;
123ime_compute_sad_ft ime_compute_sad_4x4;
124ime_compute_sad4_diamond ime_calculate_sad4_prog;
125ime_compute_sad3_diamond ime_calculate_sad3_prog;
126ime_compute_sad2_diamond ime_calculate_sad2_prog;
127ime_sub_pel_compute_sad_16x16_ft ime_sub_pel_compute_sad_16x16;
128ime_compute_sad_stat ime_compute_16x16_sad_stat;
129ime_compute_satqd_16x16_lumainter_ft ime_compute_satqd_16x16_lumainter;
130ime_compute_satqd_8x16_chroma_ft ime_compute_satqd_8x16_chroma;
131ime_compute_satqd_16x16_lumaintra_ft ime_compute_satqd_16x16_lumaintra;
132
Harinarayanan K K134291e2015-06-18 16:03:38 +0530133
Hamsalekha S8d3d3032015-03-13 21:24:58 +0530134/*SSE4.2 Declarations*/
135ime_compute_sad_ft ime_compute_sad_16x16_sse42;
136ime_compute_sad_ft ime_compute_sad_16x16_fast_sse42;
137ime_compute_sad_ft ime_compute_sad_16x8_sse42;
138ime_compute_sad_ft ime_compute_sad_16x16_ea8_sse42;
139ime_sub_pel_compute_sad_16x16_ft ime_sub_pel_compute_sad_16x16_sse42;
140ime_compute_sad4_diamond ime_calculate_sad4_prog_sse42;
141ime_compute_satqd_16x16_lumainter_ft ime_compute_satqd_16x16_lumainter_sse42;
142
143/* assembly */
144ime_compute_sad_ft ime_compute_sad_16x16_a9q;
145ime_compute_sad_ft ime_compute_sad_16x16_fast_a9q;
146ime_compute_sad_ft ime_compute_sad_16x8_a9q;
147ime_compute_sad_ft ime_compute_sad_16x16_ea8_a9q;
148ime_compute_sad4_diamond ime_calculate_sad4_prog_a9q;
149ime_compute_sad3_diamond ime_calculate_sad3_prog_a9q;
150ime_compute_sad2_diamond ime_calculate_sad2_prog_a9q;
151ime_sub_pel_compute_sad_16x16_ft ime_sub_pel_compute_sad_16x16_a9q;
152ime_compute_sad_stat ime_compute_16x16_sad_stat_a9;
153ime_compute_satqd_16x16_lumainter_ft ime_compute_satqd_16x16_lumainter_a9q;
154
155
156/* assembly - AV8 declarations */
157ime_compute_sad_ft ime_compute_sad_16x16_av8;
158ime_compute_sad_ft ime_compute_sad_16x16_fast_av8;
159ime_compute_sad_ft ime_compute_sad_16x8_av8;
160ime_compute_sad_ft ime_compute_sad_16x16_ea8_av8;
161ime_compute_sad4_diamond ime_calculate_sad4_prog_av8;
162ime_compute_sad3_diamond ime_calculate_sad3_prog_av8;
163ime_compute_sad2_diamond ime_calculate_sad2_prog_av8;
164ime_sub_pel_compute_sad_16x16_ft ime_sub_pel_compute_sad_16x16_av8;
165ime_compute_sad_stat ime_compute_16x16_sad_stat_av8;
166ime_compute_satqd_16x16_lumainter_ft ime_compute_satqd_16x16_lumainter_av8;
167
Hamsalekha S8d3d3032015-03-13 21:24:58 +0530168#endif /* IME_DISTORTION_METRICS_H_ */
169
170