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

Update __main__.py #28

Merged
merged 1 commit into from
Oct 27, 2024
Merged

Update __main__.py #28

merged 1 commit into from
Oct 27, 2024

Conversation

xyperias
Copy link
Contributor

@xyperias xyperias commented May 6, 2023

extract motion vectors at h264 quarter-pixel precision

Currently the code uses only the integer precision end-point of motion vectors. However, AVMotionVector contains motion_x, motion_y and motion_scale values which allow for sub-pixel motion vector lengths.

This should be hardly visible in the visualization, but will show how to get more accurate motion vectors.

extract motion vectors at h264 quarter-pixel precision
@LukasBommes
Copy link
Owner

LukasBommes commented Oct 27, 2024

Thanks a lot for your contribution, @xyperias. I will include this in the next release.

Just for my own understanding: I get the purpose of the factor after reading the "Detailled description" section on this page. But what's the use of the constant offset by 0.5? Is this suppoed to act as a ceil operation?

@LukasBommes LukasBommes merged commit 4270061 into LukasBommes:master Oct 27, 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.

2 participants