Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance when CPU need access decode surface #179

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

nanazhan
Copy link
Contributor

@nanazhan nanazhan commented Aug 30, 2024

Improve performance when CPU need access decode surface

1. Send consumer usage from framework, allocate system/video memory according to
consumer usage.
2. If cpu read often, use minigbm allocate linear NV12 buffer, and C2 send this
"system buffer" to OneVPL, OneVPL internally allocate NV12 buffer for decoding using
vaapi and copy this internal buffer to linear surface internally

Tracked-On: OAM-124103

@sysopenci
Copy link

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket is present.

@nanazhan nanazhan changed the title Memory Optimization for Surfaces with CPU Read Access Improve performance when CPU need access decode surface Aug 30, 2024
nanazhan added a commit to nanazhan/minigbm that referenced this pull request Aug 30, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124103
Signed-off-by: Nana Zhang <[email protected]>
1. Send consumer usage from framework, allocate system/video memory according to
consumer usage.
2. If cpu read often, use minigbm allocate linear NV12 buffer, and C2 send this
"system buffer" to OneVPL, OneVPL internally allocate NV12 buffer for decoding using
vaapi and copy this internal buffer to linear surface internally

Tracked-On: OAM-124103
Signed-off-by: Nana Zhang <[email protected]>
Copy link

@feijiang1 feijiang1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sysopenci sysopenci added PR approved and removed Pending PR Review Pending PR Review labels Sep 4, 2024
@sysopenci
Copy link

Android CI has started Engineering Build for this issue ,Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci
Copy link

SUCCESS: Android CI has completed Engineering Build for this issue.Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci sysopenci added Engineering Build Successful Engineering Build Successful and removed Engineering Build Not Started Engineering Build Not Started labels Sep 4, 2024
@nanazhan
Copy link
Contributor Author

nanazhan commented Sep 5, 2024

m_mfxVideoParams.IOPattern = (m_consumerUsage == C2MemoryUsage::CPU_READ) ? MFX_IOPATTERN_OUT_SYSTEM_MEMORY : MFX_IOPATTERN_OUT_VIDEO_MEMORY;
This is the revert method for this PR. No need to change others if need revert.

nanazhan added a commit to nanazhan/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
nanazhan added a commit to nanazhan/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
@sysopenci
Copy link

Android CI has started Engineering Build for this issue ,Please check the linked Tracked-On issue/Android CI Web for more details.

nanazhan added a commit to nanazhan/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
@sysopenci
Copy link

SUCCESS: Android CI has completed Engineering Build for this issue.Please check the linked Tracked-On issue/Android CI Web for more details.

@sysopenci
Copy link

Android CI has started MERGE Build for this pr ,Please check the linked Tracked-On issue/Android CI Web for more details.

sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
@sysopenci sysopenci merged commit 7968852 into projectceladon:celadon/u/mr0/master Sep 6, 2024
15 checks passed
sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Sep 6, 2024
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
@sysopenci
Copy link

Android CI has completed MERGE Build for this pr, build is SUCCESS. Please check the linked Tracked-On issue/Android CI Web for more details. For Binaries: /cactus-absp-or-local/celadon_umr0_master-merge/75

lsun30 pushed a commit to lsun30/minigbm that referenced this pull request Dec 6, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
(cherry picked from commit 761fe4a)
Signed-off-by: Lina Sun <[email protected]>
lsun30 pushed a commit to lsun30/minigbm that referenced this pull request Dec 9, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>
(cherry picked from commit 761fe4a)
Signed-off-by: Lina Sun <[email protected]>
lsun30 pushed a commit to lsun30/minigbm that referenced this pull request Dec 10, 2024
1. This is a revert for projectceladon#122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 761fe4a)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Jan 6, 2025
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 761fe4a)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Jan 6, 2025
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 761fe4a)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
sysopenci pushed a commit to projectceladon/minigbm that referenced this pull request Jan 6, 2025
1. This is a revert for #122
2. Releated to projectceladon/MediaSDK_C2#179

Tracked-On: OAM-124403
Signed-off-by: Nana Zhang <[email protected]>

(cherry picked from commit 761fe4a)
Tracked-On: OAM-128364
Signed-off-by: Lina Sun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants