1 /*****************************************************************************
2 * ffmpeg.h: decoder using the ffmpeg library
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: ffmpeg.h,v 1.27 2003/10/27 01:04:38 gbazin Exp $
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #include "codecs.h" /* BITMAPINFOHEADER */
26 #if LIBAVCODEC_BUILD >= 4663
27 # define LIBAVCODEC_PP
34 struct AVCodecContext;
37 void E_(InitLibavcodec)( vlc_object_t * );
38 int E_(GetFfmpegCodec)( vlc_fourcc_t, int *, int *, char ** );
39 int E_(GetFfmpegChroma)( vlc_fourcc_t );
41 /* Video decoder module */
42 int E_( InitVideoDec )( decoder_t *, AVCodecContext *, AVCodec *,
44 void E_( EndVideoDec ) ( decoder_t * );
45 int E_( DecodeVideo ) ( decoder_t *, block_t * );
47 /* Audio decoder module */
48 int E_( InitAudioDec )( decoder_t *, AVCodecContext *, AVCodec *,
50 void E_( EndAudioDec ) ( decoder_t * );
51 int E_( DecodeAudio ) ( decoder_t *, block_t * );
53 /* Chroma conversion module */
54 int E_(OpenChroma)( vlc_object_t * );
56 /* Video encoder module */
57 int E_(OpenVideoEncoder) ( vlc_object_t * );
58 void E_(CloseVideoEncoder)( vlc_object_t * );
60 /* Audio encoder module */
61 int E_(OpenAudioEncoder) ( vlc_object_t * );
62 void E_(CloseAudioEncoder)( vlc_object_t * );
64 /* Postprocessing module */
65 int E_(OpenPostproc)( decoder_t *, void ** );
66 int E_(InitPostproc)( decoder_t *, void *, int, int, int );
67 int E_(PostprocPict)( decoder_t *, void *, picture_t *, AVFrame * );
68 void E_(ClosePostproc)( decoder_t *, void * );
70 /*****************************************************************************
71 * Module descriptor help strings
72 *****************************************************************************/
73 #define DR_TEXT N_("Direct rendering")
75 #define ERROR_TEXT N_("Error resilience")
76 #define ERROR_LONGTEXT N_( \
77 "ffmpeg can make errors resiliences. \n" \
78 "Nevertheless, with a buggy encoder (like ISO MPEG-4 encoder from M$) " \
79 "this will produce a lot of errors.\n" \
80 "Valid range is -1 to 99 (-1 disables all errors resiliences).")
82 #define BUGS_TEXT N_("Workaround bugs")
83 #define BUGS_LONGTEXT N_( \
84 "Try to fix some bugs\n" \
87 "4 xvid interlaced\n" \
93 #define HURRYUP_TEXT N_("Hurry up")
94 #define HURRYUP_LONGTEXT N_( \
95 "Allow the decoder to partially decode or skip frame(s) " \
96 "when there is not enough time. It's useful with low CPU power " \
97 "but it can produce distorted pictures.")
99 #define TRUNC_TEXT N_("Truncated stream")
100 #define TRUNC_LONGTEXT N_("truncated stream -1:auto,0:disable,:1:enable")
102 #define PP_Q_TEXT N_("Post processing quality")
103 #define PP_Q_LONGTEXT N_( \
104 "Quality of post processing. Valid range is 0 to 6\n" \
105 "Higher levels require considerable more CPU power, but produce " \
106 "better looking pictures." )
108 #define LIBAVCODEC_PP_TEXT N_("Ffmpeg postproc filter chains")
109 /* FIXME (cut/past from ffmpeg */
110 #define LIBAVCODEC_PP_LONGTEXT \
111 "<filterName>[:<option>[:<option>...]][[,|/][-]<filterName>[:<option>...]]...\n" \
112 "long form example:\n" \
113 "vdeblock:autoq/hdeblock:autoq/linblenddeint default,-vdeblock\n" \
114 "short form example:\n" \
115 "vb:a/hb:a/lb de,-vb\n" \
118 "Filters Options\n" \
119 "short long name short long option Description\n" \
120 "* * a autoq cpu power dependant enabler\n" \
121 " c chrom chrominance filtring enabled\n" \
122 " y nochrom chrominance filtring disabled\n" \
123 "hb hdeblock (2 Threshold) horizontal deblocking filter\n" \
124 " 1. difference factor: default=64, higher -> more deblocking\n" \
125 " 2. flatness threshold: default=40, lower -> more deblocking\n" \
126 " the h & v deblocking filters share these\n" \
127 " so u cant set different thresholds for h / v\n" \
128 "vb vdeblock (2 Threshold) vertical deblocking filter\n" \
129 "h1 x1hdeblock Experimental h deblock filter 1\n" \
130 "v1 x1vdeblock Experimental v deblock filter 1\n" \
131 "dr dering Deringing filter\n" \
132 "al autolevels automatic brightness / contrast\n" \
133 " f fullyrange stretch luminance to (0..255)\n" \
134 "lb linblenddeint linear blend deinterlacer\n" \
135 "li linipoldeint linear interpolating deinterlace\n" \
136 "ci cubicipoldeint cubic interpolating deinterlacer\n" \
137 "md mediandeint median deinterlacer\n" \
138 "fd ffmpegdeint ffmpeg deinterlacer\n" \
139 "de default hb:a,vb:a,dr:a,al\n" \
140 "fa fast h1:a,v1:a,dr:a,al\n" \
141 "tn tmpnoise (3 Thresholds) Temporal Noise Reducer\n" \
142 " 1. <= 2. <= 3. larger -> stronger filtering\n" \
143 "fq forceQuant <quantizer> Force quantizer\n"