^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) .. _V4L2-SDR-FMT-PCU18BE:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ******************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) V4L2_SDR_FMT_PCU18BE ('PC18')
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ******************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Planar complex unsigned 18-bit big endian IQ sample
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) This format contains a sequence of complex number samples. Each complex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) number consist of two parts called In-phase and Quadrature (IQ). Both I
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) and Q are represented as a 18 bit unsigned big endian number stored in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 32 bit space. The remaining unused bits within the 32 bit space will be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) padded with 0. I value starts first and Q value starts at an offset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) equalling half of the buffer size (i.e.) offset = buffersize/2. Out of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) the 18 bits, bit 17:2 (16 bit) is data and bit 1:0 (2 bit) can be any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) **Byte Order.**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) Each cell is one byte.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) .. flat-table::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) :header-rows: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) :stub-columns: 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * - Offset:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) - Byte B0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - Byte B1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) - Byte B2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) - Byte B3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * - start + 0:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) - I'\ :sub:`0[17:10]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) - I'\ :sub:`0[9:2]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - I'\ :sub:`0[1:0]; B2[5:0]=pad`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) - pad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * - start + 4:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - I'\ :sub:`1[17:10]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - I'\ :sub:`1[9:2]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - I'\ :sub:`1[1:0]; B2[5:0]=pad`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) - pad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * - ...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * - start + offset:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - Q'\ :sub:`0[17:10]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) - Q'\ :sub:`0[9:2]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) - Q'\ :sub:`0[1:0]; B2[5:0]=pad`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) - pad
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * - start + offset + 4:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - Q'\ :sub:`1[17:10]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - Q'\ :sub:`1[9:2]`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - Q'\ :sub:`1[1:0]; B2[5:0]=pad`
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - pad