hsy75的个人空间 https://blog.eetop.cn/vivilife [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

Understanding the Diff & range of YUV or YCbCr

已有 2355 次阅读| 2007-12-6 18:37 |个人分类:video tech

天气: 晴朗
心情: 高兴
Get the question:
While we do the application for the Video Processor:
We always face these two key words for color space: YUV,YCbCr:

YCbCr is a scaled and offset version of the YUV color space
.1 what is the diff?
.11 The YUV is derived from the traditional B&W system which use the Y information only.
The YUV to RGB's equations =
Y = 0.299R´ + 0.587G´ + 0.114B´
U = – 0.147R´ – 0.289G´ + 0.436B´
= 0.492 (B´ – Y)
V = 0.615R´ – 0.515G´ – 0.100B´
= 0.877(R´ – Y)
and
R´ = Y + 1.140V
G´ = Y – 0.395U – 0.581V
B´ = Y + 2.032U
The range for Y is 0-255, and the U a range of 0 to ±112, and V a range of 0 to ±157.

.12 The YCbCr color space was developed as part of ITU-R BT.601 during the development of a world-wide digital component video standard.YCbCr is a
scaled and offset version of the YUV color space.
The scaled : The range scaled from 0-255 to 16-235 or 16-240.
The offset: The 128 value is added.The Zero Level may not be a black level.
Y is defined to have a nominal 8-bit,range of 16–235; Cb and Cr are defined to have a nominal range of 16–240.
Y601 = 0.299R´ + 0.587G´ + 0.114B´
Cb = –0.172R´ – 0.339G´ + 0.511B´ + 128
Cr = 0.511R´ – 0.428G´ – 0.083B´ + 128
R´ = Y601 + 1.371(Cr – 128)
G´ = Y601 – 0.698(Cr – 128) – 0.336(Cb – 128)
B´ = Y601 + 1.732(Cb – 128)

Summary:
.1 The YUV and YCbCr range diff: YUV UV : -128 to 128 , but YCbCr 0 -255
.2 Why -128 to 128 in YUV not ±112 ?
It seems for digital process,
Note that for digital data, 8-bit YUV and R´G´B´ data should be saturated at the 0 and 255 levels to avoid underflow and overflow
wrap-around problems.

Usage:
.1 The YUV color space is used in analog525 625 system
.2 The YCbCr is used in digital format.
.3 The YCbCr is sometime error used in DVD YPbPr
YCbCr applies only to digital video, but it is often incorrectly used in reference to the YPbPr analog component outputs of DVD players.
.4 The ADC that sampling the DVD YPbPr which has the gain and offset settings, sometime need to special setting in the after video processor ASIC.


中文说明:
YUV Color Space其实在ITU601,ITU656都采用了,在宝典里面,定义YUV和YCbCr是不同的类型的Color Space,其实两者还是有点相关的。
因为YCbCr其实就是从ITU-BT601定义出来的,其实就是一个缩放的,带偏移量的YUV 色空间。
本文,讨论的就是这两个色空间的不同,主要是讨论其采样的范围和格式的方面。

。1 标准的YUV空间的范围是带符号的,比如±112,适用于模拟的信号解调,所以说是适合525-625系统,具体就是:
CVBS,S-video,Y/C signal,SDTV Component 比如 480i
Q:为什么数字标清是数字的却用到了模拟色空间,因为SDTV本来就是为模拟信号准备的。

。2 标准的Ycbcr是用于数字的信号,比如:
480P,720P,HDTV,都是符合数字标准。输入YPbPr信号端口的信号,因此用的是ITU601或ITU656,而ITU656看作ITU601的扩展。
而YCBCR是在ITU601里面定义的变化的YUV格式,这样就不难理解,这些信号都是用的YCBCR色空间了。

。3 具体使用的例子
    .31 比如AD9883的输入为YCBCR的时候,由于ADC是在正负电平为参考的采样,那么,就必须审定CLAMP的电平到静态电平的位置,也就是设定OFFSET的值。
这样采样出来的数字信号是YCbCr的色空间,范围是0-255.而不是标准的YUV的带符号的数。
    .32 比如SAA7118的输出,虽然也可以打包为为BT601/656格式,但是,里面用的色空间都是原始的YUV扩展,那么在后面处理是,最好还是按照YUV的算法去做。


refer:
.1 Video Demystify
.2 http://www.fourcc.org/fccyvrgb.php


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 2

    粉丝
  • 1

    好友
  • 2

    获赞
  • 14

    评论
  • 3241

    访问数
关闭

站长推荐 上一条 /1 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-26 06:57 , Processed in 0.028233 second(s), 14 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部