# HG changeset patch # User diego # Date 1048640182 0 # Node ID e60c24aa2b43dc04ac6c913b5e6a6cb79cdd74a5 # Parent 2e1bd9192ce21b4b603ab1a67a24ee745ab884d8 Merged into the man page and libmpcodecs.txt. diff -r 2e1bd9192ce2 -r e60c24aa2b43 DOCS/tech/vop.txt --- a/DOCS/tech/vop.txt Wed Mar 26 00:53:15 2003 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,241 +0,0 @@ -Video Filters -============= - -Video filters are plugin-like code modules implementing the interface -defined in vf.h. - -Basically it means video output manipulation, i.e. these plugins can -modify the image and the image properties (size, colorspace etc) between -the video decoders (vd.h) and the output layer (libvo or video encoders). - -The actual API is a mixture of the video decoder (vd.h) and libvo -(video_out.h) APIs. - -main differences: -- vf plugins may be "loaded" multiple times, with different parameters - and context - it's new in MPlayer, old APIs weren't reentrant. -- vf plugins don't have to implement all functions - all functions have a - 'fallback' version, so the plugins only override these if wanted. -- Each vf plugin has its own get_image context, and they can interchange - images/buffers using these get_image/put_image calls. - -API details: --- TO DO -- (see vf.h for API and vf_*.c for examples) - -Current plugins: -================ - --vf crop[=w:h:x:y] - Simple cropping plugin. - w,h (cropped width,height) defaults to original width,height - x,y (position of cropped subimage on the original image) defaults to center - MPI: EXPORT only, using stride manipulation - --vf expand[=w:h:x:y:o] - Expanding _and_ (optional) OSD rendering plugin. - w,h (expanded width,height) defaults (-1) to original width,height - x,y (position of original image on the expanded image) defaults (-1) to center - o (0=disable/1=enable SUB/OSD rendering) defaults (0) to disabled - MPI: DR (if possible) or copy - Special: mpcodecs core uses it to solve stride restrictions between filters - MEncoder uses (autoload) it to render SUB/OSD - --vf flip - Flips image upside-down (vertical mirroring) - No parameters. - MPI: DR (if possible) or EXPORT, using stride manipulation - Special: dec_video autoloads it when flipping is required and libvo can't do - --vf mirror - Horizontal mirroring - No parameters. - MPI: TEMP - --vf rectangle[=w:h:x:y] - Draw a rectangle. Useful for testing crop plugin parameters. - w,h (rectangle's width and height) defaults (-1) to maximum - possible width while keeping the boundaries visible. - x,y (rectangle's top left corner position) defaults (-1) to upper - left most position. - The plugin responds to the input.conf directive "change_rectangle" - that takes two parameters. The first parameter can be 0 for w, 1 - for h, 2 for x or 3 for y. The second parameter is the amount to - change the designated rectangle boundary. - MPI: TEMP, accepts stride - --vf rotate[=x] - Rotate image +/- 90 degrees - Optional 'x' parameter (0..3) controls horizontal and vertical mirroring - MPI: TEMP - --vf scale[=w:h[:c[:p]]] - Software scaling (zoom) _and_ yuv<->rgb colorspace conversion - w,h (new width/height after scaling) defaults to original width,height - Note: If -zoom is used, and underlying filters (including libvo) are - incapable of scaling, then it defaults to d_width/d_height! - note 2: w/h values -1 means original width/height, 0 means scaled - d_width/d_height. -2/-3 means calculating w or h using the other - dimension and the original (-3) or prescaled (-2) aspect ratio. - c chroma skipping - 0 -> use all available input lines for chroma - 1 -> use only every 2. input line for chroma - 2 -> use only every 4. input line for chroma - 3 -> use only every 8. input line for chroma - p scaling parameter (depends upon the scaling method used) - for -sws 2 (bicubic) it is sharpness (0 (soft) - 100 (sharp)) - for -sws 7 (gaussian) it is sharpness (0 (soft) - 100 (sharp)) - for -sws 9 (lanczos) it is filter length (1 - 10) - MPI: TEMP, accepts stride - Special: dec_video and mpcodecs core autoloads it for colorspace conv. - --vf yuy2 - Forced software YV12/I420 -> YUY2 conversion - (useful for video cards/drivers with slow YV12 but fast YUY2 support) - MPI: TEMP, accepts stride - --vf rgb2bgr[=swap] - RGB 24/32 <-> BGR 24/32 colorspace conversion (default) or - RGB 24/32 <-> RGB 24/32 conversion with R<->B swapping ('swap' option) - MPI: TEMP, accepts stride - --vf palette - RGB/BGR 8 -> RGB/BGR 15/16/24/32 colorspace conversion using palette - MPI: TEMP, accepts stride - --vf format[=fourcc] - _restrict_ the list of supported colorspaces (query-format()) to a single, - given fourcc. The 'fourcc' option defaults to 'yuy2', but may be any - format name, like rgb15, bgr24, yv12 etc... - Note again that it does NOT do any conversion, it just limits the format - list for the _next_ plugin. - MPI: passthru - --vf pp=[[: