1mlib_VideoColorYUV420seq_tom_eYdUiYaVL4i2bm2liLinibtb_(rV3aiMrdLyeIoBFC)uonlcotriYoUnVs420seq_to_YUYV422int(3MLIB)
2
3
4
6 mlib_VideoColorYUV420seq_to_YUYV422int - convert YUV sequential to
7 interleaved
8
10 cc [ flag... ] file... -lmlib [ library... ]
11 #include <mlib.h>
12
13 void mlib_VideoColorYUV420seq_to_YUYV422int(mlib_u32 *YUYV
14 const mlib_u8 *Y, const mlib_u8 *U, const mlib_u8 *V,
15 mlib_s32 w, mlib_s32 h, mlib_s32 dlb,
16 mlib_s32 ylb, mlib_s32 uvlb);
17
18
20 The Y, U, V pixel streams are combined into a YUYV pixel stream. All
21 pixel components are 8-bit unsigned integers. The Y buffer has dimen‐
22 sions w and h. The U and V buffers have dimensions w/2 and h/2. Dimen‐
23 sions w and h are assumed to be even. Successive rows of the output
24 buffer YUYV use successive rows of Y and the same rows of U and V.
25
26
27 The following equation is used:
28
29 YUYV[r][c/2] = (Y[r][c] << 24) |
30 (U[r/2][c/2] << 16) |
31 (Y[r][c+1] << 8) |
32 (V[r/2][c/2])
33
34 YUYV[r+1][c/2] = (Y[r+1][c] << 24) |
35 (U[r/2][c/2] << 16) |
36 (Y[r+1][c+1] << 8) |
37 (V[r/2][c/2])
38
39
40
41 where r = 0, 2, 4, ..., h-2; and c = 0, 2, 4, ..., w-2.
42
44 The function takes the following arguments:
45
46 YUYV Pointer to output buffer.
47
48
49 Y Pointer to Y input buffer.
50
51
52 U Pointer to U input buffer.
53
54
55 V Pointer to V input buffer.
56
57
58 w Image width in pixels.
59
60
61 h Image height in lines.
62
63
64 dlb Linebytes for YUYV buffer.
65
66
67 ylb Linebytes for Y buffer.
68
69
70 uvlb Linebytes for U and V buffers.
71
72
74 None.
75
77 See attributes(5) for descriptions of the following attributes:
78
79
80
81
82 ┌─────────────────────────────┬─────────────────────────────┐
83 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
84 ├─────────────────────────────┼─────────────────────────────┤
85 │Interface Stability │Committed │
86 ├─────────────────────────────┼─────────────────────────────┤
87 │MT-Level │MT-Safe │
88 └─────────────────────────────┴─────────────────────────────┘
89
91 mlib_VideoColorYUV411seq_to_YUYV422int(3MLIB), mlib_VideoCol‐
92 orYUV422seq_to_YUYV422int(3MLIB), mlib_VideoCol‐
93 orYUV420seq_to_UYVY422int(3MLIB), mlib_VideoCol‐
94 orYUV411seq_to_UYVY422int(3MLIB), mlib_VideoCol‐
95 orYUV422seq_to_UYVY422int(3MLIB), attributes(5)
96
97
98
99SunOS 5.11 m2liMba_rVi2d0e0o7ColorYUV420seq_to_YUYV422int(3MLIB)