3

I've got a VoIP video application that works fine on MAC, Windows and iOS using the VP8 codec. When I place a call between any of these platforms and Android both sides of the call have a black and white image with red, green and blue squares. The same happens when Android calls Android.

I'm compiling VP8 with:

./libvpx/configure --target=armv7-android-gcc --sdk-path=/Applications/adt/ndk --disable-examples --enable-runtime-cpu-detect  --enable-realtime-only --enable-neon

My question is why does the Android platform yield this result and how can I go about debugging it?

Here is a screenshot of the problem:

Additional information:

The camera frame format is ImageFormat.NV21. The encoder image format is VPX_IMG_FMT_I420.

junglecat
  • 643
  • 1
  • 10
  • 19
  • since picture is not skewed, can it be a mismatch like rgba, argb or rgb, bgr? – auselen Feb 23 '13 at 06:59
  • My initial hunch is that something is incorrectly interpreting YUV data, but the colour "noise" looks like randomish DCT blocks. It might help to show the video frames at their native resolution (the noise period is about 14; common blocksizes are 8x8 and 16x16). Also, is it the encoder, decoder, or both that have this problem? – tc. Feb 23 '13 at 15:37
  • I've updated with additional information. I think the formats are compatible? – junglecat Feb 23 '13 at 19:07

1 Answers1

0

Because libvpx is configured to take image format VPX_IMG_FMT_I420 the NV21 frames must first be converted to I420.

junglecat
  • 643
  • 1
  • 10
  • 19
  • 1
    Also, I recommend using the https://code.google.com/p/libyuv/ for the mentioned VPX_IMG_FMT_I420 the NV21 frames conversion on android. It works well, and it is fast since it leverages low level NEON instructions for conversion when possible – Aki Mar 20 '13 at 20:22