Lines Matching refs:mat0
203 void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0, in jas_matrix_bindsub() argument
208 if (mat0->data_) { in jas_matrix_bindsub()
209 if (!(mat0->flags_ & JAS_MATRIX_REF)) { in jas_matrix_bindsub()
210 jas_free(mat0->data_); in jas_matrix_bindsub()
212 mat0->data_ = 0; in jas_matrix_bindsub()
213 mat0->datasize_ = 0; in jas_matrix_bindsub()
215 if (mat0->rows_) { in jas_matrix_bindsub()
216 jas_free(mat0->rows_); in jas_matrix_bindsub()
217 mat0->rows_ = 0; in jas_matrix_bindsub()
219 mat0->flags_ |= JAS_MATRIX_REF; in jas_matrix_bindsub()
220 mat0->numrows_ = r1 - r0 + 1; in jas_matrix_bindsub()
221 mat0->numcols_ = c1 - c0 + 1; in jas_matrix_bindsub()
222 mat0->maxrows_ = mat0->numrows_; in jas_matrix_bindsub()
223 mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)); in jas_matrix_bindsub()
224 for (i = 0; i < mat0->numrows_; ++i) { in jas_matrix_bindsub()
225 mat0->rows_[i] = mat1->rows_[r0 + i] + c0; in jas_matrix_bindsub()
228 mat0->xstart_ = mat1->xstart_ + c0; in jas_matrix_bindsub()
229 mat0->ystart_ = mat1->ystart_ + r0; in jas_matrix_bindsub()
230 mat0->xend_ = mat0->xstart_ + mat0->numcols_; in jas_matrix_bindsub()
231 mat0->yend_ = mat0->ystart_ + mat0->numrows_; in jas_matrix_bindsub()
238 int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1) in jas_matrix_cmp() argument
243 if (mat0->numrows_ != mat1->numrows_ || mat0->numcols_ != in jas_matrix_cmp()
247 for (i = 0; i < mat0->numrows_; i++) { in jas_matrix_cmp()
248 for (j = 0; j < mat0->numcols_; j++) { in jas_matrix_cmp()
249 if (jas_matrix_get(mat0, i, j) != jas_matrix_get(mat1, i, j)) { in jas_matrix_cmp()