assert(context);
assert(width > 0 && height > 0);
- buffer_width = ctx->pot_buffers ? util_next_power_of_two(width) : width;
- buffer_height = ctx->pot_buffers ? util_next_power_of_two(height) : height;
+ buffer_width = ctx->pot_buffers ? util_next_power_of_two(width) : align(width, MACROBLOCK_WIDTH);
+ buffer_height = ctx->pot_buffers ? util_next_power_of_two(height) : align(height, MACROBLOCK_HEIGHT);
switch (u_reduce_video_profile(profile)) {
case PIPE_VIDEO_CODEC_MPEG12:
return NULL;
}
- buffer_width = ctx->pot_buffers ? util_next_power_of_two(width) : width;
- buffer_height = ctx->pot_buffers ? util_next_power_of_two(height) : height;
+ buffer_width = ctx->pot_buffers ? util_next_power_of_two(width) : align(width, MACROBLOCK_WIDTH);
+ buffer_height = ctx->pot_buffers ? util_next_power_of_two(height) : align(height, MACROBLOCK_HEIGHT);
result = vl_video_buffer_init(context, ctx->pipe,
buffer_width, buffer_height, 1,
dec->base.create_buffer = vl_mpeg12_create_buffer;
dec->base.flush_buffer = vl_mpeg12_decoder_flush_buffer;
- dec->base.width = align(width, MACROBLOCK_WIDTH);
- dec->base.height = align(height, MACROBLOCK_HEIGHT);
-
dec->pipe = pipe;
dec->quads = vl_vb_upload_quads(dec->pipe);