[FFmpeg-devel] [PATCH] swr: handle 64bit overflow check in multiple_resample().

Ronald S. Bultje rsbultje at gmail.com
Mon Jun 9 15:49:28 CEST 2014


Hi Michael,

On Mon, Jun 9, 2014 at 9:33 AM, Michael Niedermayer <michaelni at gmx.at>
wrote:

> On Mon, Jun 09, 2014 at 08:09:49AM -0400, Ronald S. Bultje wrote:
> > ---
> >  libswresample/resample.c          | 2 ++
> >  libswresample/resample_template.c | 3 +--
> >  2 files changed, 3 insertions(+), 2 deletions(-)
>
> fixed overflow due to int vs int64
>
> applied
>
> thanks


Thanks.

So that leaves the index<0 handling that I'd like to move out of the
dsp'able portion of the function, any preference on what approach to take?
I can either shortcut the } else { .. } portion of the function to
recursively call swri_resample for the portion of the input buffer where
index >= 0 (and then the else clause itself contains no dsp code anymore),
or I can extend the input buffer to duplicate/inverse the input for the
cases where index < 0. This is probably slightly faster because then we'll
use dsp code for the "index < 0" case also (because inside swri_resample,
index is no longer < 0), except for the inverse/extend operation (although
we could write that with pshufb, but it's probably not worth it).

Ronald


More information about the ffmpeg-devel mailing list