VP8 Encoding results in grayscale image on Google Glass

陌路散爱 提交于 2019-12-13 05:04:09

问题


The application I am working on is developed for Google Glass but runs on Android tablets as well.It uses VP8 encoding to transfer camera images to a remote application.

The preview format parameter on the camera is set to ImageFormat.YV12.

The VP8 encoder is initialized with VPX_IMG_FMT_YV12 parameter.

When the application .apk file is installed and run from the Glass, the image is displayed in gray scale on the remote application.

When the same .apk file is installed on a tablet or a phone, the image is displayed in proper colors.

I am wondering if anyone has any idea on where the problem could lie. Regards.


回答1:


I finally figured out what is happening.

There is a bug in Google Glass camera module. Although it gladly accepts the requested image format of YV12, the preview buffer actually contains data in NV21 format.

I had to dump the camera preview buffer into a file and examine each byte just to figure this out:-(.

If you intend to use YV12 format, you may be better off using NV21 format for now until this bug is fixed.



来源:https://stackoverflow.com/questions/24049712/vp8-encoding-results-in-grayscale-image-on-google-glass

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!