annotate DOCS/tech/vop.txt @ 5953:1ab2605a9e44

fixed raw i420/iyuv to some extent, so that cb/cr channels are no longer reversed. this should make it possible for bttv users to play/record video (-tv outfmt=i420) once again without bogus colors.
author rfelker
date Fri, 03 May 2002 19:45:43 +0000
parents 1edc3e2b74d3
children 0aa2d199088d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
1 VideoOutPlugins - Video Filters
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
2 ===============
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
3
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
4 video filters are plugin-like code modules implementing the interface
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
5 defined in vf.h
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
6
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
7 basically it means video output manipulation, ie. these plugins can
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
8 modify the image and the image properties (size, colorspace etc) between
5695
35061a07a78f typo fix
arpi
parents: 5693
diff changeset
9 the video decoders (vd.h) and output layer (libvo or video encoders)
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
10
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
11 the actual API is a mixture of the video decoder (vd.h) and libvo
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
12 (video_out.h) APIs.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
13
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
14 the main differences:
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
15 - vf plugins may be "loaded" multiple times, with different parameters
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
16 and context - it's new in mplayer, old APIs weren't reentrant
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
17 - vf plugins don't have to implement all functions - all funcs has
5695
35061a07a78f typo fix
arpi
parents: 5693
diff changeset
18 'fallback' version, so the plugins only override these if want
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
19 - each vf plugin has its own get_image context, and they can interchange
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
20 images/buffers using these get_image/put_image calls.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
21
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
22 API details:
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
23 -- TO DO -- (see vf.h fpr API and vf_*.c for examples)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
24
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
25 Current plugins:
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
26 ================
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
27
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
28 -vop crop[=w:h:x:y]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
29 Simple cropping plugin.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
30 w,h (cropped width,height) defaults to original width,height
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
31 x,y (position of cropped subimage on the original image) defaults to center
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
32 MPI: EXPORT only, using stride manipulation
5695
35061a07a78f typo fix
arpi
parents: 5693
diff changeset
33
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
34 -vop expand[=w:h:x:y:o]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
35 Expanding _and_ (optional) OSD rendering plugin.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
36 w,h (expanded width,height) defaults to original width,height
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
37 x,y (position of original image on the expanded image) defaults to center
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
38 o (0=disable/1=enable SUB/OSD rendering) defaults to 0
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
39 MPI: DR (if possible) or copy
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
40 Special: mpcodecs core uses it to solve stride restrictions between filters
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
41 mencoder uses (autoload) it to render SUB/OSD
5695
35061a07a78f typo fix
arpi
parents: 5693
diff changeset
42
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
43 -vop flip
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
44 Flips image upside-down (vertical mirroring)
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
45 No parameters.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
46 MPI: DR (if possible) or EXPORT, using stride manipulation
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
47 Special: dec_video autoloads it when flipping is required and libvo can't do
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
48
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
49 -vop mirror
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
50 Horizontal mirroring
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
51 No parameters.
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
52 MPI: TEMP
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
53
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
54 -vop rotate[=x]
5697
d1c22e7fe9fc rotate added
arpi
parents: 5695
diff changeset
55 Rotate image +/- 90 degrees
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
56 Optional 'x' parameter (0..3) controls horizontal and vertical mirroring
5697
d1c22e7fe9fc rotate added
arpi
parents: 5695
diff changeset
57 MPI: TEMP
d1c22e7fe9fc rotate added
arpi
parents: 5695
diff changeset
58
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
59 -vop scale[=w:h]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
60 Software scaling (zoom) _and_ yuv<->rgb colorspace conversion
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
61 w,h (new width/height after scaling) defaults to original width,height
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
62 note: if -zoom is used, and underlaying filters (including libvo)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
63 uncapable of scaling, then it defaults to d_width/d_height !
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
64 MPI: TEMP, accepts stride
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
65 Special: dec_video and mpcodecs core autoloads it for colorspace conv.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
66
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
67 -vop yuy2
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
68 Forced software YV12/I420 -> YUY2 conversion
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
69 (usefull for video cards/drivers with slow YV12 but fast YUY2 support)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
70 MPI: TEMP, accepts stride
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
71
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
72 -vop rgb2bgr[=swap]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
73 RGB 24/32 <-> BGR 24/32 colorspace conversion (default) or
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
74 RGB 24/32 <-> RGB 24/32 conversion with R<->B swapping ('swap' option)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
75 MPI: TEMP, accepts stride
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
76
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
77 -vop palette
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
78 RGB/BGR 8 -> RGB/BGR 15/16/24/32 colorspace conversion using palette
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
79 MPI: TEMP, accepts stride
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
80
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
81 -vop format[=fourcc]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
82 _restrict_ the list of supported colorspaces (query-format()) to a single,
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
83 given fourcc. The 'fourcc' option defaults to 'yuy2', but may be any
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
84 format name, like rgb15, bgr24, yv12 etc...
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
85 note again, it does NOT do any conversion, it just limits the _next_
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
86 plugins format list.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
87 MPI: -
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
88
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
89 -vop pp[=flags]
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
90 Postprocessing filter. (usefull for codecs without built-in
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
91 postprocessing, like libmpeg12 or libavcodec)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
92 Flags is a bitmask set of enabled filters (see manpage for -pp details),
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
93 defaults to the value of divx_quality (set by -pp commandline option)
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
94 MPI: DR (if possible) or TEMP
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
95 Special: dec_video autoloads it if -pp option used but codec can't do pp.
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
96
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
97 -vop lavc
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
98 Fast software YV12->MPEG1 conversion, usefull for dxr3/dvb drivers
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
99 It uses libavcodec. Currently faster and better quality than -vop fame!
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
100 MPI: EXPORT special
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
101
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
102 -vop fame
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
103 Fast software YV12->MPEG1 conversion, usefull for dxr3/dvb drivers
5905
1edc3e2b74d3 updated
arpi
parents: 5697
diff changeset
104 It uses libfame.
5693
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
105 MPI: EXPORT special
8efe3a4135b4 video filters docs
arpi
parents:
diff changeset
106