xref: /aosp_15_r20/external/libavc/encoder/svc/isvce_me.h (revision 495ae853bb871d1e5a258cb02c2cc13cde8ddb9a)
1*495ae853SAndroid Build Coastguard Worker /******************************************************************************
2*495ae853SAndroid Build Coastguard Worker  *
3*495ae853SAndroid Build Coastguard Worker  * Copyright (C) 2022 The Android Open Source Project
4*495ae853SAndroid Build Coastguard Worker  *
5*495ae853SAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
6*495ae853SAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
7*495ae853SAndroid Build Coastguard Worker  * You may obtain a copy of the License at:
8*495ae853SAndroid Build Coastguard Worker  *
9*495ae853SAndroid Build Coastguard Worker  * http://www.apache.org/licenses/LICENSE-2.0
10*495ae853SAndroid Build Coastguard Worker  *
11*495ae853SAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
12*495ae853SAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
13*495ae853SAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*495ae853SAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
15*495ae853SAndroid Build Coastguard Worker  * limitations under the License.
16*495ae853SAndroid Build Coastguard Worker  *
17*495ae853SAndroid Build Coastguard Worker  *****************************************************************************
18*495ae853SAndroid Build Coastguard Worker  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19*495ae853SAndroid Build Coastguard Worker  */
20*495ae853SAndroid Build Coastguard Worker 
21*495ae853SAndroid Build Coastguard Worker /**
22*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
23*495ae853SAndroid Build Coastguard Worker  * @file
24*495ae853SAndroid Build Coastguard Worker  *  isvce_me.h
25*495ae853SAndroid Build Coastguard Worker  *
26*495ae853SAndroid Build Coastguard Worker  * @brief
27*495ae853SAndroid Build Coastguard Worker  *  Contains declarations of global variables for H264 encoder
28*495ae853SAndroid Build Coastguard Worker  *
29*495ae853SAndroid Build Coastguard Worker  * @author
30*495ae853SAndroid Build Coastguard Worker  *  ittiam
31*495ae853SAndroid Build Coastguard Worker  *
32*495ae853SAndroid Build Coastguard Worker  * @remarks
33*495ae853SAndroid Build Coastguard Worker  *
34*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
35*495ae853SAndroid Build Coastguard Worker  */
36*495ae853SAndroid Build Coastguard Worker 
37*495ae853SAndroid Build Coastguard Worker #ifndef _ISVCE_ME_H_
38*495ae853SAndroid Build Coastguard Worker #define _ISVCE_ME_H_
39*495ae853SAndroid Build Coastguard Worker 
40*495ae853SAndroid Build Coastguard Worker #include "ih264_typedefs.h"
41*495ae853SAndroid Build Coastguard Worker 
42*495ae853SAndroid Build Coastguard Worker #include "isvce_structs.h"
43*495ae853SAndroid Build Coastguard Worker 
44*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
45*495ae853SAndroid Build Coastguard Worker /* Constant Macros                                                           */
46*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
47*495ae853SAndroid Build Coastguard Worker 
48*495ae853SAndroid Build Coastguard Worker /**
49*495ae853SAndroid Build Coastguard Worker ******************************************************************************
50*495ae853SAndroid Build Coastguard Worker *  @brief     Skip Bias value for P slice
51*495ae853SAndroid Build Coastguard Worker ******************************************************************************
52*495ae853SAndroid Build Coastguard Worker */
53*495ae853SAndroid Build Coastguard Worker #define SKIP_BIAS_P 0
54*495ae853SAndroid Build Coastguard Worker 
55*495ae853SAndroid Build Coastguard Worker /**
56*495ae853SAndroid Build Coastguard Worker ******************************************************************************
57*495ae853SAndroid Build Coastguard Worker *  @brief     Skip Bias value for B slice
58*495ae853SAndroid Build Coastguard Worker ******************************************************************************
59*495ae853SAndroid Build Coastguard Worker */
60*495ae853SAndroid Build Coastguard Worker #define SKIP_BIAS_B 0
61*495ae853SAndroid Build Coastguard Worker 
62*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
63*495ae853SAndroid Build Coastguard Worker /* Function Macros                                                           */
64*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
65*495ae853SAndroid Build Coastguard Worker 
66*495ae853SAndroid Build Coastguard Worker /**
67*495ae853SAndroid Build Coastguard Worker  ******************************************************************************
68*495ae853SAndroid Build Coastguard Worker  *  @brief      compute median of 3 elements (a, b, c) and store the output
69*495ae853SAndroid Build Coastguard Worker  *  in to result. This is used for mv prediction
70*495ae853SAndroid Build Coastguard Worker  ******************************************************************************
71*495ae853SAndroid Build Coastguard Worker  */
72*495ae853SAndroid Build Coastguard Worker 
73*495ae853SAndroid Build Coastguard Worker #define MEDIAN(a, b, c, result) \
74*495ae853SAndroid Build Coastguard Worker     if(a > b)                   \
75*495ae853SAndroid Build Coastguard Worker     {                           \
76*495ae853SAndroid Build Coastguard Worker         if(b > c)               \
77*495ae853SAndroid Build Coastguard Worker             result = b;         \
78*495ae853SAndroid Build Coastguard Worker         else                    \
79*495ae853SAndroid Build Coastguard Worker         {                       \
80*495ae853SAndroid Build Coastguard Worker             if(a > c)           \
81*495ae853SAndroid Build Coastguard Worker                 result = c;     \
82*495ae853SAndroid Build Coastguard Worker             else                \
83*495ae853SAndroid Build Coastguard Worker                 result = a;     \
84*495ae853SAndroid Build Coastguard Worker         }                       \
85*495ae853SAndroid Build Coastguard Worker     }                           \
86*495ae853SAndroid Build Coastguard Worker     else                        \
87*495ae853SAndroid Build Coastguard Worker     {                           \
88*495ae853SAndroid Build Coastguard Worker         if(c > b)               \
89*495ae853SAndroid Build Coastguard Worker             result = b;         \
90*495ae853SAndroid Build Coastguard Worker         else                    \
91*495ae853SAndroid Build Coastguard Worker         {                       \
92*495ae853SAndroid Build Coastguard Worker             if(c > a)           \
93*495ae853SAndroid Build Coastguard Worker                 result = c;     \
94*495ae853SAndroid Build Coastguard Worker             else                \
95*495ae853SAndroid Build Coastguard Worker                 result = a;     \
96*495ae853SAndroid Build Coastguard Worker         }                       \
97*495ae853SAndroid Build Coastguard Worker     }
98*495ae853SAndroid Build Coastguard Worker 
99*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
100*495ae853SAndroid Build Coastguard Worker /* Extern Function Declarations                                              */
101*495ae853SAndroid Build Coastguard Worker /*****************************************************************************/
102*495ae853SAndroid Build Coastguard Worker 
103*495ae853SAndroid Build Coastguard Worker /**
104*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
105*495ae853SAndroid Build Coastguard Worker  *
106*495ae853SAndroid Build Coastguard Worker  * @brief
107*495ae853SAndroid Build Coastguard Worker  *  This function populates the length of the codewords for motion vectors in
108*495ae853SAndroid Build Coastguard Worker  *the range (-search range, search range) in pixels
109*495ae853SAndroid Build Coastguard Worker  *
110*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_me
111*495ae853SAndroid Build Coastguard Worker  *  Pointer to me ctxt
112*495ae853SAndroid Build Coastguard Worker  *
113*495ae853SAndroid Build Coastguard Worker  * @param[out] pu1_mv_bits
114*495ae853SAndroid Build Coastguard Worker  *  length of the codeword for all mv's
115*495ae853SAndroid Build Coastguard Worker  *
116*495ae853SAndroid Build Coastguard Worker  * @remarks The length of the code words are derived from signed exponential
117*495ae853SAndroid Build Coastguard Worker  * goloumb codes.
118*495ae853SAndroid Build Coastguard Worker  *
119*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
120*495ae853SAndroid Build Coastguard Worker  */
121*495ae853SAndroid Build Coastguard Worker void isvce_init_mv_bits(isvce_me_ctxt_t *ps_me);
122*495ae853SAndroid Build Coastguard Worker 
123*495ae853SAndroid Build Coastguard Worker /**
124*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
125*495ae853SAndroid Build Coastguard Worker  *
126*495ae853SAndroid Build Coastguard Worker  * @brief The function computes the parameters for a P skip MB
127*495ae853SAndroid Build Coastguard Worker  *
128*495ae853SAndroid Build Coastguard Worker  * @par Description:
129*495ae853SAndroid Build Coastguard Worker  *  The function computes the parameters for a P skip MB
130*495ae853SAndroid Build Coastguard Worker  *
131*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
132*495ae853SAndroid Build Coastguard Worker  *  Process context
133*495ae853SAndroid Build Coastguard Worker  *
134*495ae853SAndroid Build Coastguard Worker  * @param[in] u4_for_me
135*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the purpose of computing skip
136*495ae853SAndroid Build Coastguard Worker  *
137*495ae853SAndroid Build Coastguard Worker  * @param[out] ps_pred_mv
138*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the current active refernce list
139*495ae853SAndroid Build Coastguard Worker  *
140*495ae853SAndroid Build Coastguard Worker  * @returns
141*495ae853SAndroid Build Coastguard Worker  *       1) Updates skip MV in proc
142*495ae853SAndroid Build Coastguard Worker  *       2) Returns if the current MB can be coded as skip or not
143*495ae853SAndroid Build Coastguard Worker  *
144*495ae853SAndroid Build Coastguard Worker  * @remarks The code implements the logic as described in sec 8.4.1.1 in H264
145*495ae853SAndroid Build Coastguard Worker  *   specification.
146*495ae853SAndroid Build Coastguard Worker  *
147*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
148*495ae853SAndroid Build Coastguard Worker  */
149*495ae853SAndroid Build Coastguard Worker FT_FIND_SKIP_PARAMS isvce_find_pskip_params;
150*495ae853SAndroid Build Coastguard Worker 
151*495ae853SAndroid Build Coastguard Worker /**
152*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
153*495ae853SAndroid Build Coastguard Worker  *
154*495ae853SAndroid Build Coastguard Worker  * @brief The function computes the parameters for a P skip MB
155*495ae853SAndroid Build Coastguard Worker  *
156*495ae853SAndroid Build Coastguard Worker  * @par Description:
157*495ae853SAndroid Build Coastguard Worker  *  The function computes the parameters for a P skip MB
158*495ae853SAndroid Build Coastguard Worker  *
159*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
160*495ae853SAndroid Build Coastguard Worker  *  Process context
161*495ae853SAndroid Build Coastguard Worker  *
162*495ae853SAndroid Build Coastguard Worker  * @param[in] u4_for_me
163*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the purpose of computing skip
164*495ae853SAndroid Build Coastguard Worker  *
165*495ae853SAndroid Build Coastguard Worker  * @param[out] ps_pred_mv
166*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the current active refernce list
167*495ae853SAndroid Build Coastguard Worker  *
168*495ae853SAndroid Build Coastguard Worker  * @returns
169*495ae853SAndroid Build Coastguard Worker  *       1) Updates skip MV in proc
170*495ae853SAndroid Build Coastguard Worker  *       2) Returns if the current MB can be coded as skip or not
171*495ae853SAndroid Build Coastguard Worker  *
172*495ae853SAndroid Build Coastguard Worker  * @remarks The code implements the logic as described in sec 8.4.1.1 in H264
173*495ae853SAndroid Build Coastguard Worker  *   specification.
174*495ae853SAndroid Build Coastguard Worker  *
175*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
176*495ae853SAndroid Build Coastguard Worker  */
177*495ae853SAndroid Build Coastguard Worker FT_FIND_SKIP_PARAMS isvce_find_pskip_params_me;
178*495ae853SAndroid Build Coastguard Worker 
179*495ae853SAndroid Build Coastguard Worker /**
180*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
181*495ae853SAndroid Build Coastguard Worker  *
182*495ae853SAndroid Build Coastguard Worker  * @brief The function computes the parameters for a B skip MB
183*495ae853SAndroid Build Coastguard Worker  *
184*495ae853SAndroid Build Coastguard Worker  * @par Description:
185*495ae853SAndroid Build Coastguard Worker  *  The function computes the parameters for a B skip MB
186*495ae853SAndroid Build Coastguard Worker  *
187*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
188*495ae853SAndroid Build Coastguard Worker  *  Process context
189*495ae853SAndroid Build Coastguard Worker  *
190*495ae853SAndroid Build Coastguard Worker  * @param[in] u4_for_me
191*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the purpose of computing skip
192*495ae853SAndroid Build Coastguard Worker  *
193*495ae853SAndroid Build Coastguard Worker  * @param[out] ps_pred_mv
194*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the current active refernce list
195*495ae853SAndroid Build Coastguard Worker  *
196*495ae853SAndroid Build Coastguard Worker  * @returns
197*495ae853SAndroid Build Coastguard Worker  *       1) Updates skip MV in proc
198*495ae853SAndroid Build Coastguard Worker  *       2) Returns if the current MB can be coded as skip or not
199*495ae853SAndroid Build Coastguard Worker  *
200*495ae853SAndroid Build Coastguard Worker  * @remarks The code implements the logic as described in sec 8.4.1.1 in H264
201*495ae853SAndroid Build Coastguard Worker  *   specification.
202*495ae853SAndroid Build Coastguard Worker  *
203*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
204*495ae853SAndroid Build Coastguard Worker  */
205*495ae853SAndroid Build Coastguard Worker FT_FIND_SKIP_PARAMS isvce_find_bskip_params;
206*495ae853SAndroid Build Coastguard Worker 
207*495ae853SAndroid Build Coastguard Worker /**
208*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
209*495ae853SAndroid Build Coastguard Worker  *
210*495ae853SAndroid Build Coastguard Worker  * @brief The function computes the parameters for a B skip MB
211*495ae853SAndroid Build Coastguard Worker  *
212*495ae853SAndroid Build Coastguard Worker  * @par Description:
213*495ae853SAndroid Build Coastguard Worker  *  The function computes the parameters for a B skip MB
214*495ae853SAndroid Build Coastguard Worker  *
215*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
216*495ae853SAndroid Build Coastguard Worker  *  Process context
217*495ae853SAndroid Build Coastguard Worker  *
218*495ae853SAndroid Build Coastguard Worker  * @param[in] u4_for_me
219*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the purpose of computing skip
220*495ae853SAndroid Build Coastguard Worker  *
221*495ae853SAndroid Build Coastguard Worker  * @param[out] ps_pred_mv
222*495ae853SAndroid Build Coastguard Worker  *  Flag to indicate the current active refernce list
223*495ae853SAndroid Build Coastguard Worker  *
224*495ae853SAndroid Build Coastguard Worker  * @returns
225*495ae853SAndroid Build Coastguard Worker  *       1) Updates skip MV in proc
226*495ae853SAndroid Build Coastguard Worker  *       2) The type of SKIP [L0/L1/BI]
227*495ae853SAndroid Build Coastguard Worker  *
228*495ae853SAndroid Build Coastguard Worker  * @remarks
229*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
230*495ae853SAndroid Build Coastguard Worker  */
231*495ae853SAndroid Build Coastguard Worker FT_FIND_SKIP_PARAMS isvce_find_bskip_params_me;
232*495ae853SAndroid Build Coastguard Worker 
233*495ae853SAndroid Build Coastguard Worker /**
234*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
235*495ae853SAndroid Build Coastguard Worker  *
236*495ae853SAndroid Build Coastguard Worker  * @brief motion vector predictor
237*495ae853SAndroid Build Coastguard Worker  *
238*495ae853SAndroid Build Coastguard Worker  * @par Description:
239*495ae853SAndroid Build Coastguard Worker  *  The routine calculates the motion vector predictor for a given block,
240*495ae853SAndroid Build Coastguard Worker  *  given the candidate MV predictors.
241*495ae853SAndroid Build Coastguard Worker  *
242*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_left_mb_pu
243*495ae853SAndroid Build Coastguard Worker  *  pointer to left mb motion vector info
244*495ae853SAndroid Build Coastguard Worker  *
245*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_top_row_pu
246*495ae853SAndroid Build Coastguard Worker  *  pointer to top & top right mb motion vector info
247*495ae853SAndroid Build Coastguard Worker  *
248*495ae853SAndroid Build Coastguard Worker  * @param[out] ps_pred_mv
249*495ae853SAndroid Build Coastguard Worker  *  pointer to candidate predictors for the current block
250*495ae853SAndroid Build Coastguard Worker  *
251*495ae853SAndroid Build Coastguard Worker  * @returns  The x & y components of the MV predictor.
252*495ae853SAndroid Build Coastguard Worker  *
253*495ae853SAndroid Build Coastguard Worker  * @remarks The code implements the logic as described in sec 8.4.1.3 in H264
254*495ae853SAndroid Build Coastguard Worker  *   specification.
255*495ae853SAndroid Build Coastguard Worker  *   Assumptions : 1. Assumes Only partition of size 16x16
256*495ae853SAndroid Build Coastguard Worker  *
257*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
258*495ae853SAndroid Build Coastguard Worker  */
259*495ae853SAndroid Build Coastguard Worker void isvce_get_mv_predictor(isvce_enc_pu_mv_t *ps_pred_mv, isvce_enc_pu_mv_t *ps_neig_mv,
260*495ae853SAndroid Build Coastguard Worker                             WORD32 pred_algo);
261*495ae853SAndroid Build Coastguard Worker 
262*495ae853SAndroid Build Coastguard Worker /**
263*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
264*495ae853SAndroid Build Coastguard Worker  *
265*495ae853SAndroid Build Coastguard Worker  * @brief This fucntion evalues ME for 2 reference lists
266*495ae853SAndroid Build Coastguard Worker  *
267*495ae853SAndroid Build Coastguard Worker  * @par Description:
268*495ae853SAndroid Build Coastguard Worker  *  It evaluates skip, full-pel an half-pel and assigns the correct MV in proc
269*495ae853SAndroid Build Coastguard Worker  *
270*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
271*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
272*495ae853SAndroid Build Coastguard Worker  *
273*495ae853SAndroid Build Coastguard Worker  * @returns  none
274*495ae853SAndroid Build Coastguard Worker  *
275*495ae853SAndroid Build Coastguard Worker  * @remarks none
276*495ae853SAndroid Build Coastguard Worker  *
277*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
278*495ae853SAndroid Build Coastguard Worker  */
279*495ae853SAndroid Build Coastguard Worker FT_ME_ALGORITHM isvce_compute_me_multi_reflist;
280*495ae853SAndroid Build Coastguard Worker 
281*495ae853SAndroid Build Coastguard Worker /**
282*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
283*495ae853SAndroid Build Coastguard Worker  *
284*495ae853SAndroid Build Coastguard Worker  * @brief This fucntion evalues ME for single reflist [Pred L0]
285*495ae853SAndroid Build Coastguard Worker  *
286*495ae853SAndroid Build Coastguard Worker  * @par Description:
287*495ae853SAndroid Build Coastguard Worker  *  It evaluates skip, full-pel an half-pel and assigns the correct MV in proc
288*495ae853SAndroid Build Coastguard Worker  *
289*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
290*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
291*495ae853SAndroid Build Coastguard Worker  *
292*495ae853SAndroid Build Coastguard Worker  * @returns  none
293*495ae853SAndroid Build Coastguard Worker  *
294*495ae853SAndroid Build Coastguard Worker  * @remarks none
295*495ae853SAndroid Build Coastguard Worker  *
296*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
297*495ae853SAndroid Build Coastguard Worker  */
298*495ae853SAndroid Build Coastguard Worker FT_ME_ALGORITHM isvce_compute_me_single_reflist;
299*495ae853SAndroid Build Coastguard Worker 
300*495ae853SAndroid Build Coastguard Worker /**
301*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
302*495ae853SAndroid Build Coastguard Worker  *
303*495ae853SAndroid Build Coastguard Worker  * @brief This function initializes me ctxt
304*495ae853SAndroid Build Coastguard Worker  *
305*495ae853SAndroid Build Coastguard Worker  * @par Description:
306*495ae853SAndroid Build Coastguard Worker  *  Before dispatching the current job to me thread, the me context associated
307*495ae853SAndroid Build Coastguard Worker  *  with the job is initialized.
308*495ae853SAndroid Build Coastguard Worker  *
309*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
310*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
311*495ae853SAndroid Build Coastguard Worker  *
312*495ae853SAndroid Build Coastguard Worker  * @returns  none
313*495ae853SAndroid Build Coastguard Worker  *
314*495ae853SAndroid Build Coastguard Worker  * @remarks none
315*495ae853SAndroid Build Coastguard Worker  *
316*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
317*495ae853SAndroid Build Coastguard Worker  */
318*495ae853SAndroid Build Coastguard Worker void isvce_init_me(isvce_process_ctxt_t *ps_proc);
319*495ae853SAndroid Build Coastguard Worker 
320*495ae853SAndroid Build Coastguard Worker /**
321*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
322*495ae853SAndroid Build Coastguard Worker  *
323*495ae853SAndroid Build Coastguard Worker  * @brief This function performs motion estimation for the current NMB
324*495ae853SAndroid Build Coastguard Worker  *
325*495ae853SAndroid Build Coastguard Worker  * @par Description:
326*495ae853SAndroid Build Coastguard Worker  *  Intializes input and output pointers required by the function
327*495ae853SAndroid Build Coastguard Worker  *isvce_compute_me and calls the function isvce_compute_me in a loop to
328*495ae853SAndroid Build Coastguard Worker  *process NMBs.
329*495ae853SAndroid Build Coastguard Worker  *
330*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
331*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
332*495ae853SAndroid Build Coastguard Worker  *
333*495ae853SAndroid Build Coastguard Worker  * @returns
334*495ae853SAndroid Build Coastguard Worker  *
335*495ae853SAndroid Build Coastguard Worker  * @remarks none
336*495ae853SAndroid Build Coastguard Worker  *
337*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
338*495ae853SAndroid Build Coastguard Worker  */
339*495ae853SAndroid Build Coastguard Worker void isvce_compute_me_nmb(isvce_process_ctxt_t *ps_proc, UWORD32 u4_nmb_count);
340*495ae853SAndroid Build Coastguard Worker 
341*495ae853SAndroid Build Coastguard Worker /**
342*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
343*495ae853SAndroid Build Coastguard Worker  *
344*495ae853SAndroid Build Coastguard Worker  * @brief This function performs MV prediction
345*495ae853SAndroid Build Coastguard Worker  *
346*495ae853SAndroid Build Coastguard Worker  * @par Description:
347*495ae853SAndroid Build Coastguard Worker  *
348*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
349*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
350*495ae853SAndroid Build Coastguard Worker  *
351*495ae853SAndroid Build Coastguard Worker  * @returns  none
352*495ae853SAndroid Build Coastguard Worker  *
353*495ae853SAndroid Build Coastguard Worker  * @remarks none
354*495ae853SAndroid Build Coastguard Worker  *  This function will update the MB availability since intra inter decision
355*495ae853SAndroid Build Coastguard Worker  *  should be done before the call
356*495ae853SAndroid Build Coastguard Worker  *
357*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
358*495ae853SAndroid Build Coastguard Worker  */
359*495ae853SAndroid Build Coastguard Worker void isvce_mv_pred(isvce_process_ctxt_t *ps_proc, WORD32 i4_reflist);
360*495ae853SAndroid Build Coastguard Worker 
361*495ae853SAndroid Build Coastguard Worker /**
362*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
363*495ae853SAndroid Build Coastguard Worker  *
364*495ae853SAndroid Build Coastguard Worker  * @brief This function approximates Pred. MV
365*495ae853SAndroid Build Coastguard Worker  *
366*495ae853SAndroid Build Coastguard Worker  * @par Description:
367*495ae853SAndroid Build Coastguard Worker  *
368*495ae853SAndroid Build Coastguard Worker  * @param[in] ps_proc
369*495ae853SAndroid Build Coastguard Worker  *  Process context corresponding to the job
370*495ae853SAndroid Build Coastguard Worker  *
371*495ae853SAndroid Build Coastguard Worker  * @returns  none
372*495ae853SAndroid Build Coastguard Worker  *
373*495ae853SAndroid Build Coastguard Worker  * @remarks none
374*495ae853SAndroid Build Coastguard Worker  *  Motion estimation happens at nmb level. For cost calculations, mv is appro
375*495ae853SAndroid Build Coastguard Worker  *  ximated using this function
376*495ae853SAndroid Build Coastguard Worker  *
377*495ae853SAndroid Build Coastguard Worker  *******************************************************************************
378*495ae853SAndroid Build Coastguard Worker  */
379*495ae853SAndroid Build Coastguard Worker void isvce_mv_pred_me(isvce_process_ctxt_t *ps_proc, WORD32 i4_ref_list);
380*495ae853SAndroid Build Coastguard Worker 
381*495ae853SAndroid Build Coastguard Worker #endif
382