青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

牽著老婆滿街逛

嚴(yán)以律己,寬以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

YUV 像素格式

轉(zhuǎn)載自:http://blog.csdn.net/skdev/article/details/6583028

1簡(jiǎn)介

YUV是種顏色編碼方法,是彩色電視為了兼容黑白電視而發(fā)展起來(lái)的。在現(xiàn)代彩色電視系統(tǒng)中,通常采用三管彩色攝影機(jī)或彩色CCD攝影機(jī)進(jìn)行取像,然后把取得的彩色圖像信號(hào)經(jīng)分色、分別放大校正后得到RGB,再經(jīng)過(guò)矩陣變換電路得到亮度信號(hào)Y和兩個(gè)色差信號(hào)R-Y(即U)、B-Y(即V),然后對(duì)這三個(gè)信號(hào)分別進(jìn)行編碼。Y就是所謂的流明(luminance),表示光的濃度且為非線性,使用伽馬修正(gamma correction)編碼處理,而CB和CR則為藍(lán)色和紅色的濃度偏移量成份。

 

2 YUV采樣格式

  (1) YUV 4:4:4

  YUV三個(gè)信道的抽樣率相同,因此在生成的圖像里,每個(gè)象素的三個(gè)分量信息完整(每個(gè)分量通常8比特),經(jīng)過(guò)8比特量化之后,未經(jīng)壓縮的每個(gè)像素占用3個(gè)字節(jié)。

  下面的四個(gè)像素為: [Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]

  存放的碼流為: Y0 U0 V0 Y1 U1 V1 Y2 U2 V2 Y3 U3 V3

  (2) YUV 4:2:2

  每個(gè)色差信道的抽樣率是亮度信道的一半,所以水平方向的色度抽樣率只是4:4:4的一半。對(duì)非壓縮的8比特量化的圖像來(lái)說(shuō),每個(gè)由兩個(gè)水平方向相鄰的像素組成的宏像素需要占用4字節(jié)內(nèi)存。

  下面的四個(gè)像素為:[Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]

  存放的碼流為:Y0 U0 Y1 V1 Y2 U2 Y3 V3

  映射出像素點(diǎn)為:[Y0 U0 V1] [Y1 U0 V1] [Y2 U2 V3] [Y3 U2 V3]

  (3) YUV 4:1:1

  4:1:1的色度抽樣,是在水平方向上對(duì)色度進(jìn)行4:1抽樣。對(duì)于低端用戶和消費(fèi)類產(chǎn)品這仍然是可以接受的。對(duì)非壓縮的8比特量化的視頻來(lái)說(shuō),每個(gè)由4個(gè)水平方向相鄰的像素組成的宏像素需要占用6字節(jié)內(nèi)存。

  下面的四個(gè)像素為: [Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]

  存放的碼流為: Y0 U0 Y1 Y2 V2 Y3

  映射出像素點(diǎn)為:[Y0 U0 V2] [Y1 U0 V2] [Y2 U0 V2] [Y3 U0 V2]

  (4)YUV4:2:0

  4:2:0并不意味著只有Y,Cb而沒(méi)有Cr分量。它指得是對(duì)每行掃描線來(lái)說(shuō),只有一種色度分量以2:1的抽樣率存儲(chǔ)。相鄰的掃描行存儲(chǔ)不同的色度分量,也就是說(shuō),如果一行是4:2:0的話,下一行就是4:0:2,再下一行是4:2:0...以此類推。對(duì)每個(gè)色度分量來(lái)說(shuō),水平方向和豎直方向的抽樣率都是2:1,所以可以說(shuō)色度的抽樣率是4:1。

  下面八個(gè)像素為:[Y0 U0 V0] [Y1 U1 V1] [Y2 U2 V2] [Y3 U3 V3]

   [Y5 U5 V5] [Y6 U6 V6] [Y7U7 V7] [Y8 U8 V8]

  存放的碼流為:Y0 U0 Y1 Y2 U2 Y3 Y5 V5 Y6 Y7 V7 Y8

  映射出的像素點(diǎn)為:[Y0 U0 V5] [Y1 U0 V5] [Y2 U2 V7] [Y3 U2 V7]

   [Y5 U0 V5] [Y6 U0 V5] [Y7U2 V7] [Y8 U2 V7]

 3 YUV 存儲(chǔ)格式

YUV格式分為packed格式和planar格式,packed格式會(huì)將YUV數(shù)據(jù)按順序放進(jìn)數(shù)組里,planar則分將YUV的數(shù)據(jù)分為三部分放進(jìn)數(shù)組里,即先放Y部分的數(shù)據(jù),再放U,接著是V的數(shù)據(jù)。

3.1 Packed YUV Formats

Label

Bits per pixel

Description

AYUV

32

Combined YUV and alpha

CLJR

8

Cirrus Logic format with 4 pixels packed into a u_int32. A form of YUV 4:1:1 wiht less than 8 bits per Y, U and V sample.

cyuv

16

Essentially a copy of UYVY except that the sense of the height is reversed - the image is upside down with respect to the UYVY version.

GREY

8

Apparently a duplicate of Y800 (and also, presumably, "Y8  ")

IRAW

?

Intel uncompressed YUV. I have no information on this format - can you help?

IUYV

16

Interlaced version of UYVY (line order 0, 2, 4,....,1, 3, 5....) registered by Silviu Brinzei of LEAD Technologies.

IY41

12

Interlaced version of Y41P (line order 0, 2, 4,....,1, 3, 5....) registered by Silviu Brinzei of LEAD Technologies.

IYU1

12

12 bit format used in mode 2 of the IEEE 1394 Digital Camera 1.04 spec. This is equivalent to Y411

IYU2

24

24 bit format used in mode 0 of the IEEE 1394 Digital Camera 1.04 spec

HDYC

16

YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32. This is a suplicate of UYVY except that the color components use the BT709 color space (as used in HD video).

UYNV

16

A direct copy of UYVY registered by NVidia to work around problems in some old codecs which did not like hardware which offered more than 2 UYVY surfaces.

UYVP

24?

YCbCr 4:2:2 extended precision 10-bits per component in U0Y0V0Y1 order. Registered by Rich Ehlers of Evans & Sutherland. (Awaiting confirmation of component packing structure)

UYVY

16

YUV 4:2:2 (Y sample at every pixel, U and V sampled at every second pixel horizontally on each line). A macropixel contains 2 pixels in 1 u_int32.

V210

32

10-bit 4:2:2 YCrCb equivalent to the Quicktime format of the same name.

V422

16

I am told that this is an upside down version of UYVY.

V655

16?

16 bit YUV 4:2:2 format registered by Vitec Multimedia. I have no information on the component ordering or packing.

VYUY

?

ATI Packed YUV Data (format unknown but you can get hold of a codec supporting ithere)

Y422

16

Direct copy of UYVY as used by ADS Technologies Pyro WebCam firewire camera.

YUY2

16

YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel.

YUYV

16

Duplicate of YUY2

YUNV

16

A direct copy of YUY2 registered by NVidia to work around problems in some old codecs which did not like hardware which offered more than 2 YUY2 surfaces.

YVYU

16

YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel.

Y41P

12

YUV 4:1:1 (Y sample at every pixel, U and V sampled at every fourth pixel horizontally on each line). A macropixel contains 8 pixels in 3 u_int32s.

Y411

12

YUV 4:1:1 with a packed, 6 byte/4 pixel macroblock structure.

Y211

8

Packed YUV format with Y sampled at every second pixel across each line and U and V sampled at every fourth pixel.

Y41T

12

Format as for Y41P but the lsb of each Y component is used to signal pixel transparency .

Y42T

16

Format as for UYVY but the lsb of each Y component is used to signal pixel transparency .

YUVP

24?

YCbCr 4:2:2 extended precision 10-bits per component in Y0U0Y1V0 order. Registered by Rich Ehlers of Evans & Sutherland.

Y800

8

Simple, single Y plane for monochrome images.

Y8

8

Duplicate of Y800 as far as I can see.

Y16

16

16-bit uncompressed greyscale image.

 UYVY存儲(chǔ)結(jié)構(gòu)

UYVY 是一種最常用的 YUV 4:2:2 格式,其數(shù)據(jù)排列如下:

  

3.2 Planar YUV Formats

Label

Bits per pixel

Description

YVU9

9

8 bit Y plane followed by 8 bit 4x4 subsampled V and U planes. Registered by Intel.

YUV9

9?

Registered by Intel., this is the format used internally by Indeo video code

IF09

9.5

As YVU9 but an additional 4x4 subsampled plane is appended containing delta information relative to the last frame. (Bpp is reported as 9)

YV16

16

8 bit Y plane followed by 8 bit 2x1 subsampled V and U planes.

YV12

12

8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes.

I420

12

8 bit Y plane followed by 8 bit 2x2 subsampled U and V planes.

IYUV

12

Duplicate FOURCC, identical to I420.

NV12

12

8-bit Y plane followed by an interleaved U/V plane with 2x2 subsampling

NV21

12

As NV12 with U and V reversed in the interleaved plane

IMC1

12

As YV12 except the U and V planes each have the same stride as the Y plane

IMC2

12

Similar to IMC1 except that the U and V lines are interleaved at half stride boundaries

IMC3

12

As IMC1 except that U and V are swapped

IMC4

12

As IMC2 except that U and V are swapped

CLPL

12

Format similar to YV12 but including a level of indirection.

Y41B

12?

Weitek format listed as "YUV 4:1:1 planar". I have no other information on this format.

Y42B

16?

Weitek format listed as "YUV 4:2:2 planar". I have no other information on this format.

Y800

8

Simple, single Y plane for monochrome images.

Y8

8

Duplicate of Y800 as far as I can see.

CXY1

12

Awaiting clarification of format.

CXY2

16

Awaiting clarification of format.

Y42B存儲(chǔ)結(jié)構(gòu)

YCbCr 4:2:2 的方式存儲(chǔ)

 4 YUVRGB的轉(zhuǎn)換關(guān)系

yuv422 planar to rgb565
轉(zhuǎn)換公式:
R=Y+1.4075*(V-128)
G=Y-0.3455*(U-128) - 0.7169*(V-128)
B=Y+1.779*(U-128)
為了加快運(yùn)算速度,采用下面的整形計(jì)算法:
u = YUVdata[UPOS] - 128;
v = YUVdata[VPOS] - 128;

rdif = v + ((v * 103) >> 8);
invgdif = ((u * 88) >> 8) +((v * 183) >> 8);
bdif = u +( (u*198) >> 8);

r = YUVdata[YPOS] + rdif;
g = YUVdata[YPOS] - invgdif;
b = YUVdata[YPOS] + bdif;
r=r>255?:255:(r<0:?0:r);
g=g>255?:255:(g<0:?0:g);
b=b>255?:255:(b<0:?0:b);
以上得到的是rgb888的數(shù)據(jù),再將rgb888轉(zhuǎn)為rgb555
RGBdata[1] =( (r & 0xF8) | ( g >> 5) );
RGBdata[0] =( ((g & 0x1C) << 3) | ( b >> 3) );
YUV422 Planar  FORMAT size:
size=width*height*2;
YSIZE = size/2;
USIZE = size/4;
VSIZE = size/4;
YPOS=0;
UPOS=YPOS + size/2;
VPOS=UPOS + size/4;

posted on 2013-01-28 09:04 楊粼波 閱讀(2619) 評(píng)論(0)  編輯 收藏 引用


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久久天天操| 亚洲电影天堂av| 欧美91精品| 男人的天堂成人在线| 另类尿喷潮videofree| 久久精品视频在线播放| 久久综合国产精品| 久久精品亚洲| 欧美高清在线| 国产精品日韩欧美一区二区| 国产日韩欧美三级| 亚洲国产99| 亚洲一区二区三区免费观看| 欧美一区二区视频在线观看2020| 久久久噜噜噜久久中文字免| 亚洲激情第一区| 亚洲精选成人| 久久av一区二区| 欧美大片国产精品| 国产精品尤物| 亚洲精品免费观看| 性色av一区二区三区在线观看 | 制服诱惑一区二区| 亚洲国产精品一区二区第四页av | 国产日本欧美在线观看| 黄色成人小视频| av成人免费在线观看| 欧美一区二区高清| 亚洲国产成人porn| 亚洲欧美激情诱惑| 欧美激情1区2区| 国产亚洲精品高潮| 亚洲网站在线播放| 亚洲第一在线视频| 久久国产精品毛片| 国产精品试看| 一本色道久久加勒比88综合| 久久视频在线看| 一本一本久久a久久精品综合妖精| 久久国产日韩欧美| 国产精品亚洲美女av网站| 亚洲精品在线三区| 狂野欧美一区| 亚洲欧美在线另类| 国产精品黄色| 在线亚洲电影| 亚洲国内高清视频| 久久综合成人精品亚洲另类欧美 | 久久精品国产69国产精品亚洲| 欧美激情中文字幕乱码免费| 韩国一区二区在线观看| 欧美一区二区三区男人的天堂| 亚洲精品中文字幕女同| 欧美大片18| 日韩视频在线免费观看| 亚洲国产三级| 欧美美女视频| 一区二区三区日韩欧美精品| 亚洲成色777777在线观看影院| 久久天天躁狠狠躁夜夜av| 国产一区二区三区最好精华液| 午夜免费在线观看精品视频| 99视频精品| 国产精品护士白丝一区av| 亚洲一区免费网站| 亚洲视频精选| 国产欧美二区| 久久免费视频网站| 久久久久女教师免费一区| 国产日韩欧美综合| 久久久一区二区| 久久先锋影音| 亚洲精品视频在线观看网站 | 日韩视频免费大全中文字幕| 欧美日韩国产高清| 亚洲在线观看免费| 亚洲免费一区二区| 夜夜嗨网站十八久久| 久久综合激情| 久久综合伊人77777尤物| 在线观看精品一区| 亚洲国产成人精品女人久久久| 免费在线亚洲| 亚洲一级在线观看| 久久精品99国产精品酒店日本| 悠悠资源网久久精品| 亚洲国产高清aⅴ视频| 欧美日韩一区三区四区| 欧美一区二区日韩| 久久久久在线| 国产精品99久久久久久久久| 午夜精品视频| 亚洲精品一区二区三区四区高清| 日韩视频二区| 精品成人国产在线观看男人呻吟| 亚洲电影在线免费观看| 国产精品久久激情| 欧美jizz19性欧美| 国产精品入口麻豆原神| 美国三级日本三级久久99| 欧美精品亚洲一区二区在线播放| 亚洲欧美国产日韩中文字幕| 久久精品二区亚洲w码| 99精品视频一区二区三区| 性欧美video另类hd性玩具| 亚洲欧洲一区二区在线播放| 亚洲男同1069视频| 亚洲另类一区二区| 欧美呦呦网站| 亚洲一区二区三区高清| 久久婷婷蜜乳一本欲蜜臀| 亚洲一区二区三区精品在线观看| 久久精品综合网| 午夜精品婷婷| 欧美国产一区二区| 久久人人爽人人爽| 国产精品日韩在线观看| 亚洲三级免费电影| 亚洲国产视频一区二区| 欧美在线国产| 午夜影视日本亚洲欧洲精品| 欧美激情综合网| 欧美大尺度在线| 国内外成人在线视频| 亚洲视频欧洲视频| 亚洲图片在线| 欧美久久久久久蜜桃| 欧美国产亚洲另类动漫| 精品999网站| 久久久久久久久综合| 新67194成人永久网站| 欧美视频一区二区| 一本一本久久a久久精品综合麻豆| 亚洲国产女人aaa毛片在线| 欧美亚洲在线视频| 久久久久久久久综合| 国产日韩视频| 欧美在线视频一区二区| 欧美一区二区三区啪啪| 国产免费亚洲高清| 亚洲综合电影| 久久av在线看| 国产亚洲网站| 性做久久久久久| 久久天天躁狠狠躁夜夜av| 久久免费黄色| 亚洲第一福利视频| 久久人人超碰| 欧美+亚洲+精品+三区| 韩国一区电影| 久久日韩精品| 最新国产拍偷乱拍精品| av成人黄色| 国产精品美女一区二区在线观看| 亚洲男人第一网站| 久久午夜精品一区二区| 在线免费观看成人网| 欧美极品一区二区三区| 夜夜嗨av一区二区三区四区| 亚洲欧美中日韩| 黑人巨大精品欧美一区二区| 久久在线视频| 一区二区激情| 久久综合九色综合网站| 亚洲精品激情| 国产精品尤物| 欧美freesex8一10精品| 亚洲精品精选| 欧美在线91| 亚洲精品久久久久久下一站| 欧美日精品一区视频| 久久国产精品久久w女人spa| 亚洲经典在线| 久久久久久久久伊人| av成人福利| 一色屋精品亚洲香蕉网站| 欧美精品尤物在线| 欧美专区在线播放| 亚洲日产国产精品| 久久天天躁狠狠躁夜夜av| 99天天综合性| 激情综合五月天| 国产精品高清在线| 欧美www在线| 欧美在线免费| 亚洲美女视频在线观看| 免费在线欧美黄色| 欧美一二三视频| 一区二区欧美在线观看| 伊人久久大香线| 国产亚洲欧美日韩在线一区 | 国产精品腿扒开做爽爽爽挤奶网站| 久久福利电影| 亚洲欧美日本精品| 一区二区免费看| 亚洲精品在线电影| 亚洲国产综合视频在线观看| 蜜桃伊人久久| 久久手机免费观看| 久久久久久夜|