| /rockchip-linux_mpp/mpp/codec/dec/vp8/ |
| H A D | vp8d_parser.c | 217 VP8DParserContext_t *p = (VP8DParserContext_t *)c->parse_ctx; in vp8d_parser_init() local 221 if (p == NULL) { in vp8d_parser_init() 222 p = (VP8DParserContext_t*)mpp_calloc(VP8DParserContext_t, 1); in vp8d_parser_init() 223 if (NULL == p) { in vp8d_parser_init() 228 c->parse_ctx = p; in vp8d_parser_init() 230 p->packet_slots = parser_cfg->packet_slots; in vp8d_parser_init() 231 p->frame_slots = parser_cfg->frame_slots; in vp8d_parser_init() 233 mpp_buf_slot_setup(p->frame_slots, 15); in vp8d_parser_init() 235 p->dxva_ctx = mpp_calloc(DXVA_PicParams_VP8, 1); in vp8d_parser_init() 237 if (NULL == p->dxva_ctx) { in vp8d_parser_init() [all …]
|
| /rockchip-linux_mpp/mpp/codec/rc/ |
| H A D | rc_base.c | 39 MppDataV2 *p; in mpp_data_init_v2() local 47 p = mpp_malloc_size(MppDataV2, sizeof(MppDataV2) + sizeof(RK_S32) * size); in mpp_data_init_v2() 48 if (!p) { in mpp_data_init_v2() 52 p->size = size; in mpp_data_init_v2() 53 p->pos_r = 0; in mpp_data_init_v2() 54 p->pos_pw = 0; in mpp_data_init_v2() 55 p->pos_w = 0; in mpp_data_init_v2() 56 p->pos_ahead = 0; in mpp_data_init_v2() 57 p->sum = 0; in mpp_data_init_v2() 58 *data = p; in mpp_data_init_v2() [all …]
|
| H A D | rc_model_v2_smt.c | 320 RcModelV2SmtCtx *p = (RcModelV2SmtCtx*)ctx; in rc_model_v2_smt_h265_init() local 324 memcpy(&p->usr_cfg, cfg, sizeof(RcCfg)); in rc_model_v2_smt_h265_init() 325 bits_model_smt_init(p); in rc_model_v2_smt_h265_init() 333 RcModelV2SmtCtx *p = (RcModelV2SmtCtx*)ctx; in rc_model_v2_smt_h264_init() local 337 memcpy(&p->usr_cfg, cfg, sizeof(RcCfg)); in rc_model_v2_smt_h264_init() 338 bits_model_smt_init(p); in rc_model_v2_smt_h264_init() 347 RcModelV2SmtCtx *p = (RcModelV2SmtCtx *)ctx; in rc_model_v2_smt_deinit() local 349 bits_model_smt_deinit(p); in rc_model_v2_smt_deinit() 356 RcModelV2SmtCtx *p = (RcModelV2SmtCtx*)ctx; in set_coef() local 357 RK_S32 cplx_lvl_0 = mpp_data_get_pre_val_v2(p->complex_level, 0); in set_coef() [all …]
|
| H A D | vp8e_rc.c | 57 RcModelV2Ctx *p = (RcModelV2Ctx *)ctx; in rc_model_v2_vp8_hal_start() local 61 RcCfg *usr_cfg = &p->usr_cfg; in rc_model_v2_vp8_hal_start() 71 rc_dbg_func("enter p %p task %p\n", p, task); in rc_model_v2_vp8_hal_start() 87 if (p->first_frm_flg && frm->is_intra) { in rc_model_v2_vp8_hal_start() 90 p->start_qp = vp8_initial_qp(info->bit_target, mb_w * mb_h * 16 * 16); in rc_model_v2_vp8_hal_start() 91 p->cur_scale_qp = (p->start_qp) << 6; in rc_model_v2_vp8_hal_start() 95 p->start_qp = 40; in rc_model_v2_vp8_hal_start() 96 p->cur_scale_qp = (p->start_qp) << 6; in rc_model_v2_vp8_hal_start() 99 p->start_qp = info->quality_target; in rc_model_v2_vp8_hal_start() 100 p->cur_scale_qp = (p->start_qp) << 6; in rc_model_v2_vp8_hal_start() [all …]
|
| /rockchip-linux_mpp/test/ |
| H A D | mpi_enc_mt_test.c | 147 MpiEncMtTestData *p = &info->ctx; in mt_test_ctx_init() local 151 p->width = cmd->width; in mt_test_ctx_init() 152 p->height = cmd->height; in mt_test_ctx_init() 153 p->hor_stride = (cmd->hor_stride) ? (cmd->hor_stride) : in mt_test_ctx_init() 155 p->ver_stride = (cmd->ver_stride) ? (cmd->ver_stride) : in mt_test_ctx_init() 157 p->fmt = cmd->format; in mt_test_ctx_init() 158 p->type = cmd->type; in mt_test_ctx_init() 159 p->bps = cmd->bps_target; in mt_test_ctx_init() 160 p->bps_min = cmd->bps_min; in mt_test_ctx_init() 161 p->bps_max = cmd->bps_max; in mt_test_ctx_init() [all …]
|
| H A D | mpi_enc_test.c | 204 static RK_S32 get_mdinfo_size(MpiEncTestData *p, MppCodingType type) in get_mdinfo_size() argument 208 RK_U32 w = p->hor_stride, h = p->ver_stride; in get_mdinfo_size() 228 MpiEncTestData *p = &info->ctx; in kmpp_cfg_init() local 237 p->init_kcfg = init_kcfg; in kmpp_cfg_init() 240 mpp_venc_kcfg_set_u32(init_kcfg, "coding", p->type); in kmpp_cfg_init() 246 mpp_venc_kcfg_set_u32(init_kcfg, "smart_en", p->rc_mode == MPP_ENC_RC_MODE_SMTRC); in kmpp_cfg_init() 247 mpp_venc_kcfg_set_u32(init_kcfg, "max_width", p->width); in kmpp_cfg_init() 248 mpp_venc_kcfg_set_u32(init_kcfg, "max_height", p->height); in kmpp_cfg_init() 250 mpp_venc_kcfg_set_u32(init_kcfg, "qpmap_en", p->deblur_en); in kmpp_cfg_init() 259 ret = p->mpi->control(p->ctx, MPP_SET_VENC_INIT_KCFG, init_kcfg); in kmpp_cfg_init() [all …]
|
| /rockchip-linux_mpp/osal/driver/ |
| H A D | mpp_service.c | 181 MppReqV1 *mpp_service_next_req(MppDevMppService *p) in mpp_service_next_req() argument 185 if (p->req_cnt >= p->req_max) { in mpp_service_next_req() 187 p->req_max, p->req_max * 2); in mpp_service_next_req() 188 p->reqs = mpp_realloc(p->reqs, MppReqV1, p->req_max * 2); in mpp_service_next_req() 189 if (NULL == p->reqs) { in mpp_service_next_req() 194 p->req_max *= 2; in mpp_service_next_req() 197 mpp_req = &p->reqs[p->req_cnt++]; in mpp_service_next_req() 202 RegOffsetInfo *mpp_service_next_reg_offset(MppDevMppService *p) in mpp_service_next_reg_offset() argument 206 if (p->reg_offset_count + p->reg_offset_pos >= p->reg_offset_max) { in mpp_service_next_reg_offset() 207 RegOffsetInfo *orig = p->reg_offset_info; in mpp_service_next_reg_offset() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/h263/ |
| H A D | h263d_api.c | 55 H263dCtx *p; in h263d_init() local 88 p = (H263dCtx *)dec; in h263d_init() 89 p->frame_slots = cfg->frame_slots; in h263d_init() 90 p->packet_slots = cfg->packet_slots; in h263d_init() 91 p->cfg = cfg->cfg; in h263d_init() 92 p->stream = stream; in h263d_init() 93 p->stream_size = stream_size; in h263d_init() 94 p->task_pkt = task_pkt; in h263d_init() 95 p->parser = parser; in h263d_init() 111 H263dCtx *p; in h263d_deinit() local [all …]
|
| /rockchip-linux_mpp/mpp/base/ |
| H A D | mpp_packet.c | 52 MppPacketImpl *p; in mpp_packet_new() local 62 p = (MppPacketImpl*)mpp_mem_pool_get_f(pool_packet); in mpp_packet_new() 63 *packet = p; in mpp_packet_new() 64 if (!p) { in mpp_packet_new() 68 setup_mpp_packet_name(p); in mpp_packet_new() 69 p->segment_buf_cnt = MPP_PKT_SEG_CNT_DEFAULT; in mpp_packet_new() 76 MppPacketImpl *p; in mpp_packet_init() local 90 p = (MppPacketImpl *)*packet; in mpp_packet_init() 91 p->data = p->pos = data; in mpp_packet_init() 92 p->size = p->length = size; in mpp_packet_init() [all …]
|
| H A D | mpp_frame.c | 73 MppFrameImpl *p; in mpp_frame_init() local 83 p = (MppFrameImpl*)mpp_mem_pool_get_f(pool_frame); in mpp_frame_init() 84 if (!p) { in mpp_frame_init() 89 setup_mpp_frame_name(p); in mpp_frame_init() 90 setup_mpp_frame_defaults(p); in mpp_frame_init() 91 *frame = p; in mpp_frame_init() 98 MppFrameImpl *p; in mpp_frame_deinit() local 105 p = (MppFrameImpl *)*frame; in mpp_frame_deinit() 106 if (p->buffer) in mpp_frame_deinit() 107 mpp_buffer_put(p->buffer); in mpp_frame_deinit() [all …]
|
| H A D | mpp_trie.c | 137 static rk_s32 trie_prepare_buf(MppTrieImpl *p, rk_s32 info_size) in trie_prepare_buf() argument 139 if (p->info_count >= MPP_TRIE_INFO_MAX) { in trie_prepare_buf() 141 p->info_count, MPP_TRIE_INFO_MAX); in trie_prepare_buf() 146 if (p->info_buf_pos + info_size > p->info_buf_size) { in trie_prepare_buf() 147 rk_s32 old_size = p->info_buf_size; in trie_prepare_buf() 149 void *ptr = mpp_realloc(p->info_buf, void, new_size); in trie_prepare_buf() 157 p, p->info_buf, old_size, ptr, new_size); in trie_prepare_buf() 159 p->info_buf = ptr; in trie_prepare_buf() 160 p->info_buf_size = new_size; in trie_prepare_buf() 166 static rk_s32 trie_pave_node(MppTrieImpl *p, const char *name, rk_s32 str_len) in trie_pave_node() argument [all …]
|
| H A D | mpp_cluster.c | 193 void cluster_signal_f(const char *caller, MppCluster *p); 332 MppNodeImpl *p = mpp_calloc(MppNodeImpl, 1); in mpp_node_init() local 333 if (p) in mpp_node_init() 334 sem_init(&p->sem_detach, 0, 0); in mpp_node_init() 336 *node = p; in mpp_node_init() 338 return p ? MPP_OK : MPP_NOK; in mpp_node_init() 343 MppNodeImpl *p = (MppNodeImpl *)node; in mpp_node_deinit() local 345 if (p) { in mpp_node_deinit() 346 if (p->attached) in mpp_node_deinit() 347 mpp_node_task_detach(&p->task); in mpp_node_deinit() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkdec/h265d/ |
| H A D | hal_h265d_api.c | 39 HalH265dCtx *p = (HalH265dCtx *)ctx; in hal_h265d_init() local 59 p->hw_info = cfg->hw_info; in hal_h265d_init() 62 p->dev = cfg->dev; in hal_h265d_init() 63 p->is_v341 = (soc == ROCKCHIP_SOC_RK3228H || (soc == ROCKCHIP_SOC_RK3328)); in hal_h265d_init() 64 p->is_v345 = (hw_id == HWID_VDPU345); in hal_h265d_init() 65 p->is_v34x = (hw_id == HWID_VDPU34X || hw_id == HWID_VDPU38X); in hal_h265d_init() 66 p->is_v383 = (hw_id == HWID_VDPU383); in hal_h265d_init() 67 p->is_v384a = (hw_id == HWID_VDPU384A); in hal_h265d_init() 68 p->client_type = client_type; in hal_h265d_init() 71 p->api = &hal_h265d_vdpu382; in hal_h265d_init() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/mpg4/ |
| H A D | mpg4d_api.c | 56 Mpg4dCtx *p; in mpg4d_init() local 89 p = (Mpg4dCtx *)dec; in mpg4d_init() 90 p->frame_slots = cfg->frame_slots; in mpg4d_init() 91 p->packet_slots = cfg->packet_slots; in mpg4d_init() 92 p->task_count = 2; in mpg4d_init() 93 p->dec_cfg = cfg->cfg; in mpg4d_init() 94 p->stream = stream; in mpg4d_init() 95 p->stream_size = stream_size; in mpg4d_init() 96 p->task_pkt = task_pkt; in mpg4d_init() 97 p->parser = parser; in mpg4d_init() [all …]
|
| /rockchip-linux_mpp/mpp/codec/ |
| H A D | mpp_rc.c | 48 MppData *p = mpp_malloc_size(MppData, sizeof(MppData) + sizeof(RK_S32) * size); in mpp_data_init() local 49 if (NULL == p) { in mpp_data_init() 53 p->size = size; in mpp_data_init() 54 p->len = 0; in mpp_data_init() 55 p->pos = 0; in mpp_data_init() 56 p->val = (RK_S32 *)(p + 1); in mpp_data_init() 57 *data = p; in mpp_data_init() 62 void mpp_data_deinit(MppData *p) in mpp_data_deinit() argument 64 if (p) in mpp_data_deinit() 65 mpp_free(p); in mpp_data_deinit() [all …]
|
| H A D | mpp_parser.c | 90 ParserImpl *p = mpp_calloc(ParserImpl, 1); in mpp_parser_init() local 92 if (NULL == ctx || NULL == p) { in mpp_parser_init() 94 mpp_free(p); in mpp_parser_init() 102 mpp_free(p); in mpp_parser_init() 107 p->api = api; in mpp_parser_init() 108 p->ctx = ctx; in mpp_parser_init() 109 *prs = p; in mpp_parser_init() 123 ParserImpl *p = (ParserImpl *)prs; in mpp_parser_deinit() local 124 if (p->api->deinit) in mpp_parser_deinit() 125 p->api->deinit(p->ctx); in mpp_parser_deinit() [all …]
|
| H A D | enc_impl.c | 62 EncImplCtx *p = mpp_calloc(EncImplCtx, 1); in enc_impl_init() local 65 if (NULL == ctx || NULL == p) { in enc_impl_init() 67 mpp_free(p); in enc_impl_init() 75 mpp_free(p); in enc_impl_init() 80 p->api = api; in enc_impl_init() 81 p->ctx = ctx; in enc_impl_init() 82 memcpy(&p->cfg, cfg, sizeof(p->cfg)); in enc_impl_init() 83 *impl = p; in enc_impl_init() 98 EncImplCtx *p = (EncImplCtx *)impl; in enc_impl_deinit() local 99 if (p->api->deinit) in enc_impl_deinit() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkdec/vp9d/ |
| H A D | hal_vp9d_api.c | 36 HalVp9dCtx *p = (HalVp9dCtx *)ctx; in hal_vp9d_init() local 46 p->hw_info = cfg->hw_info; in hal_vp9d_init() 49 p->dev = cfg->dev; in hal_vp9d_init() 50 p->hw_id = hw_id; in hal_vp9d_init() 51 p->client_type = client_type; in hal_vp9d_init() 53 p->api = &hal_vp9d_vdpu383; in hal_vp9d_init() 56 p->api = &hal_vp9d_vdpu382; in hal_vp9d_init() 59 p->api = &hal_vp9d_vdpu34x; in hal_vp9d_init() 64 p->api = &hal_vp9d_rkv; in hal_vp9d_init() 69 p->slots = cfg->frame_slots; in hal_vp9d_init() [all …]
|
| /rockchip-linux_mpp/osal/ |
| H A D | mpp_allocator.c | 23 #define MPP_ALLOCATOR_LOCK(p) pthread_mutex_lock(&(p)->lock); argument 24 #define MPP_ALLOCATOR_UNLOCK(p) pthread_mutex_unlock(&(p)->lock); argument 48 MppAllocatorImpl *p = (MppAllocatorImpl *)allocator; in mpp_allocator_api_wrapper() local 52 if (!p || !info || id >= ALLOC_API_BUTT) { in mpp_allocator_api_wrapper() 58 MPP_ALLOCATOR_LOCK(p); in mpp_allocator_api_wrapper() 61 func = p->os_api.alloc; in mpp_allocator_api_wrapper() 64 func = p->os_api.free; in mpp_allocator_api_wrapper() 67 func = p->os_api.import; in mpp_allocator_api_wrapper() 70 func = p->os_api.release; in mpp_allocator_api_wrapper() 73 func = p->os_api.mmap; in mpp_allocator_api_wrapper() [all …]
|
| /rockchip-linux_mpp/mpp/ |
| H A D | mpp_impl.c | 289 MppDumpImpl *p = mpp_calloc(MppDumpImpl, 1); in mpp_dump_init() local 291 mpp_env_get_u32("mpp_dump_width", &p->dump_width, 0); in mpp_dump_init() 292 mpp_env_get_u32("mpp_dump_height", &p->dump_height, 0); in mpp_dump_init() 293 p->dump_size = p->dump_width * p->dump_height * 3 / 2; in mpp_dump_init() 295 mpp_mutex_init(&p->lock); in mpp_dump_init() 296 p->debug = mpp_debug; in mpp_dump_init() 297 p->tid = syscall(SYS_gettid); in mpp_dump_init() 298 p->log_version = 0; in mpp_dump_init() 299 p->time_base = mpp_time(); in mpp_dump_init() 301 *info = p; in mpp_dump_init() [all …]
|
| /rockchip-linux_mpp/mpp/hal/ |
| H A D | mpp_enc_hal.c | 53 MppEncHalImpl *p = mpp_calloc(MppEncHalImpl, 1); in mpp_enc_hal_init() local 54 if (NULL == p) { in mpp_enc_hal_init() 62 p->coding = cfg->coding; in mpp_enc_hal_init() 63 p->api = hw_enc_apis[i]; in mpp_enc_hal_init() 64 p->ctx = mpp_calloc_size(void, p->api->ctx_size); in mpp_enc_hal_init() 66 MPP_RET ret = p->api->init(p->ctx, cfg); in mpp_enc_hal_init() 72 ret = hal_task_group_init(&p->tasks, TASK_BUTT, cfg->task_cnt, in mpp_enc_hal_init() 79 cfg->tasks = p->tasks; in mpp_enc_hal_init() 80 *ctx = p; in mpp_enc_hal_init() 86 mpp_free(p->ctx); in mpp_enc_hal_init() [all …]
|
| H A D | mpp_hal.c | 90 MppHalImpl *p = mpp_calloc(MppHalImpl, 1); in mpp_hal_init() local 91 if (NULL == p) { in mpp_hal_init() 100 p->api = hw_apis[i]; in mpp_hal_init() 101 p->ctx = mpp_calloc_size(void, p->api->ctx_size); in mpp_hal_init() 103 MPP_RET ret = p->api->init(p->ctx, cfg); in mpp_hal_init() 109 *ctx = p; in mpp_hal_init() 115 mpp_free(p->ctx); in mpp_hal_init() 116 mpp_free(p); in mpp_hal_init() 128 MppHalImpl *p = (MppHalImpl*)ctx; in mpp_hal_deinit() local 129 p->api->deinit(p->ctx); in mpp_hal_deinit() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/m2v/ |
| H A D | m2vd_parser.c | 242 M2VDParserContext *p = (M2VDParserContext *)c->parse_ctx; in m2vd_parser_init() local 244 if (p == NULL) { in m2vd_parser_init() 245 M2VD_CHK_M(p = (M2VDParserContext*)mpp_calloc(M2VDParserContext, 1)); in m2vd_parser_init() 246 c->parse_ctx = p; in m2vd_parser_init() 249 M2VD_CHK_F(m2vd_parser_init_ctx(p, parser_cfg)); in m2vd_parser_init() 263 M2VDParserContext *p = (M2VDParserContext *)c->parse_ctx; in m2vd_parser_deinit() local 268 M2VD_FCLOSE(p->fp_dbg_file[k]); in m2vd_parser_deinit() 270 M2VD_FCLOSE(p->fp_dbg_yuv); in m2vd_parser_deinit() 272 if (p->bitstream_sw_buf) { in m2vd_parser_deinit() 273 mpp_free(p->bitstream_sw_buf); in m2vd_parser_deinit() [all …]
|
| /rockchip-linux_mpp/mpp/codec/enc/h264/ |
| H A D | h264e_api_v2.c | 220 static void h264e_add_syntax(H264eCtx *ctx, H264eSyntaxType type, void *p) in h264e_add_syntax() argument 223 ctx->syntax[ctx->syn_num].p = p; in h264e_add_syntax() 230 H264eCtx *p = (H264eCtx *)ctx; in h264e_init() local 236 p->type = ctrl_cfg->type; in h264e_init() 237 p->hdr_size = SZ_1K; in h264e_init() 238 p->hdr_buf = mpp_malloc_size(void, p->hdr_size); in h264e_init() 239 mpp_assert(p->hdr_buf); in h264e_init() 240 mpp_packet_init(&p->hdr_pkt, p->hdr_buf, p->hdr_size); in h264e_init() 241 mpp_assert(p->hdr_pkt); in h264e_init() 243 p->cfg = ctrl_cfg->cfg; in h264e_init() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/dummy/ |
| H A D | dummy_dec_api.c | 56 DummyDec *p; in dummy_dec_init() local 79 p = (DummyDec *)dec; in dummy_dec_init() 80 p->frame_slots = cfg->frame_slots; in dummy_dec_init() 81 p->packet_slots = cfg->packet_slots; in dummy_dec_init() 82 p->task_count = 2; in dummy_dec_init() 83 p->stream = stream; in dummy_dec_init() 84 p->stream_size = stream_size; in dummy_dec_init() 85 p->task_pkt = task_pkt; in dummy_dec_init() 87 p->slot_index[i] = -1; in dummy_dec_init() 94 DummyDec *p; in dummy_dec_deinit() local [all …]
|