nv30: add some opcodes.
[mesa.git] / src / gallium / state_trackers / g3dvl / vl_data.c
1 #include "vl_data.h"
2
3 /*
4 * Represents 8 triangles (4 quads, 1 per block) in noormalized coords
5 * that render a macroblock.
6 * Need to be scaled to cover mbW*mbH macroblock pixels and translated into
7 * position on target surface.
8 */
9 const struct vlVertex2f macroblock_verts[24] =
10 {
11 {0.0f, 0.0f}, {0.0f, 0.5f}, {0.5f, 0.0f},
12 {0.5f, 0.0f}, {0.0f, 0.5f}, {0.5f, 0.5f},
13
14 {0.5f, 0.0f}, {0.5f, 0.5f}, {1.0f, 0.0f},
15 {1.0f, 0.0f}, {0.5f, 0.5f}, {1.0f, 0.5f},
16
17 {0.0f, 0.5f}, {0.0f, 1.0f}, {0.5f, 0.5f},
18 {0.5f, 0.5f}, {0.0f, 1.0f}, {0.5f, 1.0f},
19
20 {0.5f, 0.5f}, {0.5f, 1.0f}, {1.0f, 0.5f},
21 {1.0f, 0.5f}, {0.5f, 1.0f}, {1.0f, 1.0f}
22 };
23
24 /*
25 * Represents texcoords for the above for rendering 4 luma blocks arranged
26 * in a bW*(bH*4) texture. First luma block located at 0,0->bW,bH; second at
27 * 0,bH->bW,2bH; third at 0,2bH->bW,3bH; fourth at 0,3bH->bW,4bH.
28 */
29 const struct vlVertex2f macroblock_luma_texcoords[24] =
30 {
31 {0.0f, 0.0f}, {0.0f, 0.25f}, {1.0f, 0.0f},
32 {1.0f, 0.0f}, {0.0f, 0.25f}, {1.0f, 0.25f},
33
34 {0.0f, 0.25f}, {0.0f, 0.5f}, {1.0f, 0.25f},
35 {1.0f, 0.25f}, {0.0f, 0.5f}, {1.0f, 0.5f},
36
37 {0.0f, 0.5f}, {0.0f, 0.75f}, {1.0f, 0.5f},
38 {1.0f, 0.5f}, {0.0f, 0.75f}, {1.0f, 0.75f},
39
40 {0.0f, 0.75f}, {0.0f, 1.0f}, {1.0f, 0.75f},
41 {1.0f, 0.75f}, {0.0f, 1.0f}, {1.0f, 1.0f}
42 };
43
44 /*
45 * Represents texcoords for the above for rendering 1 chroma block.
46 * Straight forward 0,0->1,1 mapping so we can reuse the MB pos vectors.
47 */
48 const struct vlVertex2f *macroblock_chroma_420_texcoords = macroblock_verts;
49
50 /*
51 * Represents texcoords for the above for rendering 2 chroma blocks arranged
52 * in a bW*(bH*2) texture. First chroma block located at 0,0->bW,bH; second at
53 * 0,bH->bW,2bH. We can render this with 0,0->1,1 mapping.
54 * Straight forward 0,0->1,1 mapping so we can reuse MB pos vectors.
55 */
56 const struct vlVertex2f *macroblock_chroma_422_texcoords = macroblock_verts;
57
58 /*
59 * Represents texcoords for the above for rendering 4 chroma blocks.
60 * Same case as 4 luma blocks.
61 */
62 const struct vlVertex2f *macroblock_chroma_444_texcoords = macroblock_luma_texcoords;
63
64 /*
65 * Used when rendering P and B macroblocks, multiplier is applied to the A channel,
66 * which is then added to the L channel, then the bias is subtracted from that to
67 * get back the differential. The differential is then added to the samples from the
68 * reference surface(s).
69 */
70 #if 0
71 const struct VL_MC_FS_CONSTS vl_mc_fs_consts =
72 {
73 {32767.0f / 255.0f, 32767.0f / 255.0f, 32767.0f / 255.0f, 0.0f},
74 {0.5f, 2.0f, 0.0f, 0.0f}
75 };
76 #endif