mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-07 18:05:51 +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 {
|
try {
|
||||||
ret = vf_alloc_desc(m_desc);
|
ret = vf_alloc_desc(m_desc);
|
||||||
for (unsigned int i = 0; i < m_desc.tile_count; ++i) {
|
for (unsigned int i = 0; i < m_desc.tile_count; ++i) {
|
||||||
ret->tiles[i].data = (char *)
|
ret->tiles[i].data =
|
||||||
m_allocator->allocate(m_max_data_len);
|
(char *) m_allocator->allocate(
|
||||||
|
m_max_data_len + MAX_PADDING);
|
||||||
if (ret->tiles[i].data == NULL) {
|
if (ret->tiles[i].data == NULL) {
|
||||||
throw std::runtime_error("Cannot allocate data");
|
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_free(s->cuda_conv_tmp_buf);
|
||||||
cuda_wrapper_malloc(
|
cuda_wrapper_malloc(
|
||||||
(void **) &s->cuda_conv_tmp_buf,
|
(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
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user