| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef _MEDIA_LIBVA_VP_H_ |
| 28 |
#define _MEDIA_LIBVA_VP_H_ |
| 29 |
|
| 30 |
#include "media_libva_common.h" |
| 31 |
#include "media_libva_cp_interface.h" |
| 32 |
#include <va/va.h> |
| 33 |
#include <va/va_vpp.h> |
| 34 |
#include <va/va_backend_vpp.h> |
| 35 |
#include "vphal.h" |
| 36 |
#include "mos_os.h" |
| 37 |
#include "ddi_vp_functions.h" |
| 38 |
|
| 39 |
|
| 40 |
#define VP_MAX_PIC_WIDTH_Gen8 16352 |
| 41 |
#define VP_MAX_PIC_HEIGHT_Gen8 16352 |
| 42 |
|
| 43 |
#define VP_MAX_PIC_WIDTH 16384 |
| 44 |
#define VP_MAX_PIC_HEIGHT 16384 |
| 45 |
|
| 46 |
#define VP_MIN_PIC_WIDTH 16 |
| 47 |
#define VP_MIN_PIC_HEIGHT 16 |
| 48 |
|
| 49 |
#define NUM_SURFS 1 |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
VAStatus DdiVp_CreateContext( |
| 54 |
VADriverContextP pVaDrvCtx, |
| 55 |
VAConfigID vaConfigID, |
| 56 |
int32_t iWidth, |
| 57 |
int32_t iHeight, |
| 58 |
int32_t iFlag, |
| 59 |
VASurfaceID *vaSurfIDs, |
| 60 |
int32_t iNumSurfs, |
| 61 |
VAContextID *pVaCtxID |
| 62 |
); |
| 63 |
|
| 64 |
VAStatus DdiVp_DestroyContext( |
| 65 |
VADriverContextP pVaDrvCtx, |
| 66 |
VAContextID vaCtxID |
| 67 |
); |
| 68 |
|
| 69 |
VAStatus DdiVp_CreateBuffer( |
| 70 |
VADriverContextP ctx, |
| 71 |
void *pDecCtx, |
| 72 |
VABufferType type, |
| 73 |
uint32_t size, |
| 74 |
uint32_t num_elements, |
| 75 |
void *pData, |
| 76 |
VABufferID *pBufId |
| 77 |
); |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
VAStatus DdiVp_CreateConfig( |
| 85 |
VAProfile profile, |
| 86 |
VAEntrypoint entrypoint, |
| 87 |
VAConfigAttrib *attrib_list, |
| 88 |
int32_t num_attribs, |
| 89 |
VAConfigID *config_id |
| 90 |
); |
| 91 |
|
| 92 |
VAStatus DdiVp_BeginPicture( |
| 93 |
VADriverContextP pVaDrvCtx, |
| 94 |
VAContextID vaCtxID, |
| 95 |
VASurfaceID vaSurfID |
| 96 |
); |
| 97 |
|
| 98 |
VAStatus DdiVp_EndPicture( |
| 99 |
VADriverContextP pVaDrvCtx, |
| 100 |
VAContextID vaCtxID |
| 101 |
); |
| 102 |
|
| 103 |
VAStatus DdiVp_RenderPicture( |
| 104 |
VADriverContextP pVaDrvCtx, |
| 105 |
VAContextID vpCtxID, |
| 106 |
VABufferID* buffers, |
| 107 |
int32_t num_buffers |
| 108 |
); |
| 109 |
|
| 110 |
VAStatus DdiVp_VideoProcessPipeline( |
| 111 |
VADriverContextP pVaDrvCtx, |
| 112 |
VAContextID vpCtxID, |
| 113 |
VASurfaceID srcSurface, |
| 114 |
VARectangle *srcRect, |
| 115 |
VASurfaceID dstSurface, |
| 116 |
VARectangle *dstRect |
| 117 |
); |
| 118 |
|
| 119 |
VAStatus DdiVp_QueryVideoProcFilterCaps( |
| 120 |
VADriverContextP ctx, |
| 121 |
VAContextID context, |
| 122 |
int32_t type, |
| 123 |
void *filter_caps, |
| 124 |
uint32_t *num_filter_caps |
| 125 |
); |
| 126 |
|
| 127 |
VAStatus DdiVp_SetProcPipelineParams( |
| 128 |
VADriverContextP pVaDrvCtx, |
| 129 |
PDDI_VP_CONTEXT pVpCtx, |
| 130 |
VAProcPipelineParameterBuffer* pPipelineParam |
| 131 |
); |
| 132 |
|
| 133 |
PVPHAL_RENDER_PARAMS VpGetRenderParams(PDDI_VP_CONTEXT pVpCtx); |
| 134 |
|
| 135 |
PDDI_VP_CONTEXT DdiVp_GetVpContextFromContextID(VADriverContextP ctx, VAContextID vaCtxID); |
| 136 |
|
| 137 |
VAStatus DdiVp_SetGpuPriority( |
| 138 |
PDDI_VP_CONTEXT pVpCtx, |
| 139 |
int32_t priority |
| 140 |
); |
| 141 |
#endif |
| 142 |
|