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

Use linear decode output buffer in the hybrid-GPU case #196

Closed

Conversation

phreer
Copy link
Contributor

@phreer phreer commented Oct 17, 2024

In hybrid GPU case, video decoder could be iGPU and the coded images would be consumed by dGPU. Unfortunately, it's likely that we can hardly find a tiling format supported by both of them. To achieve best compatibility and make our life better, simply use linear buffers for decoded images.

By setting CPU_READ and CPU_WRITE flags, we force OneVPL to allocate internal buffers and blit decoded content to external buffers. In this way we can work around hardware limitation that DG2 cannot decode to linear buffers.

@sysopenci
Copy link

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

@sysopenci
Copy link

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

c2_utils/include/mfx_c2_utils.h Outdated Show resolved Hide resolved
c2_utils/src/mfx_intel_device.cpp Outdated Show resolved Hide resolved
@phreer phreer changed the title Enforce linear decode output buffer to support Use linear decode output buffer in the hybrid-GPU case Nov 6, 2024
In hybrid GPU case, video decoder could be iGPU and the coded images
would be consumed by dGPU. Unfortunately, it's likely that we can hardly
find a tiling format supported by both of them. To achieve best
compatibility and make our life better, simply use linear buffers for
decoded images.

By setting CPU_READ and CPU_WRITE flags, we force OneVPL to allocate
internal buffers and blit decoded content to external buffers. In this
way we can work around hardware limitation that DG2 cannot decode to
linear buffers.

We will detect the GPU group type and decide whether to use linear
buffers or not.

Tracked-On: OAM-126399
Signed-off-by: Weifeng Liu <[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

@phreer
Copy link
Contributor Author

phreer commented Nov 12, 2024

Close with #202.

@phreer phreer closed this Nov 12, 2024
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