[vlc-devel] [PATCH] omxil: Limit input buffer size for qdsp6

XilasZ xilasz at gmail.com
Tue Oct 11 11:14:20 CEST 2011


i confirm it is needed at least for the HTC Desire.

On Tue, Oct 11, 2011 at 10:34 AM, Martin Storsjö <martin at martin.st> wrote:

> From: Ming Hu <tewilove at gmail.com>
>
> This fixes trac ticket 5393.
> ---
>
> This is not nice, but needed with the current buffer size
> allocation strategy in the omxil module.
>
> Currently, input buffers are allocated as 2*width*height
> bytes, which is too much for this decoder at high resolutions.
>
>  modules/codec/omxil/omxil.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
> index 3bbf5a0..717a99a 100644
> --- a/modules/codec/omxil/omxil.c
> +++ b/modules/codec/omxil/omxil.c
> @@ -264,6 +264,16 @@ static OMX_ERRORTYPE
> ImplementationSpecificWorkarounds(decoder_t *p_dec,
>             def->format.video.xFramerate >>= 16;
>         }
>     }
> +    else if (!strncmp(p_sys->psz_component, "OMX.qcom.video.decoder.",
> +                      strlen("OMX.qcom.video.decoder")))
> +    {
> +        /* qdsp6 refuses buffer size larger than 450K on input port */
> +        if (def->nBufferSize > 450 * 1024)
> +        {
> +            def->nBufferSize = 450 * 1024;
> +            p_port->i_frame_size = def->nBufferSize;
> +        }
> +    }
>
>     return OMX_ErrorNone;
>  }
> --
> 1.7.2.5
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111011/43c3b95d/attachment.html>


More information about the vlc-devel mailing list