| /rockchip-linux_mpp/mpp/base/ |
| H A D | mpp_cfg_io.c | 99 char *buf; member 148 static rk_s32 get_full_name(MppCfgIoImpl *obj, char *buf, rk_s32 buf_size) in get_full_name() argument 177 buf[0] = '\0'; in get_full_name() 183 len += snprintf(buf + len, buf_size - len, "%s", name[i]); in get_full_name() 191 cfg_io_dbg_name("depth %d obj %-16s -> %s\n", obj->depth, obj->name, buf); in get_full_name() 596 char *buf; member 606 get_full_name(impl, ctx->buf, ctx->buf_size); in add_obj_info() 607 mpp_trie_add_info(ctx->trie, ctx->buf, &impl->info, sizeof(impl->info)); in add_obj_info() 643 ctx.buf = name; in mpp_cfg_to_trie() 664 #define write_byte_f(str, buf, size) write_byte(str, (void *)buf, size, __FUNCTION__) argument [all …]
|
| /rockchip-linux_mpp/utils/ |
| H A D | camera_source.c | 117 struct v4l2_buffer buf; in camera_source_init() local 225 buf = (struct v4l2_buffer) {0}; in camera_source_init() 226 buf.type = type; in camera_source_init() 227 buf.memory = V4L2_MEMORY_MMAP; in camera_source_init() 228 buf.index = i; in camera_source_init() 231 buf.m.planes = planes; in camera_source_init() 232 buf.length = FMT_NUM_PLANES; in camera_source_init() 235 if (-1 == camera_source_ioctl(ctx->fd, VIDIOC_QUERYBUF, &buf)) { in camera_source_init() 240 if (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE == buf.type) { in camera_source_init() 242 buf_len = buf.m.planes[0].length; in camera_source_init() [all …]
|
| H A D | mpp_enc_roi_utils.c | 355 static MPP_RET set_roi_pos_val(RK_U32 *buf, RK_U32 pos, RK_U32 value) in set_roi_pos_val() argument 360 buf[index] = buf[index] | (value << bits); in set_roi_pos_val() 364 #define set_roi_qpadj(buf, index, val) \ argument 367 set_roi_pos_val(buf, offset, val); \ 370 #define set_roi_force_split(buf, index, val) \ argument 373 set_roi_pos_val(buf, offset, val); \ 376 #define set_roi_force_intra(buf, index, val) \ argument 379 set_roi_pos_val(buf, offset, val); \ 382 #define set_roi_force_inter(buf, index, val) \ argument 385 set_roi_pos_val(buf, offset, val); \ [all …]
|
| /rockchip-linux_mpp/mpp/hal/common/ |
| H A D | hal_bufs.c | 74 HalBuf *buf = hal_bufs_pos(impl, i); in hal_bufs_clear() local 78 if (buf->buf[j]) { in hal_bufs_clear() 80 ret |= mpp_buffer_put(buf->buf[j]); in hal_bufs_clear() 81 buf->buf[j] = NULL; in hal_bufs_clear() 204 HalBuf *buf = hal_bufs_pos(impl, i); in hal_bufs_setup() local 206 buf->cnt = size_cnt; in hal_bufs_setup() 207 buf->buf = (MppBuffer)(buf + 1); in hal_bufs_setup() 242 MppBuffer buf = hal_buf->buf[i]; in hal_bufs_get_buf() local 244 if (size && NULL == buf) { in hal_bufs_get_buf() 245 mpp_buffer_get(group, &buf, size); in hal_bufs_get_buf() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/av1/ |
| H A D | av1d_api.c | 42 RK_U8 *buf = NULL; in av1d_init() local 60 buf = mpp_malloc(RK_U8, size); in av1d_init() 61 if (!buf) { in av1d_init() 67 if ((ret = mpp_packet_init(&av1_ctx->pkt, (void *)buf, size)) != MPP_OK) in av1d_init() 70 av1_ctx->stream = buf; in av1d_init() 90 RK_U8 *buf = NULL; in av1d_deinit() local 96 buf = mpp_packet_get_data(av1_ctx->pkt); in av1d_deinit() 97 MPP_FREE(buf); in av1d_deinit() 147 RK_U8 *buf = NULL; in av1d_prepare() local 161 buf = pos = mpp_packet_get_pos(pkt); in av1d_prepare() [all …]
|
| /rockchip-linux_mpp/osal/test/ |
| H A D | mpp_dmabuf_test.c | 19 MppBuffer buf = NULL; in main() local 33 ret = mpp_buffer_get(grp, &buf, SZ_1M); in main() 39 fd = mpp_buffer_get_fd(buf); in main() 40 ptr = mpp_buffer_get_ptr(buf); in main() 78 if (buf) { in main() 79 mpp_buffer_put(buf); in main() 80 buf = NULL; in main()
|
| /rockchip-linux_mpp/kmpp/base/test/ |
| H A D | kmpp_buffer_test.c | 18 KmppBuffer buf = NULL; in main() local 57 ret = kmpp_buffer_get(&buf); in main() 58 mpp_logi("object %s ready\n", kmpp_obj_get_name(buf)); in main() 61 buf_cfg = kmpp_buffer_to_cfg(buf); in main() 73 kmpp_buffer_setup(buf); in main() 108 if (buf) { in main() 109 kmpp_buffer_put(buf); in main() 110 buf = NULL; in main()
|
| H A D | kmpp_obj_test.c | 106 KmppObj buf = NULL; in kmpp_buffer_test() local 189 ret = kmpp_obj_get_by_name_f(&buf, "KmppBuffer"); in kmpp_buffer_test() 195 test_detail("object %s ready\n", kmpp_obj_get_name(buf)); in kmpp_buffer_test() 198 buf_cfg = kmpp_buffer_to_cfg(buf); in kmpp_buffer_test() 219 ret = kmpp_buffer_setup(buf); in kmpp_buffer_test() 221 test_detail("object %s ioctl ret %d\n", kmpp_obj_get_name(buf), ret); in kmpp_buffer_test() 231 if (buf) in kmpp_buffer_test() 232 kmpp_obj_put_f(buf); in kmpp_buffer_test()
|
| /rockchip-linux_mpp/mpp/codec/dec/vp9/ |
| H A D | vp9d_api.c | 41 RK_U8 *buf = NULL; in vp9d_init() local 56 buf = mpp_malloc(RK_U8, size); in vp9d_init() 57 if (!buf) { in vp9d_init() 63 if ((ret = mpp_packet_init(&vp9_ctx->pkt, (void *)buf, size)) != MPP_OK) in vp9d_init() 81 RK_U8 *buf = NULL; in vp9d_deinit() local 88 buf = mpp_packet_get_data(vp9_ctx->pkt); in vp9d_deinit() 89 MPP_FREE(buf); in vp9d_deinit() 139 RK_U8 *buf = NULL; in vp9d_prepare() local 150 buf = pos = mpp_packet_get_pos(pkt); in vp9d_prepare() 153 consumed = vp9d_split_frame(ps, &out_data, &out_size, buf, length); in vp9d_prepare()
|
| /rockchip-linux_mpp/kmpp/test/ |
| H A D | kmpp_vdec_test.c | 53 char *buf = NULL; in main() local 61 buf = mpp_calloc(char, size); in main() 63 if (buf) { in main() 68 fread(buf, 1, size, fp); in main() 72 sptr.uptr = buf; in main() 87 MPP_FREE(buf); in main()
|
| /rockchip-linux_mpp/mpp/vproc/ |
| H A D | mpp_dec_vproc.c | 104 static void dec_vproc_put_frame(Mpp *mpp, MppFrame frame, MppBuffer buf, RK_S64 pts, RK_U32 err) in dec_vproc_put_frame() argument 114 if (buf) in dec_vproc_put_frame() 115 impl->buffer = buf; in dec_vproc_put_frame() 118 if (impl->meta && src_buf != buf) { in dec_vproc_put_frame() 127 RK_U8 *dst = (RK_U8 *)mpp_buffer_get_ptr(buf) + hdr_offset; in dec_vproc_put_frame() 131 mpp_buffer_sync_partial_end(buf, hdr_offset, hdr_size); in dec_vproc_put_frame() 156 MppBuffer buf = mpp_frame_get_buffer(ctx->prev_frm0); in dec_vproc_clr_prev0() local 157 RK_S32 fd = (buf) ? (mpp_buffer_get_fd(buf)) : (-1); in dec_vproc_clr_prev0() 165 MppBuffer buf = mpp_frame_get_buffer(ctx->prev_frm0); in dec_vproc_clr_prev0() local 166 if (buf) in dec_vproc_clr_prev0() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkdec/vp9d/ |
| H A D | hal_vp9d_com.h | 91 MPP_RET hal_vp9d_output_probe(void *buf, void *dxva); 92 MPP_RET hal_vp9d_prob_flag_delta(void *buf, void *dxva); 93 void hal_vp9d_update_counts(void *buf, void *dxva); 94 MPP_RET hal_vp9d_prob_default(void *buf, void *dxva); 95 MPP_RET hal_vp9d_prob_kf(void *buf);
|
| /rockchip-linux_mpp/mpp/hal/rkdec/h264d/ |
| H A D | hal_h264d_vdpu2.c | 489 char buf[1024]; in set_vlc_regs() local 490 RK_S32 buf_len = 0, buf_size = sizeof(buf) - 1; in set_vlc_regs() 492 … buf_len += snprintf(buf + buf_len, buf_size - buf_len, "=== poc_base filed %d fram_num %d ===\n", in set_vlc_regs() 495 buf_len += snprintf(buf + buf_len, buf_size - buf_len, "poc 0x%08x\n", *ptr_tmp); in set_vlc_regs() 496 …buf_len += snprintf(buf + buf_len, buf_size - buf_len, "term_flag 0x%08x refpic_valid_flag 0x%08x … in set_vlc_regs() 499 … buf_len += snprintf(buf + buf_len, buf_size - buf_len, "ref[%d] 0x%08x\n", i, ref_reg[i]); in set_vlc_regs() 500 fprintf(fp, "%s", buf); in set_vlc_regs() 601 char buf[1024]; in set_ref_regs() local 602 RK_S32 buf_len = 0, buf_size = sizeof(buf) - 1; in set_ref_regs() 604 buf_len += snprintf(buf + buf_len, buf_size - buf_len, "frame_num %d field %d bottom %d\n", in set_ref_regs() [all …]
|
| /rockchip-linux_mpp/mpp/base/test/ |
| H A D | mpp_cfg_test.c | 82 void *buf = NULL; in main() local 103 buf = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); in main() 104 if (!buf) { in main() 109 mpp_logi("mmap size %d to %p content:\n", size, buf); in main() 110 mpp_logi("%s", buf); in main() 112 ret = mpp_cfg_from_string(&root, MPP_CFG_STR_FMT_JSON, buf); in main() 138 if (buf) { in main() 139 munmap(buf, size); in main() 140 buf = NULL; in main()
|
| H A D | mpp_bit_test.c | 92 char buf[BIT_WRITER_BUFFER_SIZE]; in main() local 110 buf_len += snprintf(buf + buf_len, sizeof(buf) - buf_len, in main() 114 mpp_log("stream %s\n", buf); in main()
|
| /rockchip-linux_mpp/osal/linux/ |
| H A D | os_env.c | 43 char buf[ENV_BUF_SIZE_LINUX]; in os_set_env_u32() local 44 snprintf(buf, sizeof(buf) - 1, "%u", value); in os_set_env_u32() 45 return setenv(name, buf, 1); in os_set_env_u32()
|
| /rockchip-linux_mpp/osal/android/ |
| H A D | os_env.c | 55 char buf[PROP_VALUE_MAX + 1 + 2]; in os_set_env_u32() local 56 snprintf(buf, sizeof(buf) - 1, "0x%x", value); in os_set_env_u32() 57 int len = __system_property_set(name, buf); in os_set_env_u32()
|
| /rockchip-linux_mpp/mpp/hal/vpu/h264e/ |
| H A D | hal_h264e_vepu_v2.c | 91 static void vepu_swap_endian(RK_U32 *buf, RK_S32 size_bytes) in vepu_swap_endian() argument 100 val = buf[i]; in vepu_swap_endian() 108 val2 = buf[i + 1]; in vepu_swap_endian() 116 buf[i] = tmp2; in vepu_swap_endian() 120 buf[i] = tmp; in vepu_swap_endian() 126 static void vepu_write_cabac_table(MppBuffer buf, RK_S32 cabac_init_idc) in vepu_write_cabac_table() argument 158 mpp_buffer_write(buf, 0, table, H264E_CABAC_TABLE_BUF_SIZE); in vepu_write_cabac_table() 270 MppBuffer buf = bufs->nal_size_table; in h264e_vepu_buf_get_nal_size_table() local 274 if (NULL == buf) { in h264e_vepu_buf_get_nal_size_table() 275 mpp_buffer_get(bufs->group, &buf, bufs->nal_tab_size); in h264e_vepu_buf_get_nal_size_table() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkdec/ |
| H A D | vdpu383_com.c | 65 MppBuffer buf, Vdpu383RcbInfo *info) in vdpu383_setup_rcb() argument 69 reg->reg140_rcb_strmd_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 70 reg->reg142_rcb_strmd_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 71 reg->reg144_rcb_inter_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 72 reg->reg146_rcb_inter_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 73 reg->reg148_rcb_intra_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 74 reg->reg150_rcb_intra_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 75 reg->reg152_rcb_filterd_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 76 reg->reg154_rcb_filterd_protect_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() 77 reg->reg156_rcb_filterd_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu383_setup_rcb() [all …]
|
| H A D | vdpu384a_com.c | 79 MppBuffer buf, Vdpu384aRcbInfo *info) in vdpu384a_setup_rcb() argument 83 reg->reg140_rcb_strmd_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 84 reg->reg142_rcb_strmd_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 85 reg->reg144_rcb_inter_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 86 reg->reg146_rcb_inter_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 87 reg->reg148_rcb_intra_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 88 reg->reg150_rcb_intra_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 89 reg->reg152_rcb_filterd_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 90 reg->reg156_rcb_filterd_tile_row_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() 91 reg->reg158_rcb_filterd_tile_col_offset = mpp_buffer_get_fd(buf); in vdpu384a_setup_rcb() [all …]
|
| /rockchip-linux_mpp/mpp/codec/dec/h265/ |
| H A D | h265d_parser.c | 59 static RK_S32 hevc_find_frame_end(SplitContext_t *sc, const RK_U8 *buf, in hevc_find_frame_end() argument 67 sc->state64 = (sc->state64 << 8) | buf[i]; in hevc_find_frame_end() 83 int first_slice_segment_in_pic_flag = buf[i] >> 7; in hevc_find_frame_end() 100 static RK_S32 mpp_combine_frame(SplitContext_t *sc, RK_S32 next, const RK_U8 **buf, RK_S32 *buf_siz… in mpp_combine_frame() argument 105 mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); in mpp_combine_frame() 135 memcpy(&sc->buffer[sc->index], *buf, *buf_size); in mpp_combine_frame() 160 memcpy(&sc->buffer[sc->index], *buf, in mpp_combine_frame() 163 *buf = sc->buffer; in mpp_combine_frame() 176 mpp_log("%X %X %X %X\n", (*buf)[0], (*buf)[1], (*buf)[2], (*buf)[3]); in mpp_combine_frame() 224 const RK_U8 *buf, RK_S32 buf_size, RK_S64 pts, in h265d_split_frame() argument [all …]
|
| /rockchip-linux_mpp/mpp/base/inc/ |
| H A D | mpp_buffer_impl.h | 204 #define mpp_buffer_attach_dev(buf, dev) mpp_buffer_attach_dev_f(__FUNCTION__, buf, dev) argument 205 #define mpp_buffer_detach_dev(buf, dev) mpp_buffer_detach_dev_f(__FUNCTION__, buf, dev) argument 206 #define mpp_buffer_get_iova(buf, dev) mpp_buffer_get_iova_f(__FUNCTION__, buf, dev) argument
|
| /rockchip-linux_mpp/osal/ |
| H A D | mpp_log.c | 48 const char *buf = fmt; in __mpp_log() local 58 buf = msg; in __mpp_log() 64 buf = msg_log_nothing; in __mpp_log() 67 buf = msg; in __mpp_log() 74 buf = msg; in __mpp_log() 77 func(tag, buf, args); in __mpp_log()
|
| H A D | mpp_mem.c | 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() 153 mpp_err("%08x %08x %08x %08x\n", buf[0], buf[1], buf[2], buf[3]); in show_mem() 154 buf += 4; in show_mem() 157 mpp_err("%08x %08x %08x\n", buf[0], buf[1], buf[2]); in show_mem() 158 buf += 3; in show_mem() 161 mpp_err("%08x %08x\n", buf[0], buf[1]); in show_mem() 162 buf += 2; in show_mem() 165 mpp_err("%08x\n", buf[0]); in show_mem() 166 buf += 1; in show_mem() [all …]
|
| /rockchip-linux_mpp/mpp/hal/rkenc/common/ |
| H A D | vepu541_common.c | 37 MPP_RET vepu541_set_one_roi(void *buf, MppEncROIRegion *region, RK_S32 w, RK_S32 h) in vepu541_set_one_roi() argument 39 Vepu541RoiCfg *ptr = (Vepu541RoiCfg *)buf; in vepu541_set_one_roi() 46 if (NULL == buf || NULL == region) { in vepu541_set_one_roi() 47 mpp_err_f("invalid buf %p roi %p\n", buf, region); in vepu541_set_one_roi() 91 MPP_RET vepu541_set_roi(void *buf, MppEncROICfg *roi, RK_S32 w, RK_S32 h) in vepu541_set_roi() argument 94 Vepu541RoiCfg *ptr = (Vepu541RoiCfg *)buf; in vepu541_set_roi() 103 if (NULL == buf || NULL == roi) { in vepu541_set_roi() 104 mpp_err_f("invalid buf %p roi %p\n", buf, roi); in vepu541_set_roi() 158 vepu541_set_one_roi(buf, region, w, h); in vepu541_set_roi() 305 buf_size = mpp_buffer_get_size(tmp->buf); in vepu541_set_osd() [all …]
|