[FFmpeg-devel] [PATCH] avcodec/mmaldec: use zero-copy for AV_PIX_FMT_MMAL
Wang Bin
wbsecg1 at gmail.com
Thu Nov 2 10:45:47 EET 2017
获取 Outlook for Android<https://aka.ms/ghei36>
发件人: Wang Bin
发送时间: 11月2日星期四 16:40
主题: Re: [FFmpeg-devel] [PATCH] avcodec/mmaldec: use zero-copy for AV_PIX_FMT_MMAL
收件人: FFmpeg development discussions and patches
获取 Outlook for Android<https://aka.ms/ghei36>
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> on behalf of wm4 <nfxjfg at googlemail.com>
Sent: Monday, September 4, 2017 6:04:22 PM
To: ffmpeg-devel at ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mmaldec: use zero-copy for AV_PIX_FMT_MMAL
On Sun, 3 Sep 2017 15:44:36 +0300
Yevhen Kyriukha <kirgene at gmail.com> wrote:
> Signed-off-by: Yevhen Kyriukha <kirgene at gmail.com>
> ---
> libavcodec/mmaldec.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
> index 0b1195dc3e..19ca6ce7e7 100644
> --- a/libavcodec/mmaldec.c
> +++ b/libavcodec/mmaldec.c
> @@ -295,6 +295,8 @@ static int ffmal_update_format(AVCodecContext *avctx)
> goto fail;
>
> if (avctx->pix_fmt == AV_PIX_FMT_MMAL) {
> + if ((status = mmal_port_parameter_set_boolean(decoder->output[0], MMAL_PARAMETER_ZERO_COPY, 1)))
> + goto fail;
> format_out->encoding = MMAL_ENCODING_OPAQUE;
> } else {
> format_out->encoding_variant = format_out->encoding = MMAL_ENCODING_I420;
> @@ -332,7 +334,8 @@ static int ffmal_update_format(AVCodecContext *avctx)
> FFMAX(decoder->output[0]->buffer_size_min, decoder->output[0]->buffer_size_recommended);
> decoder->output[0]->buffer_num =
> FFMAX(decoder->output[0]->buffer_num_min, decoder->output[0]->buffer_num_recommended) + ctx->extra_buffers;
> - ctx->pool_out->pool = mmal_pool_create(decoder->output[0]->buffer_num,
> + ctx->pool_out->pool = mmal_port_pool_create(decoder->output[0],
> + decoder->output[0]->buffer_num,
> decoder->output[0]->buffer_size);
> if (!ctx->pool_out->pool) {
> ret = AVERROR(ENOMEM);
Why the change, and what are the implications? (The commit message
should contain this.)
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list