AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_PgpMgrSetConfigSpatialFilter(AG903_PgpMgrPipelineHandle *handle, uint32_t shift, uint32_t border, uint32_t border_red, uint32_t border_green, uint32_t border_blue, int32_t coeff[9], int32_t offset) 2: { 3: int32_t i; 4: 5: 6: if ((handle == NULL) || (handle->id != AG903_PGP_MGR_PIPELINE_HANDLE_ID)) { 7: return -AG903_EINVAL; 8: } 9: 10: 11: if (shift > AG903_PGP_MGR_MAX_SPF_SHIFT) { 12: return -AG903_EINVAL; 13: } 14: switch (border) { 15: case AG903_PGP_MGR_SPF_BORDER_COLOR: 16: case AG903_PGP_MGR_SPF_BORDER_NEIGHBOR: 17: break; 18: default: 19: return -AG903_EINVAL; 20: } 21: if (coeff == NULL) { 22: return -AG903_EINVAL; 23: } 24: 25: 26: handle->spf_shift = shift; 27: handle->spf_border_sel = border; 28: handle->spf_border_red = border_red; 29: handle->spf_border_green = border_green; 30: handle->spf_border_blue = border_blue; 31: for (i = 0; i < 9; i++) { 32: handle->spf_coeff[i] = coeff[i] & SPF1_COEFF_MASK; 33: } 34: handle->spf_offset = offset & SPF1_OFFSET_MASK; 35: handle->is_config_dirty[AG903_PGP_MGR_CONFIG_SP_FILTER] = true; 36: handle->is_dirty = true; 37: return AG903_ENONE; 38: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.