#define NUM_BUFFERS 2
+static const unsigned const_empty_block_mask_420[3][2][2] = {
+ { { 0x20, 0x10 }, { 0x08, 0x04 } },
+ { { 0x02, 0x02 }, { 0x02, 0x02 } },
+ { { 0x01, 0x01 }, { 0x01, 0x01 } }
+};
+
static void
flush_buffer(struct vl_mpeg12_context *ctx)
{
for (y = 0; y < 2; ++y) {
for (x = 0; x < 2; ++x, ++tb) {
- if (mb->cbp & (*ctx->mc_renderer.empty_block_mask)[0][y][x]) {
+ if (mb->cbp & (*ctx->empty_block_mask)[0][y][x]) {
vl_idct_add_block(&buffer->idct_y, mb->mbx * 2 + x, mb->mby * 2 + y, blocks);
blocks += BLOCK_WIDTH * BLOCK_HEIGHT;
}
assert(ctx->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420);
for (tb = 1; tb < 3; ++tb) {
- if (mb->cbp & (*ctx->mc_renderer.empty_block_mask)[tb][0][0]) {
+ if (mb->cbp & (*ctx->empty_block_mask)[tb][0][0]) {
if(tb == 1)
vl_idct_add_block(&buffer->idct_cb, mb->mbx, mb->mby, blocks);
else
for ( i = 0; i < num_macroblocks; ++i ) {
vl_vb_add_block(&ctx->cur_buffer->vertex_stream, &mpeg12_macroblocks[i],
- ctx->mc_renderer.empty_block_mask);
+ ctx->empty_block_mask);
upload_buffer(ctx, ctx->cur_buffer, &mpeg12_macroblocks[i]);
}
return NULL;
}
+ /* TODO: Implement 422, 444 */
+ assert(chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420);
+ ctx->empty_block_mask = &const_empty_block_mask_420;
+
if (!(idct_matrix = vl_idct_upload_matrix(ctx->pipe)))
return false;
VS_O_MV3
};
-static const unsigned const_empty_block_mask_420[3][2][2] = {
- { { 0x20, 0x10 }, { 0x08, 0x04 } },
- { { 0x02, 0x02 }, { 0x02, 0x02 } },
- { { 0x01, 0x01 }, { 0x01, 0x01 } }
-};
-
static void *
create_vert_shader(struct vl_mpeg12_mc_renderer *r)
{
renderer->buffer_height = buffer_height;
renderer->chroma_format = chroma_format;
- /* TODO: Implement 422, 444 */
- assert(chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420);
- renderer->empty_block_mask = &const_empty_block_mask_420;
-
renderer->texview_map = util_new_keymap(sizeof(struct pipe_surface*), -1,
texview_map_delete);
if (!renderer->texview_map)