Enum H264AMFCodingType
- Namespace
- VisioForge.Core.Types.FFMPEGEXE
- Assembly
- VisioForge.Core.dll
Represents the entropy coding method for H.264 AMF (AMD Media Framework) encoder.
public enum H264AMFCodingTypeFields
Auto = 0-
Automatic selection based on profile and level.
Lets the AMF encoder choose the optimal entropy coding method based on:
- Selected H.264 profile (Baseline uses CAVLC, Main/High use CABAC)
- Target device compatibility requirements
- Performance considerations
This is the recommended setting for most use cases as it ensures correct profile compliance and optimal performance.
FFMPEG: -coder 0 (or omit the parameter)
CAVLC = 2-
Context Adaptive Variable-Length Coding (lower complexity, faster).
CAVLC is the simpler entropy coding method in H.264:
- Lower computational complexity (faster encoding/decoding)
- 5-10% less compression efficiency compared to CABAC
- Required for Baseline Profile compatibility
- Better for low-power devices and real-time applications
Use cases:
- Mobile device compatibility (older smartphones)
- Low-latency streaming applications
- When Baseline Profile is required
- Embedded systems with limited processing power
FFMPEG: -coder 2
Note: CAVLC is the only option for Baseline Profile. Using CABAC will automatically upgrade the stream to Main Profile.
CABAC = 1-
Context Adaptive Binary Arithmetic Coding (higher efficiency, slower).
CABAC is the more advanced entropy coding method in H.264:
- 5-15% better compression than CAVLC
- Higher computational complexity
- Required for Main and High Profiles
- Standard for broadcast and high-quality streaming
Technical details:
- Uses binary arithmetic coding with context modeling
- Adapts probability models based on previously coded symbols
- More efficient for high-bitrate and high-quality content
Use cases:
- Broadcast television (ATSC, DVB)
- Blu-ray disc authoring
- High-quality streaming services
- VOD content where decode complexity is not critical
FFMPEG: -coder 1
Note: Not supported in Baseline Profile. Most modern devices support CABAC decoding efficiently in hardware.
Remarks
Entropy coding is the final compression stage in H.264 encoding where the quantized coefficients and motion vectors are converted to a bitstream. The choice of entropy coder affects compression efficiency, encoding speed, and compatibility with different H.264 profiles.
AMF is AMD's hardware acceleration framework that leverages AMD GPUs (Radeon RX 400 series and newer) for video encoding via Video Coding Engine (VCE). In FFMPEG, this is accessed through the h264_amf encoder.
FFMPEG usage: -c:v h264_amf -coder [0|1|2]