Mercurial > mplayer.hg
annotate libmpcodecs/vf_softpulldown.c @ 10573:df0c8b49bc69
replacing old MPlayer logo for the much nicer OSX version
(AFAIK currently used only for Gentoo desktop icon, maybe other distribs also)
author | gabucino |
---|---|
date | Mon, 11 Aug 2003 21:08:42 +0000 |
parents | 73b3e4336cd4 |
children | 711159267b2d |
rev | line source |
---|---|
10510
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
1 #include <stdio.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
2 #include <stdlib.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
3 #include <string.h> |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
4 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
5 #include "../config.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
6 #include "../mp_msg.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
7 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
8 #include "img_format.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
9 #include "mp_image.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
10 #include "vf.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
11 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
12 #include "../libvo/fastmemcpy.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
13 #include "../libvo/sub.h" |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
14 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
15 struct vf_priv_s { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
16 int state; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
17 long long in; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
18 long long out; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
19 }; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
20 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
21 static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int height, int dstStride, int srcStride) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
22 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
23 int i; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
24 void *retval=dst; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
25 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
26 for(i=0; i<height; i++) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
27 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
28 memcpy(dst, src, bytesPerLine); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
29 src+= srcStride; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
30 dst+= dstStride; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
31 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
32 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
33 return retval; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
34 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
35 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
36 static int put_image(struct vf_instance_s* vf, mp_image_t *mpi) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
37 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
38 mp_image_t *dmpi; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
39 int ret = 0; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
40 int flags = mpi->mpeg2_flags; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
41 int state = vf->priv->state; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
42 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
43 dmpi = vf_get_image(vf->next, mpi->imgfmt, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
44 MP_IMGTYPE_STATIC, MP_IMGFLAG_ACCEPT_STRIDE | |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
45 MP_IMGFLAG_PRESERVE, mpi->width, mpi->height); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
46 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
47 vf->priv->in++; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
48 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
49 if ((state == 0 && |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
50 !(flags & MP_IMGMPEG2FLAG_TOP_FIELD_FIRST)) || |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
51 (state == 1 && |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
52 flags & MP_IMGMPEG2FLAG_TOP_FIELD_FIRST)) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
53 mp_msg(MSGT_VFILTER, MSGL_WARN, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
54 "softpulldown: Unexpected mpeg2 flags: state=%d top_field_first=%d repeat_first_field=%d\n", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
55 state, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
56 (flags & MP_IMGMPEG2FLAG_TOP_FIELD_FIRST) == 1, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
57 (flags & MP_IMGMPEG2FLAG_REPEAT_FIRST_FIELD) == 1); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
58 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
59 if (state == 0) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
60 ret = vf_next_put_image(vf, mpi); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
61 vf->priv->out++; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
62 if (flags & MP_IMGMPEG2FLAG_REPEAT_FIRST_FIELD) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
63 my_memcpy_pic(dmpi->planes[0], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
64 mpi->planes[0], mpi->w, mpi->h/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
65 dmpi->stride[0]*2, mpi->stride[0]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
66 if (mpi->flags & MP_IMGFLAG_PLANAR) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
67 my_memcpy_pic(dmpi->planes[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
68 mpi->planes[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
69 mpi->chroma_width, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
70 mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
71 dmpi->stride[1]*2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
72 mpi->stride[1]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
73 my_memcpy_pic(dmpi->planes[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
74 mpi->planes[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
75 mpi->chroma_width, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
76 mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
77 dmpi->stride[2]*2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
78 mpi->stride[2]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
79 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
80 state=1; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
81 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
82 } else { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
83 my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
84 mpi->planes[0]+mpi->stride[0], mpi->w, mpi->h/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
85 dmpi->stride[0]*2, mpi->stride[0]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
86 if (mpi->flags & MP_IMGFLAG_PLANAR) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
87 my_memcpy_pic(dmpi->planes[1]+dmpi->stride[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
88 mpi->planes[1]+mpi->stride[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
89 mpi->chroma_width, mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
90 dmpi->stride[1]*2, mpi->stride[1]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
91 my_memcpy_pic(dmpi->planes[2]+dmpi->stride[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
92 mpi->planes[2]+mpi->stride[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
93 mpi->chroma_width, mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
94 dmpi->stride[2]*2, mpi->stride[2]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
95 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
96 ret = vf_next_put_image(vf, dmpi); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
97 vf->priv->out++; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
98 if (flags & MP_IMGMPEG2FLAG_REPEAT_FIRST_FIELD) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
99 ret |= vf_next_put_image(vf, mpi); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
100 vf->priv->out++; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
101 state=0; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
102 } else { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
103 my_memcpy_pic(dmpi->planes[0], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
104 mpi->planes[0], mpi->w, mpi->h/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
105 dmpi->stride[0]*2, mpi->stride[0]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
106 if (mpi->flags & MP_IMGFLAG_PLANAR) { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
107 my_memcpy_pic(dmpi->planes[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
108 mpi->planes[1], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
109 mpi->chroma_width, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
110 mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
111 dmpi->stride[1]*2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
112 mpi->stride[1]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
113 my_memcpy_pic(dmpi->planes[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
114 mpi->planes[2], |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
115 mpi->chroma_width, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
116 mpi->chroma_height/2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
117 dmpi->stride[2]*2, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
118 mpi->stride[2]*2); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
119 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
120 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
121 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
122 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
123 vf->priv->state = state; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
124 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
125 return ret; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
126 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
127 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
128 static int config(struct vf_instance_s* vf, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
129 int width, int height, int d_width, int d_height, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
130 unsigned int flags, unsigned int outfmt) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
131 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
132 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
133 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
134 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
135 static void uninit(struct vf_instance_s* vf) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
136 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
137 mp_msg(MSGT_VFILTER, MSGL_INFO, "softpulldown: %lld frames in, %lld frames out\n", vf->priv->in, vf->priv->out); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
138 free(vf->priv); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
139 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
140 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
141 static int open(vf_instance_t *vf, char* args) |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
142 { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
143 struct vf_priv_s *p; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
144 vf->config = config; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
145 vf->put_image = put_image; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
146 vf->uninit = uninit; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
147 vf->default_reqs = VFCAP_ACCEPT_STRIDE; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
148 vf->priv = p = calloc(1, sizeof(struct vf_priv_s)); |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
149 vf->priv->state = 0; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
150 return 1; |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
151 } |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
152 |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
153 vf_info_t vf_info_softpulldown = { |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
154 "mpeg2 soft 3:2 pulldown", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
155 "softpulldown", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
156 "Tobias Diedrich", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
157 "", |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
158 open, |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
159 NULL |
73b3e4336cd4
Add mpeg2_flags to mp_image_t, copy flags in vd_libmpeg2.c,
ranma
parents:
diff
changeset
|
160 }; |