memset(&sv_tmpl, 0, sizeof(sv_tmpl));
u_sampler_view_default_template(&sv_tmpl, res, res->format);
- sv_tmpl.swizzle_r = sv_tmpl.swizzle_g = sv_tmpl.swizzle_b = sv_tmpl.swizzle_a = PIPE_SWIZZLE_RED;
+ sv_tmpl.swizzle_r = sv_tmpl.swizzle_g = sv_tmpl.swizzle_b = sv_tmpl.swizzle_a = PIPE_SWIZZLE_X;
buffer->zscan_source = dec->context->create_sampler_view(dec->context, res, &sv_tmpl);
pipe_resource_reference(&res, NULL);
if (!buffer->zscan_source)
mv.bottom.weight = weight;
break;
- default: // TODO: Support DUALPRIME and 16x8
- break;
+ default:
+ unreachable("TODO: Support DUALPRIME and 16x8");
}
} else {
mv.top.x = mv.top.y = 0;
dec->context->delete_vertex_elements_state(dec->context, dec->ves_ycbcr);
dec->context->delete_vertex_elements_state(dec->context, dec->ves_mv);
- pipe_resource_reference(&dec->quads.buffer, NULL);
- pipe_resource_reference(&dec->pos.buffer, NULL);
+ pipe_resource_reference(&dec->quads.buffer.resource, NULL);
+ pipe_resource_reference(&dec->pos.buffer.resource, NULL);
pipe_sampler_view_reference(&dec->zscan_linear, NULL);
pipe_sampler_view_reference(&dec->zscan_normal, NULL);
for (i = 0; i < num_configs; ++i) {
if (!screen->is_format_supported(screen, configs[i].zscan_source_format, PIPE_TEXTURE_2D,
- 1, PIPE_BIND_SAMPLER_VIEW))
+ 1, 1, PIPE_BIND_SAMPLER_VIEW))
continue;
if (configs[i].idct_source_format != PIPE_FORMAT_NONE) {
if (!screen->is_format_supported(screen, configs[i].idct_source_format, PIPE_TEXTURE_2D,
- 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
+ 1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_3D,
- 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
+ 1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
} else {
if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_2D,
- 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
+ 1, 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
continue;
}
return &configs[i];
nr_of_idct_render_targets = 1;
formats[0] = formats[1] = formats[2] = format_config->idct_source_format;
+ assert(pipe_format_to_chroma_format(formats[0]) == dec->base.chroma_format);
memset(&templat, 0, sizeof(templat));
templat.width = dec->base.width / 4;
templat.height = dec->base.height;
- templat.chroma_format = dec->base.chroma_format;
dec->idct_source = vl_video_buffer_create_ex
(
dec->context, &templat,
goto error_idct_source;
formats[0] = formats[1] = formats[2] = format_config->mc_source_format;
+ assert(pipe_format_to_chroma_format(formats[0]) == dec->base.chroma_format);
memset(&templat, 0, sizeof(templat));
templat.width = dec->base.width / nr_of_idct_render_targets;
templat.height = dec->base.height / 4;
- templat.chroma_format = dec->base.chroma_format;
dec->mc_source = vl_video_buffer_create_ex
(
dec->context, &templat,
struct pipe_video_buffer templat;
formats[0] = formats[1] = formats[2] = format_config->mc_source_format;
+ assert(pipe_format_to_chroma_format(formats[0]) == dec->base.chroma_format);
memset(&templat, 0, sizeof(templat));
templat.width = dec->base.width;
templat.height = dec->base.height;
- templat.chroma_format = dec->base.chroma_format;
dec->mc_source = vl_video_buffer_create_ex
(
dec->context, &templat,
dec->base = *templat;
dec->base.context = context;
- dec->context = context->screen->context_create(context->screen, NULL, 0);
+ dec->context = pipe_create_multimedia_context(context->screen);
dec->base.destroy = vl_mpeg12_destroy;
dec->base.begin_frame = vl_mpeg12_begin_frame;