Lines Matching refs:inst

194 	struct vpu_inst *inst = ctrl_to_inst(ctrl);
195 struct vdec_t *vdec = inst->priv;
198 vpu_inst_lock(inst);
210 vpu_inst_unlock(inst);
220 static int vdec_ctrl_init(struct vpu_inst *inst)
225 ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 20);
229 v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
233 v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
237 ctrl = v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
242 ctrl = v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops,
247 if (inst->ctrl_handler.error) {
248 ret = inst->ctrl_handler.error;
249 v4l2_ctrl_handler_free(&inst->ctrl_handler);
253 ret = v4l2_ctrl_handler_setup(&inst->ctrl_handler);
255 dev_err(inst->dev, "[%d] setup ctrls fail, ret = %d\n", inst->id, ret);
256 v4l2_ctrl_handler_free(&inst->ctrl_handler);
263 static void vdec_handle_resolution_change(struct vpu_inst *inst)
265 struct vdec_t *vdec = inst->priv;
268 if (!inst->fh.m2m_ctx)
271 if (inst->state != VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
276 q = v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx);
281 vpu_notify_source_change(inst);
282 vpu_set_last_buffer_dequeued(inst, false);
285 static int vdec_update_state(struct vpu_inst *inst, enum vpu_codec_state state, u32 force)
287 struct vdec_t *vdec = inst->priv;
288 enum vpu_codec_state pre_state = inst->state;
291 if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
292 vdec->state = inst->state;
296 if (inst->state != VPU_CODEC_STATE_SEEK || force)
297 inst->state = state;
301 if (inst->state != pre_state)
302 vpu_trace(inst->dev, "[%d] %s -> %s\n", inst->id,
303 vpu_codec_state_name(pre_state), vpu_codec_state_name(inst->state));
305 if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
306 vdec_handle_resolution_change(inst);
311 static void vdec_set_last_buffer_dequeued(struct vpu_inst *inst)
313 struct vdec_t *vdec = inst->priv;
315 if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
319 if (!vpu_set_last_buffer_dequeued(inst, true)) {
321 vdec_update_state(inst, VPU_CODEC_STATE_DRAIN, 0);
337 struct vpu_inst *inst = to_inst(file);
338 struct vdec_t *vdec = inst->priv;
342 vpu_inst_lock(inst);
344 fmt = vpu_get_format(inst, f->type);
346 fmt = vpu_helper_find_sibling(inst, f->type, fmt->pixfmt);
350 fmt = vpu_helper_enum_format(inst, f->type, f->index);
360 vpu_inst_unlock(inst);
366 struct vpu_inst *inst = to_inst(file);
367 struct vdec_t *vdec = inst->priv;
372 vpu_inst_lock(inst);
373 cur_fmt = vpu_get_format(inst, f->type);
390 vpu_inst_unlock(inst);
397 struct vpu_inst *inst = to_inst(file);
398 struct vdec_t *vdec = inst->priv;
401 vpu_inst_lock(inst);
403 struct vpu_format *cap_fmt = vpu_get_format(inst, f->type);
405 if (!vpu_helper_match_format(inst, cap_fmt->type, cap_fmt->pixfmt,
410 vpu_try_fmt_common(inst, f, &fmt);
423 vpu_inst_unlock(inst);
428 static int vdec_s_fmt_common(struct vpu_inst *inst, struct v4l2_format *f)
434 struct vdec_t *vdec = inst->priv;
437 if (!inst->fh.m2m_ctx)
440 q = v4l2_m2m_get_vq(inst->fh.m2m_ctx, f->type);
446 if (vpu_try_fmt_common(inst, f, &fmt))
449 cur_fmt = vpu_get_format(inst, f->type);
450 if (V4L2_TYPE_IS_OUTPUT(f->type) && inst->state != VPU_CODEC_STATE_DEINIT) {
459 if (vpu_helper_match_format(inst, f->type, cur_fmt->pixfmt, pixmp->pixelformat)) {
483 inst->crop.left = 0;
484 inst->crop.top = 0;
485 inst->crop.width = cur_fmt->width;
486 inst->crop.height = cur_fmt->height;
490 vpu_trace(inst->dev, "[%d] %c%c%c%c %dx%d\n", inst->id,
503 struct vpu_inst *inst = to_inst(file);
505 struct vdec_t *vdec = inst->priv;
508 vpu_inst_lock(inst);
509 ret = vdec_s_fmt_common(inst, f);
517 fc.type = inst->cap_format.type;
518 fc.fmt.pix_mp.pixelformat = inst->cap_format.pixfmt;
521 vdec_s_fmt_common(inst, &fc);
530 vpu_inst_unlock(inst);
536 struct vpu_inst *inst = to_inst(file);
545 s->r = inst->crop;
550 s->r.width = inst->cap_format.width;
551 s->r.height = inst->cap_format.height;
560 static int vdec_drain(struct vpu_inst *inst)
562 struct vdec_t *vdec = inst->priv;
564 if (!inst->fh.m2m_ctx)
570 if (!vpu_is_source_empty(inst))
574 vpu_set_last_buffer_dequeued(inst, true);
578 vpu_iface_add_scode(inst, SCODE_PADDING_EOS);
580 vpu_iface_set_decode_params(inst, &vdec->params, 1);
582 vpu_trace(inst->dev, "[%d] frame_count = %d\n", inst->id, vdec->params.frame_count);
587 static int vdec_cmd_start(struct vpu_inst *inst)
589 struct vdec_t *vdec = inst->priv;
591 switch (inst->state) {
595 vdec_update_state(inst, VPU_CODEC_STATE_ACTIVE, 0);
600 vpu_process_capture_buffer(inst);
602 vdec_set_last_buffer_dequeued(inst);
606 static int vdec_cmd_stop(struct vpu_inst *inst)
608 struct vdec_t *vdec = inst->priv;
610 vpu_trace(inst->dev, "[%d]\n", inst->id);
612 if (inst->state == VPU_CODEC_STATE_DEINIT) {
613 vpu_set_last_buffer_dequeued(inst, true);
616 vdec_drain(inst);
624 struct vpu_inst *inst = to_inst(file);
631 vpu_inst_lock(inst);
634 vdec_cmd_start(inst);
637 vdec_cmd_stop(inst);
642 vpu_inst_unlock(inst);
689 static bool vdec_check_ready(struct vpu_inst *inst, unsigned int type)
691 struct vdec_t *vdec = inst->priv;
702 static struct vb2_v4l2_buffer *vdec_get_src_buffer(struct vpu_inst *inst, u32 count)
705 vpu_skip_frame(inst, count - 1);
707 return vpu_next_src_buf(inst);
710 static int vdec_frame_decoded(struct vpu_inst *inst, void *arg)
712 struct vdec_t *vdec = inst->priv;
722 vpu_inst_lock(inst);
725 dev_err(inst->dev, "[%d] decoded invalid frame[%d]\n", inst->id, info->id);
730 src_buf = vdec_get_src_buffer(inst, info->consumed_count);
734 v4l2_m2m_src_buf_remove(inst->fh.m2m_ctx);
742 dev_info(inst->dev, "[%d] buf[%d] has been decoded\n", inst->id, info->id);
748 cur_fmt = vpu_get_format(inst, inst->cap_format.type);
755 dev_dbg(inst->dev, "[%d][OUTPUT TS]%32lld\n", inst->id, vbuf->vb2_buf.timestamp);
761 vpu_inst_unlock(inst);
766 static struct vpu_vb2_buffer *vdec_find_buffer(struct vpu_inst *inst, u32 luma)
768 struct vdec_t *vdec = inst->priv;
781 static void vdec_buf_done(struct vpu_inst *inst, struct vpu_frame_info *frame)
783 struct vdec_t *vdec = inst->priv;
792 vpu_inst_lock(inst);
795 vpu_buf = vdec_find_buffer(inst, frame->luma);
796 vpu_inst_unlock(inst);
798 dev_err(inst->dev, "[%d] can't find buffer, id = %d, addr = 0x%x\n",
799 inst->id, frame->id, frame->luma);
803 dev_dbg(inst->dev, "[%d] frame skip\n", inst->id);
807 cur_fmt = vpu_get_format(inst, inst->cap_format.type);
810 dev_err(inst->dev, "[%d] buffer id(%d, %d) dismatch\n",
811 inst->id, vbuf->vb2_buf.index, frame->id);
817 dev_err(inst->dev, "[%d] buffer(%d) ready without decoded\n", inst->id, frame->id);
824 dev_dbg(inst->dev, "[%d][OUTPUT TS]%32lld\n", inst->id, vbuf->vb2_buf.timestamp);
827 vpu_inst_lock(inst);
829 vpu_inst_unlock(inst);
830 dev_dbg(inst->dev, "[%d] decoded : %d, display : %d, sequence : %d\n",
831 inst->id, vdec->decoded_frame_count, vdec->display_frame_count, vdec->sequence);
834 static void vdec_stop_done(struct vpu_inst *inst)
836 struct vdec_t *vdec = inst->priv;
838 vpu_inst_lock(inst);
839 vdec_update_state(inst, VPU_CODEC_STATE_DEINIT, 0);
853 inst->total_input_count = 0;
854 vpu_inst_unlock(inst);
857 static bool vdec_check_source_change(struct vpu_inst *inst)
859 struct vdec_t *vdec = inst->priv;
862 if (!inst->fh.m2m_ctx)
868 sibling = vpu_helper_find_sibling(inst, inst->cap_format.type, inst->cap_format.pixfmt);
870 vdec->codec_info.pixfmt = inst->cap_format.pixfmt;
872 if (!vb2_is_streaming(v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx)))
874 if (inst->cap_format.pixfmt != vdec->codec_info.pixfmt)
876 if (inst->cap_format.width != vdec->codec_info.decoded_width)
878 if (inst->cap_format.height != vdec->codec_info.decoded_height)
880 if (vpu_get_num_buffers(inst, inst->cap_format.type) < inst->min_buffer_cap)
882 if (inst->crop.left != vdec->codec_info.offset_x)
884 if (inst->crop.top != vdec->codec_info.offset_y)
886 if (inst->crop.width != vdec->codec_info.width)
888 if (inst->crop.height != vdec->codec_info.height)
894 static void vdec_init_fmt(struct vpu_inst *inst)
896 struct vdec_t *vdec = inst->priv;
900 f.type = inst->cap_format.type;
908 vpu_try_fmt_common(inst, &f, &inst->cap_format);
910 inst->out_format.width = vdec->codec_info.width;
911 inst->out_format.height = vdec->codec_info.height;
914 static void vdec_init_crop(struct vpu_inst *inst)
916 struct vdec_t *vdec = inst->priv;
918 inst->crop.left = vdec->codec_info.offset_x;
919 inst->crop.top = vdec->codec_info.offset_y;
920 inst->crop.width = vdec->codec_info.width;
921 inst->crop.height = vdec->codec_info.height;
924 static void vdec_init_mbi(struct vpu_inst *inst)
926 struct vdec_t *vdec = inst->priv;
935 static void vdec_init_dcp(struct vpu_inst *inst)
937 struct vdec_t *vdec = inst->priv;
953 static int vdec_alloc_fs_buffer(struct vpu_inst *inst, struct vdec_fs_info *fs)
969 return vpu_alloc_dma(inst->core, buffer);
972 static void vdec_alloc_fs(struct vpu_inst *inst, struct vdec_fs_info *fs)
977 ret = vdec_alloc_fs_buffer(inst, fs);
996 static int vdec_response_fs(struct vpu_inst *inst, struct vdec_fs_info *fs)
1010 ret = vpu_session_alloc_fs(inst, &info);
1018 static int vdec_response_frame_abnormal(struct vpu_inst *inst)
1020 struct vdec_t *vdec = inst->priv;
1030 ret = vpu_session_alloc_fs(inst, &info);
1038 static int vdec_response_frame(struct vpu_inst *inst, struct vb2_v4l2_buffer *vbuf)
1040 struct vdec_t *vdec = inst->priv;
1045 if (inst->state != VPU_CODEC_STATE_ACTIVE)
1058 dev_err(inst->dev, "[%d] repeat alloc fs %d\n",
1059 inst->id, vbuf->vb2_buf.index);
1063 dev_dbg(inst->dev, "[%d] state = %s, alloc fs %d, tag = 0x%x\n",
1064 inst->id, vpu_codec_state_name(inst->state), vbuf->vb2_buf.index, vdec->seq_tag);
1072 info.luma_size = inst->cap_format.sizeimage[0];
1077 info.chromau_size = inst->cap_format.sizeimage[1];
1078 info.bytesperline = inst->cap_format.bytesperline[0];
1079 ret = vpu_session_alloc_fs(inst, &info);
1094 static void vdec_response_fs_request(struct vpu_inst *inst, bool force)
1096 struct vdec_t *vdec = inst->priv;
1102 vdec_response_frame_abnormal(inst);
1107 ret = vpu_process_capture_buffer(inst);
1115 if (vdec_response_fs(inst, &vdec->mbi))
1121 if (vdec_response_fs(inst, &vdec->dcp))
1128 static void vdec_response_fs_release(struct vpu_inst *inst, u32 id, u32 tag)
1135 vpu_session_release_fs(inst, &info);
1138 static void vdec_recycle_buffer(struct vpu_inst *inst, struct vb2_v4l2_buffer *vbuf)
1140 if (!inst->fh.m2m_ctx)
1144 if (vpu_find_buf_by_idx(inst, vbuf->vb2_buf.type, vbuf->vb2_buf.index))
1146 v4l2_m2m_buf_queue(inst->fh.m2m_ctx, vbuf);
1149 static void vdec_clear_slots(struct vpu_inst *inst)
1151 struct vdec_t *vdec = inst->priv;
1163 vpu_trace(inst->dev, "clear slot %d\n", i);
1164 vdec_response_fs_release(inst, i, vpu_buf->tag);
1165 vdec_recycle_buffer(inst, vbuf);
1171 static void vdec_event_seq_hdr(struct vpu_inst *inst, struct vpu_dec_codec_info *hdr)
1173 struct vdec_t *vdec = inst->priv;
1175 vpu_inst_lock(inst);
1178 vpu_trace(inst->dev, "[%d] %d x %d, crop : (%d, %d) %d x %d, %d, %d\n",
1179 inst->id,
1188 inst->min_buffer_cap = hdr->num_ref_frms + hdr->num_dpb_frms;
1189 vdec->is_source_changed = vdec_check_source_change(inst);
1190 vdec_init_fmt(inst);
1191 vdec_init_crop(inst);
1192 vdec_init_mbi(inst);
1193 vdec_init_dcp(inst);
1197 vdec_update_state(inst, VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE, 0);
1199 vdec_handle_resolution_change(inst);
1204 vdec_response_fs_request(inst, true);
1205 vpu_trace(inst->dev, "[%d] seq tag change: %d -> %d\n",
1206 inst->id, vdec->seq_tag, vdec->codec_info.tag);
1210 vpu_inst_unlock(inst);
1213 static void vdec_event_resolution_change(struct vpu_inst *inst)
1215 struct vdec_t *vdec = inst->priv;
1217 vpu_trace(inst->dev, "[%d]\n", inst->id);
1218 vpu_inst_lock(inst);
1222 vdec_clear_slots(inst);
1223 vdec_init_mbi(inst);
1224 vdec_init_dcp(inst);
1226 vdec_update_state(inst, VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE, 0);
1228 vdec_handle_resolution_change(inst);
1231 vpu_inst_unlock(inst);
1234 static void vdec_event_req_fs(struct vpu_inst *inst, struct vpu_fs_info *fs)
1236 struct vdec_t *vdec = inst->priv;
1241 vpu_inst_lock(inst);
1257 vdec_alloc_fs(inst, &vdec->mbi);
1258 vdec_alloc_fs(inst, &vdec->dcp);
1260 vdec_response_fs_request(inst, false);
1262 vpu_inst_unlock(inst);
1265 static void vdec_evnet_rel_fs(struct vpu_inst *inst, struct vpu_fs_info *fs)
1267 struct vdec_t *vdec = inst->priv;
1276 if (fs->id >= vpu_get_num_buffers(inst, inst->cap_format.type)) {
1277 dev_err(inst->dev, "[%d] invalid fs(%d) to release\n", inst->id, fs->id);
1281 vpu_inst_lock(inst);
1286 dev_dbg(inst->dev, "[%d] fs[%d] has bee released\n", inst->id, fs->id);
1292 dev_dbg(inst->dev, "[%d] frame skip\n", inst->id);
1296 vdec_response_fs_release(inst, fs->id, vpu_buf->tag);
1298 vdec_recycle_buffer(inst, vbuf);
1301 vpu_process_capture_buffer(inst);
1304 vpu_inst_unlock(inst);
1307 static void vdec_event_eos(struct vpu_inst *inst)
1309 struct vdec_t *vdec = inst->priv;
1311 vpu_trace(inst->dev, "[%d] input : %d, decoded : %d, display : %d, sequence : %d\n",
1312 inst->id,
1317 vpu_inst_lock(inst);
1320 inst->min_buffer_cap = VDEC_MIN_BUFFER_CAP;
1321 vdec_set_last_buffer_dequeued(inst);
1322 vpu_inst_unlock(inst);
1325 static void vdec_event_notify(struct vpu_inst *inst, u32 event, void *data)
1329 vdec_event_seq_hdr(inst, data);
1332 vdec_event_resolution_change(inst);
1335 vdec_event_req_fs(inst, data);
1338 vdec_evnet_rel_fs(inst, data);
1341 vdec_event_eos(inst);
1348 static int vdec_process_output(struct vpu_inst *inst, struct vb2_buffer *vb)
1350 struct vdec_t *vdec = inst->priv;
1357 dev_dbg(inst->dev, "[%d] dec output [%d] %d : %ld\n",
1358 inst->id, vbuf->sequence, vb->index, vb2_get_plane_payload(vb, 0));
1360 if (inst->state == VPU_CODEC_STATE_DEINIT)
1365 if (inst->state == VPU_CODEC_STATE_STARTED)
1366 vdec_update_state(inst, VPU_CODEC_STATE_ACTIVE, 0);
1368 ret = vpu_iface_get_stream_buffer_desc(inst, &desc);
1372 free_space = vpu_helper_get_free_space(inst);
1377 ret = vpu_iface_input_frame(inst, vb);
1381 dev_dbg(inst->dev, "[%d][INPUT TS]%32lld\n", inst->id, vb->timestamp);
1385 vdec_drain(inst);
1390 static int vdec_process_capture(struct vpu_inst *inst, struct vb2_buffer *vb)
1392 struct vdec_t *vdec = inst->priv;
1396 if (inst->state == VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE)
1401 ret = vdec_response_frame(inst, vbuf);
1404 v4l2_m2m_dst_buf_remove_by_buf(inst->fh.m2m_ctx, vbuf);
1408 static void vdec_on_queue_empty(struct vpu_inst *inst, u32 type)
1410 struct vdec_t *vdec = inst->priv;
1415 vdec_handle_resolution_change(inst);
1417 vdec_set_last_buffer_dequeued(inst);
1420 static void vdec_abort(struct vpu_inst *inst)
1422 struct vdec_t *vdec = inst->priv;
1426 vpu_trace(inst->dev, "[%d] state = %s\n", inst->id, vpu_codec_state_name(inst->state));
1429 vpu_iface_add_scode(inst, SCODE_PADDING_ABORT);
1431 vpu_iface_set_decode_params(inst, &vdec->params, 1);
1433 vpu_session_abort(inst);
1435 ret = vpu_iface_get_stream_buffer_desc(inst, &desc);
1437 vpu_iface_update_stream_buffer(inst, desc.rptr, 1);
1439 vpu_session_rst_buf(inst);
1440 vpu_trace(inst->dev, "[%d] input : %d, decoded : %d, display : %d, sequence : %d\n",
1441 inst->id,
1455 inst->extra_size = 0;
1458 static void vdec_stop(struct vpu_inst *inst, bool free)
1460 struct vdec_t *vdec = inst->priv;
1462 vdec_clear_slots(inst);
1463 if (inst->state != VPU_CODEC_STATE_DEINIT)
1464 vpu_session_stop(inst);
1469 vpu_free_dma(&inst->stream_buffer);
1471 vdec_update_state(inst, VPU_CODEC_STATE_DEINIT, 1);
1475 static void vdec_release(struct vpu_inst *inst)
1477 if (inst->id != VPU_INST_NULL_ID)
1478 vpu_trace(inst->dev, "[%d]\n", inst->id);
1479 vdec_stop(inst, true);
1482 static void vdec_cleanup(struct vpu_inst *inst)
1486 if (!inst)
1489 vdec = inst->priv;
1491 inst->priv = NULL;
1492 vfree(inst);
1501 static int vdec_start(struct vpu_inst *inst)
1503 struct vdec_t *vdec = inst->priv;
1507 if (inst->state != VPU_CODEC_STATE_DEINIT)
1510 vpu_trace(inst->dev, "[%d]\n", inst->id);
1513 ret = vpu_alloc_dma(inst->core, &vdec->udata);
1515 dev_err(inst->dev, "[%d] alloc udata fail\n", inst->id);
1520 if (!inst->stream_buffer.virt) {
1521 stream_buffer_size = vpu_iface_get_stream_buffer_size(inst->core);
1523 inst->stream_buffer.length = stream_buffer_size;
1524 ret = vpu_alloc_dma(inst->core, &inst->stream_buffer);
1526 dev_err(inst->dev, "[%d] alloc stream buffer fail\n", inst->id);
1529 inst->use_stream_buffer = true;
1533 if (inst->use_stream_buffer)
1534 vpu_iface_config_stream_buffer(inst, &inst->stream_buffer);
1535 vpu_iface_init_instance(inst);
1538 ret = vpu_iface_set_decode_params(inst, &vdec->params, 0);
1540 dev_err(inst->dev, "[%d] set decode params fail\n", inst->id);
1545 ret = vpu_session_start(inst);
1547 dev_err(inst->dev, "[%d] start fail\n", inst->id);
1551 vdec_update_state(inst, VPU_CODEC_STATE_STARTED, 0);
1556 vpu_free_dma(&inst->stream_buffer);
1560 static int vdec_start_session(struct vpu_inst *inst, u32 type)
1562 struct vdec_t *vdec = inst->priv;
1567 vdec_stop(inst, false);
1568 if (inst->state == VPU_CODEC_STATE_DEINIT) {
1569 ret = vdec_start(inst);
1576 vdec_update_state(inst, vdec->state, 1);
1578 vpu_process_output_buffer(inst);
1580 vdec_cmd_start(inst);
1582 if (inst->state == VPU_CODEC_STATE_ACTIVE)
1583 vdec_response_fs_request(inst, false);
1588 static int vdec_stop_session(struct vpu_inst *inst, u32 type)
1590 struct vdec_t *vdec = inst->priv;
1592 if (inst->state == VPU_CODEC_STATE_DEINIT)
1596 vdec_update_state(inst, VPU_CODEC_STATE_SEEK, 0);
1599 if (inst->state != VPU_CODEC_STATE_DYAMIC_RESOLUTION_CHANGE) {
1600 vdec_abort(inst);
1603 vdec_clear_slots(inst);
1609 static int vdec_get_debug_info(struct vpu_inst *inst, char *str, u32 size, u32 i)
1611 struct vdec_t *vdec = inst->priv;
1694 struct vpu_inst *inst = to_inst(file);
1703 vdec_s_fmt(file, &inst->fh, &f);
1711 vdec_s_fmt(file, &inst->fh, &f);
1716 struct vpu_inst *inst;
1720 inst = vzalloc(sizeof(*inst));
1721 if (!inst)
1726 vfree(inst);
1730 inst->ops = &vdec_inst_ops;
1731 inst->formats = vdec_formats;
1732 inst->type = VPU_CORE_TYPE_DEC;
1733 inst->priv = vdec;
1735 ret = vpu_v4l2_open(file, inst);
1741 inst->min_buffer_cap = VDEC_MIN_BUFFER_CAP;
1742 inst->min_buffer_out = VDEC_MIN_BUFFER_OUT;