Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top