【发布时间】:2014-04-10 05:58:26
【问题描述】:
我正在研究Android的YuvImage.java代码,http://androidxref.com/4.2.2_r1/xref/frameworks/base/graphics/java/android/graphics/YuvImage.java#199:
为什么 YUY2 的步幅是宽度*2 而 NV21 的步幅是宽度?
代码如下:
199 private int[] calculateStrides(int width, int format) {
200 int[] strides = null;
201 if (format == ImageFormat.NV21) {
202 strides = new int[] {width, width};
203 return strides;
204 }
205
206 if (format == ImageFormat.YUY2) {
207 strides = new int[] {width * 2};
208 return strides;
209 }
210
211 return strides;
212 }
【问题讨论】:
-
为什么我读到的代码条件中的肯定是相反的?
标签: android