[FFmpeg-cvslog] mmaldec: support MPEG-4

wm4 git at videolan.org
Thu Jan 28 17:27:19 CET 2016


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Thu Jan 28 17:24:40 2016 +0100| [7b1b53f3a4569343dee1f0e2493b7cf3aa45731a] | committer: wm4

mmaldec: support MPEG-4

I guess this means part 2 in both cases. Not sure which profiles exactly
are actually supported properly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b1b53f3a4569343dee1f0e2493b7cf3aa45731a
---

 configure              |    3 +++
 libavcodec/allcodecs.c |    2 ++
 libavcodec/mmaldec.c   |   11 +++++++++++
 3 files changed, 16 insertions(+)

diff --git a/configure b/configure
index 52ac0a7..60c9402 100755
--- a/configure
+++ b/configure
@@ -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 d55751b..c590820 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 16e98ad..ed63394 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)



More information about the ffmpeg-cvslog mailing list