ImageFormat.Yv12 字段
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.
Android YUV 格式。
[Android.Runtime.Register("YV12")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)]
public const Android.Graphics.ImageFormatType Yv12 = 842094169;
[<Android.Runtime.Register("YV12")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Graphics.ImageFormatType enum directly instead of this field.", true)>]
val mutable Yv12 : Android.Graphics.ImageFormatType
字段值
Value = 842094169- 特性
注解
Android YUV 格式。
此格式将公开给软件解码器和应用程序。
YV12 是一种 4:2:0 YCrCb 平面格式,由 WxH Y 平面组成,后跟 (W/2) x (H/2) Cr 和 Cb 平面。
此格式假定 <ul><li>an even width</li><li>an even height</li><li>a horizontal stride multiple of 16 pixel</li li><>a vertical stride equal to the height</li></ul>
y_size = stride * height
c_stride = ALIGN(stride/2, 16)
c_size = c_stride * height/2
size = y_size + c_size * 2
cr_offset = y_size
cb_offset = y_size + c_size
android.hardware.camera2对于 API,#YUV_420_888建议改用 YUV 输出的格式。
对于较旧的相机 API,由于 API 级别为 12,因此保证预览图像支持 android.hardware.Camera 此格式;对于早期 API 版本,请检查 android.hardware.Camera.Parameters#getSupportedPreviewFormats()。
请注意,对于相机预览回调使用(见 android.hardware.Camera#setPreviewCallback), 步幅 值尽可能小;也就是说,它等于:
stride = ALIGN(width, 16)
Java文档android.graphics.ImageFormat.YV12。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
另请参阅
- <xref:Android.Hardware.Camera.SetPreviewCallback(.IPreviewCallback)>