Closed Bug 829724 Opened 7 years ago Closed 7 years ago

fix resampler returning short buffers

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: rillian, Assigned: rillian)

References

Details

Attachments

(1 file)

In Bug 792263 comment 24, ehsan complained that the speex resampler sometimes fails to return the requested number of samples. Jean-Marc said there was a bug which could cause this, which was fixed in the fork included with opus-tools.

This bug is about applying that fix to the version in the mozilla tree.
The libspeex_resampler says it pulled the version from speex.git commit a6d05eb5.

Fix is apparently https://git.xiph.org/?p=opus-tools.git;a=commitdiff;h=5adadc5
The opus-tools version has some other changes as well, These don't look important:

- s/sinc/sinct/ (avoid symbol confict)
- unused variable warning fix on j with OVERRIDE_INNER_PRODUCT_SINGLE
- correct sizeof to patch cast in allocations
- s/EXPORT/SPX_RESAMPLE_EXPORT/

However, the sse fix in https://git.xiph.org/?p=opus-tools.git;a=commitdiff;h=f426ab52 looks important. I'm not sure if we use SSE on any of our builds.
(In reply to comment #1)
> The libspeex_resampler says it pulled the version from speex.git commit
> a6d05eb5.
> 
> Fix is apparently https://git.xiph.org/?p=opus-tools.git;a=commitdiff;h=5adadc5

So can I just apply that patch to the mozilla tree?
(In reply to comment #1)
> The libspeex_resampler says it pulled the version from speex.git commit
> a6d05eb5.
> 
> Fix is apparently https://git.xiph.org/?p=opus-tools.git;a=commitdiff;h=5adadc5

Hmm, I don't think this will fix the issue that I'm seeing, as I'm not using the interleaved resampling functions.
Yes, the patch applies to the mozilla version. Of course it should go through the update script since it hasn't landed in our upstream, as in the attached patch.
Assignee: nobody → giles
Attachment #701323 - Flags: review?(paul)
Attachment #701323 - Flags: review?(kinetik)
OK, but like I said it won't fix the problem that I'm seeing.

Here's some debugging output of my resampling code (note how the number of consumed and output samples are smaller than the ones requested):

Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4058
Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4055
Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4058
Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4055
Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4058
Resampling, inSamples 1024 -> 1023, outSamples 4058 -> 4055
Attachment #701323 - Flags: review?(kinetik) → review+
Attachment #701323 - Flags: review?(paul) → review+
Thanks.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/79addb03eb86
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.