summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-16 13:04:04 +0200
committerChristian König <[email protected]>2011-04-16 13:04:04 +0200
commitff210aea7c080600bd45eb18b29a6109468ed4df (patch)
tree0182b9f10b28608601f5133246107c095211bc13
parentffcf287aa227cfd1c0f928a3310d98554caf16cd (diff)
[g3dvl] back to seperate mc for y and c planes
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_decoder.c27
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_decoder.h2
2 files changed, 19 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
index 9e0d40e7f5b..9e89730a23d 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
@@ -279,11 +279,14 @@ vl_mpeg12_destroy(struct pipe_video_decoder *decoder)
dec->pipe->delete_blend_state(dec->pipe, dec->blend);
dec->pipe->delete_depth_stencil_alpha_state(dec->pipe, dec->dsa);
- vl_mc_cleanup(&dec->mc);
+ vl_mc_cleanup(&dec->mc_y);
+ vl_mc_cleanup(&dec->mc_c);
+
if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) {
vl_idct_cleanup(&dec->idct_y);
vl_idct_cleanup(&dec->idct_c);
}
+
for (i = 0; i < VL_MAX_PLANES; ++i)
dec->pipe->delete_vertex_elements_state(dec->pipe, dec->ves_eb[i]);
@@ -414,13 +417,13 @@ vl_mpeg12_create_buffer(struct pipe_video_decoder *decoder)
if (!mc_source_sv)
goto error_mc_source_sv;
- if(!vl_mc_init_buffer(&dec->mc, &buffer->mc[0], mc_source_sv[0]))
+ if(!vl_mc_init_buffer(&dec->mc_y, &buffer->mc[0], mc_source_sv[0]))
goto error_mc_y;
- if(!vl_mc_init_buffer(&dec->mc, &buffer->mc[1], mc_source_sv[1]))
+ if(!vl_mc_init_buffer(&dec->mc_c, &buffer->mc[1], mc_source_sv[1]))
goto error_mc_cb;
- if(!vl_mc_init_buffer(&dec->mc, &buffer->mc[2], mc_source_sv[2]))
+ if(!vl_mc_init_buffer(&dec->mc_c, &buffer->mc[2], mc_source_sv[2]))
goto error_mc_cr;
return &buffer->base;
@@ -479,7 +482,7 @@ vl_mpeg12_decoder_flush_buffer(struct pipe_video_decode_buffer *buffer,
for (i = 0; i < VL_MAX_PLANES; ++i) {
bool first = true;
- vl_mc_set_surface(&dec->mc, surfaces[i]);
+ vl_mc_set_surface(i == 0 ? &dec->mc_y : &dec->mc_c, surfaces[i]);
for (j = 0; j < 2; ++j) {
if (sv[j] == NULL) continue;
@@ -756,8 +759,11 @@ vl_create_mpeg12_decoder(struct pipe_video_context *context,
}
}
- if (!vl_mc_init(&dec->mc, dec->pipe, dec->base.width, dec->base.height, mc_scale))
- goto error_mc;
+ if (!vl_mc_init(&dec->mc_y, dec->pipe, dec->base.width, dec->base.height, mc_scale))
+ goto error_mc_y;
+
+ if (!vl_mc_init(&dec->mc_c, dec->pipe, dec->base.width, dec->base.height, mc_scale))
+ goto error_mc_c;
if (!init_pipe_state(dec))
goto error_pipe_state;
@@ -765,9 +771,12 @@ vl_create_mpeg12_decoder(struct pipe_video_context *context,
return &dec->base;
error_pipe_state:
- vl_mc_cleanup(&dec->mc);
+ vl_mc_cleanup(&dec->mc_c);
+
+error_mc_c:
+ vl_mc_cleanup(&dec->mc_y);
-error_mc:
+error_mc_y:
if (entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) {
vl_idct_cleanup(&dec->idct_y);
vl_idct_cleanup(&dec->idct_c);
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h
index c27197f6664..6f93c5a01ab 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h
@@ -56,7 +56,7 @@ struct vl_mpeg12_decoder
void *ves_mv[2];
struct vl_idct idct_y, idct_c;
- struct vl_mpeg12_mc_renderer mc;
+ struct vl_mpeg12_mc_renderer mc_y, mc_c;
void *dsa;
void *blend;