-
Notifications
You must be signed in to change notification settings - Fork 13
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
UnsupportedImageFormatException #5
Comments
@sellmair can you provide some info about these lines: operator fun YuvImage.Factory.invoke(yuv: Yuv): YuvImage {
// YuvImage.kt
if (yuv.y.pixelStride != 1 || yuv.y.rowStride != yuv.width) { // <-- here
throw UnsupportedImageFormatException(yuv)
// Yuv+defrag.kt
fun Yuv.defrag(): Yuv {
val start = System.currentTimeMillis()
require(y.pixelStride == 1)
require(y.rowStride == width) // <--- and here In documentation it's not stated that |
Thanks for creating the issue, I have exactly the same problem using a Google Pixel 2.
|
@m-rm I fixed it with commenting two lines I mentioned above But that's not the best fix, because it will move all the pixels from NV21 format to YUV420. I'm going to create more efficient library – will post update here. |
you tried the camera2 API ? |
with camera api 1 we don't need that – there's ready to use |
@LiorA1 @m-rm |
Yuv format is not supported: Yuv(resource=androidx.camera.core.SettableImageProxy@f251aa8, width=864, height=480, y=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=430048 cap=430048], pixelStride=1, rowStride=896), u=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=215007 cap=215007], pixelStride=2, rowStride=896), v=Plane(buffer=java.nio.DirectByteBuffer[pos=0 lim=215007 cap=215007], pixelStride=2, rowStride=896))
Hello, can you suggest what is the possible cause for this error?
I noticed strange values width = 864 but rowStride = 896, may be this is the reason.
Sony Xperia XZ3 Black (H9436)
The text was updated successfully, but these errors were encountered: