Lines Matching refs:JpegHalCtx

723     JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal;  in hal_jpegd_vdpu2_init()  local
725 mpp_assert(JpegHalCtx); in hal_jpegd_vdpu2_init()
729 JpegHalCtx->dec_cb = cfg->dec_cb; in hal_jpegd_vdpu2_init()
730 JpegHalCtx->packet_slots = cfg->packet_slots; in hal_jpegd_vdpu2_init()
731 JpegHalCtx->frame_slots = cfg->frame_slots; in hal_jpegd_vdpu2_init()
732 JpegHalCtx->have_pp = cfg->hw_info->cap_jpg_pp_out; in hal_jpegd_vdpu2_init()
742 JpegHalCtx->regs = (void *)info; in hal_jpegd_vdpu2_init()
745 if (JpegHalCtx->group == NULL) { in hal_jpegd_vdpu2_init()
746 ret = mpp_buffer_group_get_internal(&JpegHalCtx->group, in hal_jpegd_vdpu2_init()
754 ret = mpp_buffer_get(JpegHalCtx->group, &JpegHalCtx->pTableBase, in hal_jpegd_vdpu2_init()
761 PPInfo *pp_info = &(JpegHalCtx->pp_info); in hal_jpegd_vdpu2_init()
767 JpegHalCtx->output_fmt = MPP_FMT_YUV420SP; in hal_jpegd_vdpu2_init()
768 JpegHalCtx->set_output_fmt_flag = 0; in hal_jpegd_vdpu2_init()
771 JpegHalCtx->hal_debug_enable = 0; in hal_jpegd_vdpu2_init()
772 JpegHalCtx->frame_count = 0; in hal_jpegd_vdpu2_init()
773 JpegHalCtx->output_yuv_count = 0; in hal_jpegd_vdpu2_init()
782 JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal; in hal_jpegd_vdpu2_deinit() local
786 if (JpegHalCtx->dev) { in hal_jpegd_vdpu2_deinit()
787 mpp_dev_deinit(JpegHalCtx->dev); in hal_jpegd_vdpu2_deinit()
788 JpegHalCtx->dev = NULL; in hal_jpegd_vdpu2_deinit()
791 if (JpegHalCtx->pTableBase) { in hal_jpegd_vdpu2_deinit()
792 ret = mpp_buffer_put(JpegHalCtx->pTableBase); in hal_jpegd_vdpu2_deinit()
799 if (JpegHalCtx->group) { in hal_jpegd_vdpu2_deinit()
800 ret = mpp_buffer_group_put(JpegHalCtx->group); in hal_jpegd_vdpu2_deinit()
807 if (JpegHalCtx->regs) { in hal_jpegd_vdpu2_deinit()
808 mpp_free(JpegHalCtx->regs); in hal_jpegd_vdpu2_deinit()
809 JpegHalCtx->regs = NULL; in hal_jpegd_vdpu2_deinit()
812 JpegHalCtx->set_output_fmt_flag = 0; in hal_jpegd_vdpu2_deinit()
813 JpegHalCtx->hal_debug_enable = 0; in hal_jpegd_vdpu2_deinit()
814 JpegHalCtx->frame_count = 0; in hal_jpegd_vdpu2_deinit()
815 JpegHalCtx->output_yuv_count = 0; in hal_jpegd_vdpu2_deinit()
830 JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal; in hal_jpegd_vdpu2_gen_regs() local
843 ret = jpegd_setup_output_fmt(JpegHalCtx, syntax, syn->dec.output); in hal_jpegd_vdpu2_gen_regs()
850 mpp_buf_slot_get_prop(JpegHalCtx->packet_slots, syn->dec.input, in hal_jpegd_vdpu2_gen_regs()
852 JpegHalCtx->pkt_fd = mpp_buffer_get_fd(streambuf); in hal_jpegd_vdpu2_gen_regs()
853 if (JpegHalCtx->pkt_fd <= 0) { in hal_jpegd_vdpu2_gen_regs()
860 mpp_buf_slot_get_prop(JpegHalCtx->frame_slots, syn->dec.output, in hal_jpegd_vdpu2_gen_regs()
862 JpegHalCtx->frame_fd = mpp_buffer_get_fd(outputBuf); in hal_jpegd_vdpu2_gen_regs()
863 if (JpegHalCtx->frame_fd <= 0) { in hal_jpegd_vdpu2_gen_regs()
868 ret = jpegd_gen_regs(JpegHalCtx, syntax); in hal_jpegd_vdpu2_gen_regs()
870 mpp_buffer_sync_end(JpegHalCtx->pTableBase); in hal_jpegd_vdpu2_gen_regs()
889 JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal; in hal_jpegd_vdpu2_start() local
890 RK_U32 *regs = (RK_U32 *)JpegHalCtx->regs; in hal_jpegd_vdpu2_start()
907 ret = mpp_dev_ioctl(JpegHalCtx->dev, MPP_DEV_REG_WR, &wr_cfg); in hal_jpegd_vdpu2_start()
919 ret = mpp_dev_ioctl(JpegHalCtx->dev, MPP_DEV_REG_RD, &rd_cfg); in hal_jpegd_vdpu2_start()
925 ret = mpp_dev_ioctl(JpegHalCtx->dev, MPP_DEV_CMD_SEND, NULL); in hal_jpegd_vdpu2_start()
944 JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal; in hal_jpegd_vdpu2_wait() local
945 JpegRegSet *reg_out = JpegHalCtx->regs; in hal_jpegd_vdpu2_wait()
952 ret = mpp_dev_ioctl(JpegHalCtx->dev, MPP_DEV_CMD_POLL, NULL); in hal_jpegd_vdpu2_wait()
959 if (JpegHalCtx->dec_cb) { in hal_jpegd_vdpu2_wait()
977 mpp_callback(JpegHalCtx->dec_cb, &param); in hal_jpegd_vdpu2_wait()
986 mpp_buf_slot_get_prop(JpegHalCtx->frame_slots, task->dec.output, in hal_jpegd_vdpu2_wait()
991 JpegHalCtx->output_yuv_count); in hal_jpegd_vdpu2_wait()
1000 JpegHalCtx->output_yuv_count, in hal_jpegd_vdpu2_wait()
1003 JpegHalCtx->output_yuv_count++; in hal_jpegd_vdpu2_wait()
1018 JpegdHalCtx *JpegHalCtx = (JpegdHalCtx *)hal; in hal_jpegd_vdpu2_control() local
1019 if (NULL == JpegHalCtx) { in hal_jpegd_vdpu2_control()
1026 JpegHalCtx->output_fmt = *((MppFrameFormat *)param); in hal_jpegd_vdpu2_control()
1027 JpegHalCtx->set_output_fmt_flag = 1; in hal_jpegd_vdpu2_control()
1028 jpegd_dbg_hal("output_format: 0x%x\n", JpegHalCtx->output_fmt); in hal_jpegd_vdpu2_control()
1030 …if (!MPP_FRAME_FMT_IS_YUV(JpegHalCtx->output_fmt) && !MPP_FRAME_FMT_IS_RGB(JpegHalCtx->output_fmt)… in hal_jpegd_vdpu2_control()
1031 mpp_err_f("invalid output format 0x%x\n", JpegHalCtx->output_fmt); in hal_jpegd_vdpu2_control()