AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_PgpMgrSetConfigThresholdColorSpace(AG903_PgpMgrPipelineHandle *handle, uint32_t limit, uint32_t shift, int32_t mtx[3][4]) 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: switch (limit) { 12: case AG903_PGP_MGR_LIMIT_0_255: 13: case AG903_PGP_MGR_LIMIT_16_235_AND_240: 14: break; 15: default: 16: return -AG903_EINVAL; 17: } 18: if (shift > AG903_PGP_MGR_MAX_COLOR_SPACE_SHIFT) { 19: return -AG903_EINVAL; 20: } 21: if (mtx == NULL) { 22: return -AG903_EINVAL; 23: } 24: 25: 26: handle->thr_csc2_limit = limit; 27: handle->thr_csc2_shift = shift; 28: for (i = 0; i < 3; i++) { 29: handle->thr_csc2_matrix[i][0] = mtx[i][0] & CSC_MUL_MASK; 30: handle->thr_csc2_matrix[i][1] = mtx[i][1] & CSC_MUL_MASK; 31: handle->thr_csc2_matrix[i][2] = mtx[i][2] & CSC_MUL_MASK; 32: handle->thr_csc2_matrix[i][3] = mtx[i][3] & CSC_ADD_MASK; 33: } 34: handle->is_config_dirty[AG903_PGP_MGR_CONFIG_THR_COLOR_SPACE] = true; 35: handle->is_dirty = true; 36: return AG903_ENONE; 37: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.