AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
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.