1 /*
2 * Copyright (c) 2017, Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22 //!
23 //! \file     CMRTKernel_PB_Kernel_def.h
24 //! \brief    HEVC FEI PB parameter definition for GEN9 SKL.
25 //!
26 
27 #ifndef _CMRTKERNEL_PB_KERNEL_DEF_
28 #define _CMRTKERNEL_PB_KERNEL_DEF_
29 
30 #include "HevcEncFei_PB_gen9.h"
31 
32 #define NUM_MBENC_PB_32X32_IC_SURFACES       10
33 #define NUM_MBENC_PB_PAK_SURFACES            11
34 #define NUM_MBENC_PB_MB_SURFACES             27
35 #define NUM_MBENC_P_MB_SURFACES              26
36 
37 #define CURBEDATA_SIZE_PB_32X32_IC           32
38 #define CURBEDATA_SIZE_PB_PAK                (32 * 2)
39 #define CURBEDATA_SIZE_PB_MB                 (32 * 7)
40 
41 #define HEVCENCKERNELNAME_PB_32x32           "Hevc_LCUEnc_PB_32x32_IntraCheck"
42 #define HEVCENCKERNELNAME_PB_PAK             "HEVC_LCUEnc_PB_PAK"
43 #define HEVCENCKERNELNAME_PB_MB              "HEVC_LCUEnc_PB_MB"
44 #define HEVCENCKERNELNAME_P_MB               "HEVC_LCUEnc_P_MB"
45 
46 typedef struct
47 {
48     void     *m_cmSurfPer32x32ICOut;
49     void     *m_cmSurfCurrY;
50     void     *m_cmSurfCurrY2;
51     void     *m_cmSurfSliceMap;
52     void     *m_cmLCUQPSurf;
53     void     *m_cmSurfSIF;
54     void     *m_cmSurfPOCDbuf;
55     void     *m_cmSurfCombinedQP;
56     void     *m_cmBRCConstSurf;
57     void     *m_cmSurfMVIndex;
58     void     *m_cmSurfMVPred;
59     void     *m_cmSurfColRefData;
60     void     *m_cmSurfIntraDist;
61     void     *m_cmSurfMinDist;
62     void     *m_cmSurfVMEIN;
63     void     *m_cmWaveFrontMap;
64     void     *m_cmSurfHaarDist;
65     void     *m_cmSurfFrameStats;
66     void     *m_cmSurfStats;
67     void     *m_cmSurfMVPredictor;
68     void     *m_cmSurfRef0[8];
69     void     *m_cmSurfRef1[8];
70     void     *m_cmSurfPerCTBInput;
71     uint8_t   m_ucRefNum0;
72     uint8_t   m_ucRefNum1;
73     uint32_t  m_width;
74     uint32_t  m_height;
75     uint32_t  m_bufSize;
76     uint32_t  m_bufOffset;
77 } PBFrameKernelParams;
78 
79 typedef struct
80 {
81     CM_WALKING_PARAMETERS   m_walkParams;
82     CM_DEPENDENCY       m_scoreboardParams;
83     uint8_t  m_totalPhase;
84     uint32_t m_currentLocalOuterLoopExecCount;
85     uint32_t m_totalLocalOuterLoopExecCount;
86     uint32_t m_deltaLocalOuterLoopExecCount;
87 } PBMbEncWalkParams;
88 
89 #endif
90