summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c')
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c45
1 files changed, 28 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c
index 80b09a6d1d..3272220ef8 100644
--- a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c
+++ b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc.c
@@ -57,7 +57,7 @@ struct vlR16SnormMC
struct pipe_constant_buffer vs_const_buf, fs_const_buf;
};
-int vlBegin
+static int vlBegin
(
struct vlRender *render
)
@@ -312,7 +312,7 @@ static int vlGrabBlocks
return 0;
}
-int vlRenderIMacroBlock
+static int vlRenderIMacroBlock
(
struct vlR16SnormMC *mc,
enum vlPictureType picture_type,
@@ -370,13 +370,13 @@ int vlRenderIMacroBlock
pipe->bind_fs_state(pipe, mc->i_fs);
pipe->draw_arrays(pipe, PIPE_PRIM_TRIANGLES, 0, 24);
-
+
mc->cur_buf++;
return 0;
}
-int vlRenderPMacroBlock
+static int vlRenderPMacroBlock
(
struct vlR16SnormMC *mc,
enum vlPictureType picture_type,
@@ -468,13 +468,13 @@ int vlRenderPMacroBlock
pipe->bind_sampler_states(pipe, 4, (void**)mc->samplers);
pipe->draw_arrays(pipe, PIPE_PRIM_TRIANGLES, 0, 24);
-
+
mc->cur_buf++;
return 0;
}
-int vlRenderBMacroBlock
+static int vlRenderBMacroBlock
(
struct vlR16SnormMC *mc,
enum vlPictureType picture_type,
@@ -580,13 +580,13 @@ int vlRenderBMacroBlock
pipe->bind_sampler_states(pipe, 5, (void**)mc->samplers);
pipe->draw_arrays(pipe, PIPE_PRIM_TRIANGLES, 0, 24);
-
+
mc->cur_buf++;
return 0;
}
-int vlRenderMacroBlocksMpeg2R16Snorm
+static int vlRenderMacroBlocksMpeg2R16Snorm
(
struct vlRender *render,
struct vlMpeg2MacroBlockBatch *batch,
@@ -702,7 +702,17 @@ int vlRenderMacroBlocksMpeg2R16Snorm
return 0;
}
-int vlEnd
+static int vlEnd
+(
+ struct vlRender *render
+)
+{
+ assert(render);
+
+ return 0;
+}
+
+static int vlFlush
(
struct vlRender *render
)
@@ -712,7 +722,7 @@ int vlEnd
return 0;
}
-int vlDestroy
+static int vlDestroy
(
struct vlRender *render
)
@@ -765,7 +775,7 @@ int vlDestroy
* Need to be scaled to cover mbW*mbH macroblock pixels and translated into
* position on target surface.
*/
-const struct vlVertex2f macroblock_verts[24] =
+static const struct vlVertex2f macroblock_verts[24] =
{
{0.0f, 0.0f}, {0.0f, 0.5f}, {0.5f, 0.0f},
{0.5f, 0.0f}, {0.0f, 0.5f}, {0.5f, 0.5f},
@@ -785,7 +795,7 @@ const struct vlVertex2f macroblock_verts[24] =
* in a bW*(bH*4) texture. First luma block located at 0,0->bW,bH; second at
* 0,bH->bW,2bH; third at 0,2bH->bW,3bH; fourth at 0,3bH->bW,4bH.
*/
-const struct vlVertex2f macroblock_luma_texcoords[24] =
+static const struct vlVertex2f macroblock_luma_texcoords[24] =
{
{0.0f, 0.0f}, {0.0f, 0.25f}, {1.0f, 0.0f},
{1.0f, 0.0f}, {0.0f, 0.25f}, {1.0f, 0.25f},
@@ -804,7 +814,7 @@ const struct vlVertex2f macroblock_luma_texcoords[24] =
* Represents texcoords for the above for rendering 1 chroma block.
* Straight forward 0,0->1,1 mapping so we can reuse the MB pos vectors.
*/
-const struct vlVertex2f *macroblock_chroma_420_texcoords = macroblock_verts;
+static const struct vlVertex2f *macroblock_chroma_420_texcoords = macroblock_verts;
/*
* Represents texcoords for the above for rendering 2 chroma blocks arranged
@@ -812,13 +822,13 @@ const struct vlVertex2f *macroblock_chroma_420_texcoords = macroblock_verts;
* 0,bH->bW,2bH. We can render this with 0,0->1,1 mapping.
* Straight forward 0,0->1,1 mapping so we can reuse MB pos vectors.
*/
-const struct vlVertex2f *macroblock_chroma_422_texcoords = macroblock_verts;
+static const struct vlVertex2f *macroblock_chroma_422_texcoords = macroblock_verts;
/*
* Represents texcoords for the above for rendering 4 chroma blocks.
* Same case as 4 luma blocks.
*/
-const struct vlVertex2f *macroblock_chroma_444_texcoords = macroblock_luma_texcoords;
+static const struct vlVertex2f *macroblock_chroma_444_texcoords = macroblock_luma_texcoords;
/*
* Used when rendering P and B macroblocks, multiplier is applied to the A channel,
@@ -826,7 +836,7 @@ const struct vlVertex2f *macroblock_chroma_444_texcoords = macroblock_luma_texco
* get back the differential. The differential is then added to the samples from the
* reference surface(s).
*/
-const struct vlFragmentShaderConsts fs_consts =
+static const struct vlFragmentShaderConsts fs_consts =
{
{32767.0f / 255.0f, 32767.0f / 255.0f, 32767.0f / 255.0f, 0.0f},
{0.5f, 2.0f, 0.0f, 0.0f}
@@ -2093,7 +2103,7 @@ static int vlCreateFragmentShaderFieldBMB
return 0;
}
-int vlCreateDataBufs
+static int vlCreateDataBufs
(
struct vlR16SnormMC *mc
)
@@ -2319,6 +2329,7 @@ int vlCreateR16SNormMC
mc->base.vlBegin = &vlBegin;
mc->base.vlRenderMacroBlocksMpeg2 = &vlRenderMacroBlocksMpeg2R16Snorm;
mc->base.vlEnd = &vlEnd;
+ mc->base.vlFlush = &vlFlush;
mc->base.vlDestroy = &vlDestroy;
mc->pipe = pipe;
mc->video_width = video_width;