X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavcodec%2Fmmaldec.c;h=c85fb4e0923776abf4a8a38316279dff158eef84;hp=718ea14021909f5d7b48748259d0353cb8584a2c;hb=ba5100ce84644923537f997dea39bf2e7b4b9c20;hpb=74beead9bd596180bcac6108548fc0a86d8eb4ae diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 718ea14021..c85fb4e092 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -2,20 +2,20 @@ * MMAL Video Decoder * Copyright (c) 2015 Rodger Combs * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -357,16 +357,19 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx) format_in = decoder->input[0]->format; format_in->type = MMAL_ES_TYPE_VIDEO; switch (avctx->codec_id) { - case AV_CODEC_ID_MPEG2VIDEO: - format_in->encoding = MMAL_ENCODING_MP2V; - break; - case AV_CODEC_ID_VC1: - format_in->encoding = MMAL_ENCODING_WVC1; - break; - case AV_CODEC_ID_H264: - default: - format_in->encoding = MMAL_ENCODING_H264; - break; + 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; + case AV_CODEC_ID_H264: + default: + format_in->encoding = MMAL_ENCODING_H264; + break; } format_in->es->video.width = FFALIGN(avctx->width, 32); format_in->es->video.height = FFALIGN(avctx->height, 16); @@ -795,6 +798,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, @@ -837,4 +847,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)