AG903ライブラリリファレンス
Body Source
AG903_PgpMgrGetFrameCalcHandle 関数
本文ソース
コピコード
1: int32_t AG903_PgpMgrGetFrameCalcHandle(
AG903_PgpMgrFrameCalcHandle
**handle,
AG903_PgpMgrPipelineHandle
*master,
void
*slave) 2: { 3: int32_t i; 4:
AG903_PgpMgrPipelineHandle
*slave_pipeline = (
AG903_PgpMgrPipelineHandle
*)slave; 5:
AG903_PgpMgrVRAMInputHandle
*slave_vram = (
AG903_PgpMgrVRAMInputHandle
*)slave; 6: 7: 8:
if
(PgpContext.pipeline_time_sharing_enable ==
true
) { 9:
if
((PgpContext.num_frame_calc_handles + 1) >
AG903_PGP_MGR_MAX_FRAME_CALC_HANDLE
) { 10:
return
-
AG903_ENOMEM
; 11: } 12: }
else
{ 13:
if
((PgpContext.num_frame_calc_handles + 1) >
AG903_PGP_MGR_CALC_PIPELINE_NUM
) { 14:
return
-
AG903_ENOMEM
; 15: } 16: } 17: 18:
if
((handle == NULL) || (master == NULL) || (slave == NULL)) { 19:
return
-
AG903_EINVAL
; 20: } 21: 22: 23:
if
(master->id !=
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) { 24:
return
-
AG903_EINVAL
; 25: } 26:
if
((master->is_assign ==
true
) || (master->is_used_frame_calc ==
true
)) { 27:
return
-
AG903_EBUSY
; 28: } 29: 30:
if
(slave_pipeline->id ==
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) { 31:
if
((slave_pipeline->is_assign ==
true
) || (slave_pipeline->is_used_frame_calc ==
true
)) { 32:
return
-
AG903_EBUSY
; 33: } 34: slave_pipeline->frame_out_enable =
false
; 35: slave_pipeline->is_used_frame_calc =
true
; 36: slave_pipeline->is_dirty =
true
; 37: }
else
if
(slave_vram->id ==
AG903_PGP_MGR_VRAM_INPUT_HANDLE_ID
) { 38: slave_vram->ref_cnt++; 39: }
else
{ 40:
return
-
AG903_EINVAL
; 41: } 42: master->ifc_enable =
true
; 43: master->is_used_frame_calc =
true
; 44: master->is_dirty =
true
; 45: 46: 47:
for
(i = 0; i <
AG903_PGP_MGR_MAX_FRAME_CALC_HANDLE
; i++) { 48:
if
(PgpContext.frame_calc_handles[i].is_used ==
false
) { 49: PgpContext.frame_calc_handles[i].is_used =
true
; 50: PgpContext.frame_calc_handles[i].master_handle = master; 51: PgpContext.frame_calc_handles[i].slave_handle = slave; 52: PgpContext.frame_calc_handles[i].id =
AG903_PGP_MGR_FRAME_CALC_HANDLE_ID
; 53: PgpContext.frame_calc_handles[i].slave_pipeline = (slave_pipeline->id ==
AG903_PGP_MGR_PIPELINE_HANDLE_ID
) ?
true
:
false
; 54: *handle = &PgpContext.frame_calc_handles[i]; 55:
break
; 56: } 57: } 58: PgpContext.num_frame_calc_handles++; 59:
return
AG903_ENONE
; 60: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.
内容
|
インデックス
|
ホーム