| /rockchip-linux_mpp/osal/ |
| H A D | mpp_mem.c | 97 size_t size; member 147 static void show_mem(rk_u32 *buf, rk_s32 size) in show_mem() argument 149 mpp_err("dumping buf %p size %d start\n", buf, size); in show_mem() 151 while (size > 0) { in show_mem() 152 if (size >= 16) { in show_mem() 155 size -= 16; in show_mem() 156 } else if (size >= 12) { in show_mem() 159 size -= 12; in show_mem() 160 } else if (size >= 8) { in show_mem() 163 size -= 8; in show_mem() [all …]
|
| H A D | mpp_list.c | 26 static inline void list_node_init_with_key_and_size(MppListNode *node, rk_u32 key, rk_s32 size) in list_node_init_with_key_and_size() argument 30 node->size = size; in list_node_init_with_key_and_size() 33 static MppListNode* create_list(void *data, rk_s32 size, rk_u32 key) in create_list() argument 35 MppListNode *node = mpp_malloc_size(MppListNode, sizeof(MppListNode) + size); in create_list() 39 list_node_init_with_key_and_size(node, key, size); in create_list() 40 memcpy(dst, data, size); in create_list() 65 int mpp_list_add_at_head(MppList *list, void *data, int size) in mpp_list_add_at_head() argument 70 MppListNode *node = create_list(data, size, 0); in mpp_list_add_at_head() 82 int mpp_list_add_at_tail(MppList *list, void *data, int size) in mpp_list_add_at_tail() argument 87 MppListNode *node = create_list(data, size, 0); in mpp_list_add_at_tail() [all …]
|
| H A D | mpp_mem_pool.c | 52 rk_u64 size; member 58 size_t size; member 130 impl->name, impl->used_count, impl->size, caller); in put_pool() 140 impl->name, impl->size, impl->used_count, impl->unused_count, caller); in put_pool() 165 mem_pool_dbg_exit("pool %-16s size %4d leaked\n", pos->name, pos->size); in mem_pool_srv_deinit() 176 MppMemPool mpp_mem_pool_init(const char *name, size_t size, const char *caller) in mpp_mem_pool_init() argument 199 pool->size = size; in mpp_mem_pool_init() 212 mem_pool_dbg_flow("pool %-16s size %4d init at %s\n", pool->name, size, caller); in mpp_mem_pool_init() 223 impl->name, impl->size, caller); in mpp_mem_pool_deinit() 237 impl->name, impl->size, impl->used_count, impl->unused_count, caller); in mpp_mem_pool_get() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/h264/ |
| H A D | h264d_scalist.c | 174 MPP_RET parse_scalingList(BitReadCtx_t *p_bitctx, RK_S32 size, RK_S32 *scaling_list, RK_S32 *use_de… in parse_scalingList() argument 182 RK_U8 *zz_scan = (size > 16) ? ZZ_SCAN8 : ZZ_SCAN; in parse_scalingList() 185 for (j = 0; j < size; ++j) { in parse_scalingList() 212 RK_S32 size = 0; in get_max_dec_frame_buf_size() local 219 size = 152064; in get_max_dec_frame_buf_size() 222 size = 152064; in get_max_dec_frame_buf_size() 226 size = 152064; in get_max_dec_frame_buf_size() 228 size = 345600; in get_max_dec_frame_buf_size() 232 size = 912384; in get_max_dec_frame_buf_size() 235 size = 912384; in get_max_dec_frame_buf_size() [all …]
|
| H A D | h264d_dpb.c | 51 RK_S32 size = 0, num_views = 0; in getDpbSize() local 57 size = 152064; in getDpbSize() 60 size = 152064; in getDpbSize() 64 size = 152064; in getDpbSize() 66 size = 345600; in getDpbSize() 69 size = 912384; in getDpbSize() 72 size = 912384; in getDpbSize() 75 size = 912384; in getDpbSize() 78 size = 1824768; in getDpbSize() 81 size = 3110400; in getDpbSize() [all …]
|
| /rockchip-linux_mpp/mpp/codec/rc/ |
| H A D | rc_base.c | 37 MPP_RET mpp_data_init_v2(MppDataV2 **data, RK_S32 size, RK_S32 value) in mpp_data_init_v2() argument 41 if (!data || size <= 0) { in mpp_data_init_v2() 42 mpp_err_f("invalid data %p size %d\n", data, size); in mpp_data_init_v2() 47 p = mpp_malloc_size(MppDataV2, sizeof(MppDataV2) + sizeof(RK_S32) * size); in mpp_data_init_v2() 49 mpp_err_f("malloc size %d failed\n", size); in mpp_data_init_v2() 52 p->size = size; in mpp_data_init_v2() 76 p->pos_r = p->size; in mpp_data_reset_v2() 77 p->sum = val * p->size; in mpp_data_reset_v2() 79 for (i = 0; i < p->size; i++) in mpp_data_reset_v2() 86 if (p->pos_r == p->size) { in mpp_data_preset_v2() [all …]
|
| /rockchip-linux_mpp/mpp/legacy/ |
| H A D | rk_list.cpp | 29 RK_S32 size; member 37 static inline void list_node_init_with_key_and_size(rk_list_node *node, RK_U32 key, RK_S32 size) in list_node_init_with_key_and_size() argument 41 node->size = size; in list_node_init_with_key_and_size() 44 static rk_list_node* create_list(void *data, RK_S32 size, RK_U32 key) in create_list() argument 46 rk_list_node *node = (rk_list_node*)malloc(sizeof(rk_list_node) + size); in create_list() 49 list_node_init_with_key_and_size(node, key, size); in create_list() 50 memcpy(dst, data, size); in create_list() 75 RK_S32 rk_list::add_at_head(void *data, RK_S32 size) in add_at_head() argument 80 rk_list_node *node = create_list(data, size, 0); in add_at_head() 93 RK_S32 rk_list::add_at_tail(void *data, RK_S32 size) in add_at_tail() argument [all …]
|
| H A D | vpu_mem_legacy.c | 37 commit_memory_handle(vpu_display_mem_pool *p, RK_S32 mem_hdl, RK_S32 size) in commit_memory_handle() argument 42 vpu_mem_dbg_func("in pool %p hnl %p size %d\n", p, mem_hdl, size); in commit_memory_handle() 46 info.size = size & 0x07ffffff; in commit_memory_handle() 47 info.index = (size & 0xf8000000) >> 27; in commit_memory_handle() 49 p_mempool->size = size; in commit_memory_handle() 50 p_mempool->buff_size = size; in commit_memory_handle() 67 ret = mpp_buffer_get(p_mempool->group, &buffer, p_mempool->size); in get_free_memory_vpumem() 74 dmabuf->size = p_mempool->size; in get_free_memory_vpumem() 77 dmabuf->phy_addr, dmabuf->size, buffer); in get_free_memory_vpumem() 165 int num, int size) in create_vpu_memory_pool_allocator() argument [all …]
|
| H A D | rk_list.h | 19 RK_S32 add_at_head(void *data, RK_S32 size); 20 RK_S32 add_at_tail(void *data, RK_S32 size); 23 RK_S32 del_at_head(void *data, RK_S32 size); 24 RK_S32 del_at_tail(void *data, RK_S32 size); 32 RK_S32 add_by_key(void *data, RK_S32 size, RK_U32 *key); 33 RK_S32 del_by_key(void *data, RK_S32 size, RK_U32 key);
|
| H A D | vpu.c | 54 RK_U32 size; member 87 mpp_req.size = sizeof(client_data); in vpu_api_set_client_type() 211 reqs[0].size = reg_size * sizeof(RK_U32); in VPUClientSendReg() 218 reqs[1].size = reg_size * sizeof(RK_U32); in VPUClientSendReg() 226 reqs[2].size = extra_info->count * sizeof(extra_info->patchs[0]); in VPUClientSendReg() 229 reqs[0].size = reg_size * sizeof(RK_U32); in VPUClientSendReg() 230 reqs[1].size = reg_size * sizeof(RK_U32); in VPUClientSendReg() 244 req.size = nregs; in VPUClientSendReg() 254 RK_S32 VPUClientSendReg2(RK_S32 socket, RK_S32 offset, RK_S32 size, void *param) in VPUClientSendReg2() argument 263 ret = (RK_S32)ioctl(socket, VPU_IOC_WRITE(offset, size), param); in VPUClientSendReg2() [all …]
|
| /rockchip-linux_mpp/utils/ |
| H A D | dictionary.c | 74 new_val = (char**) calloc(d->size * 2, sizeof * d->val); in dictionary_grow() 75 new_key = (char**) calloc(d->size * 2, sizeof * d->key); in dictionary_grow() 76 new_hash = (unsigned*) calloc(d->size * 2, sizeof * d->hash); in dictionary_grow() 88 memcpy(new_val, d->val, d->size * sizeof(char *)); in dictionary_grow() 89 memcpy(new_key, d->key, d->size * sizeof(char *)); in dictionary_grow() 90 memcpy(new_hash, d->hash, d->size * sizeof(unsigned)); in dictionary_grow() 96 d->size *= 2 ; in dictionary_grow() 150 dictionary * dictionary_new(size_t size) in dictionary_new() argument 155 if (size < DICTMINSZ) size = DICTMINSZ ; in dictionary_new() 160 d->size = size ; in dictionary_new() [all …]
|
| /rockchip-linux_mpp/osal/inc/ |
| H A D | mpp_mem.h | 20 #define mpp_malloc_size(type, size) \ argument 21 (type*)mpp_osal_malloc(__FUNCTION__, size) 26 #define mpp_calloc_size(type, size) \ argument 27 (type*)mpp_osal_calloc(__FUNCTION__, size) 32 #define mpp_realloc_size(ptr, type, size) \ argument 33 (type*)mpp_osal_realloc(__FUNCTION__, ptr, size) 45 void *mpp_osal_malloc(const char *caller, size_t size); 46 void *mpp_osal_calloc(const char *caller, size_t size); 47 void *mpp_osal_realloc(const char *caller, void *ptr, size_t size);
|
| /rockchip-linux_mpp/mpp/codec/enc/h265/ |
| H A D | h265e_stream.c | 47 s->size = H265E_EXTRA_INFO_BUF_SIZE; in h265e_stream_init() 48 mpp_writer_init(&s->enc_stream, s->buf, s->size); in h265e_stream_init() 101 RK_S32 size = 0; in h265e_stream_write_ue_with_log() local 108 size = 32; in h265e_stream_write_ue_with_log() 112 size += 16; in h265e_stream_write_ue_with_log() 115 size += ue_size_tab[tmp]; in h265e_stream_write_ue_with_log() 117 h265e_stream_write_with_log(s, 0, size >> 1, name); in h265e_stream_write_ue_with_log() 118 h265e_stream_write_with_log(s, val, (size >> 1) + 1, name); in h265e_stream_write_ue_with_log() 128 RK_S32 size = 0; in h265e_stream_write_se_with_log() local 135 size = 16; in h265e_stream_write_se_with_log() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkdec/ |
| H A D | vdpu383_com.c | 40 info[idx].size = buf_size; in update_size_offset() 81 reg->reg141_rcb_strmd_row_len = info[RCB_STRMD_ROW].size ; in vdpu383_setup_rcb() 82 reg->reg143_rcb_strmd_tile_row_len = info[RCB_STRMD_TILE_ROW].size ; in vdpu383_setup_rcb() 83 reg->reg145_rcb_inter_row_len = info[RCB_INTER_ROW].size ; in vdpu383_setup_rcb() 84 reg->reg147_rcb_inter_tile_row_len = info[RCB_INTER_TILE_ROW].size ; in vdpu383_setup_rcb() 85 reg->reg149_rcb_intra_row_len = info[RCB_INTRA_ROW].size ; in vdpu383_setup_rcb() 86 reg->reg151_rcb_intra_tile_row_len = info[RCB_INTRA_TILE_ROW].size ; in vdpu383_setup_rcb() 87 reg->reg153_rcb_filterd_row_len = info[RCB_FILTERD_ROW].size ; in vdpu383_setup_rcb() 88 reg->reg155_rcb_filterd_protect_row_len = info[RCB_FILTERD_PROTECT_ROW].size; in vdpu383_setup_rcb() 89 reg->reg157_rcb_filterd_tile_row_len = info[RCB_FILTERD_TILE_ROW].size ; in vdpu383_setup_rcb() [all …]
|
| H A D | vdpu384a_com.c | 41 info[idx].size = buf_size; in update_size_offset() 70 mpp_assert(info[i].size < (RK_S32)MPP_ALIGN(width * rcb_coeff[i], RCB_ALLINE_SIZE)); in vdpu384a_check_rcb_buf_size() 73 mpp_assert(info[i].size < (RK_S32)MPP_ALIGN(height * rcb_coeff[i], RCB_ALLINE_SIZE)); in vdpu384a_check_rcb_buf_size() 94 reg->reg141_rcb_strmd_row_len = info[RCB_STRMD_ROW].size ; in vdpu384a_setup_rcb() 95 reg->reg143_rcb_strmd_tile_row_len = info[RCB_STRMD_TILE_ROW].size ; in vdpu384a_setup_rcb() 96 reg->reg145_rcb_inter_row_len = info[RCB_INTER_ROW].size ; in vdpu384a_setup_rcb() 97 reg->reg147_rcb_inter_tile_row_len = info[RCB_INTER_TILE_ROW].size ; in vdpu384a_setup_rcb() 98 reg->reg149_rcb_intra_row_len = info[RCB_INTRA_ROW].size ; in vdpu384a_setup_rcb() 99 reg->reg151_rcb_intra_tile_row_len = info[RCB_INTRA_TILE_ROW].size ; in vdpu384a_setup_rcb() 100 reg->reg153_rcb_filterd_row_len = info[RCB_FILTERD_ROW].size ; in vdpu384a_setup_rcb() [all …]
|
| /rockchip-linux_mpp/mpp/hal/vpu/vp8e/ |
| H A D | hal_vp8e_putbit.c | 22 MPP_RET vp8e_set_buffer(Vp8ePutBitBuf *bitbuf, RK_U8 *data, RK_S32 size) in vp8e_set_buffer() argument 24 if ((bitbuf == NULL) || (data == NULL) || (size < 1)) in vp8e_set_buffer() 29 bitbuf->size = size; in vp8e_set_buffer() 90 if ((bitbuf->data - bitbuf->p_data) + gap > bitbuf->size) { in vp8e_buffer_gap() 91 bitbuf->size = 0; in vp8e_buffer_gap() 100 if (bitbuf->size > 0) in vp8e_buffer_overflow()
|
| /rockchip-linux_mpp/test/ |
| H A D | vpu_api_test.c | 242 RK_S32 size; in vpu_encode_demo() local 391 size = w_align * h_align * 3 / 2; in vpu_encode_demo() 393 printf("%d %d %d %d %d", ctx->width, ctx->height, w_align, h_align, size); in vpu_encode_demo() 402 if (enc_in && (enc_in->size == 0)) { in vpu_encode_demo() 404 enc_in->buf = (RK_U8 *)(malloc)(size); in vpu_encode_demo() 408 api_enc_in->capability = size; in vpu_encode_demo() 411 if (api_enc_in->capability < ((RK_U32)size)) { in vpu_encode_demo() 412 enc_in->buf = (RK_U8 *)(realloc)((void *)(enc_in->buf), size); in vpu_encode_demo() 416 api_enc_in->capability = size; in vpu_encode_demo() 422 enc_in->size = size; in vpu_encode_demo() [all …]
|
| /rockchip-linux_mpp/inc/ |
| H A D | mpp_buffer.h | 176 size_t size; member 222 #define mpp_buffer_get(group, buffer, size) \ argument 223 mpp_buffer_get_with_tag(group, buffer, size, MODULE_TAG, __FUNCTION__) 234 #define mpp_buffer_read(buffer, offset, data, size) \ argument 235 mpp_buffer_read_with_caller(buffer, offset, data, size, __FUNCTION__) 237 #define mpp_buffer_write(buffer, offset, data, size) \ argument 238 mpp_buffer_write_with_caller(buffer, offset, data, size, __FUNCTION__) 303 MPP_RET mpp_buffer_get_with_tag(MppBufferGroup group, MppBuffer *buffer, size_t size, 310 MPP_RET mpp_buffer_read_with_caller(MppBuffer buffer, size_t offset, void *data, size_t size, const… 311 MPP_RET mpp_buffer_write_with_caller(MppBuffer buffer, size_t offset, void *data, size_t size, cons… [all …]
|
| /rockchip-linux_mpp/mpp/base/ |
| H A D | mpp_buffer.c | 52 MPP_RET mpp_buffer_get_with_tag(MppBufferGroup group, MppBuffer *buffer, size_t size, in mpp_buffer_get_with_tag() argument 55 if (NULL == buffer || 0 == size) { in mpp_buffer_get_with_tag() 57 group, buffer, size, caller); in mpp_buffer_get_with_tag() 70 MppBufferImpl *buf = mpp_buffer_get_unused(p, size, caller); in mpp_buffer_get_with_tag() 74 size, in mpp_buffer_get_with_tag() 118 MPP_RET mpp_buffer_read_with_caller(MppBuffer buffer, size_t offset, void *data, size_t size, const… in mpp_buffer_read_with_caller() argument 126 if (0 == size) in mpp_buffer_read_with_caller() 136 memcpy(data, (char*)src + offset, size); in mpp_buffer_read_with_caller() 141 MPP_RET mpp_buffer_write_with_caller(MppBuffer buffer, size_t offset, void *data, size_t size, cons… in mpp_buffer_write_with_caller() argument 149 if (0 == size) in mpp_buffer_write_with_caller() [all …]
|
| H A D | mpp_packet.c | 74 MPP_RET mpp_packet_init(MppPacket *packet, void *data, size_t size) in mpp_packet_init() argument 92 p->size = p->length = size; in mpp_packet_init() 115 p->size = p->length = mpp_buffer_get_size(buffer); in mpp_packet_init_with_buffer() 170 p->size = p->length = length; in mpp_packet_copy_init() 237 p->length = p->size - offset; in mpp_packet_set_pos() 241 mpp_assert(p->size >= p->length); in mpp_packet_set_pos() 300 size_t size; in mpp_packet_reset() local 306 size = packet->size; in mpp_packet_reset() 312 packet->size = size; in mpp_packet_reset() 423 MPP_RET mpp_packet_read(MppPacket packet, size_t offset, void *data, size_t size) in mpp_packet_read() argument [all …]
|
| /rockchip-linux_mpp/kmpp/test/ |
| H A D | kmpp_vdec_test.c | 54 rk_s32 size = 0; in main() local 58 size = ftell(fp); in main() 61 buf = mpp_calloc(char, size); in main() 68 fread(buf, 1, size, fp); in main() 75 kmpp_packet_set_size(packet, size); in main() 77 kmpp_packet_set_length(packet, size); in main()
|
| /rockchip-linux_mpp/osal/linux/ |
| H A D | os_mem.c | 10 int os_malloc(void **memptr, size_t alignment, size_t size) in os_malloc() argument 12 return posix_memalign(memptr, alignment, size); in os_malloc() 15 int os_realloc(void *src, void **dst, size_t alignment, size_t size) in os_realloc() argument 18 *dst = realloc(src, size); in os_realloc()
|
| /rockchip-linux_mpp/osal/android/ |
| H A D | os_mem.c | 10 int os_malloc(void **memptr, size_t alignment, size_t size) in os_malloc() argument 14 void *ptr = malloc(size); in os_malloc() 27 int os_realloc(void *src, void **dst, size_t alignment, size_t size) in os_realloc() argument 30 *dst = realloc(src, size); in os_realloc()
|
| /rockchip-linux_mpp/kmpp/ |
| H A D | kmpp.c | 84 RK_U32 size; in init() local 104 size = kmpp_obj_to_shm_size(ctx->mVencInitKcfg); in init() 108 ret = mpp_vcodec_ioctl(ctx->mClientFd, VCODEC_CHAN_CREATE, 0, size, hnd); in init() 270 rk_s32 size; in put_frame() local 337 size = kmpp_obj_to_shm_size(ctx->mKframe); in put_frame() 340 size = kmpp_obj_to_shm_size(frame); in put_frame() 343 ret = mpp_vcodec_ioctl(ctx->mClientFd, VCODEC_CHAN_IN_FRM_RDY, 0, size, ptr); in put_frame() 486 RK_U32 size = 0; in control() local 499 size = kmpp_obj_to_shm_size(obj); in control() 507 size = sizeof(RK_U32); in control() [all …]
|
| /rockchip-linux_mpp/osal/allocator/ |
| H A D | allocator_ext_dma.c | 67 mpp_assert(info->size); in allocator_ext_dma_import() 83 mpp_assert(info->size); in allocator_ext_dma_mmap() 97 ptr = mmap(NULL, info->size, flags, MAP_SHARED, info->fd, offset); in allocator_ext_dma_mmap() 109 mpp_assert(info->size); in allocator_ext_dma_release() 112 munmap(info->ptr, info->size); in allocator_ext_dma_release() 117 info->size = 0; in allocator_ext_dma_release()
|