xref: /aosp_15_r20/external/libhevc/decoder/ihevcd_fmt_conv.h (revision c83a76b084498d55f252f48b2e3786804cdf24b7)
1*c83a76b0SSuyog Pawar /******************************************************************************
2*c83a76b0SSuyog Pawar *
3*c83a76b0SSuyog Pawar * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
4*c83a76b0SSuyog Pawar *
5*c83a76b0SSuyog Pawar * Licensed under the Apache License, Version 2.0 (the "License");
6*c83a76b0SSuyog Pawar * you may not use this file except in compliance with the License.
7*c83a76b0SSuyog Pawar * You may obtain a copy of the License at:
8*c83a76b0SSuyog Pawar *
9*c83a76b0SSuyog Pawar * http://www.apache.org/licenses/LICENSE-2.0
10*c83a76b0SSuyog Pawar *
11*c83a76b0SSuyog Pawar * Unless required by applicable law or agreed to in writing, software
12*c83a76b0SSuyog Pawar * distributed under the License is distributed on an "AS IS" BASIS,
13*c83a76b0SSuyog Pawar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*c83a76b0SSuyog Pawar * See the License for the specific language governing permissions and
15*c83a76b0SSuyog Pawar * limitations under the License.
16*c83a76b0SSuyog Pawar *
17*c83a76b0SSuyog Pawar ******************************************************************************/
18*c83a76b0SSuyog Pawar 
19*c83a76b0SSuyog Pawar /**
20*c83a76b0SSuyog Pawar  *******************************************************************************
21*c83a76b0SSuyog Pawar  * @file
22*c83a76b0SSuyog Pawar  *  ihevcd_structs.h
23*c83a76b0SSuyog Pawar  *
24*c83a76b0SSuyog Pawar  * @brief
25*c83a76b0SSuyog Pawar  *  Structure definitions used in the decoder
26*c83a76b0SSuyog Pawar  *
27*c83a76b0SSuyog Pawar  * @author
28*c83a76b0SSuyog Pawar  *  Harish
29*c83a76b0SSuyog Pawar  *
30*c83a76b0SSuyog Pawar  * @par List of Functions:
31*c83a76b0SSuyog Pawar  *
32*c83a76b0SSuyog Pawar  * @remarks
33*c83a76b0SSuyog Pawar  *  None
34*c83a76b0SSuyog Pawar  *
35*c83a76b0SSuyog Pawar  *******************************************************************************
36*c83a76b0SSuyog Pawar  */
37*c83a76b0SSuyog Pawar 
38*c83a76b0SSuyog Pawar #ifndef _IHEVCD_FMT_CONV_H_
39*c83a76b0SSuyog Pawar #define _IHEVCD_FMT_CONV_H_
40*c83a76b0SSuyog Pawar 
41*c83a76b0SSuyog Pawar #define COEFF1          13073
42*c83a76b0SSuyog Pawar #define COEFF2          -3207
43*c83a76b0SSuyog Pawar #define COEFF3          -6664
44*c83a76b0SSuyog Pawar #define COEFF4          16530
45*c83a76b0SSuyog Pawar 
46*c83a76b0SSuyog Pawar typedef void ihevcd_fmt_conv_420sp_to_rgba8888_ft(UWORD8 *pu1_y_src,
47*c83a76b0SSuyog Pawar                                                   UWORD8 *pu1_uv_src,
48*c83a76b0SSuyog Pawar                                                   UWORD32 *pu4_rgba_dst,
49*c83a76b0SSuyog Pawar                                                   WORD32 wd,
50*c83a76b0SSuyog Pawar                                                   WORD32 ht,
51*c83a76b0SSuyog Pawar                                                   WORD32 src_y_strd,
52*c83a76b0SSuyog Pawar                                                   WORD32 src_uv_strd,
53*c83a76b0SSuyog Pawar                                                   WORD32 dst_strd,
54*c83a76b0SSuyog Pawar                                                   WORD32 is_u_first);
55*c83a76b0SSuyog Pawar 
56*c83a76b0SSuyog Pawar typedef void ihevcd_fmt_conv_420sp_to_rgb565_ft(UWORD8 *pu1_y_src,
57*c83a76b0SSuyog Pawar                                                 UWORD8 *pu1_uv_src,
58*c83a76b0SSuyog Pawar                                                 UWORD16 *pu2_rgb_dst,
59*c83a76b0SSuyog Pawar                                                 WORD32 wd,
60*c83a76b0SSuyog Pawar                                                 WORD32 ht,
61*c83a76b0SSuyog Pawar                                                 WORD32 src_y_strd,
62*c83a76b0SSuyog Pawar                                                 WORD32 src_uv_strd,
63*c83a76b0SSuyog Pawar                                                 WORD32 dst_strd,
64*c83a76b0SSuyog Pawar                                                 WORD32 is_u_first);
65*c83a76b0SSuyog Pawar 
66*c83a76b0SSuyog Pawar 
67*c83a76b0SSuyog Pawar typedef void ihevcd_fmt_conv_420sp_to_420sp_ft(UWORD8 *pu1_y_src,
68*c83a76b0SSuyog Pawar                                                UWORD8 *pu1_uv_src,
69*c83a76b0SSuyog Pawar                                                UWORD8 *pu1_y_dst,
70*c83a76b0SSuyog Pawar                                                UWORD8 *pu1_uv_dst,
71*c83a76b0SSuyog Pawar                                                WORD32 wd,
72*c83a76b0SSuyog Pawar                                                WORD32 ht,
73*c83a76b0SSuyog Pawar                                                WORD32 src_y_strd,
74*c83a76b0SSuyog Pawar                                                WORD32 src_uv_strd,
75*c83a76b0SSuyog Pawar                                                WORD32 dst_y_strd,
76*c83a76b0SSuyog Pawar                                                WORD32 dst_uv_strd);
77*c83a76b0SSuyog Pawar typedef void ihevcd_fmt_conv_420sp_to_420p_ft(UWORD8 *pu1_y_src,
78*c83a76b0SSuyog Pawar                                               UWORD8 *pu1_uv_src,
79*c83a76b0SSuyog Pawar                                               UWORD8 *pu1_y_dst,
80*c83a76b0SSuyog Pawar                                               UWORD8 *pu1_u_dst,
81*c83a76b0SSuyog Pawar                                               UWORD8 *pu1_v_dst,
82*c83a76b0SSuyog Pawar                                               WORD32 wd,
83*c83a76b0SSuyog Pawar                                               WORD32 ht,
84*c83a76b0SSuyog Pawar                                               WORD32 src_y_strd,
85*c83a76b0SSuyog Pawar                                               WORD32 src_uv_strd,
86*c83a76b0SSuyog Pawar                                               WORD32 dst_y_strd,
87*c83a76b0SSuyog Pawar                                               WORD32 dst_uv_strd,
88*c83a76b0SSuyog Pawar                                               WORD32 is_u_first,
89*c83a76b0SSuyog Pawar                                               WORD32 disable_luma_copy);
90*c83a76b0SSuyog Pawar 
91*c83a76b0SSuyog Pawar /* C function declarations */
92*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888;
93*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_rgb565_ft ihevcd_fmt_conv_420sp_to_rgb565;
94*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp;
95*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p;
96*c83a76b0SSuyog Pawar 
97*c83a76b0SSuyog Pawar /* A9Q function declarations */
98*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_a9q;
99*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_a9q;
100*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_a9q;
101*c83a76b0SSuyog Pawar 
102*c83a76b0SSuyog Pawar /* A9A function declarations */
103*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_a9a;
104*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_a9a;
105*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_a9a;
106*c83a76b0SSuyog Pawar 
107*c83a76b0SSuyog Pawar /* SSSe31 function declarations */
108*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_ssse3;
109*c83a76b0SSuyog Pawar 
110*c83a76b0SSuyog Pawar /* SSE4 function declarations */
111*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_sse42;
112*c83a76b0SSuyog Pawar 
113*c83a76b0SSuyog Pawar /* armv8 function declarations */
114*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_av8;
115*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_av8;
116*c83a76b0SSuyog Pawar ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_av8;
117*c83a76b0SSuyog Pawar 
118*c83a76b0SSuyog Pawar #endif /* _IHEVCD_FMT_CONV_H_ */
119