annotate libmpcodecs/vf.h @ 5928:48e91dc9534b

.raw width>=65536 support by Georgi Georgiev <chutz@chubaka.homeip.net>
author arpi
date Thu, 02 May 2002 01:56:28 +0000
parents de47aebf654c
children 47d6a4b0f971
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
1
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
2 struct vf_instance_s;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
3 struct vf_priv_s;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
4
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
5 typedef struct vf_info_s {
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
6 const char *info;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
7 const char *name;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
8 const char *author;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
9 const char *comment;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
10 int (*open)(struct vf_instance_s* vf,char* args);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
11 } vf_info_t;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
12
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
13 typedef struct vf_image_context_s {
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
14 mp_image_t* static_images[2];
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
15 mp_image_t* temp_images[1];
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
16 mp_image_t* export_images[1];
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
17 int static_idx;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
18 } vf_image_context_t;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
19
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
20 typedef struct vf_instance_s {
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
21 vf_info_t* info;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
22 // funcs:
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
23 int (*config)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
24 int width, int height, int d_width, int d_height,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
25 unsigned int flags, unsigned int outfmt);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
26 int (*control)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
27 int request, void* data);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
28 int (*query_format)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
29 unsigned int fmt);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
30 void (*get_image)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
31 mp_image_t *mpi);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
32 void (*put_image)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
33 mp_image_t *mpi);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
34 void (*draw_slice)(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
35 unsigned char* src, int* stride, int w,int h, int x, int y);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
36 void (*uninit)(struct vf_instance_s* vf);
5565
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
37 // caps:
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
38 unsigned int default_caps; // used by default query_format()
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
39 unsigned int default_reqs; // used by default config()
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
40 // data:
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
41 vf_image_context_t imgctx;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
42 struct vf_instance_s* next;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
43 struct vf_priv_s* priv;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
44 } vf_instance_t;
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
45
5519
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
46 // control codes:
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
47 #include "mpc_info.h"
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
48
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
49 #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
50 #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
51 #define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */
868c13f78f08 vf control codes added, autoq support
arpi
parents: 5508
diff changeset
52
5643
3d9de27d9bd0 OSD handled by vf control()
arpi
parents: 5565
diff changeset
53 #define VFCTRL_DRAW_OSD 7
3d9de27d9bd0 OSD handled by vf control()
arpi
parents: 5565
diff changeset
54
5565
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
55 #include "vfcap.h"
5562
e7619ffa7303 VFCAP flags added
arpi
parents: 5550
diff changeset
56
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
57 // functions:
5661
42e002c565cf mpi clear func
arpi
parents: 5643
diff changeset
58 void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
59 mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
5550
7d1dfb59c6c0 encoders
arpi
parents: 5519
diff changeset
60
7d1dfb59c6c0 encoders
arpi
parents: 5519
diff changeset
61 vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char *args);
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
62 vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args);
5550
7d1dfb59c6c0 encoders
arpi
parents: 5519
diff changeset
63 vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args);
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
64
5565
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
65 unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred);
0b301fec999a capabilities support -> automatic insertion of scale, expand, pp
arpi
parents: 5562
diff changeset
66
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
67 // default wrappers:
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
68 int vf_next_config(struct vf_instance_s* vf,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
69 int width, int height, int d_width, int d_height,
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
70 unsigned int flags, unsigned int outfmt);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
71 int vf_next_control(struct vf_instance_s* vf, int request, void* data);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
72 int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
73 void vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi);
5550
7d1dfb59c6c0 encoders
arpi
parents: 5519
diff changeset
74
5507
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
75 vf_instance_t* append_filters(vf_instance_t* last);
d0d029fda134 video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff changeset
76
5737
de47aebf654c filters uninit
arpi
parents: 5661
diff changeset
77 void vf_uninit_filter(vf_instance_t* vf);
de47aebf654c filters uninit
arpi
parents: 5661
diff changeset
78 void vf_uninit_filter_chain(vf_instance_t* vf);
de47aebf654c filters uninit
arpi
parents: 5661
diff changeset
79