linux/drivers/media/platform/chips-media/wave5/wave5-vpuerror.h

/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
 * Wave5 series multi-standard codec IP - error values
 *
 * Copyright (C) 2021-2023 CHIPS&MEDIA INC
 */

#ifndef ERROR_CODE_H_INCLUDED
#define ERROR_CODE_H_INCLUDED

/*
 * WAVE5
 */

/************************************************************************/
/* WAVE5 COMMON SYSTEM ERROR (FAIL_REASON)                              */
/************************************************************************/
#define WAVE5_SYSERR_QUEUEING_FAIL
#define WAVE5_SYSERR_ACCESS_VIOLATION_HW
#define WAVE5_SYSERR_BUS_ERROR
#define WAVE5_SYSERR_DOUBLE_FAULT
#define WAVE5_SYSERR_RESULT_NOT_READY
#define WAVE5_SYSERR_VPU_STILL_RUNNING
#define WAVE5_SYSERR_UNKNOWN_CMD
#define WAVE5_SYSERR_UNKNOWN_CODEC_STD
#define WAVE5_SYSERR_UNKNOWN_QUERY_OPTION
#define WAVE5_SYSERR_VLC_BUF_FULL
#define WAVE5_SYSERR_WATCHDOG_TIMEOUT
#define WAVE5_SYSERR_VCPU_TIMEOUT
#define WAVE5_SYSERR_TEMP_SEC_BUF_OVERFLOW
#define WAVE5_SYSERR_NEED_MORE_TASK_BUF
#define WAVE5_SYSERR_PRESCAN_ERR
#define WAVE5_SYSERR_ENC_GBIN_OVERCONSUME
#define WAVE5_SYSERR_ENC_MAX_ZERO_DETECT
#define WAVE5_SYSERR_ENC_LVL_FIRST_ERROR
#define WAVE5_SYSERR_ENC_EG_RANGE_OVER
#define WAVE5_SYSERR_ENC_IRB_FRAME_DROP
#define WAVE5_SYSERR_INPLACE_V
#define WAVE5_SYSERR_FATAL_VPU_HANGUP

/************************************************************************/
/* WAVE5 COMMAND QUEUE ERROR (FAIL_REASON)                              */
/************************************************************************/
#define WAVE5_CMDQ_ERR_NOT_QUEABLE_CMD
#define WAVE5_CMDQ_ERR_SKIP_MODE_ENABLE
#define WAVE5_CMDQ_ERR_INST_FLUSHING
#define WAVE5_CMDQ_ERR_INST_INACTIVE
#define WAVE5_CMDQ_ERR_QUEUE_FAIL
#define WAVE5_CMDQ_ERR_CMD_BUF_FULL

/************************************************************************/
/* WAVE5 ERROR ON DECODER (ERR_INFO)                                    */
/************************************************************************/
// HEVC
#define HEVC_SPSERR_SEQ_PARAMETER_SET_ID
#define HEVC_SPSERR_CHROMA_FORMAT_IDC
#define HEVC_SPSERR_PIC_WIDTH_IN_LUMA_SAMPLES
#define HEVC_SPSERR_PIC_HEIGHT_IN_LUMA_SAMPLES
#define HEVC_SPSERR_CONF_WIN_LEFT_OFFSET
#define HEVC_SPSERR_CONF_WIN_RIGHT_OFFSET
#define HEVC_SPSERR_CONF_WIN_TOP_OFFSET
#define HEVC_SPSERR_CONF_WIN_BOTTOM_OFFSET
#define HEVC_SPSERR_BIT_DEPTH_LUMA_MINUS8
#define HEVC_SPSERR_BIT_DEPTH_CHROMA_MINUS8
#define HEVC_SPSERR_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4
#define HEVC_SPSERR_SPS_MAX_DEC_PIC_BUFFERING
#define HEVC_SPSERR_SPS_MAX_NUM_REORDER_PICS
#define HEVC_SPSERR_SPS_MAX_LATENCY_INCREASE
#define HEVC_SPSERR_LOG2_MIN_LUMA_CODING_BLOCK_SIZE_MINUS3
#define HEVC_SPSERR_LOG2_DIFF_MAX_MIN_LUMA_CODING_BLOCK_SIZE
#define HEVC_SPSERR_LOG2_MIN_TRANSFORM_BLOCK_SIZE_MINUS2
#define HEVC_SPSERR_LOG2_DIFF_MAX_MIN_TRANSFORM_BLOCK_SIZE
#define HEVC_SPSERR_MAX_TRANSFORM_HIERARCHY_DEPTH_INTER
#define HEVC_SPSERR_MAX_TRANSFORM_HIERARCHY_DEPTH_INTRA
#define HEVC_SPSERR_SCALING_LIST
#define HEVC_SPSERR_LOG2_DIFF_MIN_PCM_LUMA_CODING_BLOCK_SIZE_MINUS3
#define HEVC_SPSERR_LOG2_DIFF_MAX_MIN_PCM_LUMA_CODING_BLOCK_SIZE
#define HEVC_SPSERR_NUM_SHORT_TERM_REF_PIC_SETS
#define HEVC_SPSERR_NUM_LONG_TERM_REF_PICS_SPS
#define HEVC_SPSERR_GBU_PARSING_ERROR
#define HEVC_SPSERR_EXTENSION_FLAG
#define HEVC_SPSERR_VUI_ERROR
#define HEVC_SPSERR_ACTIVATE_SPS
#define HEVC_SPSERR_PROFILE_SPACE
#define HEVC_PPSERR_PPS_PIC_PARAMETER_SET_ID
#define HEVC_PPSERR_PPS_SEQ_PARAMETER_SET_ID
#define HEVC_PPSERR_NUM_REF_IDX_L0_DEFAULT_ACTIVE_MINUS1
#define HEVC_PPSERR_NUM_REF_IDX_L1_DEFAULT_ACTIVE_MINUS1
#define HEVC_PPSERR_INIT_QP_MINUS26
#define HEVC_PPSERR_DIFF_CU_QP_DELTA_DEPTH
#define HEVC_PPSERR_PPS_CB_QP_OFFSET
#define HEVC_PPSERR_PPS_CR_QP_OFFSET
#define HEVC_PPSERR_NUM_TILE_COLUMNS_MINUS1
#define HEVC_PPSERR_NUM_TILE_ROWS_MINUS1
#define HEVC_PPSERR_COLUMN_WIDTH_MINUS1
#define HEVC_PPSERR_ROW_HEIGHT_MINUS1
#define HEVC_PPSERR_PPS_BETA_OFFSET_DIV2
#define HEVC_PPSERR_PPS_TC_OFFSET_DIV2
#define HEVC_PPSERR_SCALING_LIST
#define HEVC_PPSERR_LOG2_PARALLEL_MERGE_LEVEL_MINUS2
#define HEVC_PPSERR_NUM_TILE_COLUMNS_RANGE_OUT
#define HEVC_PPSERR_NUM_TILE_ROWS_RANGE_OUT
#define HEVC_PPSERR_MORE_RBSP_DATA_ERROR
#define HEVC_PPSERR_PPS_PIC_PARAMETER_SET_ID_RANGE_OUT
#define HEVC_PPSERR_PPS_SEQ_PARAMETER_SET_ID_RANGE_OUT
#define HEVC_PPSERR_NUM_REF_IDX_L0_DEFAULT_ACTIVE_MINUS1_RANGE_OUT
#define HEVC_PPSERR_NUM_REF_IDX_L1_DEFAULT_ACTIVE_MINUS1_RANGE_OUT
#define HEVC_PPSERR_PPS_CB_QP_OFFSET_RANGE_OUT
#define HEVC_PPSERR_PPS_CR_QP_OFFSET_RANGE_OUT
#define HEVC_PPSERR_COLUMN_WIDTH_MINUS1_RANGE_OUT
#define HEVC_PPSERR_ROW_HEIGHT_MINUS1_RANGE_OUT
#define HEVC_PPSERR_PPS_BETA_OFFSET_DIV2_RANGE_OUT
#define HEVC_PPSERR_PPS_TC_OFFSET_DIV2_RANGE_OUT
#define HEVC_SHERR_SLICE_PIC_PARAMETER_SET_ID
#define HEVC_SHERR_ACTIVATE_PPS
#define HEVC_SHERR_ACTIVATE_SPS
#define HEVC_SHERR_SLICE_TYPE
#define HEVC_SHERR_FIRST_SLICE_IS_DEPENDENT_SLICE
#define HEVC_SHERR_SHORT_TERM_REF_PIC_SET_SPS_FLAG
#define HEVC_SHERR_SHORT_TERM_REF_PIC_SET
#define HEVC_SHERR_SHORT_TERM_REF_PIC_SET_IDX
#define HEVC_SHERR_NUM_LONG_TERM_SPS
#define HEVC_SHERR_NUM_LONG_TERM_PICS
#define HEVC_SHERR_LT_IDX_SPS_IS_OUT_OF_RANGE
#define HEVC_SHERR_DELTA_POC_MSB_CYCLE_LT
#define HEVC_SHERR_NUM_REF_IDX_L0_ACTIVE_MINUS1
#define HEVC_SHERR_NUM_REF_IDX_L1_ACTIVE_MINUS1
#define HEVC_SHERR_COLLOCATED_REF_IDX
#define HEVC_SHERR_PRED_WEIGHT_TABLE
#define HEVC_SHERR_FIVE_MINUS_MAX_NUM_MERGE_CAND
#define HEVC_SHERR_SLICE_QP_DELTA
#define HEVC_SHERR_SLICE_QP_DELTA_IS_OUT_OF_RANGE
#define HEVC_SHERR_SLICE_CB_QP_OFFSET
#define HEVC_SHERR_SLICE_CR_QP_OFFSET
#define HEVC_SHERR_SLICE_BETA_OFFSET_DIV2
#define HEVC_SHERR_SLICE_TC_OFFSET_DIV2
#define HEVC_SHERR_NUM_ENTRY_POINT_OFFSETS
#define HEVC_SHERR_OFFSET_LEN_MINUS1
#define HEVC_SHERR_SLICE_SEGMENT_HEADER_EXTENSION_LENGTH
#define HEVC_SHERR_WRONG_POC_IN_STILL_PICTURE_PROFILE
#define HEVC_SHERR_SLICE_TYPE_ERROR_IN_STILL_PICTURE_PROFILE
#define HEVC_SHERR_PPS_ID_NOT_EQUAL_PREV_VALUE
#define HEVC_SPECERR_OVER_PICTURE_WIDTH_SIZE
#define HEVC_SPECERR_OVER_PICTURE_HEIGHT_SIZE
#define HEVC_SPECERR_OVER_CHROMA_FORMAT
#define HEVC_SPECERR_OVER_BIT_DEPTH
#define HEVC_SPECERR_OVER_BUFFER_OVER_FLOW
#define HEVC_SPECERR_OVER_WRONG_BUFFER_ACCESS
#define HEVC_ETCERR_INIT_SEQ_SPS_NOT_FOUND
#define HEVC_ETCERR_DEC_PIC_VCL_NOT_FOUND
#define HEVC_ETCERR_NO_VALID_SLICE_IN_AU
#define HEVC_ETCERR_INPLACE_V

// AVC
#define AVC_SPSERR_SEQ_PARAMETER_SET_ID
#define AVC_SPSERR_CHROMA_FORMAT_IDC
#define AVC_SPSERR_PIC_WIDTH_IN_LUMA_SAMPLES
#define AVC_SPSERR_PIC_HEIGHT_IN_LUMA_SAMPLES
#define AVC_SPSERR_CONF_WIN_LEFT_OFFSET
#define AVC_SPSERR_CONF_WIN_RIGHT_OFFSET
#define AVC_SPSERR_CONF_WIN_TOP_OFFSET
#define AVC_SPSERR_CONF_WIN_BOTTOM_OFFSET
#define AVC_SPSERR_BIT_DEPTH_LUMA_MINUS8
#define AVC_SPSERR_BIT_DEPTH_CHROMA_MINUS8
#define AVC_SPSERR_SPS_MAX_DEC_PIC_BUFFERING
#define AVC_SPSERR_SPS_MAX_NUM_REORDER_PICS
#define AVC_SPSERR_SCALING_LIST
#define AVC_SPSERR_GBU_PARSING_ERROR
#define AVC_SPSERR_VUI_ERROR
#define AVC_SPSERR_ACTIVATE_SPS
#define AVC_PPSERR_PPS_PIC_PARAMETER_SET_ID
#define AVC_PPSERR_PPS_SEQ_PARAMETER_SET_ID
#define AVC_PPSERR_NUM_REF_IDX_L0_DEFAULT_ACTIVE_MINUS1
#define AVC_PPSERR_NUM_REF_IDX_L1_DEFAULT_ACTIVE_MINUS1
#define AVC_PPSERR_INIT_QP_MINUS26
#define AVC_PPSERR_PPS_CB_QP_OFFSET
#define AVC_PPSERR_PPS_CR_QP_OFFSET
#define AVC_PPSERR_SCALING_LIST
#define AVC_PPSERR_MORE_RBSP_DATA_ERROR
#define AVC_PPSERR_PPS_PIC_PARAMETER_SET_ID_RANGE_OUT
#define AVC_PPSERR_PPS_SEQ_PARAMETER_SET_ID_RANGE_OUT
#define AVC_PPSERR_NUM_REF_IDX_L0_DEFAULT_ACTIVE_MINUS1_RANGE_OUT
#define AVC_PPSERR_NUM_REF_IDX_L1_DEFAULT_ACTIVE_MINUS1_RANGE_OUT
#define AVC_PPSERR_PPS_CB_QP_OFFSET_RANGE_OUT
#define AVC_PPSERR_PPS_CR_QP_OFFSET_RANGE_OUT
#define AVC_SHERR_SLICE_PIC_PARAMETER_SET_ID
#define AVC_SHERR_ACTIVATE_PPS
#define AVC_SHERR_ACTIVATE_SPS
#define AVC_SHERR_SLICE_TYPE
#define AVC_SHERR_FIRST_MB_IN_SLICE
#define AVC_SHERR_RPLM
#define AVC_SHERR_LT_IDX_SPS_IS_OUT_OF_RANGE
#define AVC_SHERR_NUM_REF_IDX_L0_ACTIVE_MINUS1
#define AVC_SHERR_NUM_REF_IDX_L1_ACTIVE_MINUS1
#define AVC_SHERR_PRED_WEIGHT_TABLE
#define AVC_SHERR_SLICE_QP_DELTA
#define AVC_SHERR_SLICE_BETA_OFFSET_DIV2
#define AVC_SHERR_SLICE_TC_OFFSET_DIV2
#define AVC_SHERR_DISABLE_DEBLOCK_FILTER_IDC
#define AVC_SPECERR_OVER_PICTURE_WIDTH_SIZE
#define AVC_SPECERR_OVER_PICTURE_HEIGHT_SIZE
#define AVC_SPECERR_OVER_CHROMA_FORMAT
#define AVC_SPECERR_OVER_BIT_DEPTH
#define AVC_SPECERR_OVER_BUFFER_OVER_FLOW
#define AVC_SPECERR_OVER_WRONG_BUFFER_ACCESS
#define AVC_ETCERR_INIT_SEQ_SPS_NOT_FOUND
#define AVC_ETCERR_DEC_PIC_VCL_NOT_FOUND
#define AVC_ETCERR_NO_VALID_SLICE_IN_AU
#define AVC_ETCERR_ASO
#define AVC_ETCERR_FMO
#define AVC_ETCERR_INPLACE_V

/************************************************************************/
/* WAVE5 WARNING ON DECODER (WARN_INFO)                                 */
/************************************************************************/
// HEVC
#define HEVC_SPSWARN_MAX_SUB_LAYERS_MINUS1
#define HEVC_SPSWARN_GENERAL_RESERVED_ZERO_44BITS
#define HEVC_SPSWARN_RESERVED_ZERO_2BITS
#define HEVC_SPSWARN_SUB_LAYER_RESERVED_ZERO_44BITS
#define HEVC_SPSWARN_GENERAL_LEVEL_IDC
#define HEVC_SPSWARN_SPS_MAX_DEC_PIC_BUFFERING_VALUE_OVER
#define HEVC_SPSWARN_RBSP_TRAILING_BITS
#define HEVC_SPSWARN_ST_RPS_UE_ERROR
#define HEVC_SPSWARN_EXTENSION_FLAG
#define HEVC_SPSWARN_REPLACED_WITH_PREV_SPS
#define HEVC_PPSWARN_RBSP_TRAILING_BITS
#define HEVC_PPSWARN_REPLACED_WITH_PREV_PPS
#define HEVC_SHWARN_FIRST_SLICE_SEGMENT_IN_PIC_FLAG
#define HEVC_SHWARN_NO_OUTPUT_OF_PRIOR_PICS_FLAG
#define HEVC_SHWARN_PIC_OUTPUT_FLAG
#define HEVC_SHWARN_DUPLICATED_SLICE_SEGMENT
#define HEVC_ETCWARN_INIT_SEQ_VCL_NOT_FOUND
#define HEVC_ETCWARN_MISSING_REFERENCE_PICTURE
#define HEVC_ETCWARN_WRONG_TEMPORAL_ID
#define HEVC_ETCWARN_ERROR_PICTURE_IS_REFERENCED
#define HEVC_SPECWARN_OVER_PROFILE
#define HEVC_SPECWARN_OVER_LEVEL
#define HEVC_PRESWARN_PARSING_ERR
#define HEVC_PRESWARN_MVD_OUT_OF_RANGE
#define HEVC_PRESWARN_CU_QP_DELTA_VAL_OUT_OF_RANGE
#define HEVC_PRESWARN_COEFF_LEVEL_REMAINING_OUT_OF_RANGE
#define HEVC_PRESWARN_PCM_ERR
#define HEVC_PRESWARN_OVERCONSUME
#define HEVC_PRESWARN_END_OF_SUBSET_ONE_BIT_ERR
#define HEVC_PRESWARN_END_OF_SLICE_SEGMENT_FLAG

// AVC
#define AVC_SPSWARN_RESERVED_ZERO_2BITS
#define AVC_SPSWARN_GENERAL_LEVEL_IDC
#define AVC_SPSWARN_RBSP_TRAILING_BITS
#define AVC_PPSWARN_RBSP_TRAILING_BITS
#define AVC_SHWARN_NO_OUTPUT_OF_PRIOR_PICS_FLAG
#define AVC_ETCWARN_INIT_SEQ_VCL_NOT_FOUND
#define AVC_ETCWARN_MISSING_REFERENCE_PICTURE
#define AVC_ETCWARN_ERROR_PICTURE_IS_REFERENCED
#define AVC_SPECWARN_OVER_PROFILE
#define AVC_SPECWARN_OVER_LEVEL
#define AVC_PRESWARN_MVD_RANGE_OUT
#define AVC_PRESWARN_MB_QPD_RANGE_OUT
#define AVC_PRESWARN_COEFF_RANGE_OUT
#define AVC_PRESWARN_MV_RANGE_OUT
#define AVC_PRESWARN_MB_SKIP_RUN_RANGE_OUT
#define AVC_PRESWARN_MB_TYPE_RANGE_OUT
#define AVC_PRESWARN_SUB_MB_TYPE_RANGE_OUT
#define AVC_PRESWARN_CBP_RANGE_OUT
#define AVC_PRESWARN_INTRA_CHROMA_PRED_MODE_RANGE_OUT
#define AVC_PRESWARN_REF_IDX_RANGE_OUT
#define AVC_PRESWARN_COEFF_TOKEN_RANGE_OUT
#define AVC_PRESWARN_TOTAL_ZERO_RANGE_OUT
#define AVC_PRESWARN_RUN_BEFORE_RANGE_OUT
#define AVC_PRESWARN_OVERCONSUME
#define AVC_PRESWARN_MISSING_SLICE

/************************************************************************/
/* WAVE5 ERROR ON ENCODER (ERR_INFO)                                    */
/************************************************************************/

/************************************************************************/
/* WAVE5 WARNING ON ENCODER (WARN_INFO)                                 */
/************************************************************************/
#define WAVE5_ETCWARN_FORCED_SPLIT_BY_CU8X8

/************************************************************************/
/* WAVE5 debug info (PRI_REASON)                                        */
/************************************************************************/
#define WAVE5_DEC_VCORE_VCE_HANGUP
#define WAVE5_DEC_VCORE_UNDETECTED_SYNTAX_ERR
#define WAVE5_DEC_VCORE_MIB_BUSY
#define WAVE5_DEC_VCORE_VLC_BUSY

#endif /* ERROR_CODE_H_INCLUDED */