AG903ライブラリリファレンス
内容インデックスホーム
前へ上へ次へ
AG903_PgpMgrSetConfigThreshold8Bit 関数

閾値処理の 8bit 閾値処理のパラメータ設定

Syntax
C++
int32_t AG903_PgpMgrSetConfigThreshold8Bit(AG903_PgpMgrPipelineHandle * handle, uint32_t ch, uint32_t type, uint32_t maxval, uint32_t maxthr, uint32_t minthr);
引数 
説明 
AG903_PgpMgrPipelineHandle * handle 
[in] パイプラインハンドルを指定します。 
uint32_t ch 
[in] 設定するマスク要素を指定します。 
uint32_t type 
[in] 閾値処理の8bit閾値処理のタイプを指定します。 
uint32_t maxval 
[in] 閾値処理の8bit閾値処理のmaxValueの値を指定します。 
uint32_t maxthr 
[in] 閾値処理の8bit閾値処理のmaxThresholdの値を指定します。 
uint32_t minthr 
[in] 閾値処理の8bit閾値処理のminThresholdの値を指定します。 

設定結果

返値の詳細 
説明 
正常終了 
-AG903_EINVAL 
handleに不正な値が指定された場合
chに不正な値が指定された場合
typeに不正な値が指定された場合
PGP閾値処理タイプが拡張仕様の時 minthr > maxthr となる値が指定された場合 

閾値処理の 8bit 閾値処理のパラメータを設定します。拡張仕様の時 minthr > maxthr となる値は指定できません。 

引数に指定可能な範囲は以下の通りです。

引数 
設定可能範囲 
ch 
PGP閾値マスク要素 
type 
PGP閾値処理タイプ 
maxval/maxthr/minthr 
下位 8bit のみ有効 
1: int32_t AG903_PgpMgrSetConfigThreshold8Bit(AG903_PgpMgrPipelineHandle *handle, uint32_t ch, uint32_t type, uint32_t maxval, uint32_t maxthr, uint32_t minthr) 2: { 3: 4: if ((handle == NULL) || (handle->id != AG903_PGP_MGR_PIPELINE_HANDLE_ID)) { 5: return -AG903_EINVAL; 6: } 7: 8: 9: switch (ch) { 10: case AG903_PGP_MGR_THR_CHANNEL_B: 11: case AG903_PGP_MGR_THR_CHANNEL_G: 12: case AG903_PGP_MGR_THR_CHANNEL_R: 13: break; 14: default: 15: return -AG903_EINVAL; 16: } 17: switch (type) { 18: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_BIN: 19: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_BIN_INV: 20: case AG903_PGP_MGR_THR_8BIT_TYPE_TRU: 21: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_ZERO: 22: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_ZERO_INV: 23: break; 24: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_BIN_EXT: 25: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_BIN_INV_EXT: 26: case AG903_PGP_MGR_THR_8BIT_TYPE_TRU_EXT: 27: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_ZERO_EXT: 28: case AG903_PGP_MGR_THR_8BIT_TYPE_THR_ZERO_INV_EXT: 29: if (minthr > maxthr) { 30: return -AG903_EINVAL; 31: } 32: break; 33: default: 34: return -AG903_EINVAL; 35: } 36: 37: 38: handle->thr_thr8_prm_type[ch] = type; 39: handle->thr_thr8_prm_maxval[ch] = maxval & THR_8THR_MAXV_MASK; 40: handle->thr_thr8_prm_maxthr[ch] = maxthr & THR_8THR_MAXTH_MASK; 41: handle->thr_thr8_prm_minthr[ch] = minthr & THR_8THR_MINTH_MASK; 42: handle->is_config_dirty[AG903_PGP_MGR_CONFIG_THR_8BIT] = true; 43: handle->is_dirty = true; 44: return AG903_ENONE; 45: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.