-
Notifications
You must be signed in to change notification settings - Fork 172
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
[BUG] AFBC hor stride must be multiplied by 3/2 #509
Comments
The issue is weird,could you print the hor_stride value to check? |
Tested file is Bigbuckbunny 1080p h264. This is what i have to give to DRM Plane to render correctly. This is how the rendering is happening: stride = 1920/4 = 480 kernel is 5.10 rkr4 |
I had a mistake during testing, the actual multiplier is 3/2 not 4. So sorry for that, but i think i can make sense of 3/2 multiplier. For a given YU08 AFBC frame, you will have a single plane. If the actual frame is NV12/16/15/20 something semiplanar yuv, you will end up with hstride=width for Y plane and hstride=width/2 for UV plane. So may be AFBC is single plane, it expects stride as sum of all actual planes which is 1.5 of actual stride? |
Yes, the AFBC buffer size is slightly larger then original format size. |
This is a bug. Afbc frame can not be multiple planes, therefore if you give a stride based on only Y plane size, 3/2 scale factor of actual planes size will break your alignment. I dont understand why you close the issue? |
The fbc stride in MppFrame is not a buffer size stride. |
@HermanChen thanks for the explanation, in drm it is the plane stride i was concerned about the divider portion of 3 / 2, may cause 16 byte alignment 8 byte when scaled up and down, but i tested this with width = various odd numbers * 16, each time drm picked it up correctly without any stride skew. So this works as you have intended then. Closing to keep it clean. |
My rendering path is mpp -> ffmpeg (drm_prime) -> kodi(kms/gbm -> vop2)
i found out by testing that when the decoder spits AFBC frames, the horstride provided must be divided by 4.
nyanmisaka/ffmpeg-rockchip@4487c02
I do not know the reason for this but i found out by testing, when the mpp provided hor stride is provided the output is like nyanmisaka/ffmpeg-rockchip#4 (comment)
When divided by 4, everything is fine.
The text was updated successfully, but these errors were encountered: