Rename mis-named function opj_tcd_get_encoded_tile_size() to opj_tcd_get_encoder_input_buffer_size()

This commit is contained in:
Even Rouault 2020-04-16 20:33:22 +02:00
parent 9c1cfb034a
commit 221a801a97
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D
3 changed files with 9 additions and 5 deletions

View File

@ -11876,7 +11876,7 @@ OPJ_BOOL opj_j2k_encode(opj_j2k_t * p_j2k,
}
}
}
l_current_tile_size = opj_tcd_get_encoded_tile_size(p_j2k->m_tcd);
l_current_tile_size = opj_tcd_get_encoder_input_buffer_size(p_j2k->m_tcd);
if (!l_reuse_data) {
if (l_current_tile_size > l_max_tile_size) {
OPJ_BYTE *l_new_current_data = (OPJ_BYTE *) opj_realloc(l_current_data,

View File

@ -2349,7 +2349,7 @@ static void opj_tcd_code_block_enc_deallocate(opj_tcd_precinct_t * p_precinct)
}
}
OPJ_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd)
OPJ_SIZE_T opj_tcd_get_encoder_input_buffer_size(opj_tcd_t *p_tcd)
{
OPJ_UINT32 i;
OPJ_SIZE_T l_data_size = 0;
@ -2617,7 +2617,7 @@ OPJ_BOOL opj_tcd_copy_tile_data(opj_tcd_t *p_tcd,
OPJ_UINT32 l_size_comp, l_remaining;
OPJ_SIZE_T l_nb_elem;
l_data_size = opj_tcd_get_encoded_tile_size(p_tcd);
l_data_size = opj_tcd_get_encoder_input_buffer_size(p_tcd);
if (l_data_size != p_src_length) {
return OPJ_FALSE;
}

View File

@ -415,9 +415,11 @@ OPJ_BOOL opj_tcd_update_tile_data(opj_tcd_t *p_tcd,
OPJ_UINT32 p_dest_length);
/**
*
* Get the size in bytes of the input buffer provided before encoded.
* This must be the size provided to the p_src_length argument of
* opj_tcd_copy_tile_data()
*/
OPJ_SIZE_T opj_tcd_get_encoded_tile_size(opj_tcd_t *p_tcd);
OPJ_SIZE_T opj_tcd_get_encoder_input_buffer_size(opj_tcd_t *p_tcd);
/**
* Initialize the tile coder and may reuse some meory.
@ -433,6 +435,8 @@ OPJ_BOOL opj_tcd_init_encode_tile(opj_tcd_t *p_tcd,
/**
* Copies tile data from the given memory block onto the system.
*
* p_src_length must be equal to opj_tcd_get_encoder_input_buffer_size()
*/
OPJ_BOOL opj_tcd_copy_tile_data(opj_tcd_t *p_tcd,
OPJ_BYTE * p_src,