47 int number_sample_out;
58 if (Source_mask == NULL) {
61 if (Source_mask->
nline < 1) {
76 if (Size_factor < 1) {
84 if (Result_mask == NULL) {
92 number_line_out = Source_mask->
nline * Size_factor;
93 number_sample_out = Source_mask->
nsample * Size_factor;
107 for (iline = 0; iline < number_line_out ; iline++) {
108 for (isample = 0; isample < number_sample_out; isample++) {
115 result_mask_tmp.
data.
u8[iline][isample] =
116 Source_mask->
data.
u8[iline / Size_factor][isample / Size_factor];
129 *Result_mask = result_mask_tmp;
MTKt_status MtkDataBufferAllocate(int nline, int nsample, MTKt_DataType datatype, MTKt_DataBuffer *databuf)
Allocate Data Buffer.
2-dimensional Data Buffer
#define MTKT_DATABUFFER_INIT
MTKt_status MtkDataBufferFree(MTKt_DataBuffer *databuf)
Free data buffer.
#define MTK_ERR_CODE_MSG_JUMP(code, msg)
#define MTK_ERR_COND_JUMP(code)
MTKt_status MtkUpsampleMask(const MTKt_DataBuffer *Source_mask, int Size_factor, MTKt_DataBuffer *Result_mask)
Upsample a mask by nearest neighbor sampling.