diff options
author | wm4 <nfxjfg@googlemail.com> | 2016-01-28 17:24:40 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2016-01-28 17:24:40 +0100 |
commit | 7b1b53f3a4569343dee1f0e2493b7cf3aa45731a (patch) | |
tree | 82f3aa8b96bb44e11f7e3690574aabd9ea7b0a54 | |
parent | d27a12cb0982921e503e68692bb99b6dfe1a6144 (diff) | |
download | ffmpeg-7b1b53f3a4569343dee1f0e2493b7cf3aa45731a.tar.gz |
mmaldec: support MPEG-4
I guess this means part 2 in both cases. Not sure which profiles exactly
are actually supported properly.
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | libavcodec/allcodecs.c | 2 | ||||
-rw-r--r-- | libavcodec/mmaldec.c | 11 |
3 files changed, 16 insertions, 0 deletions
@@ -2551,6 +2551,9 @@ mpeg2_videotoolbox_hwaccel_select="mpeg2video_decoder" mpeg2_xvmc_hwaccel_deps="xvmc" mpeg2_xvmc_hwaccel_select="mpeg2video_decoder" mpeg4_crystalhd_decoder_select="crystalhd" +mpeg4_mmal_decoder_deps="mmal" +mpeg4_mmal_decoder_select="mmal" +mpeg4_mmal_hwaccel_deps="mmal" mpeg4_vaapi_hwaccel_deps="vaapi" mpeg4_vaapi_hwaccel_select="mpeg4_decoder" mpeg4_vdpau_decoder_deps="vdpau" diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index d55751b0ad..c5908203cb 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -101,6 +101,7 @@ void avcodec_register_all(void) REGISTER_HWACCEL(MPEG2_VAAPI, mpeg2_vaapi); REGISTER_HWACCEL(MPEG2_VDPAU, mpeg2_vdpau); REGISTER_HWACCEL(MPEG2_VIDEOTOOLBOX, mpeg2_videotoolbox); + REGISTER_HWACCEL(MPEG4_MMAL, mpeg4_mmal); REGISTER_HWACCEL(MPEG4_VAAPI, mpeg4_vaapi); REGISTER_HWACCEL(MPEG4_VDPAU, mpeg4_vdpau); REGISTER_HWACCEL(MPEG4_VIDEOTOOLBOX, mpeg4_videotoolbox); @@ -235,6 +236,7 @@ void avcodec_register_all(void) REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); REGISTER_ENCDEC (MPEG4, mpeg4); REGISTER_DECODER(MPEG4_CRYSTALHD, mpeg4_crystalhd); + REGISTER_DECODER(MPEG4_MMAL, mpeg4_mmal); #if FF_API_VDPAU REGISTER_DECODER(MPEG4_VDPAU, mpeg4_vdpau); #endif diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 16e98ad161..ed633948b4 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -358,6 +358,9 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx) case AV_CODEC_ID_MPEG2VIDEO: format_in->encoding = MMAL_ENCODING_MP2V; break; + case AV_CODEC_ID_MPEG4: + format_in->encoding = MMAL_ENCODING_MP4V; + break; case AV_CODEC_ID_VC1: format_in->encoding = MMAL_ENCODING_WVC1; break; @@ -793,6 +796,13 @@ AVHWAccel ff_mpeg2_mmal_hwaccel = { .pix_fmt = AV_PIX_FMT_MMAL, }; +AVHWAccel ff_mpeg4_mmal_hwaccel = { + .name = "mpeg4_mmal", + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_MPEG4, + .pix_fmt = AV_PIX_FMT_MMAL, +}; + AVHWAccel ff_vc1_mmal_hwaccel = { .name = "vc1_mmal", .type = AVMEDIA_TYPE_VIDEO, @@ -834,4 +844,5 @@ static const AVOption options[]={ FFMMAL_DEC(h264, AV_CODEC_ID_H264) FFMMAL_DEC(mpeg2, AV_CODEC_ID_MPEG2VIDEO) +FFMMAL_DEC(mpeg4, AV_CODEC_ID_MPEG4) FFMMAL_DEC(vc1, AV_CODEC_ID_VC1) |