enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height)
+ unsigned width, unsigned height, unsigned max_references)
{
unsigned buffer_width, buffer_height;
bool pot_buffers;
switch (u_reduce_video_profile(profile)) {
case PIPE_VIDEO_CODEC_MPEG12:
- return vl_create_mpeg12_decoder(pipe, profile, entrypoint, chroma_format, buffer_width, buffer_height);
+ return vl_create_mpeg12_decoder(pipe, profile, entrypoint, chroma_format, buffer_width, buffer_height, max_references);
default:
return NULL;
}
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height);
+ unsigned width, unsigned height, unsigned max_references);
#endif /* vl_decoder_h */
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height)
+ unsigned width, unsigned height, unsigned max_references)
{
const unsigned block_size_pixels = BLOCK_WIDTH * BLOCK_HEIGHT;
const struct format_config *format_config;
dec->base.chroma_format = chroma_format;
dec->base.width = width;
dec->base.height = height;
+ dec->base.max_references = max_references;
dec->base.destroy = vl_mpeg12_destroy;
dec->base.create_buffer = vl_mpeg12_create_buffer;
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height);
+ unsigned width, unsigned height, unsigned max_references);
#endif /* vl_mpeg12_decoder_h */
enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint,
enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height );
+ unsigned width, unsigned height, unsigned max_references );
/**
* Creates a video buffer as decoding target
enum pipe_video_chroma_format chroma_format;
unsigned width;
unsigned height;
+ unsigned max_references;
/**
* destroy this video decoder
vldecoder->device = dev;
- // TODO: Define max_references. Used mainly for H264
vldecoder->decoder = pipe->create_video_decoder
(
pipe, p_profile,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CHROMA_FORMAT_420,
- width, height
+ width, height, max_references
);
+
if (!vldecoder->decoder) {
ret = VDP_STATUS_ERROR;
goto error_decoder;
ProfileToPipe(mc_type),
(mc_type & XVMC_IDCT) ? PIPE_VIDEO_ENTRYPOINT_IDCT : PIPE_VIDEO_ENTRYPOINT_MC,
FormatToPipe(chroma_format),
- width, height
+ width, height, 2
);
if (!context_priv->decoder) {