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

lavc/videotoolbox: remove opengl compatability key #488

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Oct 23, 2024

We are not using OpenGL and this compatability key could introduce performance penalty on some Macs. Performance difference is neglible on Apple Silicon but on old Intel Macs like the 2018 MacBook Air, decoding performance could be reduced by 15% as the IOSurface might make extra frame copies to reshape the pixel buffer.

Changes

Issues

We are not using OpenGL and this compatability key could introduce
performance penalty on some Macs. Performance difference is neglible
on Apple Silicon but on old Intel Macs like the 2018 MacBook Air,
decoding performance could be reduced by 15% as the IOSurface might
make extra frame copies to reshape the pixel buffer.
@gnattu gnattu requested a review from a team October 23, 2024 15:50
@nyanmisaka
Copy link
Member

kCVPixelBufferMetalCompatibilityKey Can this key bring any benefits in Metal?

@gnattu
Copy link
Member Author

gnattu commented Oct 23, 2024

kCVPixelBufferMetalCompatibilityKey Can this key bring any benefits in Metal?

That key is not required as long as the pixel buffer is IOSurface backed and that key is always set:

CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfacePropertiesKey, io_surface_properties);

For all IOSurface backed CVPixelBuffer the MTLTexture created by CVMetalTextureCacheCreateTextureFromImage will use the CVPixelBuffer itself for texture storage which means no GPU frame uploading or extra texture allocation is required, at least not on Apple GPUs.

@nyanmisaka nyanmisaka merged commit 7ba9198 into jellyfin Oct 23, 2024
27 checks passed
@nyanmisaka nyanmisaka deleted the vt-disable-opengl-compatability branch October 23, 2024 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants