1/******************************************************************************
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#ifndef __IMPEG2_INTER_PRED_H__
21#define __IMPEG2_INTER_PRED_H__
22
23
24typedef struct
25{
26    UWORD8 *pu1_y;
27    UWORD8 *pu1_u;
28    UWORD8 *pu1_v;
29}yuv_buf_t;
30
31typedef struct
32{
33    WORD16 *pi2_y;
34    WORD16 *pi2_u;
35    WORD16 *pi2_v;
36}yuv_buf16_t;
37
38/**
39 * Picture buffer
40 */
41typedef struct
42{
43    UWORD8 *pu1_y;
44    UWORD8 *pu1_u;
45    UWORD8 *pu1_v;
46
47    /** Used to store display Timestamp for current buffer */
48    WORD32 u4_ts;
49    UWORD8 u1_used_as_ref;
50
51    /**
52     * buffer ID from buffer manager
53     */
54    WORD32 i4_buf_id;
55
56    /* To store the buffer's picture type */
57    e_pic_type_t e_pic_type;
58
59}pic_buf_t;
60
61typedef void pf_copy_mb_t (yuv_buf_t *src_buf,
62                   yuv_buf_t *dst_buf,
63                   UWORD32 src_wd,
64                   UWORD32 dst_wd);
65
66typedef void pf_interpred_t(UWORD8 *out,UWORD8 *ref, UWORD32 ref_wid,  UWORD32 out_wid);
67
68typedef void pf_interpolate_t(yuv_buf_t *buf_src1,
69                              yuv_buf_t *buf_src2,
70                              yuv_buf_t *buf_dst,
71                              UWORD32 stride);
72
73pf_interpolate_t impeg2_interpolate;
74pf_interpolate_t impeg2_interpolate_a9q;
75pf_interpolate_t impeg2_interpolate_av8;
76
77pf_copy_mb_t impeg2_copy_mb;
78pf_copy_mb_t impeg2_copy_mb_a9q;
79pf_copy_mb_t impeg2_copy_mb_av8;
80
81pf_interpred_t impeg2_mc_halfx_halfy_8x8;
82pf_interpred_t impeg2_mc_halfx_fully_8x8;
83pf_interpred_t impeg2_mc_fullx_halfy_8x8;
84pf_interpred_t impeg2_mc_fullx_fully_8x8;
85
86pf_interpred_t impeg2_mc_halfx_halfy_8x8_a9q;
87pf_interpred_t impeg2_mc_halfx_fully_8x8_a9q;
88pf_interpred_t impeg2_mc_fullx_halfy_8x8_a9q;
89pf_interpred_t impeg2_mc_fullx_fully_8x8_a9q;
90
91/* AV8 Declarations */
92pf_interpred_t impeg2_mc_halfx_halfy_8x8_av8;
93pf_interpred_t impeg2_mc_halfx_fully_8x8_av8;
94pf_interpred_t impeg2_mc_fullx_halfy_8x8_av8;
95pf_interpred_t impeg2_mc_fullx_fully_8x8_av8;
96
97
98/* SSE4.2 Declarations*/
99pf_copy_mb_t impeg2_copy_mb_sse42;
100pf_interpolate_t impeg2_interpolate_sse42;
101pf_interpred_t impeg2_mc_halfx_halfy_8x8_sse42;
102pf_interpred_t impeg2_mc_halfx_fully_8x8_sse42;
103pf_interpred_t impeg2_mc_fullx_halfy_8x8_sse42;
104pf_interpred_t impeg2_mc_fullx_fully_8x8_sse42;
105
106#endif /* #ifndef __IMPEG2_INTER_PRED_H__  */
107