Skip to content

Releases: gen2brain/mpeg

Release v0.6.0

Choose a tag to compare

@gen2brain gen2brain released this 19 Jun 14:56
a6c5475

This release adds SIMD-accelerated audio decoding and fixes a motion-compensation rounding bug on arm64.

  • Add SSE2, AVX2, and NEON implementations of the audio synthesis filter
  • Fix incorrect rounding in the arm64 NEON copyMacroblock
  • Consolidate and clean the SSE2/AVX2/NEON copyMacroblock
  • Rewrite the pure-Go (noasm) fallback with SWAR, processing 8 bytes per operation

Audio decoding is ~3x faster on both amd64 and arm64.

goos: linux
goarch: amd64
pkg: github.com/gen2brain/mpeg
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz

benchmark                  old ns/op     new ns/op     delta
BenchmarkDecodeAudio-8     45920         14250         -68.97%


goos: linux
goarch: arm64
pkg: github.com/gen2brain/mpeg

benchmark                  old ns/op     new ns/op     delta
BenchmarkDecodeAudio-4     796000        262000        -67.08%

Release v0.5.0

Choose a tag to compare

@gen2brain gen2brain released this 11 Aug 19:14
5503c39

This release brings performance optimizations to both audio and video decoders.

  • Add SSE2 and AVX2 implementation of copyMacroblock function
  • Add NEON implementation of copyMacroblock function
  • Use fixed-size arrays instead of slices, pass a pointer to the IDCT functions
goos: linux
goarch: amd64
pkg: github.com/gen2brain/mpeg
cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz

benchmark                  old ns/op     new ns/op     delta
BenchmarkDecodeVideo-8     143255        63948         -55.36%
BenchmarkDecodeAudio-8     86181         40183         -53.37%

benchmark                  old bytes     new bytes     delta
BenchmarkDecodeVideo-8     142           62            -56.34%
BenchmarkDecodeAudio-8     87            38            -56.32%


goos: linux
goarch: arm64
pkg: github.com/gen2brain/mpeg

benchmark                  old ns/op     new ns/op     delta
BenchmarkDecodeVideo-4     1177465       623755        -47.03%
BenchmarkDecodeAudio-4     1272192       795826        -37.44%

benchmark                  old bytes     new bytes     delta
BenchmarkDecodeVideo-4     1205          624           -48.22%
BenchmarkDecodeAudio-4     1272          806           -36.64%