# LAME 3.101 (beta 3, May 2026) q4 patched (Visual Studio cVBR build)

This is a modified Visual Studio build of the LAME MP3 encoder.

Original LAME Project:
https://lame.sourceforge.io/

Fork:
Constrained VBR (cVBR), SIMD, and OpenMP work
by Cole Williams
https://www.lamemp3.co.uk/

## DESCRIPTION

This is the cVBR Visual Studio branch of this fork.

It extends the standard LAME encoder with:

* Constrained Variable Bitrate (cVBR) mode
* q4-related bug patch from this fork
* runtime-selected CPU-specific SIMD paths, including SSE2, AVX2, and AVX-512 where supported
* OpenMP-assisted quantization in VBR mode
* OpenMP-assisted Huffman work in ABR mode
* mpg123-based MP3 decoding support

This build is intended as the Visual Studio cVBR branch.

## FEATURES

### Constrained VBR (cVBR)

Constrained VBR is a modified VBR mode that can enforce a strict minimum bitrate
and, optionally, a maximum bitrate.

This is useful for compatibility targets, streaming constraints, bitrate floors,
or any situation where normal VBR behavior is too free to drop below a chosen
minimum.

### Difference from standard LAME -F option

The standard -F option in LAME does NOT enforce a hard minimum bitrate.

-F only biases the encoder toward higher bitrates during VBR encoding. The
encoder may still select lower bitrate frames when it determines that they are
sufficient.

The --vbr-min-strict option enforces a hard minimum bitrate.

When --vbr-min-strict is enabled, any frame that would be encoded below the
bitrate specified with -b is clamped to that minimum. No frames will be encoded
below the configured bitrate.

In short:

-F                  -> suggestion (soft constraint)
--vbr-min-strict    -> rule (hard constraint)

### q4 Bug Patch

This build includes a q4-related bug fix from this fork.

The patch is intended to correct behavior in the affected VBR path and should
not be treated as a separate preset, quality mode, or compatibility option.

### MP3 Decoding Support

This Visual Studio build includes MP3 decoding support through mpg123.

mpg123 is statically linked into the executable/build output. A separate
libmpg123-0.dll is not required for --decode support.

Decode example:

lame --decode input.mp3 output.wav

### SIMD / CPU Notes

This Visual Studio cVBRb build includes runtime-selected CPU-specific SIMD paths.

Depending on the executable provided and the CPU feature support available at
runtime, supported paths may include:

* SSE2
* AVX2
* AVX-512

The AVX2 and AVX-512 paths are selected only when the build and host CPU support
them. On systems without the required CPU features, the build should fall back to
the available supported path.

The SIMD paths are intended to improve performance in selected hot paths. They
should not be interpreted as changing the meaning of the command-line options or
as separate quality modes.

### OpenMP Notes

This build uses OpenMP to assist performance in selected quantization work.

OpenMP support may introduce an additional runtime dependency depending on the
compiler and runtime used to build the executable. Keep any required OpenMP
runtime DLLs beside the executable if they are listed as dependencies.

## USAGE

Standard LAME options are supported.

Additional cVBR options:

--vbr-min-strict
Enables constrained VBR mode with a strict minimum bitrate.
The minimum bitrate is set with -b.

--vbr-max <bitrate>
Sets the maximum allowed bitrate for constrained VBR mode.

Example:

lame -V0 -b 192 --vbr-min-strict --vbr-max 320 input.wav output.mp3

In this example, VBR encoding is constrained between 192 kbps and 320 kbps.

Decode example:

lame --decode input.mp3 output.wav

## BUILD INFORMATION

### Windows Visual Studio

This package is built with Microsoft Visual Studio.

The build may be provided in:

* x86 / 32-bit
* x64 / 64-bit

This Visual Studio cVBR build includes:

* statically linked mpg123 decoding support
* runtime-selected SIMD paths, including SSE2, AVX2, and AVX-512 where supported

Because mpg123 is statically linked, no separate libmpg123-0.dll is required.

### Dependency Notes

To check runtime DLL dependencies, use:

dumpbin /dependents lame.exe

or, with MinGW tools:

objdump -p lame.exe | grep "DLL Name"

If an OpenMP runtime DLL is listed, it must be distributed beside the executable.

## LICENSE

LAME is distributed under the GNU Lesser General Public License (LGPL).

mpg123 is distributed under the GNU Lesser General Public License (LGPL).
This build links mpg123 for MP3 decoding support.

See COPYING and the relevant dependency licenses for details.

## DISCLAIMER

This is an unofficial build of LAME with additional features.
It is not affiliated with or endorsed by the original LAME project.

---

Cole Williams
https://www.lamemp3.co.uk/
