• Home
  • Raw
  • Download

Lines Matching refs:p_code_block

115 static OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block);
125 static OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block);
130 static OPJ_BOOL opj_tcd_code_block_enc_allocate_data (opj_tcd_cblk_enc_t * p_code_block);
1076 static OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block) in opj_tcd_code_block_enc_allocate() argument
1078 if (! p_code_block->layers) { in opj_tcd_code_block_enc_allocate()
1080 p_code_block->layers = (opj_tcd_layer_t*) opj_calloc(100, sizeof(opj_tcd_layer_t)); in opj_tcd_code_block_enc_allocate()
1081 if (! p_code_block->layers) { in opj_tcd_code_block_enc_allocate()
1085 if (! p_code_block->passes) { in opj_tcd_code_block_enc_allocate()
1086 p_code_block->passes = (opj_tcd_pass_t*) opj_calloc(100, sizeof(opj_tcd_pass_t)); in opj_tcd_code_block_enc_allocate()
1087 if (! p_code_block->passes) { in opj_tcd_code_block_enc_allocate()
1097 static OPJ_BOOL opj_tcd_code_block_enc_allocate_data (opj_tcd_cblk_enc_t * p_code_block) in opj_tcd_code_block_enc_allocate_data() argument
1101 …l_data_size = (OPJ_UINT32)((p_code_block->x1 - p_code_block->x0) * (p_code_block->y1 - p_code_bloc… in opj_tcd_code_block_enc_allocate_data()
1103 if (l_data_size > p_code_block->data_size) { in opj_tcd_code_block_enc_allocate_data()
1104 if (p_code_block->data) { in opj_tcd_code_block_enc_allocate_data()
1105 opj_free(p_code_block->data - 1); /* again, why -1 */ in opj_tcd_code_block_enc_allocate_data()
1107 p_code_block->data = (OPJ_BYTE*) opj_malloc(l_data_size+1); in opj_tcd_code_block_enc_allocate_data()
1108 if(! p_code_block->data) { in opj_tcd_code_block_enc_allocate_data()
1109 p_code_block->data_size = 0U; in opj_tcd_code_block_enc_allocate_data()
1112 p_code_block->data_size = l_data_size; in opj_tcd_code_block_enc_allocate_data()
1114 p_code_block->data[0] = 0; in opj_tcd_code_block_enc_allocate_data()
1115 p_code_block->data+=1; /*why +1 ?*/ in opj_tcd_code_block_enc_allocate_data()
1123 static OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block) in opj_tcd_code_block_dec_allocate() argument
1125 if (! p_code_block->data) { in opj_tcd_code_block_dec_allocate()
1127 p_code_block->data = (OPJ_BYTE*) opj_malloc(OPJ_J2K_DEFAULT_CBLK_DATA_SIZE); in opj_tcd_code_block_dec_allocate()
1128 if (! p_code_block->data) { in opj_tcd_code_block_dec_allocate()
1131 p_code_block->data_max_size = OPJ_J2K_DEFAULT_CBLK_DATA_SIZE; in opj_tcd_code_block_dec_allocate()
1134p_code_block->segs = (opj_tcd_seg_t *) opj_calloc(OPJ_J2K_DEFAULT_NB_SEGS,sizeof(opj_tcd_seg_t)); in opj_tcd_code_block_dec_allocate()
1135 if (! p_code_block->segs) { in opj_tcd_code_block_dec_allocate()
1140 p_code_block->m_current_max_segs = OPJ_J2K_DEFAULT_NB_SEGS; in opj_tcd_code_block_dec_allocate()
1144 OPJ_BYTE* l_data = p_code_block->data; in opj_tcd_code_block_dec_allocate()
1145 OPJ_UINT32 l_data_max_size = p_code_block->data_max_size; in opj_tcd_code_block_dec_allocate()
1146 opj_tcd_seg_t * l_segs = p_code_block->segs; in opj_tcd_code_block_dec_allocate()
1147 OPJ_UINT32 l_current_max_segs = p_code_block->m_current_max_segs; in opj_tcd_code_block_dec_allocate()
1149 memset(p_code_block, 0, sizeof(opj_tcd_cblk_dec_t)); in opj_tcd_code_block_dec_allocate()
1150 p_code_block->data = l_data; in opj_tcd_code_block_dec_allocate()
1151 p_code_block->data_max_size = l_data_max_size; in opj_tcd_code_block_dec_allocate()
1152 p_code_block->segs = l_segs; in opj_tcd_code_block_dec_allocate()
1153 p_code_block->m_current_max_segs = l_current_max_segs; in opj_tcd_code_block_dec_allocate()