Switch default color format to YV12.
Currently N21 is used per default. But according to
http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12
YV12 has been mandatory to support since api level 12.
Since YV12 and I420 is the same except for the order of planes, this format is cheaper to use.

Tested on N5, N6 and a Samsung device.

BUG=4011
R=glaznev@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/40749004

Cr-Commit-Position: refs/heads/master@{#8411}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8411 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/androidvideocapturer.cc b/talk/app/webrtc/androidvideocapturer.cc
index 3264421..05fa9b9 100644
--- a/talk/app/webrtc/androidvideocapturer.cc
+++ b/talk/app/webrtc/androidvideocapturer.cc
@@ -63,7 +63,7 @@
                            int length,
                            int rotation,
                            int64 time_stamp_in_ms) {
-    captured_frame_.fourcc = static_cast<uint32>(cricket::FOURCC_NV21);
+    captured_frame_.fourcc = static_cast<uint32>(cricket::FOURCC_YV12);
     captured_frame_.data = frame_data;
     captured_frame_.elapsed_time = rtc::TimeNanos() - start_time_;
     captured_frame_.time_stamp =
@@ -120,7 +120,7 @@
           json_value["width"].asInt(),
           json_value["height"].asInt(),
           cricket::VideoFormat::FpsToInterval(json_value["framerate"].asInt()),
-          cricket::FOURCC_NV21);
+          cricket::FOURCC_YV12);
       formats.push_back(format);
   }
   SetSupportedFormats(formats);
@@ -169,7 +169,7 @@
 }
 
 bool AndroidVideoCapturer::GetPreferredFourccs(std::vector<uint32>* fourccs) {
-  fourccs->push_back(cricket::FOURCC_NV21);
+  fourccs->push_back(cricket::FOURCC_YV12);
   return true;
 }
 
diff --git a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
index 2650e71..e40b702 100644
--- a/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
+++ b/talk/app/webrtc/java/src/org/webrtc/VideoCapturerAndroid.java
@@ -386,7 +386,7 @@
       }
       parameters.setPictureSize(width, height);
       parameters.setPreviewSize(width, height);
-      int format = ImageFormat.NV21;
+      int format = ImageFormat.YV12;
       parameters.setPreviewFormat(format);
       camera.setParameters(parameters);
       // Note: setRecordingHint(true) actually decrease frame rate on N5.