From bd08a0cd5f546916a9454ae2c35756ed77957458 Mon Sep 17 00:00:00 2001 From: Kamil Debski Date: Fri, 11 Mar 2011 06:16:22 -0300 Subject: [PATCH] [media] v4l: Documentation for the NV12MT format Added documentation for V4L2_PIX_FMT_NV12MT format. This is a YUV 4:2:0 format with macro block size of 64x32 and specific order of macro blocks in the memory. Signed-off-by: Kamil Debski Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media-entities.tmpl | 1 + Documentation/DocBook/v4l/nv12mt.gif | Bin 0 -> 2108 bytes Documentation/DocBook/v4l/nv12mt_example.gif | Bin 0 -> 6858 bytes Documentation/DocBook/v4l/pixfmt-nv12mt.xml | 74 +++++++++++++++++++ Documentation/DocBook/v4l/pixfmt.xml | 1 + 5 files changed, 76 insertions(+) create mode 100644 Documentation/DocBook/v4l/nv12mt.gif create mode 100644 Documentation/DocBook/v4l/nv12mt_example.gif create mode 100644 Documentation/DocBook/v4l/pixfmt-nv12mt.xml diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 40158ee3d369..5d259c632cdf 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl @@ -272,6 +272,7 @@ + diff --git a/Documentation/DocBook/v4l/nv12mt.gif b/Documentation/DocBook/v4l/nv12mt.gif new file mode 100644 index 0000000000000000000000000000000000000000..ef2d4cf8367b97293eb9139de0f33d0a2ac236be GIT binary patch literal 2108 zcmb`E`9IT-1IOQ+qvdLI6(2NWh4B$mqGFB~bIqI`Ov+J?J|;e;^kHT0IblWJ*`TR@ettFfwykFz0RpGX8Qtpc((LKc?crMQAH8KYFSWD99Kv!>_lN%eRo>u79&dGsPn{QY=Bb|r;(6+q+1bsx zxvy`8-AZ)6z3Cv$DzebNmJoNG&VJ}9=Ei%vD-U3yExrFy-&D({S>>SJpRz|$mrO(VC>MdmlKl{FQ#T@ zCtuCI77p1x0NyMM-@RX*TKTvp_`JS33@mZ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Ek@-eW*%z7^E<}3J%)$ zJrpIQY2tSA4%y)h`Kh(yc)_l3U^>((>&RtHDeOyrue4eiOrH80Aq_2QIUgju8)EmH z9tf^vzW{5uLP@gPO9gK)bJB?Pnd&Sc3Uctpwby8(|-de8|dI~ZDJ4}ij z;^wQqme2^??d-!|%xvb;9XmE$*v*1W$FZ{g^6v|5Xg&L9b94b~_X|DG$E8T`4+QHp zp$)J$n)>?P&I9hKv}N$a{x-(7yg|1+SgtA#PEyJnpoSQ{Q}P}|V2~Sf!AS=xaGOz8 zN1C)dg|5kp(>VCifsAqDmK)F^-R{ubEBeo6ifzvR6d@A zfm{|NR0~nPzz@brvSP1yYuepvZ&BuG776h#+R()pe)ez@b)6-jzTZcay JfkA-P{{T*w8|nZ6 literal 0 HcmV?d00001 diff --git a/Documentation/DocBook/v4l/nv12mt_example.gif b/Documentation/DocBook/v4l/nv12mt_example.gif new file mode 100644 index 0000000000000000000000000000000000000000..df81d68108eeb66569417b475984aa634385eebb GIT binary patch literal 6858 zcmds(^;Z)Ppv5QUNH-cpkRBb>BiWwbB^2@ym(Bt-!c z495Gu_h-C&&i&<{&;9Y9bD`Q=a`Mkg?(72gI|2VE7y#h^pJ4zP4B*eq%Bl90REqm}hES zZK&U;3v1Tbt1vPsH8$*cs@tQd)A>|qKo^G7(|N0}`^Hdz&`7`E#Bjjeq}S4X*xVH6 zkL$LzM!j?$u(2LRSasXmc0GSKZf_eD6g2K&H|}7Mb9&z4;ym%f3Fi-J^K@_Z_QJcl zw)pwrJ=}2Ko>Lw#8$v_g`+3)ghb1H=;DQ3C{e5Qw{AU9FlarHiVIea?0Uv?`Ymmt5 z!~__2V=gkh8kJm`k+Fb`t;oa-WTY=9Cl(YGlok|}V6jUXX~o6G%UPKN1qI95nV(-} zZD3&oMTK7q@^R(mYb8av+S>KX^7i(2TuX~T?zXeD6N|%c*46g*_TqYawp*HaJ3DYV z+y>77Yk%J@&i`O&@MwJe1V8x=k3V@oh26NtZD7C8&uwgA&z6=p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/pixfmt-nv12mt.xml new file mode 100644 index 000000000000..5cb5bec8b653 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml @@ -0,0 +1,74 @@ + + + V4L2_PIX_FMT_NV12MT ('TM12') + &manvol; + + + V4L2_PIX_FMT_NV12MT + + Formats with ½ horizontal and vertical +chroma resolution. This format has two planes - one for luminance and one for +chrominance. Chroma samples are interleaved. The difference to +V4L2_PIX_FMT_NV12 is the memory layout. Pixels are +grouped in macroblocks of 64x32 size. The order of macroblocks in memory is +also not standard. + + + + Description + + This is the two-plane versions of the YUV 4:2:0 format where data +is grouped into 64x32 macroblocks. The three components are separated into two +sub-images or planes. The Y plane has one byte per pixel and pixels are grouped +into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y +plane (and the image), but is half as tall in pixels. The chroma plane is also +grouped into 64x32 macroblocks. + Width of the buffer has to be aligned to the multiple of 128, and +height alignment is 32. Every four adjactent buffers - two horizontally and two +vertically are grouped together and are located in memory in Z or flipped Z +order. + Layout of macroblocks in memory is presented in the following +figure. +
+ <constant>V4L2_PIX_FMT_NV12MT</constant> macroblock Z shape +memory layout + + + + + +
+ The requirement that width is multiple of 128 is implemented because, +the Z shape cannot be cut in half horizontally. In case the vertical resolution +of macroblocks is odd then the last row of macroblocks is arranged in a linear +order.
+ In case of chroma the layout is identical. Cb and Cr samples are +interleaved. Height of the buffer is aligned to 32. + + + Memory layout of macroblocks in <constant>V4L2_PIX_FMT_NV12 +</constant> format pixel image - extreme case + +
+ Example <constant>V4L2_PIX_FMT_NV12MT</constant> memory +layout of macroblocks + + + + + +
+ Memory layout of macroblocks of V4L2_PIX_FMT_NV12MT + format in most extreme case. +
+
+
+
+ + diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index f8436dcb7414..c6fdcbbd1b41 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml @@ -709,6 +709,7 @@ information. &sub-yuv411p; &sub-nv12; &sub-nv12m; + &sub-nv12mt; &sub-nv16; -- 2.20.1