C++でv210のフレームをアンパックしてプレーナにするには？
実装例（v210 → planar YUV422P10）
以下は v210 を YUV422 の planar 1★0ビット (uint16_t) に展開するサンプルです．
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <vector>
#include <iostream>

static inline uint32_t load_le32(const uint8_t* p)
{
    // エンディアン依存を避けたいので memcpy で安全に読む
    uint32_t v;
    std::memcpy(&v, p, sizeof(v));
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    v = ((v & 0x000000FFu) << 24) |
        ((v & 0x0000FF00u) << 8)  |
        ((v & 0x00FF0000u) >> 8)  |
        ((v & 0xFF000000u) >> 24);
#endif
    return v;
}

// dstY: width  samples/line
// dstU: width/2 samples/line
// dstV: width/2 samples/line
// 各dstStrideは「uint16_t要素数」で指定
void unpack_v210_to_yuv422p10(
    const uint8_t* src,
    int srcStrideBytes,
    int width,
    int height,
    uint16_t* dstY, int dstStrideY,
    uint16_t* dstU, int dstStrideU,
    uint16_t* dstV, int dstStrideV)
{
    if (!src || !dstY || !dstU || !dstV) {
        throw std::invalid_argument("null pointer");
    }
    if (width <= 0 || height <= 0) {
        throw std::invalid_argument("invalid size");
    }
    if (width % 2 != 0) {
        throw std::invalid_argument("v210/YUV422 requires even width");
    }

    for (int y = 0; y < height; ++y) {
        const uint8_t* s = src + y * srcStrideBytes;
        uint16_t* py = dstY + y * dstStrideY;
        uint16_t* pu = dstU + y * dstStrideU;
        uint16_t* pv = dstV + y * dstStrideV;

        int x = 0;
        while (x < width) {
            // 6ピクセル単位で処理（16バイト）
            uint32_t w0 = load_le32(s +  0);
            uint32_t w1 = load_le32(s +  4);
            uint32_t w2 = load_le32(s +  8);
            uint32_t w3 = load_le32(s + 12);

            // 各 1★0ビット フィールド抽出
            uint16_t c0 = (w0 >>  0) & 0x3FF; // U0
            uint16_t y0 = (w0 >> 10) & 0x3FF; // Y0
            uint16_t c1 = (w0 >> 20) & 0x3FF; // V0

            uint16_t y1 = (w1 >>  0) & 0x3FF; // Y1
            uint16_t c2 = (w1 >> 10) & 0x3FF; // U2
            uint16_t y2 = (w1 >> 20) & 0x3FF; // Y2

            uint16_t c3 = (w2 >>  0) & 0x3FF; // V2
            uint16_t y3 = (w2 >> 10) & 0x3FF; // Y3
            uint16_t c4 = (w2 >> 20) & 0x3FF; // U4

            uint16_t y4 = (w3 >>  0) & 0x3FF; // Y4
            uint16_t c5 = (w3 >> 10) & 0x3FF; // V4
            uint16_t y5 = (w3 >> 20) & 0x3FF; // Y5

            // 出力（422 planar）
            // x..x+5 の6ピクセル
            if (x + 0 < width) py[x + 0] = y0;
            if (x + 1 < width) py[x + 1] = y1;
            if (x + 2 < width) py[x + 2] = y2;
            if (x + 3 < width) py[x + 3] = y3;
            if (x + 4 < width) py[x + 4] = y4;
            if (x + 5 < width) py[x + 5] = y5;

            // U/V は 2ピクセルに1サンプル
            int uv = x / 2;
            if (x + 0 < width) {
                pu[uv + 0] = c0; // U for pixels 0,1
                pv[uv + 0] = c1; // V for pixels 0,1
            }
            if (x + 2 < width) {
                pu[uv + 1] = c2; // U for pixels 2,3
                pv[uv + 1] = c3; // V for pixels 2,3
            }
            if (x + 4 < width) {
                pu[uv + 2] = c4; // U for pixels 4,5
                pv[uv + 2] = c5; // V for pixels 4,5
            }

            s += 16;
            x += 6;
        }
    }
}
