跳至主要内容

YUV Sampling Format and Video Format

Figure below shows three sampling patterns for Y, Cb and Cr. 4:4:4 sampling means that the three components (Y, Cb and Cr) have the same resolution, i.e. each pixel contains three components. In 4:2:2 sampling, the chrominance components have the same vertical resolution as luma but half the horizontal resolution. 4:2:0 is a popular sampling format, chrominance components have half the horizontal and vertical resolution of luma. The term "4:2:0" is rather confusing because the numbers do not actually have a logical interpretation and appear to have been chosen historically as a 'code' to identify this particular sampling pattern. 4:2:0 sampling is widely used for consumer applications such as video conferencing, DVD storage. 4:2:0 sampling is sometimes described as '12 bits per pixel'. Using 4:4:4 sampling a total of 12 samples are required for four pixels, requiring a total of 12x8=96bits, an average of 96/4=24 bits per pixel. While in 4:2:0 sampling, only six samples are required, requiring a total of 6x8=48bits, an average of 48/4=12 bits per pixel.


In practice, it is common to capture or convert one of a set of "intermediate formats" prior to compression and transmission. The Common Intermediate Format (CIF) is the basis for a popular set of formats.
Sub-QCIF 128 x 96
Quarter CIF (qcif) 176 x 144
CIF 352 x 288
4CIF 704 x 576
YUV Raw file sometimes use this as file extensions, for example, a CIF format file can have a .cif extension. But sometimes the dimension can be deduced from the file size, it is only true when we know one of them: the sampling format or the video format. If we know neither, the deduction is not authentic. In the next section, we will describe the YUV raw format, it's very simple.

part of materials and the figure in this section are referrenced from the book "H.264 and MPEG-4 Video Compression" by Iain E. G. Richardson

评论

此博客中的热门博文

反转剧

这两天明显感到天气转冷,呱呱的家里也已经下起了大雪,南京则是阴冷潮湿,让人没有了出行的欲望。没想到躲在被子里看反转剧也成了度过寒冬的一剂良药。在PPLive越来越让人失望的时候,PPStream横空出世,虽然广告仍是少不了的主题,但从视频质量和播放连续性上来说都超过PPLive,实为居家必备之良品(由此可见,新事物一定会战胜旧事物......)。韩国的反转剧最近似乎比较流行,称之为反转剧就在于其结果总是让人出乎意料,不合常理,其间又不乏各种搞怪搞笑的镜头,各种当红帅哥美女也一定让DDMM们爱不释手,20~30分钟一集的剧情一改韩剧拖沓的风貌,想看就看,容易切入。 反转剧,今天你看了吗?

from cpp to java

when i start to study java with a cpp background, i find it is very difficult to convert my mind. i always think how some features in cpp was implemented in java, this give me a little reject to java language. though java is born from c, i think they still have different applicable domains, so try to study both is good for me, and java is a pure OO language, i believe it will give me a better understanding on OOD.

低谷

近段时间,小猪的身体不好,连续好几个周末游走于各个医院,两人的心情也坏到了极点。现在的小猪已俨然成为一个药罐子,不再提当年之勇。这个周末又发起烧来,像一滩烂泥似地躺在床上,真是祸不单行。 而我呢,由于前任离职的缘故,现在出奇地忙,每天就像打仗似地,压得人喘不过气来,工作与家庭,真有些夹缝中求生存的感觉,两头都要兼顾,我想这一次我们是真的走到一个低谷了吧。 希望这一切都会过去,一切都能圆满地解决。