else {
#endif
#endif
- if (pic->stream_frame_size > 50 &&
+ if (!vdec_dual(vdec) && pic->stream_frame_size > 50 &&
(hevc->min_pic_size > pic->stream_frame_size ||
(hevc->min_pic_size == 0))) {
hevc->min_pic_size = pic->stream_frame_size;
}
#endif
#endif
- if (vdec_stream_based(vdec) && (vf->duration > 0)) {
+ if (!vdec_dual(vdec) &&
+ vdec_stream_based(vdec) && (vf->duration > 0)) {
if ((vf->pts != 0) && (hevc->last_pts != 0)) {
int diff = vf->pts - hevc->last_pts;
if (diff > ((hevc->pts_continue_miss + 2)
return;
if (vdec->input.target == VDEC_INPUT_TARGET_VLD) {
- WRITE_VREG(VLD_MEM_VIFIFO_WP,
- STBUF_READ(&vdec->vbuf, get_wp));
+ if (enable_stream_mode_multi_dec) {
+ if (!vdec->master) {
+ WRITE_VREG(VLD_MEM_VIFIFO_WP,
+ STBUF_READ(&vdec->vbuf, get_wp));
+ } else {
+ STBUF_WRITE(&vdec->vbuf, set_wp,
+ STBUF_READ(&vdec->master->vbuf, get_wp));
+ }
+ } else {
+ WRITE_VREG(VLD_MEM_VIFIFO_WP,
+ STBUF_READ(&vdec->vbuf, get_wp));
+ }
} else if (vdec->input.target == VDEC_INPUT_TARGET_HEVC) {
- WRITE_VREG(HEVC_STREAM_WR_PTR,
- STBUF_READ(&vdec->vbuf, get_wp));
+ if (enable_stream_mode_multi_dec) {
+ if (!vdec->master) {
+ WRITE_VREG(HEVC_STREAM_WR_PTR,
+ STBUF_READ(&vdec->vbuf, get_wp));
+ } else {
+ STBUF_WRITE(&vdec->vbuf, set_wp,
+ STBUF_READ(&vdec->master->vbuf, get_wp));
+ }
+ } else {
+ WRITE_VREG(HEVC_STREAM_WR_PTR,
+ STBUF_READ(&vdec->vbuf, get_wp));
+ }
}
}
vdec_frame_check_init(vdec);
#endif
/* stream buffer init. */
- if (vdec->vbuf.ops) {
+ if (vdec->vbuf.ops && !vdec->master) {
r = vdec->vbuf.ops->init(&vdec->vbuf, vdec);
if (r) {
pr_err("%s stream buffer init err (%d)\n", dev_name, r);
goto error;
}
+
+ if (vdec->slave) {
+ memcpy(&vdec->slave->vbuf, &vdec->vbuf,
+ sizeof(vdec->vbuf));
+ }
}
p->dev = platform_device_register_data(
/*Check if the vdec still in connected list, if yes, delete it*/
vdec_connect_list_force_clear(vdec_core, vdec);
- if (vdec->vbuf.ops)
+ if (vdec->vbuf.ops && !vdec->master)
vdec->vbuf.ops->release(&vdec->vbuf);
pr_debug("vdec_release instance %p, total %d\n", vdec,