Mercurial > mplayer.hg
annotate libmpcodecs/vf.h @ 33578:8860c936e5ce
Add forgotten void.
author | reimar |
---|---|
date | Sun, 19 Jun 2011 16:52:51 +0000 |
parents | 850a3272e10d |
children |
rev | line source |
---|---|
30421
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
1 /* |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
2 * This file is part of MPlayer. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
3 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
7 * (at your option) any later version. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
8 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
12 * GNU General Public License for more details. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
13 * |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
17 */ |
bbb6ebec87a0
Add missing license headers to all files in the libmpcodecs directory.
diego
parents:
30412
diff
changeset
|
18 |
26029 | 19 #ifndef MPLAYER_VF_H |
20 #define MPLAYER_VF_H | |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
21 |
31424
283eac48391d
Move extern declarations for vf.c variables to vf.h.
diego
parents:
30642
diff
changeset
|
22 #include "m_option.h" |
26147
41652035483c
Add necessary header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
23 #include "mp_image.h" |
41652035483c
Add necessary header #includes to fix 'make checkheaders'.
diego
parents:
26029
diff
changeset
|
24 |
31424
283eac48391d
Move extern declarations for vf.c variables to vf.h.
diego
parents:
30642
diff
changeset
|
25 extern m_obj_settings_t* vf_settings; |
31431 | 26 extern const m_obj_list_t vf_obj_list; |
31424
283eac48391d
Move extern declarations for vf.c variables to vf.h.
diego
parents:
30642
diff
changeset
|
27 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
28 struct vf_instance; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
29 struct vf_priv_s; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
30 |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
31 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
|
32 const char *info; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
33 const char *name; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
34 const char *author; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
35 const char *comment; |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
36 int (*vf_open)(struct vf_instance *vf,char* args); |
9593
e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
albeu
parents:
9490
diff
changeset
|
37 // Ptr to a struct dscribing the options |
24968 | 38 const void* opts; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
39 } vf_info_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
40 |
28515
134689b7b548
Add MP_IMGTYPE_NUMBERED which gives access to the kind of mp_image_t that
reimar
parents:
28174
diff
changeset
|
41 #define NUM_NUMBERED_MPI 50 |
134689b7b548
Add MP_IMGTYPE_NUMBERED which gives access to the kind of mp_image_t that
reimar
parents:
28174
diff
changeset
|
42 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
43 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
|
44 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
|
45 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
|
46 mp_image_t* export_images[1]; |
28515
134689b7b548
Add MP_IMGTYPE_NUMBERED which gives access to the kind of mp_image_t that
reimar
parents:
28174
diff
changeset
|
47 mp_image_t* numbered_images[NUM_NUMBERED_MPI]; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
48 int static_idx; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
49 } vf_image_context_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
50 |
14878 | 51 typedef struct vf_format_context_t { |
52 int have_configured; | |
53 int orig_width, orig_height, orig_fmt; | |
54 } vf_format_context_t; | |
55 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
56 typedef struct vf_instance { |
24968 | 57 const vf_info_t* info; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
58 // funcs: |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
59 int (*config)(struct vf_instance *vf, |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
60 int width, int height, int d_width, int d_height, |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
31431
diff
changeset
|
61 unsigned int flags, unsigned int outfmt); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
62 int (*control)(struct vf_instance *vf, |
6832
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
63 int request, void* data); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
64 int (*query_format)(struct vf_instance *vf, |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
65 unsigned int fmt); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
66 void (*get_image)(struct vf_instance *vf, |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
67 mp_image_t *mpi); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
68 int (*put_image)(struct vf_instance *vf, |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17566
diff
changeset
|
69 mp_image_t *mpi, double pts); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
70 void (*start_slice)(struct vf_instance *vf, |
9490
48ac3ce565ab
start_slice() added - similar to get_image(), but is called when using slices
arpi
parents:
8367
diff
changeset
|
71 mp_image_t *mpi); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
72 void (*draw_slice)(struct vf_instance *vf, |
7220
e3ecccc7e505
warning fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
6886
diff
changeset
|
73 unsigned char** src, int* stride, int w,int h, int x, int y); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
74 void (*uninit)(struct vf_instance *vf); |
18917
d9a75b26da6c
Add a new video pts tracking mode, enabled by option -correct-pts.
uau
parents:
17906
diff
changeset
|
75 |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
76 int (*continue_buffered_image)(struct vf_instance *vf); |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
77 // caps: |
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
78 unsigned int default_caps; // used by default query_format() |
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
79 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
|
80 // data: |
14073 | 81 int w, h; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
82 vf_image_context_t imgctx; |
14878 | 83 vf_format_context_t fmt; |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
84 struct vf_instance *next; |
10140
30cad6ad9dbc
fix segfaults with slices. support slice rendering into a filter even
rfelker
parents:
10052
diff
changeset
|
85 mp_image_t *dmpi; |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
86 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
|
87 } vf_instance_t; |
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
88 |
5519 | 89 // control codes: |
90 #include "mpc_info.h" | |
91 | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28515
diff
changeset
|
92 typedef struct vf_seteq_s |
6832
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
93 { |
25223 | 94 const char *item; |
6832
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
95 int value; |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
96 } vf_equalizer_t; |
54578e5a8050
... removed from vf's control(), sing struct for equalizer. based on patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
arpi
parents:
6780
diff
changeset
|
97 |
5519 | 98 #define VFCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */ |
99 #define VFCTRL_SET_PP_LEVEL 5 /* set postprocessing level */ | |
100 #define VFCTRL_SET_EQUALIZER 6 /* set color options (brightness,contrast etc) */ | |
6780 | 101 #define VFCTRL_GET_EQUALIZER 8 /* gset color options (brightness,contrast etc) */ |
5643 | 102 #define VFCTRL_DRAW_OSD 7 |
6886 | 103 #define VFCTRL_CHANGE_RECTANGLE 9 /* Change the rectangle boundaries */ |
10052
b358b7509e1a
sort of a hack, but at least this lets the framerate-increasing
rfelker
parents:
9934
diff
changeset
|
104 #define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */ |
12335 | 105 #define VFCTRL_DUPLICATE_FRAME 11 /* For encoding - encode zero-change frame */ |
12337
6f1b4c989914
soft skipping for mencoder. rather than skipping decoding/filtering
rfelker
parents:
12335
diff
changeset
|
106 #define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */ |
13593
e2dca00374f2
add new control message, that is send after end of stream, to flush all remaining frames in the video system
iive
parents:
12337
diff
changeset
|
107 #define VFCTRL_FLUSH_FRAMES 13 /* For encoding - flush delayed frames */ |
16446 | 108 #define VFCTRL_SCREENSHOT 14 /* Make a screenshot */ |
19521 | 109 #define VFCTRL_INIT_EOSD 15 /* Select EOSD renderer */ |
110 #define VFCTRL_DRAW_EOSD 16 /* Render EOSD */ | |
20906 | 111 #define VFCTRL_GET_PTS 17 /* Return last pts value that reached vf_vo*/ |
20973
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
20906
diff
changeset
|
112 #define VFCTRL_SET_DEINTERLACE 18 /* Set deinterlacing status */ |
c0bcec5150a3
Add deinterlace property, patch by Carl Eugen Hoyos
reimar
parents:
20906
diff
changeset
|
113 #define VFCTRL_GET_DEINTERLACE 19 /* Get deinterlacing status */ |
5643 | 114 |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
115 #include "vfcap.h" |
5562 | 116 |
33517
850a3272e10d
Change code to allow STREAM_CTRL_GET_CURRENT_TIME with cache enabled.
reimar
parents:
32702
diff
changeset
|
117 #include "mp_global.h" |
17906
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17566
diff
changeset
|
118 |
20aca9baf5d8
passing pts through the filter layer (lets see if pts or cola comes out at the end)
michael
parents:
17566
diff
changeset
|
119 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
120 // functions: |
5661 | 121 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
|
122 mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); |
5550 | 123 |
24968 | 124 vf_instance_t* vf_open_plugin(const vf_info_t* const* filter_list, vf_instance_t* next, const char *name, char **args); |
18980
ed69754aa58d
Marks several string parameters as const when they are not modified in the function, Patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
18937
diff
changeset
|
125 vf_instance_t* vf_open_filter(vf_instance_t* next, const char *name, char **args); |
14183
c9ff4fe2caaf
add the flip filter at the end of the filter chain.
reimar
parents:
14073
diff
changeset
|
126 vf_instance_t* vf_add_before_vo(vf_instance_t **vf, char *name, char **args); |
18980
ed69754aa58d
Marks several string parameters as const when they are not modified in the function, Patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents:
18937
diff
changeset
|
127 vf_instance_t* vf_open_encoder(vf_instance_t* next, const 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
|
128 |
24968 | 129 unsigned int vf_match_csp(vf_instance_t** vfp,const unsigned int* list,unsigned int preferred); |
9934 | 130 void vf_clone_mpi_attributes(mp_image_t* dst, mp_image_t* src); |
18917
d9a75b26da6c
Add a new video pts tracking mode, enabled by option -correct-pts.
uau
parents:
17906
diff
changeset
|
131 void vf_queue_frame(vf_instance_t *vf, int (*)(vf_instance_t *)); |
d9a75b26da6c
Add a new video pts tracking mode, enabled by option -correct-pts.
uau
parents:
17906
diff
changeset
|
132 int vf_output_queued_frame(vf_instance_t *vf); |
5565
0b301fec999a
capabilities support -> automatic insertion of scale, expand, pp
arpi
parents:
5562
diff
changeset
|
133 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
134 // default wrappers: |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
135 int vf_next_config(struct vf_instance *vf, |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
136 int width, int height, int d_width, int d_height, |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
31431
diff
changeset
|
137 unsigned int flags, unsigned int outfmt); |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
138 int vf_next_control(struct vf_instance *vf, int request, void* data); |
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
139 void vf_extra_flip(struct vf_instance *vf); |
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
140 int vf_next_query_format(struct vf_instance *vf, unsigned int fmt); |
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
141 int vf_next_put_image(struct vf_instance *vf,mp_image_t *mpi, double pts); |
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
142 void vf_next_draw_slice (struct vf_instance *vf, unsigned char** src, int* stride, int w,int h, int x, int y); |
5550 | 143 |
5507
d0d029fda134
video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
arpi
parents:
diff
changeset
|
144 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
|
145 |
5737 | 146 void vf_uninit_filter(vf_instance_t* vf); |
147 void vf_uninit_filter_chain(vf_instance_t* vf); | |
148 | |
30642
a972c1a4a012
cosmetics: Rename struct vf_instance_s --> vf_instance.
diego
parents:
30638
diff
changeset
|
149 int vf_config_wrapper(struct vf_instance *vf, |
32702
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
31431
diff
changeset
|
150 int width, int height, int d_width, int d_height, |
7af3e6f901fd
Convert some tabs to whitespace to allow using MPlayer filter sourcecode in FFmpeg.
cehoyos
parents:
31431
diff
changeset
|
151 unsigned int flags, unsigned int outfmt); |
25553
6ac1ece1f9fe
Add multiple inclusion guards to all header files that lack them.
diego
parents:
25223
diff
changeset
|
152 |
30412
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
153 static inline int norm_qscale(int qscale, int type) |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
154 { |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
155 switch (type) { |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
156 case 0: // MPEG-1 |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
157 return qscale; |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
158 case 1: // MPEG-2 |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
159 return qscale >> 1; |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
160 case 2: // H264 |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
161 return qscale >> 2; |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
162 case 3: // VP56 |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
163 return (63 - qscale + 2) >> 2; |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
164 } |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
165 return qscale; |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
166 } |
41fb4acf3df6
Support more qscale types in most post-processing filters.
reimar
parents:
29263
diff
changeset
|
167 |
26029 | 168 #endif /* MPLAYER_VF_H */ |