Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer authored on 2011/11/03 03:48:26... | ... |
@@ -20,6 +20,7 @@ |
20 | 20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 | 21 |
*/ |
22 | 22 |
|
23 |
+#include "libavutil/opt.h" |
|
23 | 24 |
#include "mpegvideo.h" |
24 | 25 |
#include "mpeg4video.h" |
25 | 26 |
#include "h263.h" |
... | ... |
@@ -2276,6 +2277,26 @@ static const AVProfile mpeg4_video_profiles[] = { |
2276 | 2276 |
{ FF_PROFILE_MPEG4_ADVANCED_SIMPLE, "Advanced Simple Profile" }, |
2277 | 2277 |
}; |
2278 | 2278 |
|
2279 |
+static const AVOption mpeg4_options[] = { |
|
2280 |
+ {"quarter_sample", "1/4 subpel MC", offsetof(MpegEncContext, quarter_sample), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, 0}, |
|
2281 |
+ {"divx_packed", "divx style packed b frames", offsetof(MpegEncContext, divx_packed), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, 0}, |
|
2282 |
+ {NULL} |
|
2283 |
+}; |
|
2284 |
+ |
|
2285 |
+static const AVClass mpeg4_class = { |
|
2286 |
+ "MPEG4 Video Decoder", |
|
2287 |
+ av_default_item_name, |
|
2288 |
+ mpeg4_options, |
|
2289 |
+ LIBAVUTIL_VERSION_INT, |
|
2290 |
+}; |
|
2291 |
+ |
|
2292 |
+static const AVClass mpeg4_vdpau_class = { |
|
2293 |
+ "MPEG4 Video VDPAU Decoder", |
|
2294 |
+ av_default_item_name, |
|
2295 |
+ mpeg4_options, |
|
2296 |
+ LIBAVUTIL_VERSION_INT, |
|
2297 |
+}; |
|
2298 |
+ |
|
2279 | 2299 |
AVCodec ff_mpeg4_decoder = { |
2280 | 2300 |
.name = "mpeg4", |
2281 | 2301 |
.type = AVMEDIA_TYPE_VIDEO, |
... | ... |
@@ -2290,7 +2311,8 @@ AVCodec ff_mpeg4_decoder = { |
2290 | 2290 |
.long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), |
2291 | 2291 |
.pix_fmts= ff_hwaccel_pixfmt_list_420, |
2292 | 2292 |
.profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles), |
2293 |
- .update_thread_context= ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context) |
|
2293 |
+ .update_thread_context= ONLY_IF_THREADS_ENABLED(ff_mpeg_update_thread_context), |
|
2294 |
+ .priv_class = &mpeg4_class, |
|
2294 | 2295 |
}; |
2295 | 2296 |
|
2296 | 2297 |
|
... | ... |
@@ -2306,5 +2328,6 @@ AVCodec ff_mpeg4_vdpau_decoder = { |
2306 | 2306 |
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, |
2307 | 2307 |
.long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), |
2308 | 2308 |
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, |
2309 |
+ .priv_class = &mpeg4_vdpau_class, |
|
2309 | 2310 |
}; |
2310 | 2311 |
#endif |