xref: /aosp_15_r20/external/libavc/encoder/svc/isvce_mc.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1 /******************************************************************************
2  *
3  * Copyright (C) 2022 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 *  isvce_mc.h
25 *
26 * @brief
27 *  This file contains declarations of routines that perform motion compensation
28 *  of luma and chroma macroblocks.
29 *
30 * @author
31 *  ittiam
32 *
33 * @remarks
34 *  none
35 *
36 *******************************************************************************
37 */
38 #ifndef _ISVCE_MC_H_
39 #define _ISVCE_MC_H_
40 
41 /**
42 ******************************************************************************
43 *
44 * @brief
45 *  performs motion compensation for a luma mb for the given mv.
46 *
47 * @par Description
48 *  This routine performs motion compensation of an inter mb. When the inter
49 *  mb mode is P16x16, there is no need to copy 16x16 unit from reference buffer
50 *  to pred buffer. In this case the function returns pointer and stride of the
51 *  ref. buffer and this info is used in place of pred buffer else where.
52 *  In other cases, the pred buffer is populated via copy / filtering + copy
53 *  (q pel cases) and returned.
54 *
55 * @param[in] ps_proc
56 *  pointer to current proc ctxt
57 *
58 * @return  none
59 *
60 * @remarks Assumes half pel buffers for the entire frame are populated.
61 *
62 ******************************************************************************
63 */
64 extern void isvce_motion_comp_luma(isvce_process_ctxt_t *ps_proc, buffer_container_t *ps_pred);
65 
66 /**
67 ******************************************************************************
68 *
69 * @brief
70 *  performs motion compensation for chroma mb
71 *
72 * @par   Description
73 *  Copies a MB of data from the reference buffer (Full pel, half pel or q pel)
74 *  according to the motion vectors given
75 *
76 * @param[in] ps_proc
77 *  pointer to current proc ctxt
78 *
79 * @return  none
80 *
81 * @remarks Assumes half pel and quarter pel buffers for the entire frame are
82 *  populated.
83 ******************************************************************************
84 */
85 extern void isvce_motion_comp_chroma(isvce_process_ctxt_t *ps_proc, buffer_container_t *ps_pred);
86 
87 #endif
88