diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index c034681..c46134d 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -1758,6 +1758,15 @@ static IV_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle, return IV_FAIL; } + if (ps_ip->s_ive_ip.u4_entropy_coding_mode > 1) + { + ps_op->s_ive_op.u4_error_code |= 1 + << IVE_UNSUPPORTEDPARAM; + ps_op->s_ive_op.u4_error_code |= + IH264E_INVALID_ENTROPY_CODING_MODE; + return IV_FAIL; + } + break; } diff --git a/encoder/ih264e_error.h b/encoder/ih264e_error.h index 1eba46c..5a7a560 100644 --- a/encoder/ih264e_error.h +++ b/encoder/ih264e_error.h @@ -223,6 +223,9 @@ typedef enum /**Not enough memory allocated as output buffer */ IH264E_INSUFFICIENT_OUTPUT_BUFFER = IH264E_CODEC_ERROR_START + 0x30, + /**Invalid entropy coding mode */ + IH264E_INVALID_ENTROPY_CODING_MODE = IH264E_CODEC_ERROR_START + 0x31, + /**max failure error code to ensure enum is 32 bits wide */ IH264E_FAIL = -1,