mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-07 16:05:37 +00:00
vcomp/cmpto_j2k, pool: alloc extra data
padding for conversions
This commit is contained in:
@@ -174,8 +174,9 @@ std::shared_ptr<video_frame> video_frame_pool::impl::get_frame() {
|
||||
try {
|
||||
ret = vf_alloc_desc(m_desc);
|
||||
for (unsigned int i = 0; i < m_desc.tile_count; ++i) {
|
||||
ret->tiles[i].data = (char *)
|
||||
m_allocator->allocate(m_max_data_len);
|
||||
ret->tiles[i].data =
|
||||
(char *) m_allocator->allocate(
|
||||
m_max_data_len + MAX_PADDING);
|
||||
if (ret->tiles[i].data == NULL) {
|
||||
throw std::runtime_error("Cannot allocate data");
|
||||
}
|
||||
|
||||
@@ -208,7 +208,8 @@ static bool configure_with(struct state_video_compress_j2k *s, struct video_desc
|
||||
cuda_wrapper_free(s->cuda_conv_tmp_buf);
|
||||
cuda_wrapper_malloc(
|
||||
(void **) &s->cuda_conv_tmp_buf,
|
||||
vc_get_datalen(desc.width, desc.height, desc.color_spec));
|
||||
vc_get_datalen(desc.width, desc.height, desc.color_spec) +
|
||||
MAX_PADDING);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user