OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec,
        OPJ_UINT32 p_tile_index,
        OPJ_BYTE * p_data,
        OPJ_UINT32 p_data_size,
        opj_stream_t *p_stream
                                          )
{
    if (p_codec && p_data && p_stream) {
        opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
        opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream;

        if (! l_codec->is_decompressor) {
            return OPJ_FALSE;
        }

        return l_codec->m_codec_data.m_decompression.opj_decode_tile_data(
                   l_codec->m_codec,
                   p_tile_index,
                   p_data,
                   p_data_size,
                   l_stream,
                   &(l_codec->m_event_mgr));
    }
    return OPJ_FALSE;
}
OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(opj_codec_t *p_codec,
        OPJ_UINT32 p_tile_index,
        OPJ_BYTE * p_data,
        OPJ_UINT32 p_data_size,
        opj_stream_t *p_stream
                                          )
{
    if (p_codec && p_data && p_stream) {
        opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
        opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream;

        if (! l_codec->is_decompressor) {
            return OPJ_FALSE;
        }

        return l_codec->m_codec_data.m_decompression.opj_decode_tile_data(
                   l_codec->m_codec,
                   p_tile_index,
                   p_data,
                   p_data_size,
                   l_stream,
                   &(l_codec->m_event_mgr));
    }
    return OPJ_FALSE;
}