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

utils/libav: Only adjust bit_shift for DRM P010 frames #239

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

nowrep
Copy link
Contributor

@nowrep nowrep commented Jan 9, 2024

Not sure about this one, but it fixes rendering P010 on radv (would be full green otherwise).

@nowrep nowrep changed the title utils/libav: Don't fix sample depth for Vulkan P010 utils/libav: Don't fix sample depth for Vulkan frames Jan 9, 2024
@haasn
Copy link
Owner

haasn commented Jan 10, 2024

Hi, can you share the command line you used to reproduce / test this? I want to make sure I understand fully what's going on, first.

@nowrep
Copy link
Contributor Author

nowrep commented Jan 10, 2024

can you share the command line

I don't have any, if you can send me some example I can try to reproduce.

My case is just simple code, very similar to what you can see in #237 . Looking more into it, bits->sample_depth being 0 doesn't seem to cause issues in my code, but the additional bit_shift will make it render incorrectly.

@streamingdv
Copy link

@nowrep I tested your fix and as you mentioned, this line in libav_internal.h is producing the green frames

case AV_PIX_FMT_P010: bits->bit_shift = 6; break;

I created a patch in my project which removes the "switch case" and can confirm that I no longer receive green frames for AV_PIX_FMT_P010 and everything works as intended.

Fixes mapping Vulkan P010 frames.

Closes haasn#237
@nowrep
Copy link
Contributor Author

nowrep commented Jan 11, 2024

Thanks for testing. The bit shift is still needed for DRM P010 frames, so I updated the patch accordingly.

@nowrep nowrep changed the title utils/libav: Don't fix sample depth for Vulkan frames utils/libav: Only adjust bit_shift for DRM P010 frames Jan 11, 2024
@haasn haasn merged commit a5e7010 into haasn:master Jan 29, 2024
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.

3 participants