linux/drivers/media/platform/qcom/venus/hfi_helper.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 * Copyright (C) 2017 Linaro Ltd.
 */
#ifndef __VENUS_HFI_HELPER_H__
#define __VENUS_HFI_HELPER_H__

#define HFI_DOMAIN_BASE_COMMON

#define HFI_DOMAIN_BASE_VDEC
#define HFI_DOMAIN_BASE_VENC
#define HFI_DOMAIN_BASE_VPE

#define HFI_VIDEO_ARCH_OX

#define HFI_ARCH_COMMON_OFFSET
#define HFI_ARCH_OX_OFFSET

#define HFI_OX_BASE

#define HFI_CMD_START_OFFSET
#define HFI_MSG_START_OFFSET

#define HFI_ERR_NONE
#define HFI_ERR_SYS_FATAL
#define HFI_ERR_SYS_INVALID_PARAMETER
#define HFI_ERR_SYS_VERSION_MISMATCH
#define HFI_ERR_SYS_INSUFFICIENT_RESOURCES
#define HFI_ERR_SYS_MAX_SESSIONS_REACHED
#define HFI_ERR_SYS_UNSUPPORTED_CODEC
#define HFI_ERR_SYS_SESSION_IN_USE
#define HFI_ERR_SYS_SESSION_ID_OUT_OF_RANGE
#define HFI_ERR_SYS_UNSUPPORTED_DOMAIN

#define HFI_ERR_SESSION_FATAL
#define HFI_ERR_SESSION_INVALID_PARAMETER
#define HFI_ERR_SESSION_BAD_POINTER
#define HFI_ERR_SESSION_INVALID_SESSION_ID
#define HFI_ERR_SESSION_INVALID_STREAM_ID
#define HFI_ERR_SESSION_INCORRECT_STATE_OPERATION
#define HFI_ERR_SESSION_UNSUPPORTED_PROPERTY
#define HFI_ERR_SESSION_UNSUPPORTED_SETTING
#define HFI_ERR_SESSION_INSUFFICIENT_RESOURCES
#define HFI_ERR_SESSION_STREAM_CORRUPT_OUTPUT_STALLED
#define HFI_ERR_SESSION_STREAM_CORRUPT
#define HFI_ERR_SESSION_ENC_OVERFLOW
#define HFI_ERR_SESSION_UNSUPPORTED_STREAM
#define HFI_ERR_SESSION_CMDSIZE
#define HFI_ERR_SESSION_UNSUPPORT_CMD
#define HFI_ERR_SESSION_UNSUPPORT_BUFFERTYPE
#define HFI_ERR_SESSION_BUFFERCOUNT_TOOSMALL
#define HFI_ERR_SESSION_INVALID_SCALE_FACTOR
#define HFI_ERR_SESSION_UPSCALE_NOT_SUPPORTED

#define HFI_EVENT_SYS_ERROR
#define HFI_EVENT_SESSION_ERROR

#define HFI_EVENT_DATA_SEQUENCE_CHANGED_SUFFICIENT_BUF_RESOURCES
#define HFI_EVENT_DATA_SEQUENCE_CHANGED_INSUFFICIENT_BUF_RESOURCES
#define HFI_EVENT_SESSION_SEQUENCE_CHANGED
#define HFI_EVENT_SESSION_PROPERTY_CHANGED
#define HFI_EVENT_SESSION_LTRUSE_FAILED
#define HFI_EVENT_RELEASE_BUFFER_REFERENCE

#define HFI_BUFFERFLAG_EOS
#define HFI_BUFFERFLAG_STARTTIME
#define HFI_BUFFERFLAG_DECODEONLY
#define HFI_BUFFERFLAG_DATACORRUPT
#define HFI_BUFFERFLAG_ENDOFFRAME
#define HFI_BUFFERFLAG_SYNCFRAME
#define HFI_BUFFERFLAG_EXTRADATA
#define HFI_BUFFERFLAG_CODECCONFIG
#define HFI_BUFFERFLAG_TIMESTAMPINVALID
#define HFI_BUFFERFLAG_READONLY
#define HFI_BUFFERFLAG_ENDOFSUBFRAME
#define HFI_BUFFERFLAG_EOSEQ
#define HFI_BUFFERFLAG_MBAFF
#define HFI_BUFFERFLAG_VPE_YUV_601_709_CSC_CLAMP
#define HFI_BUFFERFLAG_DROP_FRAME
#define HFI_BUFFERFLAG_TEI
#define HFI_BUFFERFLAG_DISCONTINUITY

#define HFI_ERR_SESSION_EMPTY_BUFFER_DONE_OUTPUT_PENDING
#define HFI_ERR_SESSION_SAME_STATE_OPERATION
#define HFI_ERR_SESSION_SYNC_FRAME_NOT_DETECTED
#define HFI_ERR_SESSION_START_CODE_NOT_FOUND

#define HFI_FLUSH_INPUT
#define HFI_FLUSH_OUTPUT
#define HFI_FLUSH_OUTPUT2
#define HFI_FLUSH_ALL

#define HFI_EXTRADATA_NONE
#define HFI_EXTRADATA_MB_QUANTIZATION
#define HFI_EXTRADATA_INTERLACE_VIDEO
#define HFI_EXTRADATA_VC1_FRAMEDISP
#define HFI_EXTRADATA_VC1_SEQDISP
#define HFI_EXTRADATA_TIMESTAMP
#define HFI_EXTRADATA_S3D_FRAME_PACKING
#define HFI_EXTRADATA_FRAME_RATE
#define HFI_EXTRADATA_PANSCAN_WINDOW
#define HFI_EXTRADATA_RECOVERY_POINT_SEI
#define HFI_EXTRADATA_MPEG2_SEQDISP
#define HFI_EXTRADATA_STREAM_USERDATA
#define HFI_EXTRADATA_FRAME_QP
#define HFI_EXTRADATA_FRAME_BITS_INFO
#define HFI_EXTRADATA_MULTISLICE_INFO
#define HFI_EXTRADATA_NUM_CONCEALED_MB
#define HFI_EXTRADATA_INDEX
#define HFI_EXTRADATA_METADATA_LTR
#define HFI_EXTRADATA_METADATA_FILLER

#define HFI_INDEX_EXTRADATA_INPUT_CROP
#define HFI_INDEX_EXTRADATA_OUTPUT_CROP
#define HFI_INDEX_EXTRADATA_DIGITAL_ZOOM
#define HFI_INDEX_EXTRADATA_ASPECT_RATIO

#define HFI_INTERLACE_FRAME_PROGRESSIVE
#define HFI_INTERLACE_INTERLEAVE_FRAME_TOPFIELDFIRST
#define HFI_INTERLACE_INTERLEAVE_FRAME_BOTTOMFIELDFIRST
#define HFI_INTERLACE_FRAME_TOPFIELDFIRST
#define HFI_INTERLACE_FRAME_BOTTOMFIELDFIRST

/*
 * HFI_PROPERTY_PARAM_OX_START
 * HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + 0x1000
 */
#define HFI_PROPERTY_PARAM_BUFFER_COUNT_ACTUAL
#define HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO
#define HFI_PROPERTY_PARAM_INTERLACE_FORMAT_SUPPORTED
#define HFI_PROPERTY_PARAM_CHROMA_SITE
#define HFI_PROPERTY_PARAM_EXTRA_DATA_HEADER_CONFIG
#define HFI_PROPERTY_PARAM_INDEX_EXTRADATA
#define HFI_PROPERTY_PARAM_DIVX_FORMAT
#define HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE
#define HFI_PROPERTY_PARAM_S3D_FRAME_PACKING_EXTRADATA
#define HFI_PROPERTY_PARAM_ERR_DETECTION_CODE_EXTRADATA
#define HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE_SUPPORTED
#define HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL
#define HFI_PROPERTY_PARAM_BUFFER_DISPLAY_HOLD_COUNT_ACTUAL

/*
 * HFI_PROPERTY_CONFIG_OX_START
 * HFI_DOMAIN_BASE_COMMON + HFI_ARCH_OX_OFFSET + 0x2000
 */
#define HFI_PROPERTY_CONFIG_BUFFER_REQUIREMENTS
#define HFI_PROPERTY_CONFIG_REALTIME
#define HFI_PROPERTY_CONFIG_PRIORITY
#define HFI_PROPERTY_CONFIG_BATCH_INFO

/*
 * HFI_PROPERTY_PARAM_VDEC_OX_START	\
 * HFI_DOMAIN_BASE_VDEC + HFI_ARCH_OX_OFFSET + 0x3000
 */
#define HFI_PROPERTY_PARAM_VDEC_CONTINUE_DATA_TRANSFER
#define HFI_PROPERTY_PARAM_VDEC_DISPLAY_PICTURE_BUFFER_COUNT
#define HFI_PROPERTY_PARAM_VDEC_MULTI_VIEW_SELECT
#define HFI_PROPERTY_PARAM_VDEC_PICTURE_TYPE_DECODE
#define HFI_PROPERTY_PARAM_VDEC_OUTPUT_ORDER
#define HFI_PROPERTY_PARAM_VDEC_MB_QUANTIZATION
#define HFI_PROPERTY_PARAM_VDEC_NUM_CONCEALED_MB
#define HFI_PROPERTY_PARAM_VDEC_H264_ENTROPY_SWITCHING
#define HFI_PROPERTY_PARAM_VDEC_OUTPUT2_KEEP_ASPECT_RATIO
#define HFI_PROPERTY_PARAM_VDEC_FRAME_RATE_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_PANSCAN_WNDW_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_RECOVERY_POINT_SEI_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_THUMBNAIL_MODE
#define HFI_PROPERTY_PARAM_VDEC_FRAME_ASSEMBLY
#define HFI_PROPERTY_PARAM_VDEC_DPB_COUNTS
#define HFI_PROPERTY_PARAM_VDEC_VC1_FRAMEDISP_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_VC1_SEQDISP_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_TIMESTAMP_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_INTERLACE_VIDEO_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_AVC_SESSION_SELECT
#define HFI_PROPERTY_PARAM_VDEC_MPEG2_SEQDISP_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_STREAM_USERDATA_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_FRAME_QP_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_FRAME_BITS_INFO_EXTRADATA
#define HFI_PROPERTY_PARAM_VDEC_SCS_THRESHOLD

/*
 * HFI_PROPERTY_CONFIG_VDEC_OX_START
 * HFI_DOMAIN_BASE_VDEC + HFI_ARCH_OX_OFFSET + 0x0000
 */
#define HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER
#define HFI_PROPERTY_CONFIG_VDEC_MB_ERROR_MAP_REPORTING
#define HFI_PROPERTY_CONFIG_VDEC_MB_ERROR_MAP

#define HFI_PROPERTY_CONFIG_VDEC_ENTROPY

/*
 * HFI_PROPERTY_PARAM_VENC_OX_START
 * HFI_DOMAIN_BASE_VENC + HFI_ARCH_OX_OFFSET + 0x5000
 */
#define HFI_PROPERTY_PARAM_VENC_MULTI_SLICE_INFO
#define HFI_PROPERTY_PARAM_VENC_H264_IDR_S3D_FRAME_PACKING_NAL
#define HFI_PROPERTY_PARAM_VENC_LTR_INFO
#define HFI_PROPERTY_PARAM_VENC_MBI_DUMPING

/*
 * HFI_PROPERTY_CONFIG_VENC_OX_START
 * HFI_DOMAIN_BASE_VENC + HFI_ARCH_OX_OFFSET + 0x6000
 */
#define HFI_PROPERTY_CONFIG_VENC_FRAME_QP

/*
 * HFI_PROPERTY_PARAM_VPE_OX_START
 * HFI_DOMAIN_BASE_VPE + HFI_ARCH_OX_OFFSET + 0x7000
 */
#define HFI_PROPERTY_PARAM_VPE_COLOR_SPACE_CONVERSION

#define HFI_PROPERTY_CONFIG_VPE_OX_START

#define HFI_CHROMA_SITE_0
#define HFI_CHROMA_SITE_1
#define HFI_CHROMA_SITE_2
#define HFI_CHROMA_SITE_3
#define HFI_CHROMA_SITE_4
#define HFI_CHROMA_SITE_5

#define HFI_PRIORITY_LOW
#define HFI_PRIOIRTY_MEDIUM
#define HFI_PRIORITY_HIGH

#define HFI_OUTPUT_ORDER_DISPLAY
#define HFI_OUTPUT_ORDER_DECODE

#define HFI_RATE_CONTROL_OFF
#define HFI_RATE_CONTROL_VBR_VFR
#define HFI_RATE_CONTROL_VBR_CFR
#define HFI_RATE_CONTROL_CBR_VFR
#define HFI_RATE_CONTROL_CBR_CFR
#define HFI_RATE_CONTROL_CQ

#define HFI_VIDEO_CODEC_H264
#define HFI_VIDEO_CODEC_H263
#define HFI_VIDEO_CODEC_MPEG1
#define HFI_VIDEO_CODEC_MPEG2
#define HFI_VIDEO_CODEC_MPEG4
#define HFI_VIDEO_CODEC_DIVX_311
#define HFI_VIDEO_CODEC_DIVX
#define HFI_VIDEO_CODEC_VC1
#define HFI_VIDEO_CODEC_SPARK
#define HFI_VIDEO_CODEC_VP8
#define HFI_VIDEO_CODEC_HEVC
#define HFI_VIDEO_CODEC_VP9
#define HFI_VIDEO_CODEC_HEVC_HYBRID

#define HFI_H264_PROFILE_BASELINE
#define HFI_H264_PROFILE_MAIN
#define HFI_H264_PROFILE_HIGH
#define HFI_H264_PROFILE_STEREO_HIGH
#define HFI_H264_PROFILE_MULTIVIEW_HIGH
#define HFI_H264_PROFILE_CONSTRAINED_BASE
#define HFI_H264_PROFILE_CONSTRAINED_HIGH

#define HFI_H264_LEVEL_1
#define HFI_H264_LEVEL_1b
#define HFI_H264_LEVEL_11
#define HFI_H264_LEVEL_12
#define HFI_H264_LEVEL_13
#define HFI_H264_LEVEL_2
#define HFI_H264_LEVEL_21
#define HFI_H264_LEVEL_22
#define HFI_H264_LEVEL_3
#define HFI_H264_LEVEL_31
#define HFI_H264_LEVEL_32
#define HFI_H264_LEVEL_4
#define HFI_H264_LEVEL_41
#define HFI_H264_LEVEL_42
#define HFI_H264_LEVEL_5
#define HFI_H264_LEVEL_51
#define HFI_H264_LEVEL_52

#define HFI_H263_PROFILE_BASELINE

#define HFI_H263_LEVEL_10
#define HFI_H263_LEVEL_20
#define HFI_H263_LEVEL_30
#define HFI_H263_LEVEL_40
#define HFI_H263_LEVEL_45
#define HFI_H263_LEVEL_50
#define HFI_H263_LEVEL_60
#define HFI_H263_LEVEL_70

#define HFI_MPEG2_PROFILE_SIMPLE
#define HFI_MPEG2_PROFILE_MAIN
#define HFI_MPEG2_PROFILE_422
#define HFI_MPEG2_PROFILE_SNR
#define HFI_MPEG2_PROFILE_SPATIAL
#define HFI_MPEG2_PROFILE_HIGH

#define HFI_MPEG2_LEVEL_LL
#define HFI_MPEG2_LEVEL_ML
#define HFI_MPEG2_LEVEL_H14
#define HFI_MPEG2_LEVEL_HL

#define HFI_MPEG4_PROFILE_SIMPLE
#define HFI_MPEG4_PROFILE_ADVANCEDSIMPLE

#define HFI_MPEG4_LEVEL_0
#define HFI_MPEG4_LEVEL_0b
#define HFI_MPEG4_LEVEL_1
#define HFI_MPEG4_LEVEL_2
#define HFI_MPEG4_LEVEL_3
#define HFI_MPEG4_LEVEL_4
#define HFI_MPEG4_LEVEL_4a
#define HFI_MPEG4_LEVEL_5
#define HFI_MPEG4_LEVEL_6
#define HFI_MPEG4_LEVEL_7
#define HFI_MPEG4_LEVEL_8
#define HFI_MPEG4_LEVEL_9
#define HFI_MPEG4_LEVEL_3b

#define HFI_VC1_PROFILE_SIMPLE
#define HFI_VC1_PROFILE_MAIN
#define HFI_VC1_PROFILE_ADVANCED

#define HFI_VC1_LEVEL_LOW
#define HFI_VC1_LEVEL_MEDIUM
#define HFI_VC1_LEVEL_HIGH
#define HFI_VC1_LEVEL_0
#define HFI_VC1_LEVEL_1
#define HFI_VC1_LEVEL_2
#define HFI_VC1_LEVEL_3
#define HFI_VC1_LEVEL_4

#define HFI_VPX_PROFILE_SIMPLE
#define HFI_VPX_PROFILE_ADVANCED
#define HFI_VPX_PROFILE_VERSION_0
#define HFI_VPX_PROFILE_VERSION_1
#define HFI_VPX_PROFILE_VERSION_2
#define HFI_VPX_PROFILE_VERSION_3

#define HFI_DIVX_FORMAT_4
#define HFI_DIVX_FORMAT_5
#define HFI_DIVX_FORMAT_6

#define HFI_DIVX_PROFILE_QMOBILE
#define HFI_DIVX_PROFILE_MOBILE
#define HFI_DIVX_PROFILE_MT
#define HFI_DIVX_PROFILE_HT
#define HFI_DIVX_PROFILE_HD

#define HFI_HEVC_PROFILE_MAIN
#define HFI_HEVC_PROFILE_MAIN10
#define HFI_HEVC_PROFILE_MAIN_STILL_PIC

#define HFI_HEVC_LEVEL_1
#define HFI_HEVC_LEVEL_2
#define HFI_HEVC_LEVEL_21
#define HFI_HEVC_LEVEL_3
#define HFI_HEVC_LEVEL_31
#define HFI_HEVC_LEVEL_4
#define HFI_HEVC_LEVEL_41
#define HFI_HEVC_LEVEL_5
#define HFI_HEVC_LEVEL_51
#define HFI_HEVC_LEVEL_52
#define HFI_HEVC_LEVEL_6
#define HFI_HEVC_LEVEL_61
#define HFI_HEVC_LEVEL_62

#define HFI_HEVC_TIER_MAIN
#define HFI_HEVC_TIER_HIGH0

#define HFI_VPX_PROFILE_MAIN

#define HFI_VPX_LEVEL_VERSION_0
#define HFI_VPX_LEVEL_VERSION_1
#define HFI_VPX_LEVEL_VERSION_2
#define HFI_VPX_LEVEL_VERSION_3

/* VP9 Profile 0, 8-bit */
#define HFI_VP9_PROFILE_P0
/* VP9 Profile 2, 10-bit */
#define HFI_VP9_PROFILE_P2_10B

#define HFI_VP9_LEVEL_1
#define HFI_VP9_LEVEL_11
#define HFI_VP9_LEVEL_2
#define HFI_VP9_LEVEL_21
#define HFI_VP9_LEVEL_3
#define HFI_VP9_LEVEL_31
#define HFI_VP9_LEVEL_4
#define HFI_VP9_LEVEL_41
#define HFI_VP9_LEVEL_5
#define HFI_VP9_LEVEL_51
#define HFI_VP9_LEVEL_6
#define HFI_VP9_LEVEL_61

#define HFI_BUFFER_INPUT
#define HFI_BUFFER_OUTPUT
#define HFI_BUFFER_OUTPUT2
#define HFI_BUFFER_INTERNAL_PERSIST
#define HFI_BUFFER_INTERNAL_PERSIST_1
#define HFI_BUFFER_INTERNAL_SCRATCH(ver)
#define HFI_BUFFER_INTERNAL_SCRATCH_1(ver)
#define HFI_BUFFER_INTERNAL_SCRATCH_2(ver)
#define HFI_BUFFER_EXTRADATA_INPUT(ver)
#define HFI_BUFFER_EXTRADATA_OUTPUT(ver)
#define HFI_BUFFER_EXTRADATA_OUTPUT2(ver)
#define HFI_BUFFER_TYPE_MAX

#define HFI_BUFFER_MODE_STATIC
#define HFI_BUFFER_MODE_RING
#define HFI_BUFFER_MODE_DYNAMIC

/*
 * HFI_PROPERTY_SYS_COMMON_START
 * HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x0000
 */
#define HFI_PROPERTY_SYS_DEBUG_CONFIG
#define HFI_PROPERTY_SYS_RESOURCE_OCMEM_REQUIREMENT_INFO
#define HFI_PROPERTY_SYS_CONFIG_VCODEC_CLKFREQ
#define HFI_PROPERTY_SYS_IDLE_INDICATOR
#define HFI_PROPERTY_SYS_CODEC_POWER_PLANE_CTRL
#define HFI_PROPERTY_SYS_IMAGE_VERSION
#define HFI_PROPERTY_SYS_CONFIG_COVERAGE
#define HFI_PROPERTY_SYS_UBWC_CONFIG

/*
 * HFI_PROPERTY_PARAM_COMMON_START
 * HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x1000
 */
#define HFI_PROPERTY_PARAM_FRAME_SIZE
#define HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO
#define HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT
#define HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SUPPORTED
#define HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT
#define HFI_PROPERTY_PARAM_PROFILE_LEVEL_SUPPORTED
#define HFI_PROPERTY_PARAM_CAPABILITY_SUPPORTED
#define HFI_PROPERTY_PARAM_PROPERTIES_SUPPORTED
#define HFI_PROPERTY_PARAM_CODEC_SUPPORTED
#define HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SUPPORTED
#define HFI_PROPERTY_PARAM_NAL_STREAM_FORMAT_SELECT
#define HFI_PROPERTY_PARAM_MULTI_VIEW_FORMAT
#define HFI_PROPERTY_PARAM_MAX_SEQUENCE_HEADER_SIZE
#define HFI_PROPERTY_PARAM_CODEC_MASK_SUPPORTED
#define HFI_PROPERTY_PARAM_MVC_BUFFER_LAYOUT
#define HFI_PROPERTY_PARAM_MAX_SESSIONS_SUPPORTED
#define HFI_PROPERTY_PARAM_WORK_MODE
#define HFI_PROPERTY_PARAM_WORK_ROUTE

/*
 * HFI_PROPERTY_CONFIG_COMMON_START
 * HFI_DOMAIN_BASE_COMMON + HFI_ARCH_COMMON_OFFSET + 0x2000
 */
#define HFI_PROPERTY_CONFIG_FRAME_RATE
#define HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE

/*
 * HFI_PROPERTY_PARAM_VDEC_COMMON_START
 * HFI_DOMAIN_BASE_VDEC + HFI_ARCH_COMMON_OFFSET + 0x3000
 */
#define HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM
#define HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR
#define HFI_PROPERTY_PARAM_VDEC_NONCP_OUTPUT2
#define HFI_PROPERTY_PARAM_VDEC_PIXEL_BITDEPTH
#define HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT
#define HFI_PROPERTY_PARAM_VDEC_COLOUR_SPACE
#define HFI_PROPERTY_PARAM_VDEC_ENABLE_SUFFICIENT_SEQCHANGE_EVENT

/*
 * HFI_PROPERTY_CONFIG_VDEC_COMMON_START
 * HFI_DOMAIN_BASE_VDEC + HFI_ARCH_COMMON_OFFSET + 0x4000
 */

/*
 * HFI_PROPERTY_PARAM_VENC_COMMON_START
 * HFI_DOMAIN_BASE_VENC + HFI_ARCH_COMMON_OFFSET + 0x5000
 */
#define HFI_PROPERTY_PARAM_VENC_SLICE_DELIVERY_MODE
#define HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL
#define HFI_PROPERTY_PARAM_VENC_H264_DEBLOCK_CONTROL
#define HFI_PROPERTY_PARAM_VENC_RATE_CONTROL
#define HFI_PROPERTY_PARAM_VENC_H264_PICORDER_CNT_TYPE
#define HFI_PROPERTY_PARAM_VENC_SESSION_QP
#define HFI_PROPERTY_PARAM_VENC_MPEG4_AC_PREDICTION
#define HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE
/*
 * Note: HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE_V2 is
 * specific to HFI_VERSION_6XX and HFI_VERSION_4XX only
 */
#define HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE_V2
#define HFI_PROPERTY_PARAM_VENC_MPEG4_TIME_RESOLUTION
#define HFI_PROPERTY_PARAM_VENC_MPEG4_SHORT_HEADER
#define HFI_PROPERTY_PARAM_VENC_MPEG4_HEADER_EXTENSION
#define HFI_PROPERTY_PARAM_VENC_OPEN_GOP
#define HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH
#define HFI_PROPERTY_PARAM_VENC_MULTI_SLICE_CONTROL
#define HFI_PROPERTY_PARAM_VENC_VBV_HRD_BUF_SIZE
#define HFI_PROPERTY_PARAM_VENC_QUALITY_VS_SPEED
#define HFI_PROPERTY_PARAM_VENC_ADVANCED
#define HFI_PROPERTY_PARAM_VENC_H264_SPS_ID
#define HFI_PROPERTY_PARAM_VENC_H264_PPS_ID
#define HFI_PROPERTY_PARAM_VENC_H264_GENERATE_AUDNAL
#define HFI_PROPERTY_PARAM_VENC_ASPECT_RATIO
#define HFI_PROPERTY_PARAM_VENC_NUMREF
#define HFI_PROPERTY_PARAM_VENC_MULTIREF_P
#define HFI_PROPERTY_PARAM_VENC_H264_NAL_SVC_EXT
#define HFI_PROPERTY_PARAM_VENC_LTRMODE
#define HFI_PROPERTY_PARAM_VENC_VIDEO_FULL_RANGE
#define HFI_PROPERTY_PARAM_VENC_H264_VUI_TIMING_INFO
#define HFI_PROPERTY_PARAM_VENC_VC1_PERF_CFG
#define HFI_PROPERTY_PARAM_VENC_MAX_NUM_B_FRAMES
#define HFI_PROPERTY_PARAM_VENC_H264_VUI_BITSTREAM_RESTRC
#define HFI_PROPERTY_PARAM_VENC_PRESERVE_TEXT_QUALITY
#define HFI_PROPERTY_PARAM_VENC_H264_TRANSFORM_8X8
#define HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER
#define HFI_PROPERTY_PARAM_VENC_DISABLE_RC_TIMESTAMP
#define HFI_PROPERTY_PARAM_VENC_INITIAL_QP
#define HFI_PROPERTY_PARAM_VENC_VPX_ERROR_RESILIENCE_MODE
#define HFI_PROPERTY_PARAM_VENC_HIER_B_MAX_NUM_ENH_LAYER
#define HFI_PROPERTY_PARAM_VENC_HIER_P_HYBRID_MODE
#define HFI_PROPERTY_PARAM_VENC_HDR10_PQ_SEI

/*
 * HFI_PROPERTY_CONFIG_VENC_COMMON_START
 * HFI_DOMAIN_BASE_VENC + HFI_ARCH_COMMON_OFFSET + 0x6000
 */
#define HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE
#define HFI_PROPERTY_CONFIG_VENC_IDR_PERIOD
#define HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD
#define HFI_PROPERTY_CONFIG_VENC_REQUEST_SYNC_FRAME
#define HFI_PROPERTY_CONFIG_VENC_SLICE_SIZE
#define HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE
#define HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER
#define HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME
#define HFI_PROPERTY_CONFIG_VENC_USELTRFRAME
#define HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER
#define HFI_PROPERTY_CONFIG_VENC_LTRPERIOD
#define HFI_PROPERTY_CONFIG_VENC_PERF_MODE
#define HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY

/*
 * HFI_PROPERTY_PARAM_VPE_COMMON_START
 * HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x7000
 */

/*
 * HFI_PROPERTY_CONFIG_VPE_COMMON_START
 * HFI_DOMAIN_BASE_VPE + HFI_ARCH_COMMON_OFFSET + 0x8000
 */
#define HFI_PROPERTY_CONFIG_VPE_DEINTERLACE
#define HFI_PROPERTY_CONFIG_VPE_OPERATIONS

enum hfi_version {};

struct hfi_buffer_info {};

struct hfi_bitrate {};

struct hfi_h264_8x8_transform {};

#define HFI_CAPABILITY_FRAME_WIDTH
#define HFI_CAPABILITY_FRAME_HEIGHT
#define HFI_CAPABILITY_MBS_PER_FRAME
#define HFI_CAPABILITY_MBS_PER_SECOND
#define HFI_CAPABILITY_FRAMERATE
#define HFI_CAPABILITY_SCALE_X
#define HFI_CAPABILITY_SCALE_Y
#define HFI_CAPABILITY_BITRATE
#define HFI_CAPABILITY_BFRAME
#define HFI_CAPABILITY_PEAKBITRATE
#define HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS
#define HFI_CAPABILITY_ENC_LTR_COUNT
#define HFI_CAPABILITY_CP_OUTPUT2_THRESH
#define HFI_CAPABILITY_HIER_B_NUM_ENH_LAYERS
#define HFI_CAPABILITY_LCU_SIZE
#define HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS
#define HFI_CAPABILITY_MBS_PER_SECOND_POWERSAVE
#define HFI_CAPABILITY_I_FRAME_QP
#define HFI_CAPABILITY_P_FRAME_QP
#define HFI_CAPABILITY_B_FRAME_QP
#define HFI_CAPABILITY_RATE_CONTROL_MODES
#define HFI_CAPABILITY_BLUR_WIDTH
#define HFI_CAPABILITY_BLUR_HEIGHT
#define HFI_CAPABILITY_SLICE_BYTE
#define HFI_CAPABILITY_SLICE_MB
#define HFI_CAPABILITY_MAX_VIDEOCORES
#define HFI_CAPABILITY_MAX_WORKMODES
#define HFI_CAPABILITY_ROTATION
#define HFI_CAPABILITY_COLOR_SPACE_CONVERSION

struct hfi_capability {};

struct hfi_capabilities {};

#define HFI_DEBUG_MSG_LOW
#define HFI_DEBUG_MSG_MEDIUM
#define HFI_DEBUG_MSG_HIGH
#define HFI_DEBUG_MSG_ERROR
#define HFI_DEBUG_MSG_FATAL
#define HFI_DEBUG_MSG_PERF

#define HFI_DEBUG_MODE_QUEUE
#define HFI_DEBUG_MODE_QDSS

struct hfi_debug_config {};

struct hfi_ubwc_config {};

struct hfi_enable {};

#define HFI_H264_DB_MODE_DISABLE
#define HFI_H264_DB_MODE_SKIP_SLICE_BOUNDARY
#define HFI_H264_DB_MODE_ALL_BOUNDARY

struct hfi_h264_db_control {};

#define HFI_H264_ENTROPY_CAVLC
#define HFI_H264_ENTROPY_CABAC

#define HFI_H264_CABAC_MODEL_0
#define HFI_H264_CABAC_MODEL_1
#define HFI_H264_CABAC_MODEL_2

struct hfi_h264_entropy_control {};

struct hfi_framerate {};

#define HFI_INTRA_REFRESH_NONE
#define HFI_INTRA_REFRESH_CYCLIC
#define HFI_INTRA_REFRESH_ADAPTIVE
#define HFI_INTRA_REFRESH_CYCLIC_ADAPTIVE
#define HFI_INTRA_REFRESH_RANDOM

struct hfi_intra_refresh {};

struct hfi_intra_refresh_3x {};

struct hfi_idr_period {};

struct hfi_operations_type {};

struct hfi_max_num_b_frames {};

struct hfi_vc1e_perf_cfg_type {};

/*
 * 0 - 7bit -> Luma (def: 16)
 * 8 - 15bit -> Chroma (def: 128)
 * format is valid up to v4
 */
struct hfi_conceal_color {};

struct hfi_conceal_color_v4 {};

struct hfi_intra_period {};

struct hfi_mpeg4_header_extension {};

struct hfi_mpeg4_time_resolution {};

struct hfi_multi_stream {};

struct hfi_multi_stream_3x {};

struct hfi_multi_view_format {};

#define HFI_MULTI_SLICE_OFF
#define HFI_MULTI_SLICE_BY_MB_COUNT
#define HFI_MULTI_SLICE_BY_BYTE_COUNT
#define HFI_MULTI_SLICE_GOB

struct hfi_multi_slice_control {};

#define HFI_NAL_FORMAT_STARTCODES
#define HFI_NAL_FORMAT_ONE_NAL_PER_BUFFER
#define HFI_NAL_FORMAT_ONE_BYTE_LENGTH
#define HFI_NAL_FORMAT_TWO_BYTE_LENGTH
#define HFI_NAL_FORMAT_FOUR_BYTE_LENGTH

struct hfi_nal_stream_format {};

struct hfi_nal_stream_format_select {};

#define HFI_PICTURE_TYPE_I
#define HFI_PICTURE_TYPE_P
#define HFI_PICTURE_TYPE_B
#define HFI_PICTURE_TYPE_IDR

struct hfi_profile_level {};

#define HFI_MAX_PROFILE_COUNT

struct hfi_profile_level_supported {};

struct hfi_quality_vs_speed {};

struct hfi_heic_frame_quality {};

struct hfi_quantization {};

struct hfi_initial_quantization {};

struct hfi_quantization_range {};

struct hfi_quantization_v2 {};

struct hfi_quantization_range_v2 {};

#define HFI_LTR_MODE_DISABLE
#define HFI_LTR_MODE_MANUAL
#define HFI_LTR_MODE_PERIODIC

struct hfi_ltr_mode {};

struct hfi_ltr_use {};

struct hfi_ltr_mark {};

struct hfi_mastering_display_colour_sei_payload {};

struct hfi_content_light_level_sei_payload {};

struct hfi_hdr10_pq_sei {};

struct hfi_framesize {};

#define HFI_VENC_PERFMODE_MAX_QUALITY
#define HFI_VENC_PERFMODE_POWER_SAVE

struct hfi_perf_mode {};

#define VIDC_CORE_ID_DEFAULT
#define VIDC_CORE_ID_1
#define VIDC_CORE_ID_2
#define VIDC_CORE_ID_3

struct hfi_videocores_usage_type {};

#define VIDC_WORK_MODE_1
#define VIDC_WORK_MODE_2

struct hfi_video_work_mode {};

struct hfi_video_work_route {};

struct hfi_h264_vui_timing_info {};

#define VIDC_BITDEPTH_8
#define VIDC_BITDEPTH_10

struct hfi_bit_depth {};

struct hfi_picture_type {};

struct hfi_pic_struct {};

struct hfi_colour_space {};

struct hfi_extradata_input_crop {};

struct hfi_dpb_counts {};

#define HFI_COLOR_FORMAT_MONOCHROME
#define HFI_COLOR_FORMAT_NV12
#define HFI_COLOR_FORMAT_NV21
#define HFI_COLOR_FORMAT_NV12_4x4TILE
#define HFI_COLOR_FORMAT_NV21_4x4TILE
#define HFI_COLOR_FORMAT_YUYV
#define HFI_COLOR_FORMAT_YVYU
#define HFI_COLOR_FORMAT_UYVY
#define HFI_COLOR_FORMAT_VYUY
#define HFI_COLOR_FORMAT_RGB565
#define HFI_COLOR_FORMAT_BGR565
#define HFI_COLOR_FORMAT_RGB888
#define HFI_COLOR_FORMAT_BGR888
#define HFI_COLOR_FORMAT_YUV444
#define HFI_COLOR_FORMAT_RGBA8888

#define HFI_COLOR_FORMAT_UBWC_BASE
#define HFI_COLOR_FORMAT_10_BIT_BASE

#define HFI_COLOR_FORMAT_YUV420_TP10
#define HFI_COLOR_FORMAT_P010
#define HFI_COLOR_FORMAT_NV12_UBWC
#define HFI_COLOR_FORMAT_YUV420_TP10_UBWC
#define HFI_COLOR_FORMAT_P010_UBWC
#define HFI_COLOR_FORMAT_RGBA8888_UBWC

struct hfi_uncompressed_format_select {};

struct hfi_uncompressed_plane_constraints {};

struct hfi_uncompressed_plane_info {};

struct hfi_uncompressed_format_supported {};

struct hfi_uncompressed_plane_actual {};

struct hfi_uncompressed_plane_actual_info {};

struct hfi_uncompressed_plane_actual_constraints_info {};

struct hfi_codec_supported {};

struct hfi_properties_supported {};

struct hfi_max_sessions_supported {};

#define HFI_MAX_MATRIX_COEFFS
#define HFI_MAX_BIAS_COEFFS
#define HFI_MAX_LIMIT_COEFFS

struct hfi_vpe_color_space_conversion {};

#define HFI_ROTATE_NONE
#define HFI_ROTATE_90
#define HFI_ROTATE_180
#define HFI_ROTATE_270

#define HFI_FLIP_NONE
#define HFI_FLIP_HORIZONTAL
#define HFI_FLIP_VERTICAL

struct hfi_operations {};

#define HFI_RESOURCE_OCMEM

struct hfi_resource_ocmem {};

struct hfi_resource_ocmem_requirement {};

struct hfi_resource_ocmem_requirement_info {};

struct hfi_property_sys_image_version_info_type {};

struct hfi_codec_mask_supported {};

struct hfi_seq_header_info {};

struct hfi_aspect_ratio {};

#define HFI_MVC_BUFFER_LAYOUT_TOP_BOTTOM
#define HFI_MVC_BUFFER_LAYOUT_SIDEBYSIDE
#define HFI_MVC_BUFFER_LAYOUT_SEQ

struct hfi_mvc_buffer_layout_descp_type {};

struct hfi_scs_threshold {};

#define HFI_TEST_SSR_SW_ERR_FATAL
#define HFI_TEST_SSR_SW_DIV_BY_ZERO
#define HFI_TEST_SSR_HW_WDOG_IRQ

struct hfi_buffer_alloc_mode {};

struct hfi_index_extradata_config {};

struct hfi_extradata_header {};

struct hfi_batch_info {};

struct hfi_buffer_count_actual {};

struct hfi_buffer_count_actual_4xx {};

struct hfi_buffer_size_actual {};

struct hfi_buffer_display_hold_count_actual {};

struct hfi_buffer_requirements {};

/* On HFI 4XX, some of the struct members have been swapped. */
static inline u32 hfi_bufreq_get_hold_count(struct hfi_buffer_requirements *req,
					    u32 ver)
{
	if (ver == HFI_VERSION_4XX)
		return 0;

	return req->hold_count;
};

static inline u32 hfi_bufreq_get_count_min(struct hfi_buffer_requirements *req,
					   u32 ver)
{
	if (ver == HFI_VERSION_4XX)
		return req->hold_count;

	return req->count_min;
};

static inline u32 hfi_bufreq_get_count_min_host(struct hfi_buffer_requirements *req,
						u32 ver)
{
	if (ver == HFI_VERSION_4XX)
		return req->count_min;

	return 0;
};

static inline void hfi_bufreq_set_hold_count(struct hfi_buffer_requirements *req,
					     u32 ver, u32 val)
{
	if (ver == HFI_VERSION_4XX)
		return;

	req->hold_count = val;
};

static inline void hfi_bufreq_set_count_min(struct hfi_buffer_requirements *req,
					    u32 ver, u32 val)
{
	if (ver == HFI_VERSION_4XX)
		req->hold_count = val;

	req->count_min = val;
};

static inline void hfi_bufreq_set_count_min_host(struct hfi_buffer_requirements *req,
						 u32 ver, u32 val)
{
	if (ver == HFI_VERSION_4XX)
		req->count_min = val;
};

struct hfi_data_payload {};

struct hfi_enable_picture {};

struct hfi_display_picture_buffer_count {};

struct hfi_extra_data_header_config {};

struct hfi_interlace_format_supported {};

struct hfi_buffer_alloc_mode_supported {};

struct hfi_mb_error_map {};

struct hfi_metadata_pass_through {};

struct hfi_multi_view_select {};

struct hfi_hybrid_hierp {};

struct hfi_pkt_hdr {};

struct hfi_session_hdr_pkt {};

struct hfi_session_pkt {};

#endif