YUV三种数据格式占用空间计算:
YUV444 ==> YUV444
1920*1080 ==> 1920*1080个Y+1920*1080个U+1920*1080个V = 1920*1080*3
YUV420 ==> YUV411
1920*1080 ==> 1920*1080个Y+1920*1080个U/4+1920*1080个V/4 = 1920*1080*3/2
YUV422 ==> YUV422
1920*1080 ==> 1920*1080个Y+1920*1080个U/2+1920*1080个V/2 = 1920*1080*2
YUV422三种存放方式:
YUV422 Planar(平面模式)
存储方式:先存储所有的Y; 再存储所有的U; 再存储所有的V;
YUV422 Semi-Planar(半平面模式)
存储方式:先存储所有的Y; UV交叉存放(U V U V ...)
YUV422 Interleaved(间隔)
存储方式:U Y V Y U Y V Y ....
YUV420两种存放方式:
YUV420 Planar(平面模式)
存储方式:先存储所有的Y; 再存储所有的U; 再存储所有的V;
YUV420 Semi-Planar(半平面模式)
存储方式:先存储所有的Y; UV交叉存放(U V U V ...)
YUV8种存储方式:
[YUV444]
yuv444 ==> y...u...v...
[YUV422]
yuv422 ==> YUYV -> yuyv...
==> UYVY -> uyvy...
yuv422P ==> yy...u...v...
[YUV420]
yuv420SP ==> Nv12(ios) -> yyyy...uv...
yuv420SP ==> Nv21(android) -> yyyy...vu...
yuv420P ==> Yu12(I420) -> yyyy...u...v...
yuv420P ==> Yv12 -> yyyy...v...u...