[FFmpeg-devel] [PATCH] swr: handle 64bit overflow check in multiple_resample().
Michael Niedermayer
michaelni at gmx.at
Mon Jun 9 17:06:51 CEST 2014
On Mon, Jun 09, 2014 at 09:49:28AM -0400, Ronald S. Bultje wrote:
> 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).
use whatever feels cleanest/fastest/best to you
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140609/5be0c533/attachment.asc>
More information about the ffmpeg-devel
mailing list