xref: /OK3568_Linux_fs/kernel/Documentation/userspace-api/media/v4l/pixfmt-sdr-pcu16be.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun.. _V4L2-SDR-FMT-PCU16BE:
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun******************************
6*4882a593SmuzhiyunV4L2_SDR_FMT_PCU16BE ('PC16')
7*4882a593Smuzhiyun******************************
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunPlanar complex unsigned 16-bit big endian IQ sample
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDescription
12*4882a593Smuzhiyun===========
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunThis format contains a sequence of complex number samples. Each complex
15*4882a593Smuzhiyunnumber consist of two parts called In-phase and Quadrature (IQ). Both I
16*4882a593Smuzhiyunand Q are represented as a 16 bit unsigned big endian number stored in
17*4882a593Smuzhiyun32 bit space. The remaining unused bits within the 32 bit space will be
18*4882a593Smuzhiyunpadded with 0. I value starts first and Q value starts at an offset
19*4882a593Smuzhiyunequalling half of the buffer size (i.e.) offset = buffersize/2. Out of
20*4882a593Smuzhiyunthe 16 bits, bit 15:2 (14 bit) is data and bit 1:0 (2 bit) can be any
21*4882a593Smuzhiyunvalue.
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun**Byte Order.**
24*4882a593SmuzhiyunEach cell is one byte.
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun.. flat-table::
27*4882a593Smuzhiyun    :header-rows:  1
28*4882a593Smuzhiyun    :stub-columns: 0
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun    * -  Offset:
31*4882a593Smuzhiyun      -  Byte B0
32*4882a593Smuzhiyun      -  Byte B1
33*4882a593Smuzhiyun      -  Byte B2
34*4882a593Smuzhiyun      -  Byte B3
35*4882a593Smuzhiyun    * -  start + 0:
36*4882a593Smuzhiyun      -  I'\ :sub:`0[13:6]`
37*4882a593Smuzhiyun      -  I'\ :sub:`0[5:0]; B1[1:0]=pad`
38*4882a593Smuzhiyun      -  pad
39*4882a593Smuzhiyun      -  pad
40*4882a593Smuzhiyun    * -  start + 4:
41*4882a593Smuzhiyun      -  I'\ :sub:`1[13:6]`
42*4882a593Smuzhiyun      -  I'\ :sub:`1[5:0]; B1[1:0]=pad`
43*4882a593Smuzhiyun      -  pad
44*4882a593Smuzhiyun      -  pad
45*4882a593Smuzhiyun    * -  ...
46*4882a593Smuzhiyun    * - start + offset:
47*4882a593Smuzhiyun      -  Q'\ :sub:`0[13:6]`
48*4882a593Smuzhiyun      -  Q'\ :sub:`0[5:0]; B1[1:0]=pad`
49*4882a593Smuzhiyun      -  pad
50*4882a593Smuzhiyun      -  pad
51*4882a593Smuzhiyun    * - start + offset + 4:
52*4882a593Smuzhiyun      -  Q'\ :sub:`1[13:6]`
53*4882a593Smuzhiyun      -  Q'\ :sub:`1[5:0]; B1[1:0]=pad`
54*4882a593Smuzhiyun      -  pad
55*4882a593Smuzhiyun      -  pad
56