-
Notifications
You must be signed in to change notification settings - Fork 14
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
Trying to understand padding issues #3
Comments
gordinmitya
added a commit
that referenced
this issue
Jan 14, 2023
Hello @acoutts, just added a test case with your numbers and I looks like code handles them correctly. Could you check that's is different on your device vs test case above? And also what is exact issues you faced (crash, wrong picture, smth else)? |
Sorry I should clarify the code works great! I just want to better understand why the row stride can sometimes differ and why padding may or may not be present. |
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. On some android devices I’ve observed that there is some padding added. The row stride is > the image width on all 3 planes (YUV420).
Through trial and error I found I only need to trim the padding from the luma channel but not the chroma channels. Coincidentally the pixel stride is 1 on the luma channel and 2 on the chroma channels.
I’m trying to understand why the padding sometimes exists and why it can only be trimmed when pixel stride is 1.
In my example I observed the following on some devices when streaming YUV420 from camera2:
Image width: 1280
Image height: 720
Y pixel stride: 1
Y row stride: 1536
U pixel stride: 2
U row stride: 1536
V pixel stride: 2
V row stride: 1536
The text was updated successfully, but these errors were encountered: