[Mplayer-cvslog] CVS: main/libmpcodecs vf_filmdint.c,1.2,1.3
Richard Felker CVS
syncmail at mplayerhq.hu
Fri Apr 23 03:37:46 CEST 2004
CVS change done by Richard Felker CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv23375/libmpcodecs
Modified Files:
vf_filmdint.c
Log Message:
dr bugfix by zoli (author of the filter)
Index: vf_filmdint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_filmdint.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_filmdint.c 11 Dec 2003 04:47:42 -0000 1.2
+++ vf_filmdint.c 23 Apr 2004 01:37:43 -0000 1.3
@@ -61,6 +61,7 @@
unsigned long crop_x, crop_y, crop_cx, crop_cy;
unsigned long export_count, merge_count;
unsigned long num_breaks;
+ unsigned long num_copies;
long in_inc, out_dec, iosync;
long num_fields;
long prev_fields;
@@ -943,11 +944,25 @@
if (mpi->type == MP_IMGTYPE_TEMP ||
(mpi->type == MP_IMGTYPE_IPB && !(mpi->flags & MP_IMGFLAG_READABLE)))
- planes_idx = 2 + (++p->temp_idx & 1);
+ planes_idx = NUM_STORED/2 + (++p->temp_idx % (NUM_STORED/2));
else
- planes_idx = ++p->static_idx & 1;
+ planes_idx = ++p->static_idx % (NUM_STORED/2);
planes = p->planes[planes_idx];
mpi->priv = p->planes[NUM_STORED + planes_idx];
+ if (mpi->priv == p->old_planes) {
+ unsigned char **old_planes =
+ p->planes[NUM_STORED + 2 + (++p->temp_idx & 1)];
+ my_memcpy_pic(old_planes[0], p->old_planes[0],
+ p->w, p->h, p->stride, p->stride);
+ if (mpi->flags & MP_IMGFLAG_PLANAR) {
+ my_memcpy_pic(old_planes[1], p->old_planes[1],
+ p->cw, p->ch, p->chroma_stride, p->chroma_stride);
+ my_memcpy_pic(old_planes[2], p->old_planes[2],
+ p->cw, p->ch, p->chroma_stride, p->chroma_stride);
+ }
+ p->old_planes = old_planes;
+ p->num_copies++;
+ }
mpi->planes[0] = planes[0];
mpi->stride[0] = p->stride;
if (mpi->flags & MP_IMGFLAG_PLANAR) {
@@ -1142,7 +1157,7 @@
old_planes = p->old_planes;
- if (mpi->flags & MP_IMGFLAG_DIRECT) {
+ if ((mpi->flags & MP_IMGFLAG_DIRECT) && mpi->priv) {
planes = mpi->priv;
mpi->priv = 0;
} else {
@@ -1157,6 +1172,7 @@
my_memcpy_pic(planes[2],
mpi->planes[2] + p->crop_cx + p->crop_cy * mpi->stride[2],
p->cw, p->ch, p->chroma_stride, mpi->stride[2]);
+ p->num_copies++;
}
}
@@ -1383,8 +1399,8 @@
{
struct vf_priv_s *p = vf->priv;
mp_msg(MSGT_VFILTER, MSGL_INFO, "diff_time: %.3f, merge_time: %.3f, "
- "export: %lu, merge: %lu\n", p->diff_time, p->merge_time,
- p->export_count, p->merge_count);
+ "export: %lu, merge: %lu, copy: %lu\n", p->diff_time, p->merge_time,
+ p->export_count, p->merge_count, p->num_copies);
free(p->memory_allocated);
free(p);
}
More information about the MPlayer-cvslog
mailing list