Mercurial > mplayer.hg
annotate DOCS/tech/vop.txt @ 7858:6ccc14497807
time.h required for select()
author | arpi |
---|---|
date | Wed, 23 Oct 2002 11:20:07 +0000 |
parents | d2f64a6cc511 |
children | d0d2108bf395 |
rev | line source |
---|---|
5693 | 1 VideoOutPlugins - Video Filters |
2 =============== | |
3 | |
4 video filters are plugin-like code modules implementing the interface | |
5 defined in vf.h | |
6 | |
7 basically it means video output manipulation, ie. these plugins can | |
8 modify the image and the image properties (size, colorspace etc) between | |
5695 | 9 the video decoders (vd.h) and output layer (libvo or video encoders) |
5693 | 10 |
11 the actual API is a mixture of the video decoder (vd.h) and libvo | |
12 (video_out.h) APIs. | |
13 | |
14 the main differences: | |
15 - vf plugins may be "loaded" multiple times, with different parameters | |
16 and context - it's new in mplayer, old APIs weren't reentrant | |
17 - vf plugins don't have to implement all functions - all funcs has | |
5695 | 18 'fallback' version, so the plugins only override these if want |
5693 | 19 - each vf plugin has its own get_image context, and they can interchange |
20 images/buffers using these get_image/put_image calls. | |
21 | |
22 API details: | |
23 -- TO DO -- (see vf.h fpr API and vf_*.c for examples) | |
24 | |
25 Current plugins: | |
26 ================ | |
27 | |
28 -vop crop[=w:h:x:y] | |
29 Simple cropping plugin. | |
30 w,h (cropped width,height) defaults to original width,height | |
31 x,y (position of cropped subimage on the original image) defaults to center | |
32 MPI: EXPORT only, using stride manipulation | |
5695 | 33 |
5693 | 34 -vop expand[=w:h:x:y:o] |
35 Expanding _and_ (optional) OSD rendering plugin. | |
6004 | 36 w,h (expanded width,height) defaults (-1) to original width,height |
37 x,y (position of original image on the expanded image) defaults (-1) to center | |
38 o (0=disable/1=enable SUB/OSD rendering) defaults (0) to disabled | |
5693 | 39 MPI: DR (if possible) or copy |
40 Special: mpcodecs core uses it to solve stride restrictions between filters | |
41 mencoder uses (autoload) it to render SUB/OSD | |
5695 | 42 |
5693 | 43 -vop flip |
5905 | 44 Flips image upside-down (vertical mirroring) |
5693 | 45 No parameters. |
46 MPI: DR (if possible) or EXPORT, using stride manipulation | |
47 Special: dec_video autoloads it when flipping is required and libvo can't do | |
48 | |
5905 | 49 -vop mirror |
50 Horizontal mirroring | |
51 No parameters. | |
52 MPI: TEMP | |
53 | |
6821 | 54 -vop rectangle[=w:h:x:y] |
55 Draw a rectangle. Useful for testing crop plugin parameters. | |
56 w,h (rectangle's width and height) defaults (-1) to maximum | |
57 possible width while keeping the boundaries visible. | |
58 x,y (rectangle's top left corner position) defauts (-1) to upper | |
59 left most position. | |
6889 | 60 The plugin responds to the input.conf directive "change_control" |
61 that takes two parameters. The first parameter can be 0 for w, 1 | |
62 for h, 2 for x or 3 for y. The second parameter is the amount to | |
63 change the designated rectangle boundary. | |
64 MPI: TEMP, accepts stride | |
6821 | 65 |
5905 | 66 -vop rotate[=x] |
5697 | 67 Rotate image +/- 90 degrees |
5905 | 68 Optional 'x' parameter (0..3) controls horizontal and vertical mirroring |
5697 | 69 MPI: TEMP |
70 | |
6638 | 71 -vop scale[=w:h[:c[:p]]] |
5693 | 72 Software scaling (zoom) _and_ yuv<->rgb colorspace conversion |
73 w,h (new width/height after scaling) defaults to original width,height | |
74 note: if -zoom is used, and underlaying filters (including libvo) | |
75 uncapable of scaling, then it defaults to d_width/d_height ! | |
6004 | 76 note 2: w/h values -1 means original width/height, 0 means scaled |
6127 | 77 d_width/d_height. -2/-3 means calculating w or h using the other |
78 dimension and the original (-3) or prescaled (-2) aspect ratio. | |
6638 | 79 c chroma skipping |
80 0 -> use all available input lines for chroma | |
81 1 -> use only every 2. input line for chroma | |
82 2 -> use only every 4. input line for chroma | |
83 3 -> use only every 8. input line for chroma | |
84 p scaling parameter (depends upon the used scaling method) | |
85 for -sws 2 (bicubic) its sharpness (0 (soft) - 100 (sharp)) | |
86 for -sws 7 (gaussian) its sharpness (0 (soft) - 100 (sharp)) | |
87 for -sws 9 (lanczos) its filter length (1 - 10) | |
5693 | 88 MPI: TEMP, accepts stride |
89 Special: dec_video and mpcodecs core autoloads it for colorspace conv. | |
90 | |
91 -vop yuy2 | |
92 Forced software YV12/I420 -> YUY2 conversion | |
93 (usefull for video cards/drivers with slow YV12 but fast YUY2 support) | |
94 MPI: TEMP, accepts stride | |
95 | |
96 -vop rgb2bgr[=swap] | |
97 RGB 24/32 <-> BGR 24/32 colorspace conversion (default) or | |
98 RGB 24/32 <-> RGB 24/32 conversion with R<->B swapping ('swap' option) | |
99 MPI: TEMP, accepts stride | |
5905 | 100 |
101 -vop palette | |
102 RGB/BGR 8 -> RGB/BGR 15/16/24/32 colorspace conversion using palette | |
103 MPI: TEMP, accepts stride | |
5693 | 104 |
105 -vop format[=fourcc] | |
106 _restrict_ the list of supported colorspaces (query-format()) to a single, | |
107 given fourcc. The 'fourcc' option defaults to 'yuy2', but may be any | |
108 format name, like rgb15, bgr24, yv12 etc... | |
109 note again, it does NOT do any conversion, it just limits the _next_ | |
110 plugins format list. | |
6004 | 111 MPI: passthru |
5693 | 112 |
113 -vop pp[=flags] | |
114 Postprocessing filter. (usefull for codecs without built-in | |
115 postprocessing, like libmpeg12 or libavcodec) | |
116 Flags is a bitmask set of enabled filters (see manpage for -pp details), | |
117 defaults to the value of divx_quality (set by -pp commandline option) | |
118 MPI: DR (if possible) or TEMP | |
119 Special: dec_video autoloads it if -pp option used but codec can't do pp. | |
120 | |
6020 | 121 -vop lavc[=quality:fps] |
5905 | 122 Fast software YV12->MPEG1 conversion, usefull for dxr3/dvb drivers |
123 It uses libavcodec. Currently faster and better quality than -vop fame! | |
6020 | 124 Param quality: fixed qscale (1<=quality<32) or bitrate (32<=quality KBits) |
125 Param fps: force output fps (float value). If not give, or 0, it's | |
126 autodetected based on height (240,480->29.97fps, others -> 25fps) | |
5905 | 127 MPI: EXPORT special |
128 | |
5693 | 129 -vop fame |
130 Fast software YV12->MPEG1 conversion, usefull for dxr3/dvb drivers | |
5905 | 131 It uses libfame. |
5693 | 132 MPI: EXPORT special |
133 | |
6004 | 134 -vop dvbscale[=aspect] |
135 Setup scaling to the optimal values for the DVB card. | |
136 (use HW for X-scaling, calc sw Y scaling to keep aspect) | |
137 The 'aspect' parameter controls aspect ratio, it should be calculated | |
138 as aspect=DVB_HEIGHT*ASPECTRATIO, default is 576*(4/3)=768 | |
139 (for 16:9 TV set it to 576*(16/9)=1024) | |
6062 | 140 It's only usefull together with expand+scale: |
6004 | 141 -vop lavc,expand=-1:576:-1:-1:1,scale=-1:0,dvbscale |
142 MPI: passthru | |
143 | |
6808 | 144 -vop cropdetect[=limit] |
6062 | 145 It's a special filter, it doesn't alter the image itself, but detects |
146 (using some kind of heuristics) the black borders/bands of the image, | |
147 and prints the optimal -vop crop= parameters to the stdout/console. | |
6808 | 148 It calculates the average value of pixel luminances for a line, and |
149 depending on the result it's either black band (result<=limit) or | |
150 picture (result>limit). Optional parameter 'limit' defaults to 24. | |
6062 | 151 MPI: EXPORT |
6449 | 152 |
6426 | 153 -vop test[=first frame number] |
154 generate various test patterns | |
155 MPI: TEMP, accepts stride | |
156 | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6889
diff
changeset
|
157 -vop noise[=lumaNoise[u][t|a][h]:chromaNoise[u][t|a][h] |
6426 | 158 add noise |
159 0<= lumaNoise, chromaNoise <=100 | |
160 u uniform noise (gaussian otherwise) | |
161 t temporal noise (noise pattern changes between frames) | |
6963
76fee64d884a
film/average noise patch by (Jindrich Makovicka <makovick at KMLinux dot fjfi dot cvut dot cz>)
michael
parents:
6889
diff
changeset
|
162 a averaged temporal (smoother, but a lot slower) |
6449 | 163 h high quality (slightly better looking, slightly slower) |
6990
857bae3001e8
semi regular noise pattern patch by (Jindrich Makovicka <makovick at kmlinux dot fjfi dot cvut dot cz>)
michael
parents:
6963
diff
changeset
|
164 p mix random noise with a (semi)regular pattern |
6449 | 165 MPI: DR (if possible) or TEMP, accepts stride |
6426 | 166 |
7064 | 167 -vop eq[=brightness:contrast] |
168 software equalizer, for use with cards that don't support | |
169 brightness and contrast controls in hardware. It might also be | |
170 useful with mencoder, either for fixing poorly captured movies, or | |
171 for slightly reducing contrast to mask artifacts and get by with | |
172 lower bitrates. Initial values in the range -100..100 may be | |
173 given on the command line, and the eq filter is controllable | |
174 interactively just like with normal hardware equalizer controls. | |
175 |